mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
dashboardgrid: disable dynamic_dashboard_srv for now
The row concept is probably going to change a lot so disabling the repeating panels and repeating rows code and tests for now.
This commit is contained in:
parent
3a089dd04c
commit
5272dd6605
@ -27,46 +27,48 @@ export class DynamicDashboardSrv {
|
|||||||
var cleanUpOnly = options.cleanUpOnly;
|
var cleanUpOnly = options.cleanUpOnly;
|
||||||
var i, j, row, panel;
|
var i, j, row, panel;
|
||||||
|
|
||||||
// cleanup scopedVars
|
if (this.dashboard.rows) {
|
||||||
for (i = 0; i < this.dashboard.rows.length; i++) {
|
// cleanup scopedVars
|
||||||
row = this.dashboard.rows[i];
|
for (i = 0; i < this.dashboard.rows.length; i++) {
|
||||||
delete row.scopedVars;
|
row = this.dashboard.rows[i];
|
||||||
|
delete row.scopedVars;
|
||||||
|
|
||||||
for (j = 0; j < row.panels.length; j++) {
|
for (j = 0; j < row.panels.length; j++) {
|
||||||
delete row.panels[j].scopedVars;
|
delete row.panels[j].scopedVars;
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for (i = 0; i < this.dashboard.rows.length; i++) {
|
|
||||||
row = this.dashboard.rows[i];
|
|
||||||
|
|
||||||
// handle row repeats
|
|
||||||
if (row.repeat) {
|
|
||||||
if (!cleanUpOnly) {
|
|
||||||
this.repeatRow(row, i);
|
|
||||||
}
|
}
|
||||||
} else if (row.repeatRowId && row.repeatIteration !== this.iteration) {
|
|
||||||
// clean up old left overs
|
|
||||||
this.dashboard.removeRow(row, true);
|
|
||||||
i = i - 1;
|
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// repeat panels
|
for (i = 0; i < this.dashboard.rows.length; i++) {
|
||||||
for (j = 0; j < row.panels.length; j++) {
|
row = this.dashboard.rows[i];
|
||||||
panel = row.panels[j];
|
|
||||||
if (panel.repeat) {
|
// handle row repeats
|
||||||
|
if (row.repeat) {
|
||||||
if (!cleanUpOnly) {
|
if (!cleanUpOnly) {
|
||||||
this.repeatPanel(panel, row);
|
this.repeatRow(row, i);
|
||||||
}
|
}
|
||||||
} else if (panel.repeatPanelId && panel.repeatIteration !== this.iteration) {
|
} else if (row.repeatRowId && row.repeatIteration !== this.iteration) {
|
||||||
// clean up old left overs
|
// clean up old left overs
|
||||||
row.panels = _.without(row.panels, panel);
|
this.dashboard.removeRow(row, true);
|
||||||
j = j - 1;
|
i = i - 1;
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
row.panelSpanChanged();
|
// repeat panels
|
||||||
|
for (j = 0; j < row.panels.length; j++) {
|
||||||
|
panel = row.panels[j];
|
||||||
|
if (panel.repeat) {
|
||||||
|
if (!cleanUpOnly) {
|
||||||
|
this.repeatPanel(panel, row);
|
||||||
|
}
|
||||||
|
} else if (panel.repeatPanelId && panel.repeatIteration !== this.iteration) {
|
||||||
|
// clean up old left overs
|
||||||
|
row.panels = _.without(row.panels, panel);
|
||||||
|
j = j - 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
row.panelSpanChanged();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@ import {DynamicDashboardSrv} from '../dynamic_dashboard_srv';
|
|||||||
|
|
||||||
function dynamicDashScenario(desc, func) {
|
function dynamicDashScenario(desc, func) {
|
||||||
|
|
||||||
describe(desc, function() {
|
describe.skip(desc, function() {
|
||||||
var ctx: any = {};
|
var ctx: any = {};
|
||||||
|
|
||||||
ctx.setup = function (setupFunc) {
|
ctx.setup = function (setupFunc) {
|
||||||
|
Loading…
Reference in New Issue
Block a user