Add emitters for install started/stopped

This commit is contained in:
Dane Everitt
2020-07-29 21:39:27 -07:00
parent f0d6f67c6b
commit 7f9ec4402a
3 changed files with 17 additions and 6 deletions

View File

@@ -36,6 +36,9 @@ func (s *Server) Install(sync bool) error {
}
}
// Send the start event so the Panel can automatically update.
s.Events().Publish(InstallStartedEvent, "")
err := s.internalInstall()
s.Log().Debug("notifying panel of server install state")
@@ -52,6 +55,10 @@ func (s *Server) Install(sync bool) error {
l.Warn("failed to notify panel of server install state")
}
// Push an event to the websocket so we can auto-refresh the information in the panel once
// the install is completed.
s.Events().Publish(InstallCompletedEvent, "")
return err
}