mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-11 10:25:52 +02:00
refactor: notification module
This commit is contained in:
parent
34fa4eb204
commit
ab46d1de7e
41 changed files with 3989 additions and 2411 deletions
|
@ -86,14 +86,14 @@ func syncSave(name string, content string) {
|
|||
}).
|
||||
Post(fmt.Sprintf("/api/streams/%s", name))
|
||||
if err != nil {
|
||||
notification.Error("Save Remote Stream Error", err.Error())
|
||||
notification.Error("Save Remote Stream Error", err.Error(), nil)
|
||||
return
|
||||
}
|
||||
if resp.StatusCode() != http.StatusOK {
|
||||
notification.Error("Save Remote Stream Error", NewSyncResult(node.Name, name, resp).String())
|
||||
notification.Error("Save Remote Stream Error", "Save stream %{name} to %{node} failed", NewSyncResult(node.Name, name, resp))
|
||||
return
|
||||
}
|
||||
notification.Success("Save Remote Stream Success", NewSyncResult(node.Name, name, resp).String())
|
||||
notification.Success("Save Remote Stream Success", "Save stream %{name} to %{node} successfully", NewSyncResult(node.Name, name, resp))
|
||||
|
||||
// Check if the site is enabled, if so then enable it on the remote node
|
||||
enabledConfigFilePath := nginx.GetConfPath("streams-enabled", name)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue