ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akuznet...@apache.org
Subject ignite git commit: IGNITE-843 UI tweaking.
Date Mon, 31 Aug 2015 07:13:51 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-843 3a4c2b494 -> a2d983db6


IGNITE-843 UI tweaking.


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

Branch: refs/heads/ignite-843
Commit: a2d983db619190cd65437fca7d4c1eba89af9fdb
Parents: 3a4c2b4
Author: Alexey Kuznetsov <akuznetsov@apache.org>
Authored: Mon Aug 31 14:14:18 2015 +0700
Committer: Alexey Kuznetsov <akuznetsov@apache.org>
Committed: Mon Aug 31 14:14:18 2015 +0700

----------------------------------------------------------------------
 .../main/js/controllers/caches-controller.js    | 44 ++++++++++++++++----
 .../main/js/controllers/clusters-controller.js  |  1 -
 .../src/main/js/controllers/common-module.js    |  4 +-
 .../main/js/controllers/metadata-controller.js  |  2 +-
 .../src/main/js/controllers/models/caches.json  |  2 +
 .../main/js/controllers/models/clusters.json    |  1 +
 .../src/main/js/public/stylesheets/style.scss   |  3 ++
 .../src/main/js/views/includes/controls.jade    |  4 +-
 8 files changed, 46 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/a2d983db/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 6070873..019cceb 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
@@ -155,17 +155,44 @@ controlCenterModule.controller('cachesController', [
             };
 
             $scope.tableSimpleValid = function (item, field, fx, index) {
-                if (!$common.isValidJavaClass('SQL function', fx, false, $table.tableFieldId(index,
'SqlFx')))
-                    return $table.tableFocusInvalidField(index, 'SqlFx');
+                var model;
 
-                var model = item[field.model];
+                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!');
 
-                if ($common.isDefined(model)) {
-                    var idx = _.indexOf(model, fx);
+                        model = item.cacheStoreFactory.CacheHibernateBlobStoreFactory[field.model];
 
-                    // Found duplicate.
-                    if (idx >= 0 && idx != index)
-                        return $common.showPopoverMessage(null, null, $table.tableFieldId(index,
'SqlFx'), 'SQL function with such class name already exists!');
+                        var key = fx.split('=')[0];
+
+                        var exist = false;
+
+                        if ($common.isDefined(model)) {
+                            model.forEach(function (val) {
+                                if (val.split('=')[0] == key)
+                                    exist = true;
+                            })
+                        }
+
+                        if (exist)
+                            return $common.showPopoverMessage(null, null, $table.tableFieldId(index,
'HibProp'), 'Property with such name already exists!');
+
+                        break;
+
+                    case 'sqlFunctionClasses':
+                        if (!$common.isValidJavaClass('SQL function', fx, false, $table.tableFieldId(index,
'SqlFx')))
+                            return $table.tableFocusInvalidField(index, 'SqlFx');
+
+                        model = item[field.model];
+
+                        if ($common.isDefined(model)) {
+                            var idx = _.indexOf(model, fx);
+
+                            // 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 true;
@@ -397,7 +424,6 @@ controlCenterModule.controller('cachesController', [
             function validate(item) {
                 if ($common.isEmptyString(item.name))
                     return showPopoverMessage($scope.panels, 'general', 'cacheName', 'Name
should not be empty');
-                        sessionStorage.removeItem('cacheSelectedItem');
 
                 if (item.memoryMode == 'OFFHEAP_TIERED' && item.offHeapMaxMemory
== null)
                     return showPopoverMessage($scope.panels, 'memory', 'offHeapMaxMemory',

http://git-wip-us.apache.org/repos/asf/ignite/blob/a2d983db/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 e26e32b..09d2700 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
@@ -343,7 +343,6 @@ controlCenterModule.controller('clustersController', ['$scope', '$controller',
'
         function validate(item) {
             if ($common.isEmptyString(item.name))
                 return showPopoverMessage($scope.panels, 'general', 'clusterName', 'Name
should not be empty');
-                    sessionStorage.removeItem('clusterSelectedItem');
 
             if (item.discovery.kind == 'Vm' && item.discovery.Vm.addresses.length
== 0)
                 return showPopoverMessage($scope.panels, 'general', 'addresses', 'Addresses
are not specified');

http://git-wip-us.apache.org/repos/asf/ignite/blob/a2d983db/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 778370d..36c4a94 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
@@ -495,7 +495,7 @@ controlCenterModule.service('$common', [
 
                 var marginTop = parent.css('marginTop');
 
-                var parentHeight = Math.max(75, left.height() - 2 * (isDefined(marginTop)
? marginTop.replace("px", "") : 0));
+                var parentHeight = Math.max(right.attr('min-height').replace('px', ''), 75,
left.height() - 2 * (isDefined(marginTop) ? marginTop.replace('px', '') : 0));
 
                 parent.outerHeight(parentHeight);
 
@@ -608,7 +608,7 @@ controlCenterModule.service('$common', [
                 for (var i = 0; i < parts.length; i++) {
                     var part = parts[i];
 
-                    if (!isValidJavaIdentifier(msg, part))
+                    if (!isValidJavaIdentifier(msg, part, elemId))
                         return false;
                 }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/a2d983db/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 05c93a6..e406d29 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
@@ -866,7 +866,7 @@ controlCenterModule.controller('metadataController', [
 
                     var model = item[field.model];
 
-                    if (!$common.isValidJavaIdentifier(dbFieldTable.msg + ' java name', dbFieldValue.javaName))
+                    if (!$common.isValidJavaIdentifier(dbFieldTable.msg + ' java name', dbFieldValue.javaName,
$table.tableFieldId(index, 'JavaName' + dbFieldTable.id)))
                         return $table.tableFocusInvalidField(index, 'JavaName' + dbFieldTable.id);
 
                     if ($common.isDefined(model)) {

http://git-wip-us.apache.org/repos/asf/ignite/blob/a2d983db/modules/control-center-web/src/main/js/controllers/models/caches.json
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/controllers/models/caches.json b/modules/control-center-web/src/main/js/controllers/models/caches.json
index 2c9a760..e8a62ce 100644
--- a/modules/control-center-web/src/main/js/controllers/models/caches.json
+++ b/modules/control-center-web/src/main/js/controllers/models/caches.json
@@ -573,10 +573,12 @@
               "fields": [
                 {
                   "label": "Hibernate properties",
+                  "id": "hibernateProperties",
                   "type": "table-simple",
                   "path": "cacheStoreFactory.CacheHibernateBlobStoreFactory",
                   "model": "hibernateProperties",
                   "placeholder": "key=value",
+                  "focusId": "HibProp",
                   "addTip": "Add new Hibernate property.",
                   "removeTip": "Remove Hibernate property.",
                   "tip": [

http://git-wip-us.apache.org/repos/asf/ignite/blob/a2d983db/modules/control-center-web/src/main/js/controllers/models/clusters.json
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/controllers/models/clusters.json b/modules/control-center-web/src/main/js/controllers/models/clusters.json
index 632f4cc..37e0240 100644
--- a/modules/control-center-web/src/main/js/controllers/models/clusters.json
+++ b/modules/control-center-web/src/main/js/controllers/models/clusters.json
@@ -484,6 +484,7 @@
     {
       "label": "Events",
       "group": "events",
+      "minHeight": "150px",
       "tip": [
         " Grid events are used for notification about what happens within the grid."
       ],

http://git-wip-us.apache.org/repos/asf/ignite/blob/a2d983db/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 eb458ef..db9741a 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
@@ -861,6 +861,9 @@ table tr:hover {
 div.affix.padding-top-dflt {
     z-index: 910;
     background-color: white;
+    hr {
+        margin-bottom: 0;
+    }
 }
 
 .panel-title a {

http://git-wip-us.apache.org/repos/asf/ignite/blob/a2d983db/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 be17eb2..f5de7bd 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
@@ -469,8 +469,8 @@ mixin preview(preview, id)
             i.group-legend-btn(ng-click='#{previewState} = !#{previewState}')
                 img(ng-if='#{previewState}' src='/images/xml.png' title='Show XML')
                 img(ng-if='!#{previewState}' src='/images/java.png' title='Show Java code')
-        .preview-content(ng-if='!preview[#{preview}].allDefaults && !#{previewState}'
id='#{id}' ui-ace='{onLoad: previewInit, mode: "xml"}' ng-model='preview[#{preview}].xml')
-        .preview-content(ng-if='!preview[#{preview}].allDefaults && #{previewState}'
id='#{id}' ui-ace='{onLoad: previewInit, mode: "java"}' ng-model='preview[#{preview}].java')
+        .preview-content(ng-if='!preview[#{preview}].allDefaults && !#{previewState}'
id='#{id}' ui-ace='{onLoad: previewInit, mode: "xml"}' ng-model='preview[#{preview}].xml'
min-height='{{::group.minHeight}}')
+        .preview-content(ng-if='!preview[#{preview}].allDefaults && #{previewState}'
id='#{id}' ui-ace='{onLoad: previewInit, mode: "java"}' ng-model='preview[#{preview}].java'
min-height='{{::group.minHeight}}')
         .preview-content-empty(ng-if='preview[#{preview}].allDefaults' id='#{id}')
             label All Defaults
 


Mime
View raw message