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 WIP on clusters table.
Date Tue, 26 May 2015 10:58:36 GMT
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-843 9741bfc70 -> c92da1671


# IGNITE-843 WIP on clusters table.


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

Branch: refs/heads/ignite-843
Commit: c92da16718e554537c6d2719563de9ddb87bca6a
Parents: 9741bfc
Author: AKuznetsov <akuznetsov@gridgain.com>
Authored: Tue May 26 17:58:29 2015 +0700
Committer: AKuznetsov <akuznetsov@gridgain.com>
Committed: Tue May 26 17:58:29 2015 +0700

----------------------------------------------------------------------
 .../public/javascripts/controllers/clusters.js  | 15 ++++++++----
 modules/webconfig/nodejs/routes/clusters.js     |  1 +
 modules/webconfig/nodejs/routes/pages.js        |  4 ++++
 modules/webconfig/nodejs/views/clusters.jade    |  8 +++----
 modules/webconfig/nodejs/views/discovery.jade   | 24 ++++++++++++++++++++
 5 files changed, 43 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c92da167/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 8bd3fc9..36a04e4 100644
--- a/modules/webconfig/nodejs/public/javascripts/controllers/clusters.js
+++ b/modules/webconfig/nodejs/public/javascripts/controllers/clusters.js
@@ -1,6 +1,5 @@
 configuratorModule.controller('clustersController',
-    [
-        '$scope', '$modal', '$http', '$filter', 'ngTableParams',
+    ['$scope', '$modal', '$http', '$filter', 'ngTableParams',
         function ($scope, $modal, $http, $filter, ngTableParams) {
             $scope.edit = {};
             $scope.editRow = {};
@@ -28,7 +27,7 @@ configuratorModule.controller('clustersController',
                     $scope.clustersTable = new ngTableParams({
                         page: 1,                    // Show first page.
                         count: Number.MAX_VALUE,    // Count per page.
-                        sorting: { name: 'asc'}     // Initial sorting.
+                        sorting: {name: 'asc'}      // Initial sorting.
                     }, {
                         total: $scope.clusters.length, // Length of data.
                         counts: [],
@@ -48,8 +47,14 @@ configuratorModule.controller('clustersController',
                     $scope.text = data;
                 });
 
-            // TODO: Pre-fetch an external template populated with a custom scope.
-            var myOtherModal = $modal({scope: $scope, template: '/cluster/edit', show: false});
+            // Create popup for discovery advanced settings.
+            var discoveryModal = $modal({scope: $scope, template: '/discovery', show: false});
+
+            $scope.editDiscovery = function (cluster) {
+                console.log('>>> editDiscovery');
+
+                discoveryModal.$promise.then(discoveryModal.show);
+            }
 
             $scope.submit = function () {
                 if ($scope.editIdx !== false) {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c92da167/modules/webconfig/nodejs/routes/clusters.js
----------------------------------------------------------------------
diff --git a/modules/webconfig/nodejs/routes/clusters.js b/modules/webconfig/nodejs/routes/clusters.js
index c027d72..ea85232 100644
--- a/modules/webconfig/nodejs/routes/clusters.js
+++ b/modules/webconfig/nodejs/routes/clusters.js
@@ -1,4 +1,5 @@
 var express = require('express');
+
 var router = express.Router();
 
 var db = require('../db');

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c92da167/modules/webconfig/nodejs/routes/pages.js
----------------------------------------------------------------------
diff --git a/modules/webconfig/nodejs/routes/pages.js b/modules/webconfig/nodejs/routes/pages.js
index 5b037c5..2904278 100644
--- a/modules/webconfig/nodejs/routes/pages.js
+++ b/modules/webconfig/nodejs/routes/pages.js
@@ -7,6 +7,10 @@ router.get('/login', function(req, res) {
     res.render('login');
 });
 
+router.get('/discovery', function(req, res) {
+    res.render('discovery');
+});
+
 /* GET register page. */
 router.get('/register', function(req, res) {
     res.render('register');

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c92da167/modules/webconfig/nodejs/views/clusters.jade
----------------------------------------------------------------------
diff --git a/modules/webconfig/nodejs/views/clusters.jade b/modules/webconfig/nodejs/views/clusters.jade
index 40e8235..883ac0d 100644
--- a/modules/webconfig/nodejs/views/clusters.jade
+++ b/modules/webconfig/nodejs/views/clusters.jade
@@ -32,11 +32,11 @@ block content
                 td.text-center(data-title="'Discovery'" sortable="'discovery'")
                     div(ng-if='!(edit.discovery && editIdx == $index)')
                         span(ng-if='cluster.discovery') {{discoveryAsString(cluster.discovery)}}
-                        span.pull-right(type='button' ng-click='beginEdit(cluster); edit.discovery
= true' data-animation="am-fade-and-scale")
-                            i(class=['fa', 'fa-pencil'])
+                        span.pull-right(type='button')
+                            i(class=['fa', 'fa-caret-square-o-down'] ng-click='editDiscovery(cluster);
edit.discovery = false')
+                            i(class=['fa', 'fa-pencil'] ng-click='beginEdit(cluster); edit.discovery
= true' style='margin-left: 10px;')
                     div.input-group(ng-if='edit.discovery && editIdx == $index')
-                        button(
-                        class=['btn', 'btn-default', 'form-control', 'pull-right'] style='width:
85%' data-placement='bottom-center' ng-model='cluster.discovery' data-template='/select' data-placeholder='Choose
discovery' bs-options='discovery.value as discovery.label for discovery in discoveries' bs-select)
+                        button(class=['btn', 'btn-default', 'form-control', 'pull-right']
style='width: 85%' data-placement='bottom-center' ng-model='cluster.discovery' data-template='/select'
data-placeholder='Choose discovery' bs-options='discovery.value as discovery.label for discovery
in discoveries' bs-select)
                             span.caret
                         span.input-group-addon
                             i(class=['fa', 'fa-repeat'] ng-click='revert(); edit.discovery
= false')

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c92da167/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..2fcba3f
--- /dev/null
+++ b/modules/webconfig/nodejs/views/discovery.jade
@@ -0,0 +1,24 @@
+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 Discovery
+                    p Enter IP Addresses
+            .modal-body
+                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


Mime
View raw message