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 WIP on preview.
Date Thu, 27 Aug 2015 07:50:38 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-843 bfb1e71cb -> c256b7a65


IGNITE-843 WIP on preview.


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

Branch: refs/heads/ignite-843
Commit: c256b7a65964ee6e686747af597d0df3426191dc
Parents: bfb1e71
Author: Alexey Kuznetsov <akuznetsov@apache.org>
Authored: Thu Aug 27 14:51:01 2015 +0700
Committer: Alexey Kuznetsov <akuznetsov@apache.org>
Committed: Thu Aug 27 14:51:01 2015 +0700

----------------------------------------------------------------------
 .../main/js/controllers/caches-controller.js    | 89 ++++++++++++++++----
 .../main/js/controllers/clusters-controller.js  | 89 ++++++++++++++++----
 .../src/main/js/controllers/common-module.js    | 41 ++++++++-
 .../main/js/controllers/metadata-controller.js  | 84 +++++++++++++++---
 .../src/main/js/public/stylesheets/style.scss   | 21 +++++
 .../main/js/routes/generator/generator-java.js  |  4 +-
 .../src/main/js/views/configuration/caches.jade | 10 ++-
 .../main/js/views/configuration/clusters.jade   | 10 ++-
 .../main/js/views/configuration/metadata.jade   | 10 ++-
 9 files changed, 292 insertions(+), 66 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/c256b7a6/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 b1ce78a..26a8da3 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
@@ -28,7 +28,14 @@ controlCenterModule.controller('cachesController', [
             $scope.tableNewItemActive = $table.tableNewItemActive;
             $scope.tableEditing = $table.tableEditing;
             $scope.tableStartEdit = $table.tableStartEdit;
-            $scope.tableRemove = $table.tableRemove;
+            $scope.tableRemove = function (item, field, index) {
+                $table.tableRemove(item, field, index);
+
+                markChanged();
+
+                // Dirty state do not change automatically.
+                $scope.ui.inputForm.$dirty = true;
+            };
 
             $scope.tableSimpleSave = $table.tableSimpleSave;
             $scope.tableSimpleSaveVisible = $table.tableSimpleSaveVisible;
@@ -87,6 +94,23 @@ controlCenterModule.controller('cachesController', [
                 $common.hidePopover();
             };
 
+            function markChanged() {
+                sessionStorage.cacheBackupItemChanged = true;
+
+                $scope.ui.inputForm.$setDirty();
+            }
+
+            function markPristine() {
+                if ($common.isDefined($scope.ui.inputForm))
+                    $scope.ui.inputForm.$setPristine();
+
+                sessionStorage.removeItem('cacheBackupItemChanged');
+            }
+
+            function cacheChanged() {
+                return $common.isDefined($scope.ui.inputForm) && $scope.ui.inputForm.$dirty;
+            }
+
             $scope.panels = {activePanels: [0]};
 
             $scope.$watchCollection('panels.activePanels', function () {
@@ -239,13 +263,13 @@ controlCenterModule.controller('cachesController', [
                                     });
                                 }
 
-                                $scope.selectItem(cache, restoredItem);
+                                $scope.selectItem(cache, restoredItem, sessionStorage.cacheBackupItemChanged);
                             }
                             else
                                 sessionStorage.removeItem('cacheBackupItem');
                         }
                         else
-                            $scope.backupItem = restoredItem;
+                            $scope.selectItem(undefined, restoredItem, sessionStorage.cacheBackupItemChanged)
                     }
                     else if ($scope.caches.length > 0)
                         $scope.selectItem($scope.caches[0]);
@@ -289,6 +313,8 @@ controlCenterModule.controller('cachesController', [
                             $scope.preview.rebalanceJava = $generatorJava.cacheRebalance(val,
varName).join('');
                             $scope.preview.serverNearCacheJava = $generatorJava.cacheServerNearCache(val,
varName).join('');
                             $scope.preview.statisticsJava = $generatorJava.cacheStatistics(val,
varName).join('');
+
+                            markChanged();
                         }
                     }, true);
 
@@ -300,26 +326,49 @@ controlCenterModule.controller('cachesController', [
                     $common.showError(errMsg);
                 });
 
-            $scope.selectItem = function (item, backup) {
-                $table.tableReset();
+            $scope.selectItem = function (item, backup, changed) {
+                function selectItem() {
+                    $table.tableReset();
 
-                $scope.selectedItem = item;
+                    if (backup)
+                        $scope.backupItem = backup;
+                    else if (item)
+                        $scope.backupItem = angular.copy(item);
+                    else
+                        $scope.backupItem = undefined;
 
-                if (backup)
-                    $scope.backupItem = backup;
-                else if (item)
-                    $scope.backupItem = angular.copy(item);
-                else
-                    $scope.backupItem = undefined;
+                    $scope.selectedItem = item;
+
+                    if (item)
+                        sessionStorage.cacheSelectedItem = angular.toJson(item);
+                    else
+                        sessionStorage.removeItem('cacheSelectedItem');
+
+                    $timeout(function () {
+                        $common.previewHeightUpdate();
+
+                        $common.configureStickyElement();
+                    });
 
-                if (item)
-                    sessionStorage.cacheSelectedItem = angular.toJson(item);
+                    $timeout(function () {
+                        if (changed)
+                            markChanged();
+                        else
+                            markPristine();
+                    }, 50);
+                }
+
+                if (cacheChanged())
+                    $confirm.show('<span>Current cache is modified.<br/><br/>Discard
unsaved changes?</span>').then(
+                        function () {
+                            selectItem();
+                        }
+                    );
                 else
-                    sessionStorage.removeItem('cacheSelectedItem');
+                    selectItem();
 
-                $timeout(function () {
-                    $common.previewHeightUpdate();
-                })
+                $scope.ui.formTitle = $common.isDefined($scope.backupItem) && $scope.backupItem._id
?
+                    'Cache "' + $scope.backupItem.name + '" editing' : 'New cache';
             };
 
             // Add new cache.
@@ -397,6 +446,8 @@ controlCenterModule.controller('cachesController', [
             function save(item) {
                 $http.post('caches/save', item)
                     .success(function (_id) {
+                        markPristine();
+
                         var idx = _.findIndex($scope.caches, function (cache) {
                             return cache._id == _id;
                         });
@@ -451,6 +502,8 @@ controlCenterModule.controller('cachesController', [
 
                 $confirm.show('Are you sure you want to remove cache: "' + selectedItem.name
+ '"?').then(
                     function () {
+                        markPristine();
+
                         var _id = selectedItem._id;
 
                         $http.post('caches/remove', {_id: _id})

http://git-wip-us.apache.org/repos/asf/ignite/blob/c256b7a6/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 8ea6314..d01d21d 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
@@ -25,7 +25,14 @@ controlCenterModule.controller('clustersController', ['$scope', '$http',
'$timeo
         $scope.tableNewItemActive = $table.tableNewItemActive;
         $scope.tableEditing = $table.tableEditing;
         $scope.tableStartEdit = $table.tableStartEdit;
-        $scope.tableRemove = $table.tableRemove;
+        $scope.tableRemove = function (item, field, index) {
+            $table.tableRemove(item, field, index);
+
+            markChanged();
+
+            // Dirty state do not change automatically.
+            $scope.ui.inputForm.$dirty = true;
+        };
 
         $scope.tableSimpleSave = $table.tableSimpleSave;
         $scope.tableSimpleSaveVisible = $table.tableSimpleSaveVisible;
@@ -90,6 +97,23 @@ controlCenterModule.controller('clustersController', ['$scope', '$http',
'$timeo
             $common.hidePopover();
         };
 
+        function markChanged() {
+            sessionStorage.clusterBackupItemChanged = true;
+
+            $scope.ui.inputForm.$setDirty();
+        }
+
+        function markPristine() {
+            if ($common.isDefined($scope.ui.inputForm))
+                $scope.ui.inputForm.$setPristine();
+
+            sessionStorage.removeItem('clusterBackupItemChanged');
+        }
+
+        function clusterChanged() {
+            return $common.isDefined($scope.ui.inputForm) && $scope.ui.inputForm.$dirty;
+        }
+
         $scope.panels = {activePanels: [0]};
 
         $scope.$watchCollection('panels.activePanels', function () {
@@ -178,13 +202,13 @@ controlCenterModule.controller('clustersController', ['$scope', '$http',
'$timeo
                                 });
                             }
 
-                            $scope.selectItem(cluster, restoredItem);
+                            $scope.selectItem(cluster, restoredItem, sessionStorage.clusterBackupItemChanged);
                         }
                         else
                             sessionStorage.removeItem('clusterBackupItem');
                     }
                     else
-                        $scope.backupItem = restoredItem;
+                        $scope.selectItem(undefined, restoredItem, sessionStorage.clusterBackupItemChanged);
                 }
                 else if ($scope.clusters.length > 0)
                     $scope.selectItem($scope.clusters[0]);
@@ -226,6 +250,8 @@ controlCenterModule.controller('clustersController', ['$scope', '$http',
'$timeo
                         $scope.preview.timeJava = $generatorJava.clusterTime(val).join('');
                         $scope.preview.poolsJava = $generatorJava.clusterPools(val).join('');
                         $scope.preview.transactionsJava = $generatorJava.clusterTransactions(val).join('');
+
+                        markChanged();
                     }
                 }, true);
 
@@ -237,26 +263,49 @@ controlCenterModule.controller('clustersController', ['$scope', '$http',
'$timeo
                 $common.showError(errMsg);
             });
 
-        $scope.selectItem = function (item, backup) {
-            $table.tableReset();
+        $scope.selectItem = function (item, backup, changed) {
+            function selectItem() {
+                $table.tableReset();
 
-            $scope.selectedItem = item;
+                $scope.selectedItem = item;
 
-            if (backup)
-                $scope.backupItem = backup;
-            else if (item)
-                $scope.backupItem = angular.copy(item);
-            else
-                $scope.backupItem = undefined;
+                if (backup)
+                    $scope.backupItem = backup;
+                else if (item)
+                    $scope.backupItem = angular.copy(item);
+                else
+                    $scope.backupItem = undefined;
+
+                if (item)
+                    sessionStorage.clusterSelectedItem = angular.toJson(item);
+                else
+                    sessionStorage.removeItem('clusterSelectedItem');
+
+                $timeout(function () {
+                    $common.previewHeightUpdate();
+
+                    $common.configureStickyElement();
+                });
 
-            if (item)
-                sessionStorage.clusterSelectedItem = angular.toJson(item);
+                $timeout(function () {
+                    if (changed)
+                        markChanged();
+                    else
+                        markPristine();
+                }, 50);
+            }
+
+            if (clusterChanged())
+                $confirm.show('<span>Current cluster is modified.<br/><br/>Discard
unsaved changes?</span>').then(
+                    function () {
+                        selectItem();
+                    }
+                );
             else
-                sessionStorage.removeItem('clusterSelectedItem');
+                selectItem();
 
-            $timeout(function () {
-                $common.previewHeightUpdate();
-            });
+            $scope.ui.formTitle = $common.isDefined($scope.backupItem) && $scope.backupItem._id
?
+                'Selected cluster: ' + $scope.backupItem.name : 'New cluster';
         };
 
         // Add new cluster.
@@ -338,6 +387,8 @@ controlCenterModule.controller('clustersController', ['$scope', '$http',
'$timeo
         function save(item) {
             $http.post('clusters/save', item)
                 .success(function (_id) {
+                    markPristine();
+
                     var idx = _.findIndex($scope.clusters, function (cluster) {
                         return cluster._id == _id;
                     });
@@ -392,6 +443,8 @@ controlCenterModule.controller('clustersController', ['$scope', '$http',
'$timeo
 
             $confirm.show('Are you sure you want to remove cluster: "' + selectedItem.name
+ '"?').then(
                 function () {
+                    markPristine();
+
                     var _id = selectedItem._id;
 
                     $http.post('clusters/remove', {_id: _id})

http://git-wip-us.apache.org/repos/asf/ignite/blob/c256b7a6/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 e85dedf..5334239 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
@@ -501,6 +501,37 @@ controlCenterModule.service('$common', [
             }
         }
 
+        var win = $(window);
+
+        var stickyOffsetTop = undefined;
+
+        function configureStickyElement() {
+            var elem = $('#scrolled');
+
+            if (elem.length > 0) {
+                if (!stickyOffsetTop)
+                    stickyOffsetTop = elem.offset().top;
+
+                var cont = $('.docs-content');
+
+                var scrollSpyWidth = Math.round(cont[0].getBoundingClientRect().width);
+
+                elem.toggleClass('panel-sticky', win.scrollTop() > stickyOffsetTop);
+
+                elem.width(scrollSpyWidth);
+
+                elem.find('label').width(scrollSpyWidth - elem.find('#buttonsPnl').outerWidth()
- 1);
+            }
+        }
+
+        win.scroll(function() {
+            configureStickyElement();
+        });
+
+        win.resize(function () {
+            configureStickyElement();
+        });
+
         return {
             getModel: function (obj, field) {
                 var path = field.path;
@@ -668,6 +699,9 @@ controlCenterModule.service('$common', [
                         subtree: true
                     });
                 });
+            },
+            configureStickyElement: function () {
+                configureStickyElement();
             }
         }
     }]);
@@ -1129,9 +1163,12 @@ controlCenterModule.factory('$focus', function ($timeout) {
 
                 var winOffset = window.pageYOffset;
 
-                if(elemOffset - 20 < winOffset || elemOffset + elem.outerHeight(true)
+ 20 > winOffset + window.innerHeight)
+                var topHeight = $('.section-top').outerHeight();
+
+                if(elemOffset - 20 - topHeight < winOffset
+                    || elemOffset + elem.outerHeight(true) + 20 > winOffset + window.innerHeight)
                     $('html, body').animate({
-                        scrollTop: elemOffset - 20
+                        scrollTop: elemOffset - 20 - topHeight
                     }, 10);
 
                 elem[0].focus();

http://git-wip-us.apache.org/repos/asf/ignite/blob/c256b7a6/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 46afce6..a09c1fa 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
@@ -20,6 +20,8 @@ controlCenterModule.controller('metadataController', [
         function ($scope, $controller, $http, $modal, $common, $timeout, $focus, $confirm,
$copy, $table, $preview) {
             // Initialize the super class and extend it.
             angular.extend(this, $controller('agent-download', {$scope: $scope}));
+            $scope.ui = {};
+
             $scope.agentGoal = 'load metadata from database schema';
             $scope.agentTestDriveOption = '--test-metadata';
 
@@ -33,7 +35,14 @@ controlCenterModule.controller('metadataController', [
             $scope.tableNewItemActive = $table.tableNewItemActive;
             $scope.tableEditing = $table.tableEditing;
             $scope.tableStartEdit = $table.tableStartEdit;
-            $scope.tableRemove = $table.tableRemove;
+            $scope.tableRemove = function (item, field, index) {
+                $table.tableRemove(item, field, index);
+
+                markChanged();
+
+                // Dirty state do not change automatically.
+                $scope.ui.inputForm.$dirty = true;
+            };
 
             $scope.tableSimpleSave = $table.tableSimpleSave;
             $scope.tableSimpleSaveVisible = $table.tableSimpleSaveVisible;
@@ -157,6 +166,23 @@ controlCenterModule.controller('metadataController', [
             });
             $scope.metadatas = [];
 
+            function markChanged() {
+                sessionStorage.metadataBackupItemChanged = true;
+
+                $scope.ui.inputForm.$setDirty();
+            }
+
+            function markPristine() {
+                if ($common.isDefined($scope.ui.inputForm))
+                    $scope.ui.inputForm.$setPristine();
+
+                sessionStorage.removeItem('metadataBackupItemChanged');
+            }
+
+            function metadataChanged() {
+                return $common.isDefined($scope.ui.inputForm) && $scope.ui.inputForm.$dirty;
+            }
+
             $scope.isJavaBuildInClass = function () {
                 var item = $scope.backupItem;
 
@@ -183,15 +209,38 @@ controlCenterModule.controller('metadataController', [
                     $scope.selectItem($scope.metadatas[0]);
             }
 
-            function setSelectedAndBackupItem(sel, bak) {
-                $table.tableReset();
+            function setSelectedAndBackupItem(sel, bak, changed) {
+                function setSelectedAndBackupItem() {
+                    $table.tableReset();
 
-                $scope.selectedItem = sel;
-                $scope.backupItem = bak;
+                    $scope.backupItem = bak;
+                    $scope.selectedItem = sel;
 
-                $timeout(function () {
-                    $common.previewHeightUpdate();
-                })
+                    $timeout(function () {
+                        $common.previewHeightUpdate();
+
+                        $common.configureStickyElement();
+                    });
+
+                    $timeout(function () {
+                        if (changed)
+                            markChanged();
+                        else
+                            markPristine();
+                    }, 50);
+                }
+
+                if (metadataChanged())
+                    $confirm.show('<span>Current metadata is modified.<br/><br/>Discard
unsaved changes?</span>').then(
+                        function () {
+                            setSelectedAndBackupItem();
+                        }
+                    );
+                else
+                    setSelectedAndBackupItem();
+
+                $scope.ui.formTitle = $common.isDefined($scope.backupItem) && $scope.backupItem._id
?
+                    'Metadata "' + $scope.backupItem.name + '" editing' : 'New metadata';
             }
 
             $scope.selectAllSchemas = function () {
@@ -487,7 +536,7 @@ controlCenterModule.controller('metadataController', [
                                         }) >= 0;
                                 });
 
-                                setSelectedAndBackupItem($scope.metadatas[idx], restoredItem);
+                                setSelectedAndBackupItem($scope.metadatas[idx], restoredItem,
sessionStorage.metadataBackupItemChanged);
                             }
                             else {
                                 sessionStorage.removeItem('metadataBackupItem');
@@ -496,7 +545,7 @@ controlCenterModule.controller('metadataController', [
                             }
                         }
                         else
-                            setSelectedAndBackupItem(undefined, restoredItem);
+                            setSelectedAndBackupItem(undefined, restoredItem, sessionStorage.metadataBackupItemChanged);
                     }
                     else
                         selectFirstItem();
@@ -516,6 +565,8 @@ controlCenterModule.controller('metadataController', [
                             $scope.preview.generalJava = $generatorJava.metadataGeneral(val).join('');
                             $scope.preview.queryJava = $generatorJava.metadataQuery(val).join('');
                             $scope.preview.storeJava = $generatorJava.metadataStore(val).join('');
+
+                            markChanged();
                         }
                     }, true);
 
@@ -556,9 +607,7 @@ controlCenterModule.controller('metadataController', [
                     $common.ensureActivePanel($scope.panels, 'metadata-data', 'metadataName');
                 });
 
-                $scope.selectedItem = undefined;
-
-                $scope.backupItem = {space: $scope.spaces[0]._id};
+                setSelectedAndBackupItem(undefined, {space: $scope.spaces[0]._id});
             };
 
             function queryConfigured(item) {
@@ -647,6 +696,8 @@ controlCenterModule.controller('metadataController', [
 
                 $http.post('metadata/save', item)
                     .success(function (_id) {
+                        markPristine();
+
                         $common.showInfo('Metadata "' + item.name + '" saved.');
 
                         var idx = _.findIndex($scope.metadatas, function (metadata) {
@@ -706,6 +757,8 @@ controlCenterModule.controller('metadataController', [
 
                         $http.post('metadata/remove', {_id: _id})
                             .success(function () {
+                                markPristine();
+
                                 $common.showInfo('Cache type metadata has been removed: '
+ selectedItem.name);
 
                                 var metadatas = $scope.metadatas;
@@ -1012,6 +1065,11 @@ controlCenterModule.controller('metadataController', [
                 $table.tableReset();
 
                 group.fields.splice(index, 1);
+
+                markChanged();
+
+                // Dirty state do not change automatically.
+                $scope.ui.inputForm.$dirty = true;
             };
         }]
 );

http://git-wip-us.apache.org/repos/asf/ignite/blob/c256b7a6/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 04cb9e8..c8abd89 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
@@ -954,6 +954,21 @@ button .caret, .btn .caret {
     margin: 0;
 }
 
+div.panel-sticky {
+    z-index: 10000;
+    position: fixed;
+    top: 0;
+    background-color: #ffffff;
+
+    border-left: 1px solid #e2e2e2;
+    border-bottom: 1px solid #e2e2e2;
+    border-right: 1px solid #e2e2e2;
+
+    margin-left: -30px;
+    margin-top: 0;
+    padding: 10px 30px 10px 29px;
+}
+
 .panel-title a {
     font-size: 14px;
 }
@@ -1331,6 +1346,12 @@ a {
     margin-top: 20px;
 }
 
+.section-top {
+    width: 100%;
+    margin-top: 10px;
+    margin-bottom: 20px;
+}
+
 .advanced-options {
     @extend .section;
     margin-bottom: 20px;

http://git-wip-us.apache.org/repos/asf/ignite/blob/c256b7a6/modules/control-center-web/src/main/js/routes/generator/generator-java.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/routes/generator/generator-java.js b/modules/control-center-web/src/main/js/routes/generator/generator-java.js
index b524180..202598b 100644
--- a/modules/control-center-web/src/main/js/routes/generator/generator-java.js
+++ b/modules/control-center-web/src/main/js/routes/generator/generator-java.js
@@ -1018,12 +1018,10 @@ $generatorJava.cache = function(cache, varName, res) {
 };
 
 // Generate cluster caches.
-$generatorJava.clusterCaches = function (cluster, res) {
+$generatorJava.clusterCaches = function (caches, res) {
     if (!res)
         res = $generatorCommon.builder();
 
-    var caches = cluster.caches;
-
     if (caches && caches.length > 0) {
         res.emptyLineIfNeeded();
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/c256b7a6/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 d8719c2..3abb011 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
@@ -32,13 +32,15 @@ block content
             button.btn.btn-primary(ng-click='createItem()') Add cache
         hr
         form.form-horizontal(name='ui.inputForm' ng-if='backupItem' novalidate)
+            .section-top(id='scrolled')
+                label {{ui.formTitle}}
+                span(id='buttonsPnl')
+                    button.btn.btn-primary(ng-click='saveItem()') Save
+                    button.btn.btn-primary(ng-show='backupItem._id' ng-click='saveItemAs()')
Copy
+                    button.btn.btn-primary(ng-show='backupItem._id' ng-click='removeItem()')
Remove
             .panel-group(bs-collapse ng-model='panels.activePanels' data-allow-multiple='true')
                 +groups('general', 'backupItem')
                 div(ng-show='ui.expanded')
                     +advanced-options-bottom
                     +groups('advanced', 'backupItem')
             +advanced-options-top
-            .section
-                button.btn.btn-primary(ng-click='saveItem()') Save
-                button.btn.btn-primary(ng-show='backupItem._id' ng-click='saveItemAs()')
Copy
-                button.btn.btn-primary(ng-show='backupItem._id' ng-click='removeItem()')
Remove

http://git-wip-us.apache.org/repos/asf/ignite/blob/c256b7a6/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 92045b7..c4c2428 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,13 +35,15 @@ block content
             i.tipLabel.fa.fa-question-circle(bs-tooltip data-title='{{joinTip(templateTip)}}'
type='button')
         hr
         form.form-horizontal(name='ui.inputForm' ng-if='backupItem' novalidate)
+            .section-top(id='scrolled')
+                label {{ui.formTitle}}
+                span(id='buttonsPnl')
+                    button.btn.btn-primary(ng-click='saveItem()') Save
+                    button.btn.btn-primary(ng-show='backupItem._id' ng-click='saveItemAs()')
Copy
+                    button.btn.btn-primary(ng-show='backupItem._id' ng-click='removeItem()')
Remove
             .panel-group(bs-collapse ng-model='panels.activePanels' data-allow-multiple='true'
ng-click='triggerDigest = true')
                 +groups('general', 'backupItem')
                 div(ng-show='ui.expanded')
                     +advanced-options-bottom
                     +groups('advanced', 'backupItem')
             +advanced-options-top
-            .section
-                button.btn.btn-primary(ng-click='saveItem()') Save
-                button.btn.btn-primary(ng-show='backupItem._id' ng-click='saveItemAs()')
Copy
-                button.btn.btn-primary(ng-show='backupItem._id' ng-click='removeItem()')
Remove

http://git-wip-us.apache.org/repos/asf/ignite/blob/c256b7a6/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 a6b71bd..12e79f1 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
@@ -33,9 +33,11 @@ block content
             button.btn.btn-primary(ng-click='showLoadMetadataModal()') Load from database
         hr
         form.form-horizontal(name='ui.inputForm' ng-if='backupItem' novalidate)
+            .section-top(id='scrolled')
+                label {{ui.formTitle}}
+                span(id='buttonsPnl')
+                    button.btn.btn-primary(ng-click='saveItem()') Save
+                    button.btn.btn-primary(ng-show='backupItem._id' ng-click='saveItemAs()')
Copy
+                    button.btn.btn-primary.btn-second(ng-show='backupItem._id' ng-click='removeItem()')
Remove
             .panel-group(bs-collapse ng-model='panels.activePanels' data-allow-multiple='true')
                 +groups('metadata', 'backupItem')
-            .section
-                button.btn.btn-primary(ng-click='saveItem()') Save
-                button.btn.btn-primary(ng-show='backupItem._id' ng-click='saveItemAs()')
Copy
-                button.btn.btn-primary.btn-second(ng-show='backupItem._id' ng-click='removeItem()')
Remove


Mime
View raw message