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 Minor UI fixes.
Date Fri, 28 Aug 2015 07:26:37 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-843 df489c2f4 -> 7f4b01554


IGNITE-843 Minor UI fixes.


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

Branch: refs/heads/ignite-843
Commit: 7f4b015547b29417a8565e5f8e633484aaf640e3
Parents: df489c2
Author: Alexey Kuznetsov <akuznetsov@apache.org>
Authored: Fri Aug 28 14:27:01 2015 +0700
Committer: Alexey Kuznetsov <akuznetsov@apache.org>
Committed: Fri Aug 28 14:27:01 2015 +0700

----------------------------------------------------------------------
 .../src/main/js/controllers/caches-controller.js   |  9 +--------
 .../src/main/js/controllers/clusters-controller.js |  9 +--------
 .../src/main/js/controllers/common-module.js       | 17 ++++++++++++++++-
 .../src/main/js/controllers/metadata-controller.js |  9 +--------
 .../src/main/js/controllers/summary-controller.js  |  6 +++---
 .../src/main/js/public/stylesheets/style.scss      | 14 +++++++-------
 .../src/main/js/views/configuration/caches.jade    |  2 +-
 .../src/main/js/views/configuration/clusters.jade  |  2 +-
 .../src/main/js/views/includes/controls.jade       |  5 +++--
 9 files changed, 34 insertions(+), 39 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/7f4b0155/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 2fae5e8..017a428 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
@@ -342,14 +342,7 @@ controlCenterModule.controller('cachesController', [
                     }, 50);
                 }
 
-                if ($common.formChanged($scope.ui.inputForm))
-                    $confirm.show('<span>You have unsaved changes.<br/><br/>Are
you sure you want to discard them?</span>').then(
-                        function () {
-                            selectItem();
-                        }
-                    );
-                else
-                    selectItem();
+                $common.confirmUnsavedChanges($confirm, $scope.ui.inputForm, selectItem);
 
                 $scope.ui.formTitle = $common.isDefined($scope.backupItem) && $scope.backupItem._id
?
                     'Selected cache: ' + $scope.backupItem.name : 'New cache';

http://git-wip-us.apache.org/repos/asf/ignite/blob/7f4b0155/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 9309330..8d40c76 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
@@ -275,14 +275,7 @@ controlCenterModule.controller('clustersController', ['$scope', '$controller',
'
                 }, 50);
             }
 
-            if ($common.formChanged($scope.ui.inputForm))
-                $confirm.show('<span>You have unsaved changes.<br/><br/>Are
you sure you want to discard them?</span>').then(
-                    function () {
-                        selectItem();
-                    }
-                );
-            else
-                selectItem();
+            $common.confirmUnsavedChanges($confirm, $scope.ui.inputForm, selectItem);
 
             $scope.ui.formTitle = $common.isDefined($scope.backupItem) && $scope.backupItem._id
?
                 'Selected cluster: ' + $scope.backupItem.name : 'New cluster';

http://git-wip-us.apache.org/repos/asf/ignite/blob/7f4b0155/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 c4b3c50..78c8daf 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,12 +495,16 @@ controlCenterModule.service('$common', [
 
                 parent.outerHeight(parentHeight);
 
-                right.height(parentHeight - scrollHeight / 2);
+                right.height(parentHeight - scrollHeight * 3 / 4);
 
                 right.resize();
             }
         }
 
+        function formChanged (form) {
+            return isDefined(form) && form.$dirty;
+        }
+
         return {
             getModel: function (obj, field) {
                 var path = field.path;
@@ -682,6 +686,17 @@ controlCenterModule.service('$common', [
             },
             formChanged: function (form) {
                 return isDefined(form) && form.$dirty;
+            },
+            confirmUnsavedChanges: function(confirm, form, selectFunc) {
+                if (formChanged(form))
+                    confirm.show('<span>You have unsaved changes.<br/><br/>Are
you sure you want to discard them?</span>').then(
+                        function () {
+                            selectFunc();
+                        }
+                    );
+                else
+                    selectFunc();
+
             }
         }
     }]);

http://git-wip-us.apache.org/repos/asf/ignite/blob/7f4b0155/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 bd45339..5648b09 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
@@ -214,14 +214,7 @@ controlCenterModule.controller('metadataController', [
                     }, 50);
                 }
 
-                if ($common.formChanged($scope.ui.inputForm))
-                    $confirm.show('<span>You have unsaved changes.<br/><br/>Are
you sure you want to discard them?</span>').then(
-                        function () {
-                            setSelectedAndBackupItem();
-                        }
-                    );
-                else
-                    setSelectedAndBackupItem();
+                $common.confirmUnsavedChanges($confirm, $scope.ui.inputForm, setSelectedAndBackupItem);
 
                 $scope.ui.formTitle = $common.isDefined($scope.backupItem) && $scope.backupItem._id
?
                     'Selected metadata: ' + $scope.backupItem.name : 'New metadata';

http://git-wip-us.apache.org/repos/asf/ignite/blob/7f4b0155/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 86868e1..7e545a9 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
@@ -64,8 +64,8 @@ controlCenterModule.controller('summaryController', ['$scope', '$http',
'$common
         editor.setTheme('ace/theme/chrome');
     };
 
-    $scope.generateJavaServer = function() {
-        $scope.javaServer = $generatorJava.cluster($scope.selectedItem, $scope.configServer.javaClassServer
=== 2)
+    $scope.generateJavaServer = function () {
+        $scope.javaServer = $generatorJava.cluster($scope.selectedItem, $scope.configServer.javaClassServer
=== 2);
     };
 
     $scope.$watch('configServer.javaClassServer', $scope.generateJavaServer, true);
@@ -73,7 +73,7 @@ controlCenterModule.controller('summaryController', ['$scope', '$http',
'$common
     $scope.generateDockerServer = function() {
         var os = $scope.configServer.os ? $scope.configServer.os : $scope.oss[0];
 
-        $scope.dockerServer =  $generatorDocker.clusterDocker($scope.selectedItem, os);
+        $scope.dockerServer = $generatorDocker.clusterDocker($scope.selectedItem, os);
     };
 
     $scope.$watch('configServer.os', $scope.generateDockerServer, true);

http://git-wip-us.apache.org/repos/asf/ignite/blob/7f4b0155/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 dcac909..8acdb0b 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
@@ -31,13 +31,7 @@ hr {
     margin: 20px 0;
 }
 
-.main-header .logo {
-    height: auto;
-}
 
-.main-sidebar {
-    padding-top: 60px;
-}
 
 .navbar-default .navbar-brand, .navbar-default .navbar-brand:hover {
     position: absolute;
@@ -1364,7 +1358,7 @@ a {
 .ace_cursor { opacity:0 }
 
 .ace_editor, #ace_document {
-    margin: 0.65em 0 0 0;
+    margin: 0.85em 0 0 0;
 
     height: 400px;
 
@@ -1400,6 +1394,12 @@ a {
     margin-right: 3px;
     overflow: visible;
     position: absolute;
+    z-index: 9999;
+
+    label {
+        padding: 0 5px 0 5px;
+        background: white;
+    }
 
     i {
         cursor: pointer;

http://git-wip-us.apache.org/repos/asf/ignite/blob/7f4b0155/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 5860709..fccc2e0 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
@@ -40,5 +40,5 @@ block content
                     +advanced-options-bottom
                     +groups('advanced', 'backupItem')
             +advanced-options-top
-            .section
+            .section(ng-if='ui.expanded')
                 +save-remove-buttons

http://git-wip-us.apache.org/repos/asf/ignite/blob/7f4b0155/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 1abb8ae..cd9650a 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
@@ -40,5 +40,5 @@ block content
                     +advanced-options-bottom
                     +groups('advanced', 'backupItem')
             +advanced-options-top
-            .section
+            .section(ng-show='ui.expanded')
                 +save-remove-buttons

http://git-wip-us.apache.org/repos/asf/ignite/blob/7f4b0155/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 3418d6b..08740a5 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
@@ -468,6 +468,7 @@ mixin preview(previewModel, id)
 
     .preview-panel
         .preview-legend
+            label Preview
             i.group-legend-btn(ng-click='#{previewModelState} = !#{previewModelState}')
                 img(ng-if='#{previewModelState}' src='/images/xml.png' title='Show XML')
                 img(ng-if='!#{previewModelState}' src='/images/java.png' title='Show Java
code')
@@ -478,9 +479,9 @@ mixin save-remove-buttons
     button.btn.btn-primary(ng-hide='backupItem._id' ng-disabled='!formChanged(ui.inputForm)'
ng-click='saveItem()') Save
     .btn-group(ng-show='backupItem._id')
         button.btn.btn-primary(id='save-item' ng-disabled='!formChanged(ui.inputForm)' ng-click='saveItem()')
Save
-        button.btn.dropdown-toggle.btn-primary(ng-disabled='!backupItem._id' data-toggle='dropdown'
bs-dropdown='saveDropdown' data-placement='bottom-center')
+        button.btn.dropdown-toggle.btn-primary(id='save-item-dropdown' ng-disabled='!backupItem._id'
data-toggle='dropdown' bs-dropdown='saveDropdown' data-placement='bottom-center')
             span.caret
     .btn-group(ng-show='backupItem._id')
         button.btn.btn-primary(id='remove-item' ng-click='removeItem()') Remove
-        button.btn.dropdown-toggle.btn-primary(data-toggle='dropdown' bs-dropdown='removeDropdown'
data-placement='bottom-center')
+        button.btn.dropdown-toggle.btn-primary(id='remove-item-dropdown' data-toggle='dropdown'
bs-dropdown='removeDropdown' data-placement='bottom-center')
             span.caret


Mime
View raw message