triggers panel multi-ds supoort: refactor

This commit is contained in:
Alexander Zobnin
2017-12-02 22:32:50 +03:00
parent 51c2185cde
commit e0064da209
11 changed files with 279 additions and 184 deletions

View File

@@ -3,6 +3,23 @@
System.register([], function (_export, _context) {
"use strict";
function migratePanelSchema(panel) {
var schemaVersion = getSchemaVersion(panel);
switch (schemaVersion) {
case 1:
panel.datasources = [panel.datasource];
panel.targets[panel.datasources[0]] = panel.triggers;
break;
}
return panel;
}
_export("migratePanelSchema", migratePanelSchema);
function getSchemaVersion(panel) {
return panel.schemaVersion || 1;
}
return {
setters: [],
execute: function () {}