Repository: incubator-ignite Updated Branches: refs/heads/ignite-843 d849929dd -> ae180c2a5
# ignite-843 WIP. Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/ae180c2a Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/ae180c2a Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/ae180c2a Branch: refs/heads/ignite-843 Commit: ae180c2a5b1b3b91c0ffa613e27a3f61539d9fc9 Parents: d849929 Author: Andrey <[email protected]> Authored: Thu May 28 14:00:12 2015 +0700 Committer: Andrey <[email protected]> Committed: Thu May 28 14:00:12 2015 +0700 ---------------------------------------------------------------------- modules/webconfig/nodejs/app.js | 2 - modules/webconfig/nodejs/package.json | 2 +- .../public/javascripts/controllers/clusters.js | 91 +++++++++++--------- .../public/javascripts/controllers/common.js | 2 +- .../nodejs/public/stylesheets/style.css | 2 +- .../nodejs/public/stylesheets/style.less | 29 +++++++ modules/webconfig/nodejs/routes/pages.js | 42 +++++---- modules/webconfig/nodejs/views/clusters.jade | 80 ++++++++++------- modules/webconfig/nodejs/views/layout.jade | 6 +- 9 files changed, 156 insertions(+), 100 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ae180c2a/modules/webconfig/nodejs/app.js ---------------------------------------------------------------------- diff --git a/modules/webconfig/nodejs/app.js b/modules/webconfig/nodejs/app.js index 711b216..5fb4b4f 100644 --- a/modules/webconfig/nodejs/app.js +++ b/modules/webconfig/nodejs/app.js @@ -57,8 +57,6 @@ passport.deserializeUser(db.Account.deserializeUser()); passport.use(db.Account.createStrategy()); var mustAuthenticated = function (req, res, next) { - console.log('isAuthenticated = ' + req.isAuthenticated()); - req.isAuthenticated() ? next() : res.redirect('/'); }; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ae180c2a/modules/webconfig/nodejs/package.json ---------------------------------------------------------------------- diff --git a/modules/webconfig/nodejs/package.json b/modules/webconfig/nodejs/package.json index c5c6b39..59ff406 100644 --- a/modules/webconfig/nodejs/package.json +++ b/modules/webconfig/nodejs/package.json @@ -15,8 +15,8 @@ "cookie-parser": "~1.3.4", "debug": "~2.1.1", "express": "~4.12.2", + "express-messages": "0.0.2", "express-session": "^1.11.1", - "flash": "^1.1.0", "jade": "~1.9.2", "less-middleware": "1.0.x", "mongoose": "^4.0.2", http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ae180c2a/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 858ccf6..e77c223 100644 --- a/modules/webconfig/nodejs/public/javascripts/controllers/clusters.js +++ b/modules/webconfig/nodejs/public/javascripts/controllers/clusters.js @@ -1,13 +1,18 @@ // Controller for clusters page. -configuratorModule.controller('clustersController', ['$scope', '$modal', '$http', '$filter', 'ngTableParams', - function($scope, $modal, $http, $filter, ngTableParams) { +configuratorModule.controller('clustersController', ['$scope', '$modal', '$http', + function($scope, $modal, $http) { $scope.editColumn = {}; $scope.editCluster = {}; $scope.discoveries = [ {value: 'TcpDiscoveryVmIpFinder', label: 'Static IPs'}, - {value: 'TcpDiscoveryMulticastIpFinder', label: 'Multicast'} + {value: 'TcpDiscoveryMulticastIpFinder', label: 'Multicast'}, + {value: 'TcpDiscoveryS3IpFinder', label: 'AWS S3'}, + {value: 'TcpDiscoveryCloudIpFinder', label: 'Apache jclouds'}, + {value: 'TcpDiscoveryGoogleStorageIpFinder', label: 'Google Cloud Storage'}, + {value: 'TcpDiscoveryJdbcIpFinder', label: 'JDBC'}, + {value: 'TcpDiscoverySharedFsIpFinder', label: 'Shared Filesystem'} ]; $scope.discoveryAsString = function(value) { @@ -25,49 +30,49 @@ configuratorModule.controller('clustersController', ['$scope', '$modal', '$http' $scope.spaces = data.spaces; $scope.clusters = data.clusters; - $scope.clustersTable = new ngTableParams({ - page: 1, // Show first page. - count: Number.MAX_VALUE, // Count per page. - sorting: {name: 'asc'} // Initial sorting. - }, { - total: $scope.clusters.length, // Length of data. - counts: [], - getData: function($defer, params) { - // Use build-in angular filter. - var orderedData = params.sorting() ? - $filter('orderBy')($scope.clusters, params.orderBy()) : - $scope.clusters; - - var page = params.page(); - var cnt = params.count(); - - $defer.resolve(orderedData.slice(page - 1 * cnt, page * cnt)); - } - }); + //$scope.clustersTable = new ngTableParams({ + // page: 1, // Show first page. + // count: Number.MAX_VALUE, // Count per page. + // sorting: {name: 'asc'} // Initial sorting. + //}, { + // total: $scope.clusters.length, // Length of data. + // counts: [], + // getData: function($defer, params) { + // // Use build-in angular filter. + // var orderedData = params.sorting() ? + // $filter('orderBy')($scope.clusters, params.orderBy()) : + // $scope.clusters; + // + // var page = params.page(); + // var cnt = params.count(); + // + // $defer.resolve(orderedData.slice(page - 1 * cnt, page * cnt)); + // } + //}); }); // Create popup for tcpDiscoveryVmIpFinder advanced settings. var staticIpsModal = $modal({scope: $scope, template: '/staticIps', show: false}); - $scope.editStaticIps = function(cluster) { - $scope.staticIpsTable = new ngTableParams({ - page: 1, // Show first page. - count: Number.MAX_VALUE // Count per page. - }, { - total: cluster.addresses.length, // Length of data. - counts: [], - getData: function($defer, params) { - var addresses = cluster.addresses; - - var page = params.page(); - var cnt = params.count(); - - $defer.resolve(addresses.slice(page - 1 * cnt, page * cnt)); - } - }); - - staticIpsModal.$promise.then(staticIpsModal.show); - }; + //$scope.editStaticIps = function(cluster) { + // $scope.staticIpsTable = new ngTableParams({ + // page: 1, // Show first page. + // count: Number.MAX_VALUE // Count per page. + // }, { + // total: cluster.addresses.length, // Length of data. + // counts: [], + // getData: function($defer, params) { + // var addresses = cluster.addresses; + // + // var page = params.page(); + // var cnt = params.count(); + // + // $defer.resolve(addresses.slice(page - 1 * cnt, page * cnt)); + // } + // }); + // + // staticIpsModal.$promise.then(staticIpsModal.show); + //}; // Add new cluster. $scope.addStaticIp = function(cluster) { @@ -147,8 +152,8 @@ configuratorModule.controller('clustersController', ['$scope', '$modal', '$http' } }; - $scope.deleteCluster = function(cluster) { - $http.post('/rest/clusters/remove', {_id: cluster._id}) + $scope.removeItem = function(_id) { + $http.post('/rest/clusters/remove', {_id: _id}) .success(function(data) { $scope.spaces = data.spaces; $scope.clusters = data.clusters; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ae180c2a/modules/webconfig/nodejs/public/javascripts/controllers/common.js ---------------------------------------------------------------------- diff --git a/modules/webconfig/nodejs/public/javascripts/controllers/common.js b/modules/webconfig/nodejs/public/javascripts/controllers/common.js index 3a9ef07..09226ba 100644 --- a/modules/webconfig/nodejs/public/javascripts/controllers/common.js +++ b/modules/webconfig/nodejs/public/javascripts/controllers/common.js @@ -1,4 +1,4 @@ -var configuratorModule = angular.module('ignite-web-configurator', ['ngTable', 'mgcrea.ngStrap']); +var configuratorModule = angular.module('ignite-web-configurator', ['smart-table', 'mgcrea.ngStrap']); configuratorModule.controller('activeLink', ['$scope', function($scope) { $scope.isActive = function(path) { http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ae180c2a/modules/webconfig/nodejs/public/stylesheets/style.css ---------------------------------------------------------------------- diff --git a/modules/webconfig/nodejs/public/stylesheets/style.css b/modules/webconfig/nodejs/public/stylesheets/style.css index 024dc23..f98debb 100644 --- a/modules/webconfig/nodejs/public/stylesheets/style.css +++ b/modules/webconfig/nodejs/public/stylesheets/style.css @@ -1 +1 @@ -.main-header .logo{height:auto}.main-sidebar{padding-top:60px}.navbar-default .navbar-brand,.navbar-default .navbar-brand:hover{position:absolute;width:100%;left:0;text-align:center}.modal-backdrop.am-fade{opacity:.5;transition:opacity .15s linear}.modal-backdrop.am-fade.ng-enter{opacity:0}.modal-backdrop.am-fade.ng-enter.ng-enter-active{opacity:.5}.modal-backdrop.am-fade.ng-leave{opacity:.5}.modal-backdrop.am-fade.ng-leave.ng-leave-active{opacity:0}.modal.center .modal-dialog{position:fixed;top:40%;left:50%;min-width:320px;max-width:630px;width:50%;-webkit-transform:translateX(-50%) translateY(-50%);transform:translateX(-50%) translateY(-50%)}.ng-table th.text-right{text-align:right}.ng-table th.text-left{text-align:left}.ng-table th.text-center{text-align:center}.fa.fa-remove{color:red}.border-left{-webkit-box-shadow:1px 0 0px 0px #eee inset;box-shadow:1px 0 0px 0px #eee inset}.border-right{-webkit-box-shadow:1px 0 0px 0px #eee;box-shadow:1px 0 0px 0px #eee}.theme-line{background- color:#f9f9f9}.theme-line header{background-color:#fff}.theme-line header .search-bar{width:90%;margin:30px auto 0;-webkit-border-radius:5px;border-radius:5px;-webkit-box-shadow:0 0 0 5px rgba(0,0,0,0.1),0 0 0 1px rgba(0,0,0,0.1);box-shadow:0 0 0 5px rgba(0,0,0,0.1),0 0 0 1px rgba(0,0,0,0.1);position:relative}.theme-line header .search-bar.focus{-webkit-box-shadow:0 0 0 5px rgba(0,0,0,0.2),0 0 0 1px rgba(0,0,0,0.1);box-shadow:0 0 0 5px rgba(0,0,0,0.2),0 0 0 1px rgba(0,0,0,0.1)}.theme-line header .search-bar .fa{position:absolute;top:10px;left:14px;font-size:21px;color:#ccc;z-index:10}.theme-line header .search-bar .twitter-typeahead{width:100%}.theme-line header .search-bar input{-webkit-border-radius:5px;border-radius:5px;height:100%;border:0 none;-webkit-box-shadow:0 2px 2px rgba(0,0,0,0.1) inset;box-shadow:0 2px 2px rgba(0,0,0,0.1) inset;color:#444;width:100%;padding:13px 13px 13px 50px;font-size:14px}.theme-line header .search-bar input.tt-hint{color:#bbb}.theme-line header .sea rch-bar input:active .theme-line header .search-bar input:focus{outline:0 none;-webkit-box-shadow:0 2px 2px rgba(0,0,0,0.2) inset;box-shadow:0 2px 2px rgba(0,0,0,0.2) inset}.theme-line header .search-bar .tt-dropdown-menu,.theme-solid header .search-bar .tt-dropdown-menu{width:100%;text-align:left}.theme-line header .search-bar .tt-dropdown-menu h3{padding:0 45px;color:#ccc;font-weight:bold;font-size:12px;margin:10px 0 4px;text-transform:uppercase}.theme-line header .search-bar .tt-dropdown-menu .tt-suggestions{display:block}.theme-line header .search-bar .tt-dropdown-menu .tt-suggestions .tt-suggestion{cursor:pointer;font-size:14px;padding:4px 45px}.theme-line header .search-bar .tt-dropdown-menu .tt-suggestions .tt-suggestion p{color:#333;white-space:nowrap;overflow:hidden;-o-text-overflow:ellipsis;text-overflow:ellipsis}.theme-line header .search-bar .tt-cursor{background-color:#eee}.theme-line header .search-bar .tt-cursor p{color:#fff}.theme-line header a.btn{border:0 none;padd ing:10px 25px;background-color:rgba(0,0,0,0.15)}.theme-line header a.btn:hover{background-color:rgba(0,0,0,0.25)}.theme-line header a.btn.btn-link{background:transparent;color:rgba(255,255,255,0.8)}.theme-line header a.btn.btn-link:hover{color:#fff;text-decoration:none}.theme-line .navbar-nav a{background-color:transparent}.theme-line .navbar-nav a:hover,.theme-line .navbar-nav a:active,.theme-line .navbar-nav a:focus{background-color:transparent}.theme-line .navbar-nav .active a{font-weight:bold}.theme-line .main-links{padding-top:50px}.theme-line .main-links h3{margin-top:0;font-size:17px}.theme-line .main-links .links a{color:#888}.theme-line .main-links .links a:hover{text-decoration:none}.theme-line #category-columns,.theme-solid #category-columns{margin:50px 30px 0}.theme-line #category-columns h4{text-transform:uppercase;font-weight:300;color:#999;font-size:14px}.theme-line #category-columns ul{list-style:none;padding:0;margin-bottom:15px}.theme-line #category-columns ul li a {padding:4px 0;display:block;font-size:16px}.theme-line #category-columns ul .view-all{font-size:0.85em}.theme-line .docs-header{color:#999;overflow:hidden}.theme-line .docs-header h1{color:#444;margin-top:0;font-size:25px}.theme-line .btn-primary{border:0 none}.theme-line .main-content .nav-horizontal a{-webkit-box-shadow:0 0;box-shadow:0 0;border:0 none;background-color:#fff;-webkit-border-radius:0;border-radius:0;color:#aaa;padding:6px;margin:0 14px}.theme-line .main-content .nav-horizontal a:hover{color:#999;border-bottom:4px solid #ddd}.theme-line .main-content .nav-horizontal a.active{border-bottom:4px solid #888}.theme-line .sidebar-nav{color:#474a54;padding-bottom:30px}.theme-line .sidebar-nav ul{padding:0;list-style:none;font-size:13px;margin:3px 0 0}.theme-line .sidebar-nav ul li a{padding:3px 0;display:block;color:#666;position:relative;white-space:nowrap;overflow:hidden;-o-text-overflow:ellipsis;text-overflow:ellipsis}.theme-line .sidebar-nav ul li a:before{top:0;content :" ";display:block;width:6px;height:100%;position:absolute;left:-30px}.theme-line .sidebar-nav ul li a:hover{text-decoration:none}.theme-line .sidebar-nav ul li a.active{font-weight:bold}.theme-line .sidebar-nav ul li .subcategory{padding-left:15px}.theme-line .sidebar-nav h4{margin-top:2em;font-weight:normal;text-transform:uppercase;font-size:11px;margin-bottom:10px;color:#bbb}.theme-line .sidebar-nav h4:first-child{margin-top:0em}.theme-line .sidebar-nav .ask{width:100%;text-align:center;padding:10px}.theme-line .border-left .sidebar-nav{padding-left:15px}.theme-line .suggest{padding:4px;display:inline-block;font-size:12px}.header{padding:15px}.header .has-github{padding-right:136px}.header h1.navbar-brand{height:40px;width:200px;padding:0;margin:0;margin-top:5px;margin-right:15px}.header h1.navbar-brand a{text-indent:-99999px;background-position:center center;display:block;width:100%;height:100%;-webkit-background-size:contain;-moz-background-size:contain;background-size:contain; background-repeat:no-repeat}.header .nav.navbar-nav.pull-right{position:relative;right:-30px}.header .nav.navbar-nav .not-link{padding:15px;display:inline-block}.header .nav.navbar-nav .stable,.header .nav.navbar-nav .beta,.header .nav.navbar-nav .private{font-size:9px;padding:3px 5px;display:inline-block;line-height:8px;-webkit-border-radius:3px;border-radius:3px;margin-left:6px;color:#fff;top:-2px;position:relative;opacity:0.6;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=60)";filter:alpha(opacity=60)}.header .nav.navbar-nav a:hover>.stable,.header .nav.navbar-nav a:hover>.beta,.header .nav.navbar-nav a:hover>.private{opacity:1;-ms-filter:none;filter:none}.header .nav.navbar-nav .beta{background-color:#59c3d1}.header .nav.navbar-nav .stable{background-color:#41b841}.header .nav.navbar-nav .private{background-color:#333}.header #jumbotron{margin:55px 70px 50px;text-align:center}.header #jumbotron h2{margin-top:0;margin-bottom:20px}.header #jumbotron p{margin-bottom:0; line-height:1.6em;font-size:16px}.header #jumbotron .btn{margin-top:20px}.header .searchbox{position:relative;margin-right:15px;top:9px}.header .searchbox .fa-search{position:absolute;top:8px;right:10px;color:#777;pointer-events:none}.header .searchbox .typeahead{line-height:1.25em;-webkit-transition:.3s ease-out;-moz-transition:.3s ease-out;-o-transition:.3s ease-out;-ms-transition:.3s ease-out;transition:.3s ease-out;background-color:rgba(0,0,0,0.05);-webkit-border-radius:5px;border-radius:5px;width:95px}.header .searchbox .typeahead:focus,.header .searchbox .typeahead:active{outline:0 none}.header .searchbox .tt-dropdown-menu{max-width:350px;margin-left:-100px}.header .searchbox .tt-dropdown-menu h3{width:100px;float:left;margin:0;padding:8px 0 6px 15px;font-size:13px;color:#bbb}.header .searchbox .tt-dropdown-menu .tt-suggestions{display:block;float:left;width:250px}.header .searchbox .tt-dropdown-menu .tt-suggestions .tt-suggestion{font-size:14px}.header .searchbox .tt-dropdown -menu .tt-suggestions .tt-suggestion p{white-space:nowrap;overflow:hidden;-o-text-overflow:ellipsis;text-overflow:ellipsis}.header .searchbox .tt-cursor{background-color:#eee}.header .searchbox .tt-cursor p{color:#fff}.header .searchbox input{border:0 none;display:inline-block;font-size:14px;padding:6px 32px 6px 12px;margin:0}.header .searchbox input.tt-hint{height:auto}.header .searchbox.focus input{width:250px}.theme-line header{border-bottom:8px solid}.theme-line header h2{color:#aaa}.theme-line header p{color:#666}.theme-line .navbar-nav{color:#888}.theme-line .navbar-nav a{color:#bbb}.theme-line.lumosity-light .searchbox .tt-cursor p{color:rgba(0,0,0,0.7)}.theme-line header{border-bottom-color:#ec1c24}.theme-line header a.btn{background-color:#ec1c24}.theme-line header a.btn:hover{background-color:#950d12}.theme-line header .navbar-nav a:hover,.theme-line header .navbar-nav .open>a{color:#ec1c24}.theme-line header .navbar-nav .tt-cursor{background-color:#ec1c24}.theme-line .nav bar-nav .active a{font-weight:bold;color:#ec1c24}.theme-line .navbar-nav .active a:hover{color:#950d12}.theme-line .main-links .links a:hover{color:#ec1c24}.theme-line .main-content a{color:#ec1c24}.theme-line .main-content a:hover{color:#950d12}.theme-line .sidebar-nav ul li a.active:before{background-color:#ec1c24}.theme-line .sidebar-nav ul li a.active{color:#ec1c24}.theme-line .sidebar-nav ul li a:hover,.theme-line .sidebar-nav ul li a.active:hover{color:#950d12}.theme-line .btn-primary{background-color:#ec1c24}.theme-line .btn-primary:hover{background-color:#950d12}.theme-line .main-content .nav-horizontal a.active{border-color:#ec1c24;color:#ec1c24}.theme-line .main-content .nav-horizontal a:hover{color:#950d12}.theme-line .main-content .nav-horizontal a.active:hover{border-color:#950d12}.theme-line header .navbar-nav a.active,.theme-line #versions-list li a:hover strong,.theme-line #versions-list li a.active .current,.theme-line #versions-list li a:active .current{color:#ec1c 24}.theme-line.body-threes .section-right .threes-nav .btn-default:hover,.theme-line.page-docs.body-threes .section-right .threes-nav .pull-right a:hover{color:#ec1c24;border-color:#ec1c24}.body-overlap .main-content{margin-top:30px}.body-box .main-content,.body-overlap .main-content{padding:30px;-webkit-box-shadow:0 0 0 1px rgba(0,0,0,0.1);box-shadow:0 0 0 1px rgba(0,0,0,0.1);background-color:#fff}body{font-weight:400;font-family:Roboto Slab, serif}h1,h2,h3,h4,h5,h6{font-weight:700;font-family:Roboto Slab, serif}.submit-vote.submit-vote-parent.voted a.submit-vote-button,.submit-vote.submit-vote-parent a.submit-vote-button:hover{background-color:#ec1c24}div.submit-vote.submit-vote-parent.voted a.submit-vote-button:hover{background-color:#950d12}a,.link .title{color:#ec1c24}a:hover,.link:hover .title{color:#950d12}.header h1.navbar-brand a{background-image:url("https://www.filepicker.io/api/file/QagunjDGRFul2JgNCAli")}.header h1.navbar-brand{width:96px}.block-edit-parameters{text-ali gn:right;padding-bottom:5px}.ng-table-pager{display:none}.container-footer{margin-top:20px}.vcenter{vertical-align:middle}.modal{display:block;overflow:hidden}.modal .close{position:absolute;top:24px;right:24px;float:none}.modal .modal-dialog{width:610px}.modal .modal-content{-webkit-border-radius:0;border-radius:0;background-color:#f7f7f7}.modal .modal-content .modal-header{background-color:#fff;text-align:center;color:#555;padding:24px;font-family:"myriad-pro",sans-serif}.modal .modal-content .modal-header h4{font-family:"myriad-pro",sans-serif;font-size:22px}.modal .modal-content .modal-header h4 .fa{display:block;font-size:41px;color:#ddd;margin-bottom:5px}.modal .modal-content .modal-header p{margin:0;color:#aaa;font-size:1em;margin-top:3px}.modal .modal-content .modal-spacer{padding:10px 10px 0 10px}.modal .modal-content .modal-footer{margin-top:0}.modal-body{padding-top:30px}h1.ignite-logo{background-image:url("https://www.filepicker.io/api/file/QagunjDGRFul2JgNCAli")}.block- display-image img{max-width:100%;max-height:450px;margin:auto;display:block} \ No newline at end of file +.main-header .logo{height:auto}.main-sidebar{padding-top:60px}.navbar-default .navbar-brand,.navbar-default .navbar-brand:hover{position:absolute;width:100%;left:0;text-align:center}.modal-backdrop.am-fade{opacity:.5;transition:opacity .15s linear}.modal-backdrop.am-fade.ng-enter{opacity:0}.modal-backdrop.am-fade.ng-enter.ng-enter-active{opacity:.5}.modal-backdrop.am-fade.ng-leave{opacity:.5}.modal-backdrop.am-fade.ng-leave.ng-leave-active{opacity:0}.modal.center .modal-dialog{position:fixed;top:40%;left:50%;min-width:320px;max-width:630px;width:50%;-webkit-transform:translateX(-50%) translateY(-50%);transform:translateX(-50%) translateY(-50%)}.ng-table th.text-right{text-align:right}.ng-table th.text-left{text-align:left}.ng-table th.text-center{text-align:center}.fa.fa-remove{color:red}.border-left{-webkit-box-shadow:1px 0 0px 0px #eee inset;box-shadow:1px 0 0px 0px #eee inset}.border-right{-webkit-box-shadow:1px 0 0px 0px #eee;box-shadow:1px 0 0px 0px #eee}.theme-line{background- color:#f9f9f9}.theme-line header{background-color:#fff}.theme-line header .search-bar{width:90%;margin:30px auto 0;-webkit-border-radius:5px;border-radius:5px;-webkit-box-shadow:0 0 0 5px rgba(0,0,0,0.1),0 0 0 1px rgba(0,0,0,0.1);box-shadow:0 0 0 5px rgba(0,0,0,0.1),0 0 0 1px rgba(0,0,0,0.1);position:relative}.theme-line header .search-bar.focus{-webkit-box-shadow:0 0 0 5px rgba(0,0,0,0.2),0 0 0 1px rgba(0,0,0,0.1);box-shadow:0 0 0 5px rgba(0,0,0,0.2),0 0 0 1px rgba(0,0,0,0.1)}.theme-line header .search-bar .fa{position:absolute;top:10px;left:14px;font-size:21px;color:#ccc;z-index:10}.theme-line header .search-bar .twitter-typeahead{width:100%}.theme-line header .search-bar input{-webkit-border-radius:5px;border-radius:5px;height:100%;border:0 none;-webkit-box-shadow:0 2px 2px rgba(0,0,0,0.1) inset;box-shadow:0 2px 2px rgba(0,0,0,0.1) inset;color:#444;width:100%;padding:13px 13px 13px 50px;font-size:14px}.theme-line header .search-bar input.tt-hint{color:#bbb}.theme-line header .sea rch-bar input:active .theme-line header .search-bar input:focus{outline:0 none;-webkit-box-shadow:0 2px 2px rgba(0,0,0,0.2) inset;box-shadow:0 2px 2px rgba(0,0,0,0.2) inset}.theme-line header .search-bar .tt-dropdown-menu,.theme-solid header .search-bar .tt-dropdown-menu{width:100%;text-align:left}.theme-line header .search-bar .tt-dropdown-menu h3{padding:0 45px;color:#ccc;font-weight:bold;font-size:12px;margin:10px 0 4px;text-transform:uppercase}.theme-line header .search-bar .tt-dropdown-menu .tt-suggestions{display:block}.theme-line header .search-bar .tt-dropdown-menu .tt-suggestions .tt-suggestion{cursor:pointer;font-size:14px;padding:4px 45px}.theme-line header .search-bar .tt-dropdown-menu .tt-suggestions .tt-suggestion p{color:#333;white-space:nowrap;overflow:hidden;-o-text-overflow:ellipsis;text-overflow:ellipsis}.theme-line header .search-bar .tt-cursor{background-color:#eee}.theme-line header .search-bar .tt-cursor p{color:#fff}.theme-line header a.btn{border:0 none;padd ing:10px 25px;background-color:rgba(0,0,0,0.15)}.theme-line header a.btn:hover{background-color:rgba(0,0,0,0.25)}.theme-line header a.btn.btn-link{background:transparent;color:rgba(255,255,255,0.8)}.theme-line header a.btn.btn-link:hover{color:#fff;text-decoration:none}.theme-line .navbar-nav a{background-color:transparent}.theme-line .navbar-nav a:hover,.theme-line .navbar-nav a:active,.theme-line .navbar-nav a:focus{background-color:transparent}.theme-line .navbar-nav .active a{font-weight:bold}.theme-line .main-links{padding-top:50px}.theme-line .main-links h3{margin-top:0;font-size:17px}.theme-line .main-links .links a{color:#888}.theme-line .main-links .links a:hover{text-decoration:none}.theme-line #category-columns,.theme-solid #category-columns{margin:50px 30px 0}.theme-line #category-columns h4{text-transform:uppercase;font-weight:300;color:#999;font-size:14px}.theme-line #category-columns ul{list-style:none;padding:0;margin-bottom:15px}.theme-line #category-columns ul li a {padding:4px 0;display:block;font-size:16px}.theme-line #category-columns ul .view-all{font-size:0.85em}.theme-line .docs-header{color:#999;overflow:hidden}.theme-line .docs-header h1{color:#444;margin-top:0;font-size:25px}.theme-line .btn-primary{border:0 none}.theme-line .main-content .nav-horizontal a{-webkit-box-shadow:0 0;box-shadow:0 0;border:0 none;background-color:#fff;-webkit-border-radius:0;border-radius:0;color:#aaa;padding:6px;margin:0 14px}.theme-line .main-content .nav-horizontal a:hover{color:#999;border-bottom:4px solid #ddd}.theme-line .main-content .nav-horizontal a.active{border-bottom:4px solid #888}.theme-line .sidebar-nav{color:#474a54;padding-bottom:30px}.theme-line .sidebar-nav ul{padding:0;list-style:none;font-size:13px;margin:3px 0 0}.theme-line .sidebar-nav ul li a{padding:3px 0;display:block;color:#666;position:relative;white-space:nowrap;overflow:hidden;-o-text-overflow:ellipsis;text-overflow:ellipsis}.theme-line .sidebar-nav ul li a:before{top:0;content :" ";display:block;width:6px;height:100%;position:absolute;left:-30px}.theme-line .sidebar-nav ul li a:hover{text-decoration:none}.theme-line .sidebar-nav ul li a.active{font-weight:bold}.theme-line .sidebar-nav ul li .subcategory{padding-left:15px}.theme-line .sidebar-nav h4{margin-top:2em;font-weight:normal;text-transform:uppercase;font-size:11px;margin-bottom:10px;color:#bbb}.theme-line .sidebar-nav h4:first-child{margin-top:0em}.theme-line .sidebar-nav .ask{width:100%;text-align:center;padding:10px}.theme-line .border-left .sidebar-nav{padding-left:15px}.theme-line .suggest{padding:4px;display:inline-block;font-size:12px}.header{padding:15px}.header .has-github{padding-right:136px}.header h1.navbar-brand{height:40px;width:200px;padding:0;margin:0;margin-top:5px;margin-right:15px}.header h1.navbar-brand a{text-indent:-99999px;background-position:center center;display:block;width:100%;height:100%;-webkit-background-size:contain;-moz-background-size:contain;background-size:contain; background-repeat:no-repeat}.header .nav.navbar-nav.pull-right{position:relative;right:-30px}.header .nav.navbar-nav .not-link{padding:15px;display:inline-block}.header .nav.navbar-nav .stable,.header .nav.navbar-nav .beta,.header .nav.navbar-nav .private{font-size:9px;padding:3px 5px;display:inline-block;line-height:8px;-webkit-border-radius:3px;border-radius:3px;margin-left:6px;color:#fff;top:-2px;position:relative;opacity:0.6;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=60)";filter:alpha(opacity=60)}.header .nav.navbar-nav a:hover>.stable,.header .nav.navbar-nav a:hover>.beta,.header .nav.navbar-nav a:hover>.private{opacity:1;-ms-filter:none;filter:none}.header .nav.navbar-nav .beta{background-color:#59c3d1}.header .nav.navbar-nav .stable{background-color:#41b841}.header .nav.navbar-nav .private{background-color:#333}.header #jumbotron{margin:55px 70px 50px;text-align:center}.header #jumbotron h2{margin-top:0;margin-bottom:20px}.header #jumbotron p{margin-bottom:0; line-height:1.6em;font-size:16px}.header #jumbotron .btn{margin-top:20px}.header .searchbox{position:relative;margin-right:15px;top:9px}.header .searchbox .fa-search{position:absolute;top:8px;right:10px;color:#777;pointer-events:none}.header .searchbox .typeahead{line-height:1.25em;-webkit-transition:.3s ease-out;-moz-transition:.3s ease-out;-o-transition:.3s ease-out;-ms-transition:.3s ease-out;transition:.3s ease-out;background-color:rgba(0,0,0,0.05);-webkit-border-radius:5px;border-radius:5px;width:95px}.header .searchbox .typeahead:focus,.header .searchbox .typeahead:active{outline:0 none}.header .searchbox .tt-dropdown-menu{max-width:350px;margin-left:-100px}.header .searchbox .tt-dropdown-menu h3{width:100px;float:left;margin:0;padding:8px 0 6px 15px;font-size:13px;color:#bbb}.header .searchbox .tt-dropdown-menu .tt-suggestions{display:block;float:left;width:250px}.header .searchbox .tt-dropdown-menu .tt-suggestions .tt-suggestion{font-size:14px}.header .searchbox .tt-dropdown -menu .tt-suggestions .tt-suggestion p{white-space:nowrap;overflow:hidden;-o-text-overflow:ellipsis;text-overflow:ellipsis}.header .searchbox .tt-cursor{background-color:#eee}.header .searchbox .tt-cursor p{color:#fff}.header .searchbox input{border:0 none;display:inline-block;font-size:14px;padding:6px 32px 6px 12px;margin:0}.header .searchbox input.tt-hint{height:auto}.header .searchbox.focus input{width:250px}.theme-line header{border-bottom:8px solid}.theme-line header h2{color:#aaa}.theme-line header p{color:#666}.theme-line .navbar-nav{color:#888}.theme-line .navbar-nav a{color:#bbb}.theme-line.lumosity-light .searchbox .tt-cursor p{color:rgba(0,0,0,0.7)}.theme-line header{border-bottom-color:#ec1c24}.theme-line header a.btn{background-color:#ec1c24}.theme-line header a.btn:hover{background-color:#950d12}.theme-line header .navbar-nav a:hover,.theme-line header .navbar-nav .open>a{color:#ec1c24}.theme-line header .navbar-nav .tt-cursor{background-color:#ec1c24}.theme-line .nav bar-nav .active a{font-weight:bold;color:#ec1c24}.theme-line .navbar-nav .active a:hover{color:#950d12}.theme-line .main-links .links a:hover{color:#ec1c24}.theme-line .main-content a{color:#ec1c24}.theme-line .main-content a:hover{color:#950d12}.theme-line .sidebar-nav ul li a.active:before{background-color:#ec1c24}.theme-line .sidebar-nav ul li a.active{color:#ec1c24}.theme-line .sidebar-nav ul li a:hover,.theme-line .sidebar-nav ul li a.active:hover{color:#950d12}.theme-line .btn-primary{background-color:#ec1c24}.theme-line .btn-primary:hover{background-color:#950d12}.theme-line .main-content .nav-horizontal a.active{border-color:#ec1c24;color:#ec1c24}.theme-line .main-content .nav-horizontal a:hover{color:#950d12}.theme-line .main-content .nav-horizontal a.active:hover{border-color:#950d12}.theme-line header .navbar-nav a.active,.theme-line #versions-list li a:hover strong,.theme-line #versions-list li a.active .current,.theme-line #versions-list li a:active .current{color:#ec1c 24}.theme-line.body-threes .section-right .threes-nav .btn-default:hover,.theme-line.page-docs.body-threes .section-right .threes-nav .pull-right a:hover{color:#ec1c24;border-color:#ec1c24}.body-overlap .main-content{margin-top:30px}.body-box .main-content,.body-overlap .main-content{padding:30px;-webkit-box-shadow:0 0 0 1px rgba(0,0,0,0.1);box-shadow:0 0 0 1px rgba(0,0,0,0.1);background-color:#fff}body{font-weight:400;font-family:Roboto Slab, serif}h1,h2,h3,h4,h5,h6{font-weight:700;font-family:Roboto Slab, serif}.submit-vote.submit-vote-parent.voted a.submit-vote-button,.submit-vote.submit-vote-parent a.submit-vote-button:hover{background-color:#ec1c24}div.submit-vote.submit-vote-parent.voted a.submit-vote-button:hover{background-color:#950d12}a,.link .title{color:#ec1c24}a:hover,.link:hover .title{color:#950d12}.header h1.navbar-brand a{background-image:url("https://www.filepicker.io/api/file/QagunjDGRFul2JgNCAli")}.header h1.navbar-brand{width:96px}.block-edit-parameters{text-ali gn:right;padding-bottom:5px}.ng-table-pager{display:none}.container-footer{margin-top:20px}.vcenter{vertical-align:middle}.modal{display:block;overflow:hidden}.modal .close{position:absolute;top:24px;right:24px;float:none}.modal .modal-dialog{width:610px}.modal .modal-content{-webkit-border-radius:0;border-radius:0;background-color:#f7f7f7}.modal .modal-content .modal-header{background-color:#fff;text-align:center;color:#555;padding:24px;font-family:"myriad-pro",sans-serif}.modal .modal-content .modal-header h4{font-family:"myriad-pro",sans-serif;font-size:22px}.modal .modal-content .modal-header h4 .fa{display:block;font-size:41px;color:#ddd;margin-bottom:5px}.modal .modal-content .modal-header p{margin:0;color:#aaa;font-size:1em;margin-top:3px}.modal .modal-content .modal-spacer{padding:10px 10px 0 10px}.modal .modal-content .modal-footer{margin-top:0}.modal-body{padding-top:30px}h1.ignite-logo{background-image:url("https://www.filepicker.io/api/file/QagunjDGRFul2JgNCAli")}.st-sor t-ascent:after{content:'\25B2'}.st-sort-descent:after{content:'\25BC'}.docs-content table{width:100%;border-top:1px solid #ccc;border-left:1px solid #ccc;margin-bottom:30px}.docs-content th{border-right:1px solid #ccc;border-bottom:1px solid #ccc;background-color:#f7f7f7;padding:5px}.docs-content td{border-right:1px solid #ccc;border-bottom:1px solid #ccc;vertical-align:top;padding:5px}.block-display-image img{max-width:100%;max-height:450px;margin:auto;display:block} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ae180c2a/modules/webconfig/nodejs/public/stylesheets/style.less ---------------------------------------------------------------------- diff --git a/modules/webconfig/nodejs/public/stylesheets/style.less b/modules/webconfig/nodejs/public/stylesheets/style.less index fcc21af..c41e149 100644 --- a/modules/webconfig/nodejs/public/stylesheets/style.less +++ b/modules/webconfig/nodejs/public/stylesheets/style.less @@ -790,6 +790,35 @@ h1.ignite-logo { background-image: url("@{logo-path}"); } +.st-sort-ascent:after { + content: '\25B2'; +} + +.st-sort-descent:after { + content: '\25BC'; +} + +.docs-content table { + width: 100%; + border-top: 1px solid #ccc; + border-left: 1px solid #ccc; + margin-bottom: 30px; +} + +.docs-content th { + border-right: 1px solid #ccc; + border-bottom: 1px solid #ccc; + background-color: #f7f7f7; + padding: 5px; +} + +.docs-content td { + border-right: 1px solid #ccc; + border-bottom: 1px solid #ccc; + vertical-align: top; + padding: 5px; +} + .block-display-image img { max-width: 100%; max-height: 450px; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ae180c2a/modules/webconfig/nodejs/routes/pages.js ---------------------------------------------------------------------- diff --git a/modules/webconfig/nodejs/routes/pages.js b/modules/webconfig/nodejs/routes/pages.js index bd5f374..5e72aec 100644 --- a/modules/webconfig/nodejs/routes/pages.js +++ b/modules/webconfig/nodejs/routes/pages.js @@ -1,6 +1,9 @@ -var jade = require('jade'); -var express = require('express'); -var router = express.Router(); +var router = require('express').Router(); + +// GET dropdown-menu template. +router.get('/select', function(req, res) { + res.render('templates/select', { }); +}); /* GET login page. */ router.get('/login', function(req, res) { @@ -24,7 +27,10 @@ router.get('/register', function(req, res) { /* GET home page. */ router.get('/', function(req, res) { - res.render('index', { user: req.user, messages: req.flash('info') }); + if (req.isAuthenticated()) + res.redirect('/clusters'); + else + res.render('index', { user: req.user }); }); /* GET clusters page. */ @@ -32,34 +38,38 @@ router.get('/clusters', function(req, res) { res.render('clusters', { user: req.user }); }); -/* GET cluster edit popup. */ -router.get('/cluster/edit', function(req, res) { - res.render('clusterEdit', {}); +router.get('/discovery', function(req, res) { + res.render('discovery'); +}); + +/* GET advanced options for TcpDiscoveryVmIpFinder page. */ +router.get('/tcpDiscoveryVmIpFinder', function(req, res) { + res.render('tcpDiscoveryVmIpFinder'); +}); + +/* GET advanced options for TcpDiscoveryMulticastIpFinder page. */ +router.get('/tcpDiscoveryMulticastIpFinder', function(req, res) { + res.render('tcpDiscoveryMulticastIpFinder'); }); /* GET caches page. */ router.get('/caches', function(req, res) { - res.render('caches', { }); + res.render('caches', { user: req.user }); }); /* GET persistence page. */ router.get('/persistence', function(req, res) { - res.render('persistence', { }); + res.render('persistence', { user: req.user }); }); /* GET sql page. */ router.get('/sql', function(req, res) { - res.render('sql', { }); + res.render('sql', { user: req.user }); }); /* GET clients page. */ router.get('/clients', function(req, res) { - res.render('clients', { }); -}); - -// GET dropdown-menu template. -router.get('/select', function(req, res) { - res.render('templates/select', { }); + res.render('clients', { user: req.user }); }); module.exports = router; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ae180c2a/modules/webconfig/nodejs/views/clusters.jade ---------------------------------------------------------------------- diff --git a/modules/webconfig/nodejs/views/clusters.jade b/modules/webconfig/nodejs/views/clusters.jade index 0732ac2..68f282f 100644 --- a/modules/webconfig/nodejs/views/clusters.jade +++ b/modules/webconfig/nodejs/views/clusters.jade @@ -2,7 +2,7 @@ extends layout-sidebar append css - link(rel='stylesheet', href='/stylesheets/ng-table.css') + //link(rel='stylesheet', href='/stylesheets/ng-table.css') append scripts script(src='/javascripts/controllers/clusters.js') @@ -13,35 +13,49 @@ block content p Create and configure Ignite clusters. hr div.docs-body(ng-controller='clustersController') - div.block-edit-parameters - div.btn-group - button(ng-click='addCluster()' class=['btn', 'btn-default', 'fa', 'fa-plus'] )  Add - table(ng-table="clustersTable" class=['table', 'table-bordered', 'table-hover']) - tr(ng-repeat="cluster in $data") - td(data-title="'#'" class=['text-center', 'vcenter'] style='width: 50px') {{$index + 1}} - td(data-title="'Name'" sortable="'name'" class=['text-center', 'col-sm-7']) - div(ng-if='!(editColumn == "name" && currentCluster == cluster)') - span(ng-if='cluster.name') {{cluster.name}} - span.pull-right(type='button' ng-click='beginEditCluster("name", cluster);') - i(class=['fa', 'fa-pencil']) - div.input-group(ng-if='editColumn == "name" && currentCluster == 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.text-center(data-title="'Discovery'" sortable="'discovery'") - div(ng-if='!(editColumn == "discovery" && currentCluster == cluster)') - span(ng-if='cluster.discovery') {{discoveryAsString(cluster.discovery)}} - span.pull-right(type='button') - i(class=['fa', 'fa-caret-square-o-down'] ng-click='editStaticIps(cluster);') - i(class=['fa', 'fa-pencil'] ng-click='beginEditCluster("discovery", cluster);' style='margin-left: 10px;') - div.input-group(ng-if='editColumn == "discovery" && currentCluster == cluster') - 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='revertCluster();') - 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='deleteCluster(cluster)') - i(class=['fa', 'fa-remove']) \ No newline at end of file + table(st-table='rowCollection' st-safe-src='clusters') + thead + tr + th # + th(st-sort='name') Name + th Action + tbody + tr(st-select-row='row' st-select-mode='single' ng-repeat='row in rowCollection') + td {{$index + 1}} + td {{row.name}} + td.col-sm-1 + center + span(type='button' ng-click='removeItem(row._id)') + i(class=['fa', 'fa-remove']) + //div.block-edit-parameters + // div.btn-group + // button(ng-click='addCluster()' class=['btn', 'btn-default', 'fa', 'fa-plus'] )  Add + //table(ng-table="clustersTable" class=['table', 'table-bordered', 'table-hover', 'ng-table-responsive']) + // tr(ng-repeat="cluster in $data") + // td(data-title="'#'" class=['text-center', 'vcenter'] style='width: 50px') {{$index + 1}} + // td(data-title="'Name'" sortable="'name'" class=['text-center', 'col-sm-7']) + // div(ng-if='!(editColumn == "name" && currentCluster == cluster)') + // span(ng-if='cluster.name') {{cluster.name}} + // span.pull-right(type='button' ng-click='beginEditCluster("name", cluster);') + // i(class=['fa', 'fa-pencil']) + // div.input-group(ng-if='editColumn == "name" && currentCluster == 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.text-center(data-title="'Discovery'" sortable="'discovery'") + // div(ng-if='!(editColumn == "discovery" && currentCluster == cluster)') + // span(ng-if='cluster.discovery') {{discoveryAsString(cluster.discovery)}} + // span.pull-right(type='button') + // i(class=['fa', 'fa-caret-square-o-down'] ng-click='editStaticIps(cluster);') + // i(class=['fa', 'fa-pencil'] ng-click='beginEditCluster("discovery", cluster);' style='margin-left: 10px;') + // div.input-group(ng-if='editColumn == "discovery" && currentCluster == cluster') + // 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='revertCluster();') + // 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='deleteCluster(cluster)') + // i(class=['fa', 'fa-remove']) \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ae180c2a/modules/webconfig/nodejs/views/layout.jade ---------------------------------------------------------------------- diff --git a/modules/webconfig/nodejs/views/layout.jade b/modules/webconfig/nodejs/views/layout.jade index abe310e..aa83072 100644 --- a/modules/webconfig/nodejs/views/layout.jade +++ b/modules/webconfig/nodejs/views/layout.jade @@ -22,12 +22,12 @@ html(ng-app='ignite-web-configurator') script(src='//cdnjs.cloudflare.com/ajax/libs/angular-strap/2.2.2/angular-strap.js') script(src='//cdnjs.cloudflare.com/ajax/libs/angular-strap/2.2.2/angular-strap.tpl.min.js') - script(src='/javascripts/ng-table.js') - - script(src='/javascripts/bundle.js') + //script(src='/javascripts/ng-table.js') + script(src='https://cdnjs.cloudflare.com/ajax/libs/angular-smart-table/2.0.3/smart-table.js') script(src='/javascripts/controllers/common.js') + script(src='/javascripts/bundle.js') body(class=['theme-line', 'body-overlap']) div.wrapper include includes/header
