[Groonga-commit] groonga/grafana-datasource-plugin-groonga at b0a23e8 [master] Add query editor skeleton

Back to archive index

Masafumi Yokoyama null+****@clear*****
Mon Feb 8 23:53:49 JST 2016


Masafumi Yokoyama	2016-02-08 23:53:49 +0900 (Mon, 08 Feb 2016)

  New Revision: b0a23e8368e7f91eec5d50520fdfcdc52010b296
  https://github.com/groonga/grafana-datasource-plugin-groonga/commit/b0a23e8368e7f91eec5d50520fdfcdc52010b296

  Message:
    Add query editor skeleton

  Added files:
    directives.js
    partials/query.editor.html
    query_ctrl.js
  Modified files:
    datasource.js

  Modified: datasource.js (+3 -1)
===================================================================
--- datasource.js    2016-02-08 22:48:58 +0900 (3ed767d)
+++ datasource.js    2016-02-08 23:53:49 +0900 (8816894)
@@ -1,5 +1,7 @@
 define([
-  'angular'
+  'angular',
+  './directives',
+  './query_ctrl'
 ],
 function (angular) {
   'use strict';

  Added: directives.js (+16 -0) 100644
===================================================================
--- /dev/null
+++ directives.js    2016-02-08 23:53:49 +0900 (bc6ba6c)
@@ -0,0 +1,16 @@
+define([
+  'angular'
+],
+function (angular) {
+  'use strict';
+
+  var module = angular.module('grafana.directives');
+
+  module.directive('metricQueryEditorGroonga', function() {
+    return {
+      controller: 'GroongaQueryCtrl',
+      templateUrl: 'app/plugins/datasource/groonga/partials/query.editor.html'
+    };
+  });
+
+});

  Added: partials/query.editor.html (+26 -0) 100644
===================================================================
--- /dev/null
+++ partials/query.editor.html    2016-02-08 23:53:49 +0900 (c4f5667)
@@ -0,0 +1,26 @@
+<div class="editor-row">
+  <div ng-repeat="target in panel.targets"
+       class="tight-form-container"
+       ng-class="{'tight-form-disabled': target.hide}"
+       ng-controller="GroongaQueryCtrl"
+       ng-init="init()">
+    <div class="tight-form">
+      <ul class="tight-form-list">
+        <li class="tight-form-item query-keyword"
+            style="width: 75px">
+          TABLE
+        </li>
+        <li>
+          <input type="text"
+                 class="tight-form-input input-medium"
+                 ng-model="table"
+                 ng-model-onblur
+                 ng-change="get_data()"
+                 spellcheck='false'
+                 placeholder="Logs">
+        </li>
+      </ul>
+      <div class="clearfix"></div>
+    </div>
+  </div>
+</div>

  Added: query_ctrl.js (+15 -0) 100644
===================================================================
--- /dev/null
+++ query_ctrl.js    2016-02-08 23:53:49 +0900 (d556571)
@@ -0,0 +1,15 @@
+define([
+  'angular'
+],
+function (angular) {
+  'use strict';
+
+  var module = angular.module('grafana.controllers');
+
+  module.controller('GroongaQueryCtrl', function ($scope) {
+
+    $scope.init = function () {
+    };
+
+  });
+});
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index