AnnotationList: Adds spacing to UI (#31888)

* AnnotationList: Adds spacing to UI

* Tests: updates snapshots

* Chore: updates after PR comments
This commit is contained in:
Hugo Häggmark
2021-03-11 11:59:35 +01:00
committed by GitHub
parent d59574ec1e
commit 9f92eb6859
7 changed files with 493 additions and 70 deletions

View File

@@ -32,6 +32,7 @@ exports[`DashboardPage Dashboard init completed Should render dashboard grid 1`
"_eventsCount": 0,
},
},
"formatDate": [Function],
"getVariables": [Function],
"getVariablesFromState": [Function],
"gnetId": null,
@@ -158,6 +159,7 @@ exports[`DashboardPage Dashboard init completed Should render dashboard grid 1`
"_eventsCount": 0,
},
},
"formatDate": [Function],
"getVariables": [Function],
"getVariablesFromState": [Function],
"gnetId": null,
@@ -255,6 +257,7 @@ exports[`DashboardPage Dashboard init completed Should render dashboard grid 1`
"_eventsCount": 0,
},
},
"formatDate": [Function],
"getVariables": [Function],
"getVariablesFromState": [Function],
"gnetId": null,
@@ -408,6 +411,7 @@ exports[`DashboardPage When dashboard has editview url state should render setti
"_eventsCount": 0,
},
},
"formatDate": [Function],
"getVariables": [Function],
"getVariablesFromState": [Function],
"gnetId": null,
@@ -534,6 +538,7 @@ exports[`DashboardPage When dashboard has editview url state should render setti
"_eventsCount": 0,
},
},
"formatDate": [Function],
"getVariables": [Function],
"getVariablesFromState": [Function],
"gnetId": null,
@@ -631,6 +636,7 @@ exports[`DashboardPage When dashboard has editview url state should render setti
"_eventsCount": 0,
},
},
"formatDate": [Function],
"getVariables": [Function],
"getVariablesFromState": [Function],
"gnetId": null,
@@ -732,6 +738,7 @@ exports[`DashboardPage When dashboard has editview url state should render setti
"_eventsCount": 0,
},
},
"formatDate": [Function],
"getVariables": [Function],
"getVariablesFromState": [Function],
"gnetId": null,

View File

@@ -79,6 +79,7 @@ exports[`DashboardGrid Can render dashboard grid Should render 1`] = `
"_eventsCount": 1,
},
},
"formatDate": [Function],
"getVariables": [Function],
"getVariablesFromState": [Function],
"gnetId": null,
@@ -302,6 +303,7 @@ exports[`DashboardGrid Can render dashboard grid Should render 1`] = `
"_eventsCount": 1,
},
},
"formatDate": [Function],
"getVariables": [Function],
"getVariablesFromState": [Function],
"gnetId": null,
@@ -525,6 +527,7 @@ exports[`DashboardGrid Can render dashboard grid Should render 1`] = `
"_eventsCount": 1,
},
},
"formatDate": [Function],
"getVariables": [Function],
"getVariablesFromState": [Function],
"gnetId": null,
@@ -748,6 +751,7 @@ exports[`DashboardGrid Can render dashboard grid Should render 1`] = `
"_eventsCount": 1,
},
},
"formatDate": [Function],
"getVariables": [Function],
"getVariablesFromState": [Function],
"gnetId": null,

View File

@@ -98,6 +98,7 @@ export class DashboardModel {
panelInEdit: true,
panelInView: true,
getVariablesFromState: true,
formatDate: true,
};
constructor(data: any, meta?: DashboardMeta, private getVariablesFromState: GetVariables = getVariables) {
@@ -128,6 +129,7 @@ export class DashboardModel {
this.links = data.links || [];
this.gnetId = data.gnetId || null;
this.panels = _.map(data.panels || [], (panelData: any) => new PanelModel(panelData));
this.formatDate = this.formatDate.bind(this);
this.resetOriginalVariables(true);
this.resetOriginalTime();