Fix error handling

This commit is contained in:
cuigh 2018-04-12 11:34:04 +08:00
parent 4e698446e8
commit db4311f669

View File

@ -311,11 +311,16 @@ func serviceStats(ctx web.Context) error {
if dashboard, err = biz.Chart.GetDashboard("service", name); err != nil {
return err
}
if dashboard == nil {
charts, err = biz.Chart.GetServiceCharts(name)
} else {
charts, err = biz.Chart.GetDashboardCharts(dashboard)
}
if err != nil {
return err
}
}
period := cast.ToDuration(ctx.Q("time"), time.Hour)