ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anovi...@apache.org
Subject ignite git commit: IGNITE-1597 Improve filtering behavior.
Date Tue, 13 Oct 2015 06:54:17 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-843-rc1 6c202e08b -> 566cd757b


IGNITE-1597 Improve filtering behavior.


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/566cd757
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/566cd757
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/566cd757

Branch: refs/heads/ignite-843-rc1
Commit: 566cd757b0082ba95f20feb5f38d8923cfd8ec67
Parents: 6c202e0
Author: Andrey <anovikov@gridgain.com>
Authored: Tue Oct 13 13:54:14 2015 +0700
Committer: Andrey <anovikov@gridgain.com>
Committed: Tue Oct 13 13:54:14 2015 +0700

----------------------------------------------------------------------
 .../main/js/controllers/caches-controller.js    |  1 +
 .../main/js/controllers/clusters-controller.js  |  3 ++-
 .../src/main/js/controllers/common-module.js    |  3 +++
 .../main/js/controllers/metadata-controller.js  |  1 +
 .../main/js/controllers/summary-controller.js   |  5 ++--
 .../src/main/js/public/stylesheets/style.scss   |  3 +--
 .../src/main/js/views/configuration/caches.jade |  2 +-
 .../main/js/views/configuration/clusters.jade   |  2 +-
 .../main/js/views/configuration/metadata.jade   |  5 ++--
 .../main/js/views/configuration/summary.jade    |  2 +-
 .../src/main/js/views/includes/controls.jade    | 24 +++++++++++---------
 11 files changed, 30 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/566cd757/modules/control-center-web/src/main/js/controllers/caches-controller.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/controllers/caches-controller.js b/modules/control-center-web/src/main/js/controllers/caches-controller.js
index 9062d58..7d6824c 100644
--- a/modules/control-center-web/src/main/js/controllers/caches-controller.js
+++ b/modules/control-center-web/src/main/js/controllers/caches-controller.js
@@ -34,6 +34,7 @@ consoleModule.controller('cachesController', [
             $scope.compactJavaName = $common.compactJavaName;
             $scope.saveBtnTipText = $common.saveBtnTipText;
 
+            $scope.tableVisibleRow = $table.tableVisibleRow;
             $scope.tableReset = $table.tableReset;
             $scope.tableNewItem = $table.tableNewItem;
             $scope.tableNewItemActive = $table.tableNewItemActive;

http://git-wip-us.apache.org/repos/asf/ignite/blob/566cd757/modules/control-center-web/src/main/js/controllers/clusters-controller.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/controllers/clusters-controller.js b/modules/control-center-web/src/main/js/controllers/clusters-controller.js
index 66211c8..fa64283 100644
--- a/modules/control-center-web/src/main/js/controllers/clusters-controller.js
+++ b/modules/control-center-web/src/main/js/controllers/clusters-controller.js
@@ -33,6 +33,7 @@ consoleModule.controller('clustersController', [
         $scope.compactJavaName = $common.compactJavaName;
         $scope.saveBtnTipText = $common.saveBtnTipText;
 
+        $scope.tableVisibleRow = $table.tableVisibleRow;
         $scope.tableReset = $table.tableReset;
         $scope.tableNewItem = $table.tableNewItem;
         $scope.tableNewItemActive = $table.tableNewItemActive;
@@ -561,6 +562,6 @@ consoleModule.controller('clustersController', [
 
             $common.resetItem($scope.backupItem, resetTo, $scope.general, group);
             $common.resetItem($scope.backupItem, resetTo, $scope.advanced, group);
-        }
+        };
     }]
 );

http://git-wip-us.apache.org/repos/asf/ignite/blob/566cd757/modules/control-center-web/src/main/js/controllers/common-module.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/controllers/common-module.js b/modules/control-center-web/src/main/js/controllers/common-module.js
index 59ad2e6..5e28ebd 100644
--- a/modules/control-center-web/src/main/js/controllers/common-module.js
+++ b/modules/control-center-web/src/main/js/controllers/common-module.js
@@ -1154,6 +1154,9 @@ consoleModule.service('$table', ['$common', '$focus', function ($common,
$focus)
     }
 
     return {
+        tableVisibleRow: function (rows, row) {
+            return !row || !row._id || _.findIndex(rows, function(item) {return item._id
== row._id}) >= 0;
+        },
         tableState: function (name, editIndex) {
             _tableState(name, editIndex);
         },

http://git-wip-us.apache.org/repos/asf/ignite/blob/566cd757/modules/control-center-web/src/main/js/controllers/metadata-controller.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/controllers/metadata-controller.js b/modules/control-center-web/src/main/js/controllers/metadata-controller.js
index 9f35aaa..915adc6 100644
--- a/modules/control-center-web/src/main/js/controllers/metadata-controller.js
+++ b/modules/control-center-web/src/main/js/controllers/metadata-controller.js
@@ -40,6 +40,7 @@ consoleModule.controller('metadataController', [
             $scope.compactJavaName = $common.compactJavaName;
             $scope.saveBtnTipText = $common.saveBtnTipText;
 
+            $scope.tableVisibleRow = $table.tableVisibleRow;
             $scope.tableReset = $table.tableReset;
             $scope.tableNewItem = $table.tableNewItem;
             $scope.tableNewItemActive = $table.tableNewItemActive;

http://git-wip-us.apache.org/repos/asf/ignite/blob/566cd757/modules/control-center-web/src/main/js/controllers/summary-controller.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/controllers/summary-controller.js b/modules/control-center-web/src/main/js/controllers/summary-controller.js
index 9247b14..fb57065 100644
--- a/modules/control-center-web/src/main/js/controllers/summary-controller.js
+++ b/modules/control-center-web/src/main/js/controllers/summary-controller.js
@@ -17,8 +17,9 @@
 
 // Controller for Summary screen.
 consoleModule.controller('summaryController', [
-    '$scope', '$http', '$common', '$loading', '$message',
-    function ($scope, $http, $common, $loading, $message) {
+    '$scope', '$http', '$common', '$loading', '$message', '$table',
+    function ($scope, $http, $common, $loading, $message, $table) {
+    $scope.tableVisibleRow = $table.tableVisibleRow;
     $scope.joinTip = $common.joinTip;
     $scope.getModel = $common.getModel;
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/566cd757/modules/control-center-web/src/main/js/public/stylesheets/style.scss
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/public/stylesheets/style.scss b/modules/control-center-web/src/main/js/public/stylesheets/style.scss
index 7447577..9bcd01e 100644
--- a/modules/control-center-web/src/main/js/public/stylesheets/style.scss
+++ b/modules/control-center-web/src/main/js/public/stylesheets/style.scss
@@ -614,8 +614,7 @@ button.form-control {
     width: 100%;
 
     label.placeholder {
-        font-size: 0.8em;
-        line-height: 0.8em;
+        text-align: center;
         color: $ignite-placeholder-color;
         width: 100%;
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/566cd757/modules/control-center-web/src/main/js/views/configuration/caches.jade
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/views/configuration/caches.jade b/modules/control-center-web/src/main/js/views/configuration/caches.jade
index 3a8dbfc..93751ed 100644
--- a/modules/control-center-web/src/main/js/views/configuration/caches.jade
+++ b/modules/control-center-web/src/main/js/views/configuration/caches.jade
@@ -35,7 +35,7 @@ block content
                         button.btn.btn-primary(id='new-item' ng-click='createItem()') Add
cache
                     +save-remove-buttons('cache')
                     hr
-                form.form-horizontal(name='ui.inputForm' ng-if='backupItem' novalidate unsaved-warning-form)
+                form.form-horizontal(name='ui.inputForm' ng-if='backupItem && tableVisibleRow(displayedRows,
selectedItem)' novalidate unsaved-warning-form)
                     .panel-group(bs-collapse ng-model='panels.activePanels' data-allow-multiple='true')
                         +groups('general', 'backupItem')
                         div(ng-show='ui.expanded')

http://git-wip-us.apache.org/repos/asf/ignite/blob/566cd757/modules/control-center-web/src/main/js/views/configuration/clusters.jade
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/views/configuration/clusters.jade b/modules/control-center-web/src/main/js/views/configuration/clusters.jade
index 3ce51aa..b546db6 100644
--- a/modules/control-center-web/src/main/js/views/configuration/clusters.jade
+++ b/modules/control-center-web/src/main/js/views/configuration/clusters.jade
@@ -35,7 +35,7 @@ block content
                         button.btn.btn-primary(id='new-item' ng-click='createItem()') Add
cluster
                     +save-remove-buttons('cluster')
                     hr
-                form.form-horizontal(name='ui.inputForm' ng-if='backupItem' novalidate unsaved-warning-form)
+                form.form-horizontal(name='ui.inputForm' ng-show='backupItem && tableVisibleRow(displayedRows,
selectedItem)' novalidate unsaved-warning-form)
                     .panel-group(bs-collapse ng-model='panels.activePanels' data-allow-multiple='true'
ng-click='triggerDigest = true')
                         +groups('general', 'backupItem')
                         div(ng-show='ui.expanded')

http://git-wip-us.apache.org/repos/asf/ignite/blob/566cd757/modules/control-center-web/src/main/js/views/configuration/metadata.jade
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/views/configuration/metadata.jade b/modules/control-center-web/src/main/js/views/configuration/metadata.jade
index 42b4a1a..93da3d5 100644
--- a/modules/control-center-web/src/main/js/views/configuration/metadata.jade
+++ b/modules/control-center-web/src/main/js/views/configuration/metadata.jade
@@ -45,12 +45,13 @@ block content
                             tbody
                                 tr
                                     td
-                                        .scrollable-y(style='max-height: 200px')
+                                        .scrollable-y(ng-show='displayedRows.length >
0' style='max-height: 200px')
                                             table
                                                 tbody
                                                     tr(ng-repeat='row in (displayedRows |
metadatasValidation:ui.showValid:true) track by row._id')
                                                         td
                                                             a(ng-class='{active: row._id
== selectedItem._id}' ng-click='selectItem(row)') {{$index + 1}}) {{row.valueType}}
+                                        label.placeholder(ng-show='displayedRows.length ==
0') No metadata found
                 .padding-top-dflt(bs-affix)
                     .panel-tip-container(data-placement='bottom' bs-tooltip data-title='Create
new metadata')
                         button.btn.btn-primary(id='new-item' ng-click='createItem()') Add
metadata
@@ -58,7 +59,7 @@ block content
                         button.btn.btn-primary(ng-click='showLoadMetadataModal()') Load from
database
                     +save-remove-buttons('metadata')
                 hr
-                form.form-horizontal(name='ui.inputForm' ng-if='backupItem' novalidate unsaved-warning-form)
+                form.form-horizontal(name='ui.inputForm' ng-if='backupItem && tableVisibleRow(displayedRows,
selectedItem)' novalidate unsaved-warning-form)
                     .panel-group(bs-collapse ng-model='panels.activePanels' data-allow-multiple='true')
                         +groups('metadata', 'backupItem')
                     .section

http://git-wip-us.apache.org/repos/asf/ignite/blob/566cd757/modules/control-center-web/src/main/js/views/configuration/summary.jade
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/views/configuration/summary.jade b/modules/control-center-web/src/main/js/views/configuration/summary.jade
index b900e88..63f92a5 100644
--- a/modules/control-center-web/src/main/js/views/configuration/summary.jade
+++ b/modules/control-center-web/src/main/js/views/configuration/summary.jade
@@ -60,7 +60,7 @@ block content
             | You have no clusters configured. Please configure them &nbsp;
             a(href='clusters') here.
         +main-table('Clusters:', 'clusters', 'clusterName', 'selectItem(row)', '{{$index
+ 1}}) {{row.name}}')
-        div(ng-show='selectedItem' role='tab' method='post' action='summary/download')
+        div(ng-show='selectedItem && tableVisibleRow(displayedRows, selectedItem)'
role='tab' method='post' action='summary/download')
             .padding-dflt(bs-collapse data-start-collapsed='false')
                 .panel.panel-default
                     form.panel-heading(role='tab' method='post' action='summary/download'
bs-collapse-toggle) Server

http://git-wip-us.apache.org/repos/asf/ignite/blob/566cd757/modules/control-center-web/src/main/js/views/includes/controls.jade
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/views/includes/controls.jade b/modules/control-center-web/src/main/js/views/includes/controls.jade
index aa40367..3ec2e84 100644
--- a/modules/control-center-web/src/main/js/views/includes/controls.jade
+++ b/modules/control-center-web/src/main/js/views/includes/controls.jade
@@ -454,12 +454,13 @@ mixin main-table(title, rows, focusId, click, rowTemplate)
                 tbody
                     tr
                         td
-                            .scrollable-y(style='max-height: 200px')
+                            .scrollable-y(ng-show='displayedRows.length > 0' style='max-height:
200px')
                                 table
                                     tbody
                                         tr(ng-repeat='row in displayedRows track by row._id')
                                             td
                                                 a(ng-class='{active: row._id == selectedItem._id}'
on-click-focus=focusId ng-click=click) #{rowTemplate}
+                            label.placeholder(ng-show='displayedRows.length == 0') No #{rows}
found
 
 mixin groups(groups, dataSource)
     .panel.panel-default(ng-repeat='group in #{groups}' ng-click='triggerDigest=true' ng-hide='{{group.hide}}')
@@ -503,13 +504,14 @@ mixin save-remove-buttons(objectName)
     -var removeTip = '"Remove current ' + objectName + '"'
     -var cloneTip = '"Clone current ' + objectName + '"'
 
-    .panel-tip-container(ng-hide='!backupItem || backupItem._id')
-        a.btn.btn-primary(ng-disabled='!ui.isDirty()' ng-click='ui.isDirty() ? saveItem()
: ""' bs-tooltip='' data-title='{{saveBtnTipText(ui.isDirty(), "#{objectName}")}}' data-placement='bottom'
data-trigger='hover') Save
-    .panel-tip-container(ng-show='backupItem._id')
-        a.btn.btn-primary(id='save-item' ng-disabled='!ui.isDirty()' ng-click='ui.isDirty()
? saveItem() : ""' bs-tooltip='' data-title='{{saveBtnTipText(ui.isDirty(), "#{objectName}")}}'
data-placement='bottom' data-trigger='hover') Save
-    .panel-tip-container(ng-show='backupItem._id')
-        a.btn.btn-primary(id='clone-item' ng-click='cloneItem()' bs-tooltip=cloneTip data-placement='bottom'
data-trigger='hover') Clone
-    .btn-group.panel-tip-container(ng-show='backupItem._id')
-        button.btn.btn-primary(id='remove-item' ng-click='removeItem()' bs-tooltip=removeTip
data-placement='bottom' data-trigger='hover') Remove
-        button.btn.dropdown-toggle.btn-primary(id='remove-item-dropdown' data-toggle='dropdown'
data-container='body' bs-dropdown='removeDropdown' data-placement='bottom-right')
-            span.caret
+    div(ng-show='tableVisibleRow(displayedRows, selectedItem)' style='display: inline-block;')
+        .panel-tip-container(ng-hide='!backupItem || backupItem._id')
+            a.btn.btn-primary(ng-disabled='!ui.isDirty()' ng-click='ui.isDirty() ? saveItem()
: ""' bs-tooltip='' data-title='{{saveBtnTipText(ui.isDirty(), "#{objectName}")}}' data-placement='bottom'
data-trigger='hover') Save
+        .panel-tip-container(ng-show='backupItem._id')
+            a.btn.btn-primary(id='save-item' ng-disabled='!ui.isDirty()' ng-click='ui.isDirty()
? saveItem() : ""' bs-tooltip='' data-title='{{saveBtnTipText(ui.isDirty(), "#{objectName}")}}'
data-placement='bottom' data-trigger='hover') Save
+        .panel-tip-container(ng-show='backupItem._id')
+            a.btn.btn-primary(id='clone-item' ng-click='cloneItem()' bs-tooltip=cloneTip
data-placement='bottom' data-trigger='hover') Clone
+        .btn-group.panel-tip-container(ng-show='backupItem._id')
+            button.btn.btn-primary(id='remove-item' ng-click='removeItem()' bs-tooltip=removeTip
data-placement='bottom' data-trigger='hover') Remove
+            button.btn.dropdown-toggle.btn-primary(id='remove-item-dropdown' data-toggle='dropdown'
data-container='body' bs-dropdown='removeDropdown' data-placement='bottom-right')
+                span.caret


Mime
View raw message