Annotation datasource redesign is done, Closes #608

This commit is contained in:
Torkel Ödegaard
2014-07-20 16:32:09 +02:00
parent 5ae8607771
commit 551b802d89
3 changed files with 7 additions and 2 deletions
+4
View File
@@ -42,6 +42,10 @@ function (angular, app, _) {
$scope.currentAnnotation = annotation;
$scope.currentIsNew = false;
$scope.currentDatasource = _.findWhere($scope.datasources, { name: annotation.datasource });
if (!$scope.currentDatasource) {
$scope.currentDatasource = $scope.datasources[0];
}
};
$scope.update = function() {
+1 -1
View File
@@ -27,7 +27,7 @@ function (angular, app, _) {
annotations: []
};
_.defaults($scope.panel,_d);
_.defaults($scope.panel, _d);
$scope.hide = function (annotation) {
annotation.enable = !annotation.enable;
+2 -1
View File
@@ -24,6 +24,7 @@ function (angular, _, config) {
if (!this.default) {
this.default = datasources[_.keys(datasources)[0]];
this.default.default = true;
}
};
@@ -51,7 +52,7 @@ function (angular, _, config) {
if (value.supportAnnotations) {
results.push({
name: key,
editorSrc: value.annotationEditorSrc
editorSrc: value.annotationEditorSrc,
});
}
});