-
Notifications
You must be signed in to change notification settings - Fork 257
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds support for starting dashboard
server with service start
#1472
Conversation
Outputs:
|
if viper.GetBool(constants.ArgDashboardClient) { | ||
err = dashboardserver.OpenBrowser(fmt.Sprintf("http://localhost:%d", serverPort)) | ||
if err != nil { | ||
log.Println("[TRACE] dashboard server started but failed to start client", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this be a warning not trace? or should the status message indicate this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an inconvenience rather than an ERROR or WARNING. That's why I put it on TRACE.
We still get the port in the output.
|
||
var dashboardState *dashboardserver.DashboardServiceState | ||
if viper.GetBool(constants.ArgDashboard) { | ||
serverPort := dashboardserver.ListenPort(viper.GetInt(constants.ArgDashboardPort)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
put into startDashBoardServer()
function
@@ -279,6 +320,8 @@ func runServiceRestartCmd(cmd *cobra.Command, args []string) { | |||
fmt.Println("Steampipe service is not running.") | |||
return | |||
} | |||
currentDashboardState, err := dashboardserver.GetDashboardServiceState() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
comments describing our approach to restarting dashboard server
cmd/service.go
Outdated
} else { | ||
dbState, err = db_local.GetState() | ||
if err != nil { | ||
{ // Code fold |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what does this comment mean?
dashboard/dashboardserver/service.go
Outdated
return nil | ||
} | ||
|
||
func setupDashboardServerlogSink() hclog.Logger { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
casing: setupDashboardServerLogSink
steampipe service start
Adds a
--dashboard
flag tosteampipe service start
which starts thedashboard
server with the steampipe service.Also adds support for
--dashboard-listen
and--dashboard-port
flags in theservice start
command (ignored if--dashboard
is not used).steampipe service start
starts the service only.steampipe service start --dashboard
starts the service and the dashboard serverif
steampipe service start --dashboard
is given after asteampipe service start
then only thedashboard
server is started andpostgres
is left untouchedsteampipe service stop
Stops both services if running - else stops only
postgres
andpluginmanager
--force
force stops both (individually)steampipe service restart
Restarts both (if running) else restarts only
postgres