ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anovi...@apache.org
Subject [1/2] ignite git commit: IGNITE-2132 Enable test drive for metadata from web.
Date Wed, 16 Dec 2015 01:47:42 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-843-rc2 5b31c31d2 -> 5bc99ac48


IGNITE-2132 Enable test drive for metadata from web.


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

Branch: refs/heads/ignite-843-rc2
Commit: ae6257022dd25ba0a63fb39dd0e34e86645902d1
Parents: 5f69d8f
Author: Andrey <anovikov@gridgain.com>
Authored: Tue Dec 15 16:15:39 2015 +0700
Committer: Andrey <anovikov@gridgain.com>
Committed: Tue Dec 15 16:15:39 2015 +0700

----------------------------------------------------------------------
 .../handlers/DatabaseMetadataExtractor.java     |   4 +
 .../agent/testdrive/AgentMetadataTestDrive.java |  12 +-
 modules/control-center-web/src/main/js/app.js   |   2 -
 .../src/main/js/controllers/common-module.js    |   1 -
 .../main/js/controllers/metadata-controller.js  | 149 ++++++++++++-------
 .../main/js/controllers/models/metadata.json    |   8 +-
 modules/control-center-web/src/main/js/db.js    |  13 --
 .../src/main/js/gulpfile.js/tasks/connect.js    |   1 +
 .../src/main/js/public/stylesheets/style.scss   |   1 +
 .../src/main/js/routes/presets.js               |  68 ---------
 .../src/main/js/views/configuration/caches.jade |   2 +-
 .../main/js/views/configuration/clusters.jade   |   2 +-
 .../src/main/js/views/configuration/igfs.jade   |   2 +-
 .../js/views/configuration/metadata-load.jade   |   2 +-
 .../main/js/views/configuration/summary.jade    |   2 +-
 .../src/main/js/views/includes/controls.jade    |   4 +-
 .../main/js/views/templates/agent-download.jade |   1 +
 17 files changed, 115 insertions(+), 159 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/ae625702/modules/control-center-agent/src/main/java/org/apache/ignite/agent/handlers/DatabaseMetadataExtractor.java
----------------------------------------------------------------------
diff --git a/modules/control-center-agent/src/main/java/org/apache/ignite/agent/handlers/DatabaseMetadataExtractor.java
b/modules/control-center-agent/src/main/java/org/apache/ignite/agent/handlers/DatabaseMetadataExtractor.java
index 4fa7119..f6f7cec 100644
--- a/modules/control-center-agent/src/main/java/org/apache/ignite/agent/handlers/DatabaseMetadataExtractor.java
+++ b/modules/control-center-agent/src/main/java/org/apache/ignite/agent/handlers/DatabaseMetadataExtractor.java
@@ -34,6 +34,7 @@ import java.util.logging.Level;
 import java.util.logging.Logger;
 import org.apache.ignite.agent.AgentConfiguration;
 import org.apache.ignite.agent.remote.Remote;
+import org.apache.ignite.agent.testdrive.AgentMetadataTestDrive;
 import org.apache.ignite.schema.parser.DbMetadataReader;
 import org.apache.ignite.schema.parser.DbTable;
 
@@ -68,6 +69,9 @@ public class DatabaseMetadataExtractor {
         if (!new File(jdbcDriverJarPath).isAbsolute() && driversFolder != null)
             jdbcDriverJarPath = new File(driversFolder, jdbcDriverJarPath).getPath();
 
+        if (AgentMetadataTestDrive.isTestDriveUrl(jdbcUrl))
+            AgentMetadataTestDrive.testDrive();
+
         return DbMetadataReader.getInstance().connect(jdbcDriverJarPath, jdbcDriverCls, jdbcUrl,
jdbcInfo);
     }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/ae625702/modules/control-center-agent/src/main/java/org/apache/ignite/agent/testdrive/AgentMetadataTestDrive.java
----------------------------------------------------------------------
diff --git a/modules/control-center-agent/src/main/java/org/apache/ignite/agent/testdrive/AgentMetadataTestDrive.java
b/modules/control-center-agent/src/main/java/org/apache/ignite/agent/testdrive/AgentMetadataTestDrive.java
index 3dfd539..b773a63 100644
--- a/modules/control-center-agent/src/main/java/org/apache/ignite/agent/testdrive/AgentMetadataTestDrive.java
+++ b/modules/control-center-agent/src/main/java/org/apache/ignite/agent/testdrive/AgentMetadataTestDrive.java
@@ -44,15 +44,11 @@ public class AgentMetadataTestDrive {
     private static final AtomicBoolean initLatch = new AtomicBoolean();
 
     /**
-     * Execute query.
-     *
-     * @param conn Connection to database.
-     * @param qry Statement to execute.
+     * @param jdbcUrl Connection url.
+     * @return true if url is used for test-drive.
      */
-    private static void query(Connection conn, String qry) throws SQLException {
-        try (PreparedStatement ps = conn.prepareStatement(qry)) {
-            ps.executeUpdate();
-        }
+    public static boolean isTestDriveUrl(String jdbcUrl) {
+        return "jdbc:h2:mem:test-drive-db".equals(jdbcUrl);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/ae625702/modules/control-center-web/src/main/js/app.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/app.js b/modules/control-center-web/src/main/js/app.js
index b469f0c..26daf31 100644
--- a/modules/control-center-web/src/main/js/app.js
+++ b/modules/control-center-web/src/main/js/app.js
@@ -31,7 +31,6 @@ var notebooksRoutes = require('./routes/notebooks');
 var clustersRouter = require('./routes/clusters');
 var cachesRouter = require('./routes/caches');
 var metadataRouter = require('./routes/metadata');
-var presetsRouter = require('./routes/presets');
 var igfsRouter = require('./routes/igfs');
 var adminRouter = require('./routes/admin');
 var profileRouter = require('./routes/profile');
@@ -120,7 +119,6 @@ app.use('/profile', mustAuthenticated, profileRouter);
 app.use('/configuration/clusters', clustersRouter);
 app.use('/configuration/caches', cachesRouter);
 app.use('/configuration/metadata', metadataRouter);
-app.use('/configuration/presets', presetsRouter);
 app.use('/configuration/igfs', igfsRouter);
 
 app.use('/agent', mustAuthenticated, agentRouter);

http://git-wip-us.apache.org/repos/asf/ignite/blob/ae625702/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 1585646..7545d6d 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
@@ -872,7 +872,6 @@ consoleModule.service('$common', [
                 }
                 else
                     selectFunc();
-
             },
             saveBtnTipText: function (dirty, objectName) {
                 if (dirty)

http://git-wip-us.apache.org/repos/asf/ignite/blob/ae625702/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 bd5e006..96c6e99 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
@@ -93,7 +93,7 @@ consoleModule.controller('metadataController', [
 
             $scope.indexType = $common.mkOptions(['SORTED', 'FULLTEXT', 'GEOSPATIAL']);
 
-            var presets = [
+            var _dbPresets = [
                 {
                     db: 'oracle',
                     jdbcDriverClass: 'oracle.jdbc.OracleDriver',
@@ -132,6 +132,47 @@ consoleModule.controller('metadataController', [
                 }
             ];
 
+            function _loadPresets () {
+                try {
+                   var restoredPresets =  JSON.parse(localStorage.dbPresets);
+
+                    _.forEach(restoredPresets, function (restoredPreset) {
+                        var preset = _.find(_dbPresets, { jdbcDriverClass: restoredPreset.jdbcDriverClass
});
+
+                        if (preset) {
+                            preset.jdbcUrl = restoredPreset.jdbcUrl;
+
+                            preset.user = restoredPreset.user;
+                        }
+                    });
+
+                }
+                catch (ignore) {
+                    // No-op.
+                }
+            }
+
+            _loadPresets();
+
+            function _savePreset (preset) {
+                try {
+                    if (preset.testDrive)
+                        return;
+
+                    var oldPreset = _.find(_dbPresets, { jdbcDriverClass: preset.jdbcDriverClass
});
+
+                    if (oldPreset)
+                        angular.extend(oldPreset, preset);
+                    else
+                        _dbPresets.push(preset);
+
+                    localStorage.dbPresets = JSON.stringify(_dbPresets);
+                }
+                catch (errMsg) {
+                    $common.showError(errMsg);
+                }
+            }
+
             $scope.preset = {
                 db: 'unknown',
                 jdbcDriverClass: '',
@@ -143,25 +184,15 @@ consoleModule.controller('metadataController', [
 
             $scope.ui.showValid = true;
 
-            var jdbcDrivers = [];
-
-            function _findPreset(jdbcDriverJar) {
-                var jdbcDriverClass = '';
+            function _findPreset(idx) {
+                var jdbcDriverClass = $scope.jdbcDriverJars[idx].jdbcDriverClass;
 
-                var idx = _.findIndex(jdbcDrivers, function (jdbcDriver) {
-                    return  jdbcDriver.jdbcDriverJar == jdbcDriverJar;
+                idx = _.findIndex(_dbPresets, function (preset) {
+                    return preset.jdbcDriverClass === jdbcDriverClass;
                 });
 
-                if (idx >= 0) {
-                    jdbcDriverClass = jdbcDrivers[idx].jdbcDriverClass;
-
-                    idx = _.findIndex(presets, function (preset) {
-                        return preset.jdbcDriverClass == jdbcDriverClass;
-                    });
-
-                    if (idx >= 0)
-                        return presets[idx];
-                }
+                if (idx >= 0)
+                    return _dbPresets[idx];
 
                 return {
                     db: 'unknown',
@@ -172,14 +203,19 @@ consoleModule.controller('metadataController', [
                 }
             }
 
-            $scope.$watch('preset.jdbcDriverJar', function (jdbcDriverJar) {
-                if (jdbcDriverJar) {
-                    var newPreset = _findPreset(jdbcDriverJar);
+            $scope.$watch('preset.drvIdx', function (drvIdx) {
+                if (_.isNumber(drvIdx)) {
+                    var preset = $scope.jdbcDriverJars[drvIdx];
+
+                    if (!preset.testDrive)
+                        preset = _findPreset(drvIdx);
+
+                    var newPreset = angular.copy(preset);
+
+                    newPreset.drvIdx = drvIdx;
+                    newPreset.tablesOnly = $scope.preset.tablesOnly;
 
-                    $scope.preset.db = newPreset.db;
-                    $scope.preset.jdbcDriverClass = newPreset.jdbcDriverClass;
-                    $scope.preset.jdbcUrl = newPreset.jdbcUrl;
-                    $scope.preset.user = newPreset.user;
+                    $scope.preset = newPreset;
                 }
             }, true);
 
@@ -266,24 +302,46 @@ consoleModule.controller('metadataController', [
                 $scope.awaitAgent(function (result, onSuccess, onException) {
                     loadMetaModal.show();
 
-                    $loading.start('loadingMetadataFromDb');
-
                     // Get available JDBC drivers via agent.
                     if ($scope.loadMeta.action == 'drivers') {
+                        $loading.start('loadingMetadataFromDb');
+
                         $http.post('/api/v1/agent/drivers')
                             .success(function (drivers) {
                                 onSuccess();
 
                                 if (drivers && drivers.length > 0) {
-                                    $scope.jdbcDriverJars = _.map(drivers, function (driver)
{
-                                        return {value: driver.jdbcDriverJar, label: driver.jdbcDriverJar};
+                                    $scope.jdbcDriverJars = [];
+
+                                    var _h2DrvJar = _.find(drivers, function (drv) {
+                                        return drv.jdbcDriverJar.startsWith('h2');
                                     });
 
-                                    jdbcDrivers = drivers;
+                                    if (_h2DrvJar) {
+                                        $scope.jdbcDriverJars.push({
+                                            label: 'Test-drive metadata',
+                                            value: $scope.jdbcDriverJars.length,
+                                            jdbcDriverJar: _h2DrvJar.jdbcDriverJar,
+                                            jdbcDriverClass: 'org.h2.Driver',
+                                            jdbcUrl: 'jdbc:h2:mem:test-drive-db',
+                                            user: 'sa',
+                                            password: '',
+                                            testDrive: true
+                                        });
+                                    }
 
-                                    $scope.preset.jdbcDriverJar = drivers[0].jdbcDriverJar;
+                                    drivers.forEach(function (driver) {
+                                        $scope.jdbcDriverJars.push({
+                                            label: driver.jdbcDriverJar,
+                                            value: $scope.jdbcDriverJars.length,
+                                            jdbcDriverJar: driver.jdbcDriverJar,
+                                            jdbcDriverClass: driver.jdbcDriverClass
+                                        });
+                                    });
 
-                                    function openLoadMetadataModal() {
+                                    $scope.preset.drvIdx = 0;
+
+                                    $common.confirmUnsavedChanges($scope.ui.isDirty(), function
() {
                                         loadMetaModal.$promise.then(function () {
                                             $scope.loadMeta.action = 'connect';
                                             $scope.loadMeta.tables = [];
@@ -291,9 +349,7 @@ consoleModule.controller('metadataController', [
 
                                             $focus('jdbcUrl');
                                         });
-                                    }
-
-                                    $common.confirmUnsavedChanges($scope.ui.isDirty(), openLoadMetadataModal);
+                                    });
                                 }
                                 else {
                                     $common.showError('JDBC drivers not found!');
@@ -306,6 +362,7 @@ consoleModule.controller('metadataController', [
                             })
                             .finally(function () {
                                 $scope.loadMeta.info = INFO_CONNECT_TO_DB;
+
                                 $loading.finish('loadingMetadataFromDb');
                             });
                     }
@@ -473,12 +530,7 @@ consoleModule.controller('metadataController', [
                 if (!$common.isValidJavaClass('Package', $scope.ui.packageName, false, 'metadataLoadPackage',
true))
                     return false;
 
-                $scope.preset.space = $scope.spaces[0];
-
-                $http.post('/api/v1/configuration/presets/save', $scope.preset)
-                    .error(function (errMsg) {
-                        $common.showError(errMsg);
-                    });
+                _savePreset($scope.preset);
 
                 var batch = [];
                 var tables = [];
@@ -747,23 +799,6 @@ consoleModule.controller('metadataController', [
                     $loading.finish('loadingMetadataScreen');
                 });
 
-            $http.post('/api/v1/configuration/presets/list')
-                .success(function (data) {
-                    _.forEach(data.presets, function (restoredPreset) {
-                        var preset = _.find(presets, function (dfltPreset) {
-                            return dfltPreset.jdbcDriverClass == restoredPreset.jdbcDriverClass;
-                        });
-
-                        if (preset) {
-                            preset.jdbcUrl = restoredPreset.jdbcUrl;
-                            preset.user = restoredPreset.user;
-                        }
-                    });
-                })
-                .error(function (errMsg) {
-                    $common.showError(errMsg);
-                });
-
             $scope.selectItem = function (item, backup) {
                 function selectItem() {
                     $table.tableReset();

http://git-wip-us.apache.org/repos/asf/ignite/blob/ae625702/modules/control-center-web/src/main/js/controllers/models/metadata.json
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/controllers/models/metadata.json b/modules/control-center-web/src/main/js/controllers/models/metadata.json
index 1a4fdbc..bd734a2 100644
--- a/modules/control-center-web/src/main/js/controllers/models/metadata.json
+++ b/modules/control-center-web/src/main/js/controllers/models/metadata.json
@@ -167,7 +167,7 @@
       "id": "jdbcDriverJar",
       "type": "dropdown",
       "container": "false",
-      "model": "jdbcDriverJar",
+      "model": "drvIdx",
       "items": "jdbcDriverJars",
       "tip": [
         "Select appropriate JAR with JDBC driver",
@@ -179,6 +179,7 @@
       "label": "JDBC Driver",
       "id": "jdbcDriverClass",
       "type": "text",
+      "disabled": "jdbcDriverJars[preset.drvIdx].testDrive",
       "model": "jdbcDriverClass",
       "placeholder": "Full class name of JDBC driver",
       "tip": [
@@ -189,6 +190,7 @@
       "label": "JDBC URL",
       "id": "jdbcUrl",
       "type": "text",
+      "disabled": "jdbcDriverJars[preset.drvIdx].testDrive",
       "model": "jdbcUrl",
       "placeholder": "JDBC URL",
       "tip": [
@@ -200,7 +202,7 @@
       "label": "User",
       "id": "user",
       "type": "text",
-      "disabled": "preset.jdbcUrl == 'jdbc:h2:mem:test-drive-db'",
+      "disabled": "jdbcDriverJars[preset.drvIdx].testDrive",
       "model": "user",
       "tip": [
         "User name for connecting to database"
@@ -210,7 +212,7 @@
       "label": "Password",
       "id": "password",
       "type": "password",
-      "disabled": "preset.jdbcUrl == 'jdbc:h2:mem:test-drive-db'",
+      "disabled": "jdbcDriverJars[preset.drvIdx].testDrive",
       "model": "password",
       "onEnter": "loadMetadataNext()",
       "tip": [

http://git-wip-us.apache.org/repos/asf/ignite/blob/ae625702/modules/control-center-web/src/main/js/db.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/db.js b/modules/control-center-web/src/main/js/db.js
index 7a65589..e166612 100644
--- a/modules/control-center-web/src/main/js/db.js
+++ b/modules/control-center-web/src/main/js/db.js
@@ -482,19 +482,6 @@ var NotebookSchema = new Schema({
 // Define Notebook model.
 exports.Notebook = mongoose.model('Notebook', NotebookSchema);
 
-// Define Database preset schema.
-var DatabasePresetSchema = new Schema({
-    space: {type: ObjectId, ref: 'Space'},
-    jdbcDriverJar: String,
-    jdbcDriverClass: String,
-    jdbcUrl: String,
-    user: String,
-    packageName: String
-});
-
-// Define Database preset model.
-exports.DatabasePreset = mongoose.model('DatabasePreset', DatabasePresetSchema);
-
 exports.upsert = function (model, data, cb) {
     if (data._id) {
         var id = data._id;

http://git-wip-us.apache.org/repos/asf/ignite/blob/ae625702/modules/control-center-web/src/main/js/gulpfile.js/tasks/connect.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/gulpfile.js/tasks/connect.js b/modules/control-center-web/src/main/js/gulpfile.js/tasks/connect.js
index 2aa8006..19f87ec 100644
--- a/modules/control-center-web/src/main/js/gulpfile.js/tasks/connect.js
+++ b/modules/control-center-web/src/main/js/gulpfile.js/tasks/connect.js
@@ -21,6 +21,7 @@ var modrewrite = require('connect-modrewrite');
 
 var options = {
     livereload: true,
+	port: 8090,
 	root: './build',
 	middleware: function (connect, opt) {
 		return [modrewrite([

http://git-wip-us.apache.org/repos/asf/ignite/blob/ae625702/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 862fb5b..1f217f9 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
@@ -1115,6 +1115,7 @@ label {
 
 .labelHeader {
     font-weight: bold;
+    text-transform: capitalize;
 }
 
 .labelField {

http://git-wip-us.apache.org/repos/asf/ignite/blob/ae625702/modules/control-center-web/src/main/js/routes/presets.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/routes/presets.js b/modules/control-center-web/src/main/js/routes/presets.js
deleted file mode 100644
index 6bfdc48..0000000
--- a/modules/control-center-web/src/main/js/routes/presets.js
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-var router = require('express').Router();
-var db = require('../db');
-
-/**
- * Get database presets.
- *
- * @param req Request.
- * @param res Response.
- */
-router.post('/list', function (req, res) {
-    var userId = req.currentUserId();
-
-    // Get owned space and all accessed space.
-    db.Space.find({$or: [{owner: userId}, {usedBy: {$elemMatch: {account: userId}}}]}, function
(err, spaces) {
-        if (db.processed(err, res)) {
-            var spaceIds = spaces.map(function (value) {
-                return value._id;
-            });
-
-            // Get all presets for spaces.
-            db.DatabasePreset.find({space: {$in: spaceIds}}).exec(function (err, presets)
{
-                if (db.processed(err, res))
-                    res.json({spaces: spaces, presets: presets});
-            });
-        }
-    });
-});
-
-/**
- * Save database preset.
- */
-router.post('/save', function (req, res) {
-    var params = req.body;
-
-    db.DatabasePreset.findOne({space: params.space, jdbcDriverJar: params.jdbcDriverJar},
function (err, preset) {
-        if (db.processed(err, res)) {
-            if (preset)
-                db.DatabasePreset.update({space: params.space, jdbcDriverJar: params.jdbcDriverJar},
params, {upsert: true}, function (err) {
-                    if (db.processed(err, res))
-                        return res.sendStatus(200);
-                });
-            else
-                (new db.DatabasePreset(params)).save(function (err) {
-                    if (db.processed(err, res))
-                        return res.sendStatus(200);
-                });
-        }
-    });
-});
-
-module.exports = router;

http://git-wip-us.apache.org/repos/asf/ignite/blob/ae625702/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 9dc996e..113ea89 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
@@ -49,7 +49,7 @@ include ../includes/controls
     div(dw-loading='loadingCachesScreen' dw-loading-options='{text: "Loading caches screen...",
className: "page-loading-overlay"}')
         div(ng-show='ui.ready')
             hr
-            +main-table('Caches:', 'caches', 'cacheName', 'selectItem(row)', '{{$index +
1}}) {{row.label}}', 'label')
+            +main-table('caches', 'caches', 'cacheName', 'selectItem(row)', '{{$index + 1}})
{{row.label}}', 'label')
             .padding-top-dflt(bs-affix)
                 .panel-tip-container(data-placement='bottom' bs-tooltip data-title='Create
new cache')
                     button.btn.btn-primary(id='new-item' ng-click='createItem()') Add cache

http://git-wip-us.apache.org/repos/asf/ignite/blob/ae625702/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 09c7aaa..d18fcca 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
@@ -42,7 +42,7 @@ include ../includes/controls
     div(dw-loading='loadingClustersScreen' dw-loading-options='{text: "Loading clusters screen...",
className: "page-loading-overlay"}')
         div(ng-show='ui.ready')
             hr
-            +main-table('Clusters:', 'clusters', 'clusterName', 'selectItem(row)', '{{$index
+ 1}}) {{row.label}}', 'label')
+            +main-table('clusters', 'clusters', 'clusterName', 'selectItem(row)', '{{$index
+ 1}}) {{row.label}}', 'label')
             .padding-top-dflt(bs-affix)
                 .panel-tip-container(data-placement='bottom' bs-tooltip data-title='Create
new cluster')
                     button.btn.btn-primary(id='new-item' ng-click='createItem()') Add cluster

http://git-wip-us.apache.org/repos/asf/ignite/blob/ae625702/modules/control-center-web/src/main/js/views/configuration/igfs.jade
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/views/configuration/igfs.jade b/modules/control-center-web/src/main/js/views/configuration/igfs.jade
index 873262f..7b5a311 100644
--- a/modules/control-center-web/src/main/js/views/configuration/igfs.jade
+++ b/modules/control-center-web/src/main/js/views/configuration/igfs.jade
@@ -45,7 +45,7 @@ include ../includes/controls
     div(dw-loading='loadingIgfsScreen' dw-loading-options='{text: "Loading IGFS screen...",
className: "page-loading-overlay"}')
         div(ng-show='ui.ready')
             hr
-            +main-table('IGFS:', 'igfss', 'igfsName', 'selectItem(row)', '{{$index + 1}})
{{row.name}}', 'name')
+            +main-table('IGFS', 'igfss', 'igfsName', 'selectItem(row)', '{{$index + 1}})
{{row.name}}', 'name')
             .padding-top-dflt(bs-affix)
                 .panel-tip-container(data-placement='bottom' bs-tooltip data-title='Create
new IGFS')
                     button.btn.btn-primary(id='new-item' ng-click='createItem()') Add IGFS

http://git-wip-us.apache.org/repos/asf/ignite/blob/ae625702/modules/control-center-web/src/main/js/views/configuration/metadata-load.jade
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/views/configuration/metadata-load.jade
b/modules/control-center-web/src/main/js/views/configuration/metadata-load.jade
index a6800d0..b8c85ac 100644
--- a/modules/control-center-web/src/main/js/views/configuration/metadata-load.jade
+++ b/modules/control-center-web/src/main/js/views/configuration/metadata-load.jade
@@ -20,7 +20,7 @@ mixin chk(mdl, change, tip)
     input(type='checkbox' ng-model=mdl ng-change=change bs-tooltip='' data-title=tip data-placement='bottom')
 
 .modal.center(role='dialog')
-    .modal-dialog
+    .modal-dialog(ng-cloak)
         .modal-content(dw-loading='loadingMetadataFromDb' dw-loading-options='loadMeta.loadingOptions')
             #errors-container.modal-header.header
                 button.close(ng-click='$hide()' aria-hidden='true') &times;

http://git-wip-us.apache.org/repos/asf/ignite/blob/ae625702/modules/control-center-web/src/main/js/views/configuration/summary.jade
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/views/configuration/summary.jade b/modules/control-center-web/src/main/js/views/configuration/summary.jade
index 7fa27c8..d931384 100644
--- a/modules/control-center-web/src/main/js/views/configuration/summary.jade
+++ b/modules/control-center-web/src/main/js/views/configuration/summary.jade
@@ -58,7 +58,7 @@ mixin hard-link(ref, txt)
             a(href='/configuration/clusters') here.
 
         div(ng-show='clusters || clusters.length > 0')
-            +main-table('Clusters:', 'clusters', 'clusterName', 'selectItem(row)', '{{$index
+ 1}}) {{row.name}}', 'name')
+            +main-table('clusters', 'clusters', 'clusterName', 'selectItem(row)', '{{$index
+ 1}}) {{row.name}}', 'name')
 
             div(ng-show='selectedItem && tableVisibleRow(displayedRows, selectedItem)')
                 .padding-top-dflt(bs-affix)

http://git-wip-us.apache.org/repos/asf/ignite/blob/ae625702/modules/control-center-web/src/main/js/views/includes/controls.jade
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/views/includes/controls.jade b/modules/control-center-web/src/main/js/views/includes/controls.jade
index afab8ce..230b599 100644
--- a/modules/control-center-web/src/main/js/views/includes/controls.jade
+++ b/modules/control-center-web/src/main/js/views/includes/controls.jade
@@ -487,9 +487,9 @@ mixin main-table(title, rows, focusId, click, rowTemplate, searchField)
             thead
                 tr
                     th
-                        lable.labelHeader.labelFormField #{title}
+                        lable.labelHeader.labelFormField #{title}:
                         .col-sm-3.pull-right(style='padding: 0')
-                            input.form-control(type='text' st-search='#{searchField}' placeholder='Filter
#{rows}...')
+                            input.form-control(type='text' st-search='#{searchField}' placeholder='Filter
#{title}...')
                 tbody
                     tr
                         td

http://git-wip-us.apache.org/repos/asf/ignite/blob/ae625702/modules/control-center-web/src/main/js/views/templates/agent-download.jade
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/views/templates/agent-download.jade b/modules/control-center-web/src/main/js/views/templates/agent-download.jade
index a692b0e..05a73e6 100644
--- a/modules/control-center-web/src/main/js/views/templates/agent-download.jade
+++ b/modules/control-center-web/src/main/js/views/templates/agent-download.jade
@@ -53,4 +53,5 @@
                         | &nbsp; in agent folder for more information
             .modal-footer
                 button.btn.btn-default(ng-click='goBack()') Back to {{::agentDownloadBackTo}}
+                button.btn.btn-primary(ng-if='nodeFailedConnection' ng-click='downloadAgent()')
Start test-drive
                 button.btn.btn-primary(ng-if='!nodeFailedConnection' ng-click='downloadAgent()')
Download zip


Mime
View raw message