From 430d7fad3084959f945cb9f80a2b4968947e1796 Mon Sep 17 00:00:00 2001 From: Rashid Khan Date: Thu, 24 Apr 2014 17:07:44 -0700 Subject: [PATCH] Simplify kibanaPanel directive, fix css that stopped overflow:scroll from working on the table panel --- src/app/dashboards/default.json | 2 +- src/app/directives/kibanaPanel.js | 5 +- src/app/panels/table/module.html | 201 +++++++++++++++--------------- src/app/partials/dashboard.html | 18 +-- 4 files changed, 114 insertions(+), 112 deletions(-) diff --git a/src/app/dashboards/default.json b/src/app/dashboards/default.json index 1f38ed88ed5a4..ae9eceef1d5aa 100644 --- a/src/app/dashboards/default.json +++ b/src/app/dashboards/default.json @@ -24,7 +24,7 @@ "rows": [ { "title": "Intro", - "height": "450px", + "height": "700px", "editable": false, "collapse": false, "collapsable": false, diff --git a/src/app/directives/kibanaPanel.js b/src/app/directives/kibanaPanel.js index f9e7fd6718ef8..610083fb5a081 100644 --- a/src/app/directives/kibanaPanel.js +++ b/src/app/directives/kibanaPanel.js @@ -66,7 +66,8 @@ function (angular,$) { '\n'+ ''; return { - restrict: 'E', + restrict: 'A', + replace: true, link: function($scope, elem, attr) { // once we have the template, scan it for controllers and // load the module.js if we have any @@ -83,7 +84,7 @@ function (angular,$) { // compile the module and uncloack. We're done function loadModule($module) { $module.appendTo(elem); - elem.wrap(container); + elem.wrapInner(container); /* jshint indent:false */ $compile(elem.contents())(newScope); elem.removeClass("ng-cloak"); diff --git a/src/app/panels/table/module.html b/src/app/panels/table/module.html index cfb426ad6a341..a182cf5065091 100644 --- a/src/app/panels/table/module.html +++ b/src/app/panels/table/module.html @@ -57,7 +57,7 @@
-
-
- -
- - - -

- - {{adhocOpts.title}} - -

- -
- - -
-
- - +
+ +
+
+

+ + {{adhocOpts.title}} + +

+
-
- {{panel.offset}} to {{panel.offset + data.slice(panel.offset,panel.offset+panel.size).length}} - of {{data.length}} available for paging -
-
- + + +
+
+ + +
+
+ {{panel.offset}} to {{panel.offset + data.slice(panel.offset,panel.offset+panel.size).length}} + of {{data.length}} available for paging +
+
+ +
-
- - - - - - - - - - - - - + + + + + + + + +
_source (select columns from the list to the left) - - - - {{field}} - - - {{field}} - -
- - -
- - View: - Table / - JSON / - Raw - + + + + - -
_source (select columns from the list to the left) + + + + {{field}} + - - - - - - - - - - - - -
FieldActionValue
- - - -
-

-              

-            
-          
-
-
- - -
-
- {{panel.offset}} to {{panel.offset + data.slice(panel.offset,panel.offset+panel.size).length}} - of {{data.length}} available for paging -
-
- + {{field}} + + + + +
+ + +
+ + View: + Table / + JSON / + Raw + + + + + + + + + + + + + + +
FieldActionValue
+ + + +
+

+                

+              
+
+
+ + +
+
+ {{panel.offset}} to {{panel.offset + data.slice(panel.offset,panel.offset+panel.size).length}} + of {{data.length}} available for paging +
+
+ +
diff --git a/src/app/partials/dashboard.html b/src/app/partials/dashboard.html index 51d970a9698ff..fbe36f10c08ce 100644 --- a/src/app/partials/dashboard.html +++ b/src/app/partials/dashboard.html @@ -48,16 +48,18 @@
- -
- - -
- -
+ +
- +

Drop here to add to this row

Or drop on top of any other panel to insert in that row