ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anovi...@apache.org
Subject ignite git commit: # GG-843 Fixed validation popover.
Date Tue, 08 Sep 2015 03:57:35 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-843 d076b4757 -> b9a95ef34


# GG-843 Fixed validation popover.


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

Branch: refs/heads/ignite-843
Commit: b9a95ef349df85b0707f1a936c00e9d2850a443d
Parents: d076b47
Author: Andrey <anovikov@gridgain.com>
Authored: Tue Sep 8 10:58:19 2015 +0700
Committer: Andrey <anovikov@gridgain.com>
Committed: Tue Sep 8 10:58:28 2015 +0700

----------------------------------------------------------------------
 .../main/js/controllers/caches-controller.js    |  8 +--
 .../src/main/js/controllers/common-module.js    |  2 +-
 .../main/js/controllers/metadata-controller.js  | 16 +++---
 .../src/main/js/public/stylesheets/style.scss   | 51 +++++++-------------
 .../src/main/js/routes/public.js                |  4 +-
 .../src/main/js/views/sql/cache-metadata.jade   |  2 +-
 .../src/main/js/views/sql/chart-settings.jade   |  2 +-
 .../src/main/js/views/sql/paragraph-rate.jade   |  2 +-
 .../src/main/js/views/sql/sql.jade              |  4 +-
 .../src/main/js/views/templates/popover.jade    | 24 ---------
 .../js/views/templates/validation-error.jade    | 21 ++++++++
 11 files changed, 58 insertions(+), 78 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/b9a95ef3/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 fffde43..c6e12dc 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
@@ -163,7 +163,7 @@ controlCenterModule.controller('cachesController', [
                 switch (field.model) {
                     case 'hibernateProperties':
                         if (fx.indexOf('=') < 0)
-                            return $common.showPopoverMessage(null, null, $table.tableFieldId(index,
'HibProp'), 'Property should be present in format key=value!');
+                            return showPopoverMessage(null, null, $table.tableFieldId(index,
'HibProp'), 'Property should be present in format key=value!');
 
                         model = item.cacheStoreFactory.CacheHibernateBlobStoreFactory[field.model];
 
@@ -179,7 +179,7 @@ controlCenterModule.controller('cachesController', [
                         }
 
                         if (exist)
-                            return $common.showPopoverMessage(null, null, $table.tableFieldId(index,
'HibProp'), 'Property with such name already exists!');
+                            return showPopoverMessage(null, null, $table.tableFieldId(index,
'HibProp'), 'Property with such name already exists!');
 
                         break;
 
@@ -194,7 +194,7 @@ controlCenterModule.controller('cachesController', [
 
                             // Found duplicate.
                             if (idx >= 0 && idx != index)
-                                return $common.showPopoverMessage(null, null, $table.tableFieldId(index,
'SqlFx'), 'SQL function with such class name already exists!');
+                                return showPopoverMessage(null, null, $table.tableFieldId(index,
'SqlFx'), 'SQL function with such class name already exists!');
                         }
                 }
 
@@ -219,7 +219,7 @@ controlCenterModule.controller('cachesController', [
 
                     // Found duplicate.
                     if (idx >= 0 && idx != index)
-                        return $common.showPopoverMessage(null, null, $table.tableFieldId(index,
'KeyIndexedType'), 'Indexed type with such key class already exists!');
+                        return showPopoverMessage(null, null, $table.tableFieldId(index,
'KeyIndexedType'), 'Indexed type with such key class already exists!');
                 }
 
                 return true;

http://git-wip-us.apache.org/repos/asf/ignite/blob/b9a95ef3/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 7c19418..2d23db8 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
@@ -30,7 +30,7 @@ controlCenterModule.config(function ($popoverProvider) {
         trigger: 'manual',
         placement: 'right',
         container: 'body',
-        templateUrl: '/popover'
+        templateUrl: '/validation-error'
     });
 });
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/b9a95ef3/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 5a9c3f7..5db83b9 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
@@ -660,12 +660,12 @@ controlCenterModule.controller('metadataController', [
                 if ($common.isEmptyString(item.keyType))
                     return showPopoverMessage($scope.panels, 'metadata', 'keyType', 'Key
type should not be empty');
                 else if (!$common.isValidJavaClass('Key type', item.keyType, true, 'keyType'))
-                    return showPopoverMessage($scope.panels, 'metadata', 'keyType', 'Key
type should be valid Java class');
+                    return false;
 
                 if ($common.isEmptyString(item.valueType))
                     return showPopoverMessage($scope.panels, 'metadata', 'valueType', 'Value
type should not be empty');
                 else if (!$common.isValidJavaClass('Value type', item.valueType, false, 'valueType'))
-                    return showPopoverMessage($scope.panels, 'metadata', 'valueType', 'Value
type should valid Java class');
+                    return false;
 
                 var qry = queryConfigured(item);
 
@@ -842,7 +842,7 @@ controlCenterModule.controller('metadataController', [
 
                     // Found duplicate.
                     if (idx >= 0 && idx != index)
-                        return $common.showPopoverMessage(null, null, $table.tableFieldId(index,
'TextField'), 'Field with such name already exists!');
+                        return showPopoverMessage(null, null, $table.tableFieldId(index,
'TextField'), 'Field with such name already exists!');
                 }
 
                 return true;
@@ -872,7 +872,7 @@ controlCenterModule.controller('metadataController', [
 
                         // Found duplicate.
                         if (idx >= 0 && idx != index)
-                            return $common.showPopoverMessage(null, null, $table.tableFieldId(index,
'Key' + pairField.id), 'Field with such name already exists!');
+                            return showPopoverMessage(null, null, $table.tableFieldId(index,
'Key' + pairField.id), 'Field with such name already exists!');
                     }
                 }
 
@@ -917,7 +917,7 @@ controlCenterModule.controller('metadataController', [
 
                         // Found duplicate.
                         if (idx >= 0 && index != idx)
-                            return $common.showPopoverMessage(null, null, $table.tableFieldId(index,
'DatabaseName' + dbFieldTable.id), 'Field with such database name already exists!');
+                            return showPopoverMessage(null, null, $table.tableFieldId(index,
'DatabaseName' + dbFieldTable.id), 'Field with such database name already exists!');
 
                         idx = _.findIndex(model, function (dbMeta) {
                             return dbMeta.javaName == dbFieldValue.javaName;
@@ -925,7 +925,7 @@ controlCenterModule.controller('metadataController', [
 
                         // Found duplicate.
                         if (idx >= 0 && index != idx)
-                            return $common.showPopoverMessage(null, null, $table.tableFieldId(index,
'JavaName' + dbFieldTable.id), 'Field with such java name already exists!');
+                            return showPopoverMessage(null, null, $table.tableFieldId(index,
'JavaName' + dbFieldTable.id), 'Field with such java name already exists!');
 
                         if (index < 0) {
                                 model.push(dbFieldValue);
@@ -974,7 +974,7 @@ controlCenterModule.controller('metadataController', [
 
                     // Found duplicate.
                     if (idx >= 0 && idx != index)
-                        return $common.showPopoverMessage(null, null, $table.tableFieldId(index,
'GroupName'), 'Group with such name already exists!');
+                        return showPopoverMessage(null, null, $table.tableFieldId(index,
'GroupName'), 'Group with such name already exists!');
                 }
 
                 var item = $scope.backupItem;
@@ -1084,7 +1084,7 @@ controlCenterModule.controller('metadataController', [
 
                     // Found duplicate.
                     if (idx >= 0 && idx != index)
-                        return $common.showPopoverMessage(null, null, $table.tableFieldId(index,
'FieldName'), 'Field with such name already exists in group!');
+                        return showPopoverMessage(null, null, $table.tableFieldId(index,
'FieldName'), 'Field with such name already exists in group!');
                 }
 
                 var group = $scope.backupItem.groups[groupIndex];

http://git-wip-us.apache.org/repos/asf/ignite/blob/b9a95ef3/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 245a2c0..a4058e8 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
@@ -767,48 +767,31 @@ div.affix.padding-top-dflt {
     background-color: $brand-primary;
 }
 
-.popover {
-    color: $brand-primary;
-    max-width: 400px;
-}
-
 .popover-content {
     padding: 5px;
 }
 
-.popover-arrow {
-    background: white;
-    border: 1px solid $brand-primary;
-}
-
-.popover-arrow:after, .popover-arrow:before {
-    right: 100%;
-    top: 50%;
-    border: solid transparent;
-    content: " ";
-    height: 0;
-    width: 0;
-    position: absolute;
-    pointer-events: none;
+.theme-line .popover.settings {
+    .close {
+        position: absolute;
+        top: 5px;
+        right: 5px;
+    }
 }
 
-.popover-arrow:after {
-    border: solid 7px transparent;
-    border-right-color: white;
-    margin-top: -7px;
-}
+.theme-line .popover.validation-error {
+    max-width: 400px;
+    color: $brand-primary;
+    background: white;
+    border: 1px solid $brand-primary;
 
-.popover-arrow:before {
-    border: solid 8px transparent;
-    border-right-color: $brand-primary;
-    margin-top: -8px;
-}
+    &.right > .arrow {
+        border-right-color: $brand-primary;
+    }
 
-.popover .close {
-    position: absolute;
-    top: 5px;
-    right: 5px;
-    float: none;
+    .close {
+        vertical-align: middle;
+    }
 }
 
 label {

http://git-wip-us.apache.org/repos/asf/ignite/blob/b9a95ef3/modules/control-center-web/src/main/js/routes/public.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/routes/public.js b/modules/control-center-web/src/main/js/routes/public.js
index 3d2ed54..e65bf46 100644
--- a/modules/control-center-web/src/main/js/routes/public.js
+++ b/modules/control-center-web/src/main/js/routes/public.js
@@ -29,8 +29,8 @@ router.get('/select', function (req, res) {
 });
 
 // GET dropdown-menu template.
-router.get('/popover', function (req, res) {
-    res.render('templates/popover', {});
+router.get('/validation-error', function (req, res) {
+    res.render('templates/validation-error', {});
 });
 
 // GET confirmation dialog.

http://git-wip-us.apache.org/repos/asf/ignite/blob/b9a95ef3/modules/control-center-web/src/main/js/views/sql/cache-metadata.jade
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/views/sql/cache-metadata.jade b/modules/control-center-web/src/main/js/views/sql/cache-metadata.jade
index 8fb88e9..1bce0c2 100644
--- a/modules/control-center-web/src/main/js/views/sql/cache-metadata.jade
+++ b/modules/control-center-web/src/main/js/views/sql/cache-metadata.jade
@@ -11,7 +11,7 @@
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-.popover(tabindex='-1' style='width: 200px')
+.popover.settings(tabindex='-1' style='width: 200px')
     .arrow
     h3.popover-title(style='color: black') Refresh rate
     button.close(id='paragraph-rate-close' type='button' ng-click='$hide()') &times;

http://git-wip-us.apache.org/repos/asf/ignite/blob/b9a95ef3/modules/control-center-web/src/main/js/views/sql/chart-settings.jade
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/views/sql/chart-settings.jade b/modules/control-center-web/src/main/js/views/sql/chart-settings.jade
index 0396182..1842dd0 100644
--- a/modules/control-center-web/src/main/js/views/sql/chart-settings.jade
+++ b/modules/control-center-web/src/main/js/views/sql/chart-settings.jade
@@ -14,7 +14,7 @@
     See the License for the specific language governing permissions and
     limitations under the License.
 
-.popover(tabindex='-1' style='width: 250px')
+.popover.settings(tabindex='-1' style='width: 250px')
     .arrow
     h3.popover-title(style='color: black') Chart settings
     button.close(id='chart-settings-close' type='button' ng-click='$hide()') &times;

http://git-wip-us.apache.org/repos/asf/ignite/blob/b9a95ef3/modules/control-center-web/src/main/js/views/sql/paragraph-rate.jade
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/views/sql/paragraph-rate.jade b/modules/control-center-web/src/main/js/views/sql/paragraph-rate.jade
index 13337cf..df54ad3 100644
--- a/modules/control-center-web/src/main/js/views/sql/paragraph-rate.jade
+++ b/modules/control-center-web/src/main/js/views/sql/paragraph-rate.jade
@@ -14,7 +14,7 @@
     See the License for the specific language governing permissions and
     limitations under the License.
 
-.popover(tabindex='-1' style='width: 200px')
+.popover.settings(tabindex='-1' style='width: 200px')
     .arrow
     h3.popover-title(style='color: black') Refresh rate
     button.close(id='paragraph-rate-close' type='button' ng-click='$hide()') &times;

http://git-wip-us.apache.org/repos/asf/ignite/blob/b9a95ef3/modules/control-center-web/src/main/js/views/sql/sql.jade
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/views/sql/sql.jade b/modules/control-center-web/src/main/js/views/sql/sql.jade
index 22c6681..c112141 100644
--- a/modules/control-center-web/src/main/js/views/sql/sql.jade
+++ b/modules/control-center-web/src/main/js/views/sql/sql.jade
@@ -98,7 +98,7 @@ block container
                                         button.btn.btn-primary(ng-click='scan(paragraph)'
ng-disabled='!paragraph.cache') Scan
                                         .pull-right
                                             label Refresh rate:
-                                            button.btn.btn-default.fa.fa-clock-o.tipLabel(ng-class='{"btn-info":
paragraph.rate && paragraph.rate.executed}' bs-popover data-template-url='rate' data-placement='top-right'
data-auto-close='1' data-trigger='click') {{rateAsString(paragraph)}}
+                                            button.btn.btn-default.fa.fa-clock-o.tipLabel(ng-class='{"btn-info":
paragraph.rate && paragraph.rate.executed}' bs-popover data-template-url='rate' data-placement='left'
data-auto-close='1' data-trigger='click') {{rateAsString(paragraph)}}
                                             label.tipLabel Page size:
                                             button.btn.btn-default.base-control.tipLabel(ng-model='paragraph.pageSize'
bs-options='item for item in pageSizes' bs-select style='margin-right: 0')
                                 .col-sm-12(ng-show='paragraph.result != "none"')
@@ -124,7 +124,7 @@ block container
                                                 tr(ng-repeat='row in displayedResult track
by $index')
                                                     td(ng-repeat='val in row track by $index')
{{ val }}
                                 .col-sm-12(ng-show='paragraph.rows && paragraph.result
!= "table" && paragraph.result != "none"')
-                                    button.btn.btn-default.chart-btn.fa.fa-cog(bs-popover
data-template-url='chart-settings' data-placement='top-right' data-auto-close='1' data-trigger='click')
+                                    button.btn.btn-default.chart-btn.fa.fa-cog(bs-popover
data-template-url='chart-settings' data-placement='left' data-auto-close='1' data-trigger='click')
                                     div(id='chart-{{paragraph.id}}')
                                         svg
                                 .col-sm-12.sql-empty-result(ng-show='!paragraph.rows &&
paragraph.result != "none"') Result set is empty.

http://git-wip-us.apache.org/repos/asf/ignite/blob/b9a95ef3/modules/control-center-web/src/main/js/views/templates/popover.jade
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/views/templates/popover.jade b/modules/control-center-web/src/main/js/views/templates/popover.jade
deleted file mode 100644
index 3d1cc97..0000000
--- a/modules/control-center-web/src/main/js/views/templates/popover.jade
+++ /dev/null
@@ -1,24 +0,0 @@
-//-
-    Licensed to the Apache Software Foundation (ASF) under one or more
-    contributor license agreements.  See the NOTICE file distributed with
-    this work for additional information regarding copyright ownership.
-    The ASF licenses this file to You under the Apache License, Version 2.0
-    (the "License"); you may not use this file except in compliance with
-    the License.  You may obtain a copy of the License at
-
-         http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software
-    distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-    limitations under the License.
-
-.popover-arrow.popover
-    table
-        tr
-            td
-                .popover-content
-                    label {{content}}
-            td
-                button.close(id='popover-btn-close' type='button' ng-click='$hide()') &times;

http://git-wip-us.apache.org/repos/asf/ignite/blob/b9a95ef3/modules/control-center-web/src/main/js/views/templates/validation-error.jade
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/views/templates/validation-error.jade
b/modules/control-center-web/src/main/js/views/templates/validation-error.jade
new file mode 100644
index 0000000..41d77bc
--- /dev/null
+++ b/modules/control-center-web/src/main/js/views/templates/validation-error.jade
@@ -0,0 +1,21 @@
+//-
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+.popover.validation-error
+    .arrow
+    .popover-content
+        label {{content}}&nbsp&nbsp
+        button.close(id='popover-btn-close' type='button' ng-click='$hide()') &times;


Mime
View raw message