plugin change: make interval, cache timeout & max data points options in plugin.json, remove query.options component feature, add help markdown feature and toggle for data sources

This commit is contained in:
Torkel Ödegaard
2017-08-31 14:05:52 +02:00
parent 9b60a63778
commit 84d4958a3c
15 changed files with 231 additions and 75 deletions

View File

@@ -3,6 +3,7 @@
import angular from 'angular';
import _ from 'lodash';
import appEvents from 'app/core/app_events';
import Remarkable from 'remarkable';
export class PluginEditCtrl {
model: any;
@@ -67,11 +68,9 @@ export class PluginEditCtrl {
}
initReadme() {
return this.backendSrv.get(`/api/plugins/${this.pluginId}/readme`).then(res => {
return System.import('remarkable').then(Remarkable => {
var md = new Remarkable();
this.readmeHtml = this.$sce.trustAsHtml(md.render(res));
});
return this.backendSrv.get(`/api/plugins/${this.pluginId}/markdown/readme`).then(res => {
var md = new Remarkable();
this.readmeHtml = this.$sce.trustAsHtml(md.render(res));
});
}