mirror of https://github.com/statping/statping
JS updates - bulk import updated
parent
355e7e325b
commit
67e781925d
|
@ -163,3 +163,10 @@ Statping accepts Push Requests! Feel free to add your own features and notifiers
|
||||||
[](https://goreportcard.com/report/github.com/hunterlong/statping)
|
[](https://goreportcard.com/report/github.com/hunterlong/statping)
|
||||||
[](https://travis-ci.com/hunterlong/statping) [](https://dashboard.cypress.io/#/projects/bi8mhr/runs)
|
[](https://travis-ci.com/hunterlong/statping) [](https://dashboard.cypress.io/#/projects/bi8mhr/runs)
|
||||||
[](https://hub.docker.com/r/hunterlong/statping/builds/) [](https://godoc.org/github.com/hunterlong/statping)[](https://coveralls.io/github/hunterlong/statping?branch=master)
|
[](https://hub.docker.com/r/hunterlong/statping/builds/) [](https://godoc.org/github.com/hunterlong/statping)[](https://coveralls.io/github/hunterlong/statping?branch=master)
|
||||||
|
|
||||||
|
|
||||||
|
<p align="center">
|
||||||
|
<a href="https://www.buymeacoffee.com/hunterlong" target="_blank">
|
||||||
|
<img height="55" src="https://img.cjx.io/buy-me-redbull.png" >
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
|
|
|
@ -126,14 +126,14 @@ func bulkImportHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
newService, err := commaToService(col)
|
newService, err := commaToService(col)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
utils.Log(3, fmt.Errorf("issue with row %v: %v", i, err))
|
utils.Log(3, fmt.Errorf("issue with row %v: %v", i, err))
|
||||||
return
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
service := core.ReturnService(newService)
|
service := core.ReturnService(newService)
|
||||||
_, err = service.Create(true)
|
_, err = service.Create(true)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
utils.Log(3, fmt.Errorf("cannot create service %v: %v", col[0], err))
|
utils.Log(3, fmt.Errorf("cannot create service %v: %v", col[0], err))
|
||||||
return
|
continue
|
||||||
}
|
}
|
||||||
utils.Log(1, fmt.Sprintf("Created new service %v", service.Name))
|
utils.Log(1, fmt.Sprintf("Created new service %v", service.Name))
|
||||||
}
|
}
|
||||||
|
|
|
@ -124,7 +124,7 @@ $('select#service_type').on('change', function() {
|
||||||
$('#post_data').parent().parent().addClass('d-none');
|
$('#post_data').parent().parent().addClass('d-none');
|
||||||
$('#service_response').parent().parent().addClass('d-none');
|
$('#service_response').parent().parent().addClass('d-none');
|
||||||
$('#service_response_code').parent().parent().addClass('d-none');
|
$('#service_response_code').parent().parent().addClass('d-none');
|
||||||
$('#headers').parent().parent().removeClass('d-none');
|
$('#headers').parent().parent().addClass('d-none');
|
||||||
} else if (selected === 'icmp') {
|
} else if (selected === 'icmp') {
|
||||||
$('#service_port').parent().parent().removeClass('d-none');
|
$('#service_port').parent().parent().removeClass('d-none');
|
||||||
$('#headers').parent().parent().addClass('d-none');
|
$('#headers').parent().parent().addClass('d-none');
|
||||||
|
|
|
@ -1,2 +1,5 @@
|
||||||
name,domain,expected,expected_status,interval,type,method,post_data,port,timeout,order,allow_notifications,public,group_id,headers,permalink
|
name,domain,expected,expected_status,interval,type,method,post_data,port,timeout,order,allow_notifications,public,group_id,headers,permalink
|
||||||
Bulk Upload,http://google.com,,200,60s,http,get,,,60s,1,true,true,,Authorization=example,bulk_example
|
Bulk Upload,http://google.com,,200,60s,http,get,,,60s,1,TRUE,TRUE,,Authorization=example,bulk_example
|
||||||
|
JSON Post,https://jsonplaceholder.typicode.com/posts,,200,1m,http,post,"{""id"": 1, ""title"": 'foo', ""body"": 'bar', ""userId"": 1}",,15s,2,TRUE,TRUE,,Content-Type=application/json,json_post_example
|
||||||
|
Google DNS,8.8.8.8,,,,tcp,,,53,10s,3,TRUE,TRUE,,,google_dns_example
|
||||||
|
Google DNS UDP,8.8.8.8,,,,udp,,,53,10s,4,TRUE,TRUE,,,google_dns_udp_example
|
||||||
|
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Code generated by go generate; DO NOT EDIT.
|
// Code generated by go generate; DO NOT EDIT.
|
||||||
// This file was generated by robots at
|
// This file was generated by robots at
|
||||||
// 2019-05-14 12:39:30.867402 -0700 PDT m=+0.544240003
|
// 2019-05-14 13:40:52.036043 -0700 PDT m=+0.508533092
|
||||||
//
|
//
|
||||||
// This contains the most recently Markdown source for the Statping Wiki.
|
// This contains the most recently Markdown source for the Statping Wiki.
|
||||||
package source
|
package source
|
||||||
|
|
Loading…
Reference in New Issue