DashboardSettings: Fixed modal issue (#23155)

Fixes #23148
This commit is contained in:
Torkel Ödegaard 2020-03-28 07:51:15 +01:00 committed by GitHub
parent f2337c9855
commit 366aa6b5d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 96 additions and 102 deletions

View File

@ -319,11 +319,7 @@ export class DashboardPage extends PureComponent<Props, State> {
<PanelEditor dashboard={dashboard} sourcePanel={editPanel} /> <PanelEditor dashboard={dashboard} sourcePanel={editPanel} />
</Portal> </Portal>
)} )}
{editview && ( {editview && <DashboardSettings dashboard={dashboard} updateLocation={updateLocation} />}
<Portal>
<DashboardSettings dashboard={dashboard} updateLocation={updateLocation} />
</Portal>
)}
</div> </div>
); );
} }

View File

@ -667,106 +667,104 @@ exports[`DashboardPage When dashboard has editview url state should render setti
</div> </div>
</CustomScrollbar> </CustomScrollbar>
</div> </div>
<Portal> <DashboardSettings
<DashboardSettings dashboard={
dashboard={ DashboardModel {
DashboardModel { "annotations": Object {
"annotations": Object { "list": Array [
"list": Array [ Object {
Object { "builtIn": 1,
"builtIn": 1, "datasource": "-- Grafana --",
"datasource": "-- Grafana --", "enable": true,
"enable": true, "hide": true,
"hide": true, "iconColor": "rgba(0, 211, 255, 1)",
"iconColor": "rgba(0, 211, 255, 1)", "name": "Annotations & Alerts",
"name": "Annotations & Alerts", "type": "dashboard",
"type": "dashboard",
},
],
},
"autoUpdate": undefined,
"description": undefined,
"editable": true,
"events": Emitter {
"emitter": EventEmitter {
"_events": Object {},
"_eventsCount": 0,
},
},
"getVariables": [Function],
"gnetId": null,
"graphTooltip": 0,
"id": null,
"links": Array [],
"meta": Object {
"canEdit": true,
"canMakeEditable": false,
"canSave": true,
"canShare": true,
"canStar": true,
"fullscreen": false,
"isEditing": false,
"showSettings": true,
},
"originalTemplating": Array [],
"originalTime": Object {
"from": "now-6h",
"to": "now",
},
"panels": Array [
PanelModel {
"cachedPluginOptions": Object {},
"datasource": null,
"events": Emitter {
"emitter": EventEmitter {
"_events": Object {},
"_eventsCount": 0,
},
},
"gridPos": Object {
"h": 1,
"w": 1,
"x": 0,
"y": 0,
},
"id": 1,
"options": Object {},
"replaceVariables": [Function],
"targets": Array [
Object {
"refId": "A",
},
],
"title": "My graph",
"transparent": false,
"type": "graph",
}, },
], ],
"refresh": undefined, },
"revision": undefined, "autoUpdate": undefined,
"schemaVersion": 22, "description": undefined,
"snapshot": undefined, "editable": true,
"style": "dark", "events": Emitter {
"tags": Array [], "emitter": EventEmitter {
"templating": Object { "_events": Object {},
"list": Array [], "_eventsCount": 0,
}, },
"time": Object { },
"from": "now-6h", "getVariables": [Function],
"to": "now", "gnetId": null,
"graphTooltip": 0,
"id": null,
"links": Array [],
"meta": Object {
"canEdit": true,
"canMakeEditable": false,
"canSave": true,
"canShare": true,
"canStar": true,
"fullscreen": false,
"isEditing": false,
"showSettings": true,
},
"originalTemplating": Array [],
"originalTime": Object {
"from": "now-6h",
"to": "now",
},
"panels": Array [
PanelModel {
"cachedPluginOptions": Object {},
"datasource": null,
"events": Emitter {
"emitter": EventEmitter {
"_events": Object {},
"_eventsCount": 0,
},
},
"gridPos": Object {
"h": 1,
"w": 1,
"x": 0,
"y": 0,
},
"id": 1,
"options": Object {},
"replaceVariables": [Function],
"targets": Array [
Object {
"refId": "A",
},
],
"title": "My graph",
"transparent": false,
"type": "graph",
}, },
"timepicker": Object {}, ],
"timezone": "", "refresh": undefined,
"title": "My dashboard", "revision": undefined,
"uid": null, "schemaVersion": 22,
"variables": Object { "snapshot": undefined,
"list": Array [], "style": "dark",
}, "tags": Array [],
"version": 0, "templating": Object {
} "list": Array [],
},
"time": Object {
"from": "now-6h",
"to": "now",
},
"timepicker": Object {},
"timezone": "",
"title": "My dashboard",
"uid": null,
"variables": Object {
"list": Array [],
},
"version": 0,
} }
updateLocation={[MockFunction]} }
/> updateLocation={[MockFunction]}
</Portal> />
</div> </div>
`; `;

View File

@ -6,7 +6,7 @@
left: 0; left: 0;
right: 0; right: 0;
bottom: 0; bottom: 0;
z-index: $zindex-modal; z-index: $zindex-sidemenu;
background: $body-bg; background: $body-bg;
display: flex; display: flex;
flex-direction: column; flex-direction: column;