mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Import and typescript fixups
This commit is contained in:
parent
1e6e89121c
commit
d338b7ea7b
@ -4,7 +4,7 @@ const INTERVAL = 150;
|
||||
|
||||
export default class ElapsedTime extends PureComponent<any, any> {
|
||||
offset: number;
|
||||
timer: NodeJS.Timer;
|
||||
timer: number;
|
||||
|
||||
state = {
|
||||
elapsed: 0,
|
||||
@ -12,7 +12,7 @@ export default class ElapsedTime extends PureComponent<any, any> {
|
||||
|
||||
start() {
|
||||
this.offset = Date.now();
|
||||
this.timer = setInterval(this.tick, INTERVAL);
|
||||
this.timer = window.setInterval(this.tick, INTERVAL);
|
||||
}
|
||||
|
||||
tick = () => {
|
||||
|
@ -21,8 +21,12 @@ export function reactContainer($route, $location, backendSrv: BackendSrv, dataso
|
||||
restrict: 'E',
|
||||
template: '',
|
||||
link(scope, elem) {
|
||||
let component = $route.current.locals.component.default;
|
||||
let props = {
|
||||
let component = $route.current.locals.component;
|
||||
// Dynamic imports return whole module, need to extract default export
|
||||
if (component.default) {
|
||||
component = component.default;
|
||||
}
|
||||
const props = {
|
||||
backendSrv: backendSrv,
|
||||
datasourceSrv: datasourceSrv,
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user