ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akuznet...@apache.org
Subject incubator-ignite git commit: # IGNITE-843 Implemented show popup for discovery.
Date Fri, 29 May 2015 09:05:43 GMT
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-843 1d6480ca1 -> 619c1c8d1


# IGNITE-843 Implemented show popup for discovery.


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

Branch: refs/heads/ignite-843
Commit: 619c1c8d158e3124ec678285ea7a2ccfa1836bc3
Parents: 1d6480c
Author: AKuznetsov <akuznetsov@gridgain.com>
Authored: Fri May 29 16:05:40 2015 +0700
Committer: AKuznetsov <akuznetsov@gridgain.com>
Committed: Fri May 29 16:05:40 2015 +0700

----------------------------------------------------------------------
 .../public/javascripts/controllers/clusters.js  | 15 ++++++++--
 modules/webconfig/nodejs/routes/pages.js        | 11 ++-----
 modules/webconfig/nodejs/views/clusters.jade    | 22 +++++++-------
 modules/webconfig/nodejs/views/discovery.jade   | 30 ++++++++++++++++++++
 modules/webconfig/nodejs/views/multicast.jade   | 27 ------------------
 modules/webconfig/nodejs/views/staticIps.jade   | 30 --------------------
 6 files changed, 56 insertions(+), 79 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/619c1c8d/modules/webconfig/nodejs/public/javascripts/controllers/clusters.js
----------------------------------------------------------------------
diff --git a/modules/webconfig/nodejs/public/javascripts/controllers/clusters.js b/modules/webconfig/nodejs/public/javascripts/controllers/clusters.js
index b435e6e..5992971 100644
--- a/modules/webconfig/nodejs/public/javascripts/controllers/clusters.js
+++ b/modules/webconfig/nodejs/public/javascripts/controllers/clusters.js
@@ -17,14 +17,23 @@ configuratorModule.controller('clustersController', ['$scope', '$modal',
'$http'
         ];
 
         $scope.discoveryAsString = function(value) {
-            for (var i in $scope.discoveries) {
-                if ($scope.discoveries[i].value == value)
-                    return $scope.discoveries[i].label;
+            for (var i = 0; i < $scope.discoveries.length; i++) {
+                var discovery = $scope.discoveries[i];
+
+                if (discovery.value == value)
+                    return discovery.label;
             }
 
             return 'Wrong discovery';
         };
 
+        // Create popup for discovery advanced settings.
+        var discoveryModal = $modal({scope: $scope, template: '/discovery', show: false});
+
+        $scope.editDiscovery = function(cluster) {
+            discoveryModal.$promise.then(discoveryModal.show);
+        };
+
         // When landing on the page, get clusters and show them.
         $http.get('/rest/clusters')
             .success(function(data) {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/619c1c8d/modules/webconfig/nodejs/routes/pages.js
----------------------------------------------------------------------
diff --git a/modules/webconfig/nodejs/routes/pages.js b/modules/webconfig/nodejs/routes/pages.js
index 5e72aec..7f19c4b 100644
--- a/modules/webconfig/nodejs/routes/pages.js
+++ b/modules/webconfig/nodejs/routes/pages.js
@@ -10,14 +10,9 @@ router.get('/login', function(req, res) {
     res.render('login');
 });
 
-/* GET advanced options for TcpDiscoveryVmIpFinder page. */
-router.get('/staticIps', function(req, res) {
-    res.render('staticIps');
-});
-
-/* GET advanced options for TcpDiscoveryMulticastIpFinder page. */
-router.get('/multicast', function(req, res) {
-    res.render('multicast');
+/* GET page for discovery advanced settings. */
+router.get('/discovery', function(req, res) {
+    res.render('discovery');
 });
 
 /* GET register page. */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/619c1c8d/modules/webconfig/nodejs/views/clusters.jade
----------------------------------------------------------------------
diff --git a/modules/webconfig/nodejs/views/clusters.jade b/modules/webconfig/nodejs/views/clusters.jade
index c89d5ff..1c474e0 100644
--- a/modules/webconfig/nodejs/views/clusters.jade
+++ b/modules/webconfig/nodejs/views/clusters.jade
@@ -43,7 +43,7 @@ block content
                     td
                     td
                         .input-group
-                            input.form-control(type='text' name="name" ng-model='create.name'
placeholder='Enter cluster name')
+                            input.form-control(type='text' name='name' ng-model='create.name'
placeholder='Enter cluster name')
                             button(class=['form-control'] ng-model='create.template' data-placement='bottom-center'
data-template='/select' data-placeholder='Choose cluster template' bs-options='item.value
as item.label for item in templates' bs-select)
                     td
                         button(ng-click='createItem()' class=['btn', 'btn-success', 'fa',
'fa-plus'] ng-disabled='!(create.name && create.template)') &nbspCreate
@@ -51,37 +51,37 @@ block content
             .form-group
                 label.control-label.col-sm-4 Name:
                 .col-sm-8
-                    input.form-control(type="text" ng-model='backupItem.name')
+                    input.form-control(type='text' ng-model='backupItem.name')
             .form-group
                 label.control-label.col-sm-4 Discovery:
                 .col-sm-8
                     .input-group
-                        button(class=['form-control'] ng-model='backupItem.discovery' data-placement='bottom-center'
data-template='/select' data-placeholder='Choose discovery' bs-options='item.value as item.label
for item in discoveries' bs-select)
+                        button.form-control(ng-model='backupItem.discovery' data-placement='bottom-center'
data-template='/select' data-placeholder='Choose discovery' bs-options='item.value as item.label
for item in discoveries' bs-select)
                         span.input-group-btn
-                            button(class=['btn', 'btn-default'])
-                                i(class=['fa', 'fa-caret-square-o-down'])
+                            button(class=['btn', 'btn-default'] ng-click='editDiscovery(cluster)')
+                                i(class=['fa', 'fa-bars'])
             .panel.advanced(bs-collapse data-start-collapsed='true')
                 .panel-collapse(bs-collapse-target)
                     .form-group
                         label.control-label.col-sm-4 Public thread pool size:
                         .col-sm-8
-                            input.form-control(type="text" ng-model='backupItem.pubPoolSize')
+                            input.form-control(type='text' ng-model='backupItem.pubPoolSize')
                     .form-group
                         label.control-label.col-sm-4 System thread pool size:
                         .col-sm-8
-                            input.form-control(type="text" ng-model='backupItem.sysPoolSize')
+                            input.form-control(type='text' ng-model='backupItem.sysPoolSize')
                     .form-group
                         label.control-label.col-sm-4 Management thread pool size:
                         .col-sm-8
-                            input.form-control(type="text" ng-model='backupItem.mgmtPoolSize'
placeholder='4')
+                            input.form-control(type='text' ng-model='backupItem.mgmtPoolSize'
placeholder='4')
                     .form-group
                         label.control-label.col-sm-4 Peer class loading thread pool size:
                         .col-sm-8
-                            input.form-control(type="text" ng-model='backupItem.p2pPoolSize'
placeholder='2')
+                            input.form-control(type='text' ng-model='backupItem.p2pPoolSize'
placeholder='2')
                 .panel-heading
                     .panel-title
                         span(bs-collapse-toggle)
-                            a(ng-click="expanded = true" ng-hide="expanded") Show advanced
settings
-                            a(ng-click="expanded = false" ng-show="expanded") Hide advanced
settings
+                            a(ng-click='expanded = true' ng-hide='expanded') Show advanced
settings
+                            a(ng-click='expanded = false' ng-show='expanded') Hide advanced
settings
             center
                 button.btn.btn-primary(ng-click='saveCluster(backupItem)' ng-disabled='editForm.$invalid')
Apply
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/619c1c8d/modules/webconfig/nodejs/views/discovery.jade
----------------------------------------------------------------------
diff --git a/modules/webconfig/nodejs/views/discovery.jade b/modules/webconfig/nodejs/views/discovery.jade
new file mode 100644
index 0000000..46a4241
--- /dev/null
+++ b/modules/webconfig/nodejs/views/discovery.jade
@@ -0,0 +1,30 @@
+div(class=['modal', 'center'] tabindex='-1' role='dialog')
+    .modal-dialog
+        .modal-content
+            .modal-header
+                button.close(type='button', ng-click='$hide()', aria-hidden='true') &times;
+                h4.modal-title Configure Static IPs
+            .modal-body
+                div.block-edit-parameters
+                    div.btn-group
+                        button(ng-click='add()' class=['btn', 'btn-default', 'fa', 'fa-plus']
) &nbspAdd
+                table(ng-table="tcpDiscoveryVmIpFinderTable" class=['table', 'table-bordered',
'table-hover'])
+                    tr(ng-repeat="address in $data")
+                        td(data-title="'#'" class=['text-center', 'vcenter'] style='width:
50px') {{$index + 1}}
+                        td.text-center(data-title="'IP Address with ports range'")
+                            div(ng-if='!(editColumn == "ip" && currentRow == cluster)')
+                                span(ng-if='cluster.name') {{'127.0.0.1:47500..47509'}}
+                                span.pull-right(type='button' ng-click='beginEditStaticIps(cluster);')
+                                    i(class=['fa', 'fa-pencil'])
+                            div.input-group(ng-if='editColumn == "name" && currentRow
== cluster')
+                                input.form-control(type='text' ng-model='cluster.name')
+                                span.input-group-addon
+                                    i(class=['fa', 'fa-repeat'] ng-click='revert();')
+                                    i(class=['fa', 'fa-save'] ng-click='submit();' style='margin-left:
10px;')
+                        td.col-sm-1(data-title="'Delete'")
+                            center
+                                span(type='button' ng-click='delete(cluster)')
+                                    i(class=['fa', 'fa-remove'])
+            .modal-footer
+                button.btn.btn-primary(ng-click='saveDiscovery(disco_info)' ng-disabled='discoveryForm.$invalid')
Save
+                button.btn.btn-primary(ng-click='$hide()') Cancel

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/619c1c8d/modules/webconfig/nodejs/views/multicast.jade
----------------------------------------------------------------------
diff --git a/modules/webconfig/nodejs/views/multicast.jade b/modules/webconfig/nodejs/views/multicast.jade
deleted file mode 100644
index 475aa95..0000000
--- a/modules/webconfig/nodejs/views/multicast.jade
+++ /dev/null
@@ -1,27 +0,0 @@
-div(class=['modal', 'center'] tabindex='-1' role='dialog')
-    .modal-dialog
-        .modal-content
-            .modal-header
-                button.close(type='button', ng-click='$hide()', aria-hidden='true') &times;
-                h4.modal-title Configure TcpDiscoveryMulticastIpFinder
-            .modal-body
-                div.block-edit-parameters
-                    div.btn-group
-                        button(ng-click='add()' class=['btn', 'btn-default', 'fa', 'fa-plus']
) &nbspAdd
-                    table(ng-table="clustersTable" class=['table', 'table-bordered', 'table-hover'])
-                form.form-horizontal(name='discoveryForm')
-                    .modal-body.row
-                        div(ng-show='errorMessage')
-                            p.text-center.error-message {{errorMessage}}
-                        .col-xs-10.login.col-xs-offset-1
-                            div.form-group
-                                label.col-sm-3.control-label IP Address
-                                .controls.col-sm-9
-                                    input.form-control(type='text', ng-model='discovery.ip',
placeholder='127.0.0.0', focus-me='true', required)
-                            div.form-group
-                                label.col-sm-3.control-label Ports range
-                                .controls.col-sm-9
-                                    input.form-control(type='text', ng-model='discovery.ports',
placeholder='47500..47509', required)
-                    .modal-footer
-                        button.btn.btn-primary(ng-click='saveDiscovery(disco_info)' ng-disabled='discoveryForm.$invalid')
Save
-                        button.btn.btn-primary(ng-click='$hide()') Cancel

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/619c1c8d/modules/webconfig/nodejs/views/staticIps.jade
----------------------------------------------------------------------
diff --git a/modules/webconfig/nodejs/views/staticIps.jade b/modules/webconfig/nodejs/views/staticIps.jade
deleted file mode 100644
index 46a4241..0000000
--- a/modules/webconfig/nodejs/views/staticIps.jade
+++ /dev/null
@@ -1,30 +0,0 @@
-div(class=['modal', 'center'] tabindex='-1' role='dialog')
-    .modal-dialog
-        .modal-content
-            .modal-header
-                button.close(type='button', ng-click='$hide()', aria-hidden='true') &times;
-                h4.modal-title Configure Static IPs
-            .modal-body
-                div.block-edit-parameters
-                    div.btn-group
-                        button(ng-click='add()' class=['btn', 'btn-default', 'fa', 'fa-plus']
) &nbspAdd
-                table(ng-table="tcpDiscoveryVmIpFinderTable" class=['table', 'table-bordered',
'table-hover'])
-                    tr(ng-repeat="address in $data")
-                        td(data-title="'#'" class=['text-center', 'vcenter'] style='width:
50px') {{$index + 1}}
-                        td.text-center(data-title="'IP Address with ports range'")
-                            div(ng-if='!(editColumn == "ip" && currentRow == cluster)')
-                                span(ng-if='cluster.name') {{'127.0.0.1:47500..47509'}}
-                                span.pull-right(type='button' ng-click='beginEditStaticIps(cluster);')
-                                    i(class=['fa', 'fa-pencil'])
-                            div.input-group(ng-if='editColumn == "name" && currentRow
== cluster')
-                                input.form-control(type='text' ng-model='cluster.name')
-                                span.input-group-addon
-                                    i(class=['fa', 'fa-repeat'] ng-click='revert();')
-                                    i(class=['fa', 'fa-save'] ng-click='submit();' style='margin-left:
10px;')
-                        td.col-sm-1(data-title="'Delete'")
-                            center
-                                span(type='button' ng-click='delete(cluster)')
-                                    i(class=['fa', 'fa-remove'])
-            .modal-footer
-                button.btn.btn-primary(ng-click='saveDiscovery(disco_info)' ng-disabled='discoveryForm.$invalid')
Save
-                button.btn.btn-primary(ng-click='$hide()') Cancel


Mime
View raw message