mirror of https://github.com/statping/statping
fixed message notify time - added messages to export json settings
parent
76d56d5856
commit
3e433ea8bf
2
Makefile
2
Makefile
|
@ -1,4 +1,4 @@
|
||||||
VERSION=0.79.88
|
VERSION=0.79.89
|
||||||
BINARY_NAME=statup
|
BINARY_NAME=statup
|
||||||
GOPATH:=$(GOPATH)
|
GOPATH:=$(GOPATH)
|
||||||
GOCMD=go
|
GOCMD=go
|
||||||
|
|
|
@ -48,7 +48,7 @@ func ExportChartsJs() string {
|
||||||
type ExportData struct {
|
type ExportData struct {
|
||||||
Core *types.Core `json:"core"`
|
Core *types.Core `json:"core"`
|
||||||
Services []types.ServiceInterface `json:"services"`
|
Services []types.ServiceInterface `json:"services"`
|
||||||
Messages []*types.Message `json:"messages"`
|
Messages []*Message `json:"messages"`
|
||||||
Checkins []*Checkin `json:"checkins"`
|
Checkins []*Checkin `json:"checkins"`
|
||||||
Users []*User `json:"users"`
|
Users []*User `json:"users"`
|
||||||
Notifiers []types.AllNotifiers `json:"notifiers"`
|
Notifiers []types.AllNotifiers `json:"notifiers"`
|
||||||
|
@ -56,6 +56,7 @@ type ExportData struct {
|
||||||
|
|
||||||
func ExportSettings() ([]byte, error) {
|
func ExportSettings() ([]byte, error) {
|
||||||
users, err := SelectAllUsers()
|
users, err := SelectAllUsers()
|
||||||
|
messages, err := SelectMessages()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
@ -65,6 +66,7 @@ func ExportSettings() ([]byte, error) {
|
||||||
Checkins: AllCheckins(),
|
Checkins: AllCheckins(),
|
||||||
Users: users,
|
Users: users,
|
||||||
Services: CoreApp.Services,
|
Services: CoreApp.Services,
|
||||||
|
Messages: messages,
|
||||||
}
|
}
|
||||||
export, err := json.Marshal(data)
|
export, err := json.Marshal(data)
|
||||||
return export, err
|
return export, err
|
||||||
|
|
|
@ -60,11 +60,11 @@
|
||||||
<label for="notify_before" class="col-sm-4 col-form-label">Notify Before</label>
|
<label for="notify_before" class="col-sm-4 col-form-label">Notify Before</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<div class="form-inline">
|
<div class="form-inline">
|
||||||
<input type="number" name="notify_before_scale" class="col-4 form-control" id="notify_before" value="{{.NotifyBefore.Int64}}" >
|
<input type="number" name="notify_before" class="col-4 form-control" id="notify_before" value="{{.NotifyBefore.Int64}}">
|
||||||
<select class="ml-2 col-7 form-control" name="notify_before_scale" id="notify_before_scale">
|
<select class="ml-2 col-7 form-control" name="notify_before_scale" id="notify_before_scale">
|
||||||
<option value="minute"{{if ne .Id 0}} selected{{end}}>Minutes</option>
|
<option value="minute"{{if ne .Id 0}} selected{{else}}{{if eq .NotifyBeforeScale "minute"}}selected{{end}}{{end}}>Minutes</option>
|
||||||
<option value="hour">Hours</option>
|
<option value="hour"{{if eq .NotifyBeforeScale "hour"}} selected{{end}}>Hours</option>
|
||||||
<option value="day">Days</option>
|
<option value="day"{{if eq .NotifyBeforeScale "day"}} selected{{end}}>Days</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue