mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
feat(import): save gnetId for dashbards imported from grafana.net
This commit is contained in:
@@ -39,6 +39,7 @@ function (angular, $, _, moment) {
|
||||
this.schemaVersion = data.schemaVersion || 0;
|
||||
this.version = data.version || 0;
|
||||
this.links = data.links || [];
|
||||
this.gnetId = data.gnetId || null;
|
||||
this._updateSchema(data);
|
||||
this._initMeta(meta);
|
||||
}
|
||||
|
||||
@@ -147,10 +147,11 @@ export class DashImportCtrl {
|
||||
return this.backendSrv.get('api/gnet/dashboards/' + dashboardId).then(res => {
|
||||
this.gnetInfo = res;
|
||||
// store reference to grafana.net
|
||||
res.json.gnetId = dashboardId;
|
||||
res.json.gnetId = res.id;
|
||||
this.onUpload(res.json);
|
||||
}).catch(err => {
|
||||
this.gnetError = err.message || err;
|
||||
err.isHandled = true;
|
||||
this.gnetError = err.data.message || err;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user