Browse Source

Initial commit

master
rozetko 6 years ago
parent
commit
0513943132
  1. 18
      src/datasource/datasource.ts
  2. 14
      src/datasource/module.ts
  3. 1
      src/datasource/partials/config.html
  4. 0
      src/datasource/partials/query_ctrl.html
  5. 6
      src/datasource/plugin.json
  6. 12
      src/datasource/query_ctrl.ts

18
src/datasource/datasource.ts

@ -0,0 +1,18 @@
export class HasticDatasource {
/** @ngInject */
constructor(public instanceSettings: any) {
}
async query(options: any) {
}
async testDatasource() {
}
metricFindQuery(options: any) {
return [];
}
}

14
src/datasource/module.ts

@ -0,0 +1,14 @@
import { HasticDatasource } from './datasource';
import { HasticQueryCtrl } from './query_ctrl';
import configTemplate from './partials/config.html';
class HasticConfigCtrl {
public static template = configTemplate;
}
export {
HasticDatasource as Datasource,
HasticConfigCtrl as ConfigCtrl,
HasticQueryCtrl as QueryCtrl
};

1
src/datasource/partials/config.html

@ -0,0 +1 @@
<datasource-http-settings current="ctrl.current" suggest-url="http://localhost:8000"/>

0
src/datasource/partials/query_ctrl.html

6
src/datasource/plugin.json

@ -0,0 +1,6 @@
{
"type": "datasource",
"name": "Hastic datasource",
"id": "corpglory-hastic-datasource",
"metrics": true
}

12
src/datasource/query_ctrl.ts

@ -0,0 +1,12 @@
import template from './partials/query_ctrl.html';
import { QueryCtrl } from 'grafana/app/plugins/sdk';
export class HasticQueryCtrl extends QueryCtrl {
static template = template;
/** @ngInject */
constructor($scope, $injector) {
super($scope, $injector);
}
}
Loading…
Cancel
Save