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} />
</Portal>
)}
{editview && (
<Portal>
<DashboardSettings dashboard={dashboard} updateLocation={updateLocation} />
</Portal>
)}
{editview && <DashboardSettings dashboard={dashboard} updateLocation={updateLocation} />}
</div>
);
}

View File

@ -667,106 +667,104 @@ exports[`DashboardPage When dashboard has editview url state should render setti
</div>
</CustomScrollbar>
</div>
<Portal>
<DashboardSettings
dashboard={
DashboardModel {
"annotations": Object {
"list": Array [
Object {
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"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",
<DashboardSettings
dashboard={
DashboardModel {
"annotations": Object {
"list": Array [
Object {
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"type": "dashboard",
},
],
"refresh": undefined,
"revision": undefined,
"schemaVersion": 22,
"snapshot": undefined,
"style": "dark",
"tags": Array [],
"templating": Object {
"list": Array [],
},
"autoUpdate": undefined,
"description": undefined,
"editable": true,
"events": Emitter {
"emitter": EventEmitter {
"_events": Object {},
"_eventsCount": 0,
},
"time": Object {
"from": "now-6h",
"to": "now",
},
"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",
},
"timepicker": Object {},
"timezone": "",
"title": "My dashboard",
"uid": null,
"variables": Object {
"list": Array [],
},
"version": 0,
}
],
"refresh": undefined,
"revision": undefined,
"schemaVersion": 22,
"snapshot": undefined,
"style": "dark",
"tags": Array [],
"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]}
/>
</Portal>
}
updateLocation={[MockFunction]}
/>
</div>
`;

View File

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