graph: initial Add Annotation flow #1286

This commit is contained in:
Alexander Zobnin
2017-04-08 13:32:16 +03:00
parent efca9e904d
commit 32d34aed7a
6 changed files with 155 additions and 0 deletions

View File

@@ -126,6 +126,18 @@ export class AnnotationsSrv {
return this.globalAnnotationsPromise;
}
postAnnotation(annotation) {
console.log("POST /api/annotations\n", annotation);
// Not implemented yet
let implemented = false;
if (implemented) {
return this.backendSrv.post('/api/annotations', annotation);
} else {
return Promise.resolve("Not implemented");
}
}
translateQueryResult(annotation, results) {
for (var item of results) {
item.source = annotation;