diff options
Diffstat (limited to 'ui/src/controller/trace_error_controller.ts')
-rw-r--r-- | ui/src/controller/trace_error_controller.ts | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/ui/src/controller/trace_error_controller.ts b/ui/src/controller/trace_error_controller.ts index a8bb80bf8..6b6f461d1 100644 --- a/ui/src/controller/trace_error_controller.ts +++ b/ui/src/controller/trace_error_controller.ts @@ -13,9 +13,10 @@ // limitations under the License. import {Engine} from '../common/engine'; +import {NUM} from '../common/query_result'; +import {publishTraceErrors} from '../frontend/publish'; import {Controller} from './controller'; -import {globals} from './globals'; export interface TraceErrorControllerArgs { engine: Engine; @@ -32,10 +33,13 @@ export class TraceErrorController extends Controller<'main'> { return; } this.hasRun = true; - this.args.engine - .queryOneRow(`SELECT sum(value) FROM stats WHERE severity != 'info'`) + const engine = this.args.engine; + engine + .query( + `SELECT sum(value) as sumValue FROM stats WHERE severity != 'info'`) .then(result => { - globals.publish('TraceErrors', result[0]); + const errors = result.firstRow({sumValue: NUM}).sumValue; + publishTraceErrors(errors); }); } } |