ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akuznet...@apache.org
Subject ignite git commit: IGNITE-843 Confirm override for metadata load.
Date Thu, 10 Sep 2015 09:15:21 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-843 006baed10 -> 5780f96d0


IGNITE-843 Confirm override for metadata load.


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

Branch: refs/heads/ignite-843
Commit: 5780f96d0149c8bc5640f045bcd004ca447f7e35
Parents: 006baed
Author: Alexey Kuznetsov <akuznetsov@apache.org>
Authored: Thu Sep 10 16:15:56 2015 +0700
Committer: Alexey Kuznetsov <akuznetsov@apache.org>
Committed: Thu Sep 10 16:15:56 2015 +0700

----------------------------------------------------------------------
 .../main/js/controllers/metadata-controller.js  |  5 +--
 .../main/js/controllers/models/metadata.json    |  8 -----
 modules/control-center-web/src/main/js/db.js    |  1 -
 .../src/main/js/public/stylesheets/style.scss   | 10 ++++++
 .../js/routes/generator/generator-common.js     | 11 ++++---
 .../main/js/routes/generator/generator-java.js  |  4 +--
 .../js/routes/generator/generator-properties.js |  2 +-
 .../main/js/routes/generator/generator-xml.js   |  2 +-
 .../src/main/js/routes/metadata.js              |  5 +++
 .../configuration/metadata-load-confirm.jade    | 32 ++++++++++++++++++++
 .../main/js/views/configuration/metadata.jade   |  2 +-
 .../src/main/js/views/templates/confirm.jade    |  2 +-
 12 files changed, 60 insertions(+), 24 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/5780f96d/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 48e7838..158e642 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
@@ -701,7 +701,7 @@ controlCenterModule.controller('metadataController', [
                 $table.tableReset();
 
                 $timeout(function () {
-                    $common.ensureActivePanel($scope.panels, 'metadata', 'metadataName');
+                    $common.ensureActivePanel($scope.panels, 'metadata', 'keyType');
                 });
 
                 $scope.selectItem(undefined, {space: $scope.spaces[0]._id, caches: []});
@@ -709,9 +709,6 @@ controlCenterModule.controller('metadataController', [
 
             // Check metadata logical consistency.
             function validate(item) {
-                if ($common.isEmptyString(item.name))
-                    return showPopoverMessage($scope.panels, 'general', 'metadataName', 'Name
should not be empty');
-
                 if ($common.isEmptyString(item.keyType))
                     return showPopoverMessage($scope.panels, 'general', 'keyType', 'Key type
should not be empty');
                 else if (!$common.isValidJavaClass('Key type', item.keyType, true, 'keyType'))

http://git-wip-us.apache.org/repos/asf/ignite/blob/5780f96d/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 b80b2ee..c85a698 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
@@ -25,14 +25,6 @@
       ],
       "fields": [
         {
-          "label": "Name",
-          "id": "metadataName",
-          "type": "text",
-          "model": "name",
-          "required": true,
-          "placeholder": "Input name"
-        },
-        {
           "label": "Caches",
           "id": "caches",
           "type": "dropdown-multiple",

http://git-wip-us.apache.org/repos/asf/ignite/blob/5780f96d/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 46725cf..7053ef5 100644
--- a/modules/control-center-web/src/main/js/db.js
+++ b/modules/control-center-web/src/main/js/db.js
@@ -72,7 +72,6 @@ exports.Space = mongoose.model('Space', new Schema({
 // Define Cache type metadata schema.
 var CacheTypeMetadataSchema = new Schema({
     space: {type: ObjectId, ref: 'Space'},
-    name: String,
     caches: [{type: ObjectId, ref: 'Cache'}],
     kind: {type: String, enum: ['query', 'store', 'both']},
     databaseSchema: String,

http://git-wip-us.apache.org/repos/asf/ignite/blob/5780f96d/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 ae5878d..63e3fb2 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
@@ -289,6 +289,16 @@ h1, h2, h3, h4, h5, h6 {
     margin-top: 0;
 }
 
+.modal-footer {
+    .checkbox {
+        margin: 0;
+
+        label {
+            vertical-align: middle;
+        }
+    }
+}
+
 .modal-body {
     margin-left: 20px;
     margin-right: 20px;

http://git-wip-us.apache.org/repos/asf/ignite/blob/5780f96d/modules/control-center-web/src/main/js/routes/generator/generator-common.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/routes/generator/generator-common.js b/modules/control-center-web/src/main/js/routes/generator/generator-common.js
index 5503c37..100df46 100644
--- a/modules/control-center-web/src/main/js/routes/generator/generator-common.js
+++ b/modules/control-center-web/src/main/js/routes/generator/generator-common.js
@@ -62,6 +62,10 @@ $generatorCommon.builder = function () {
 
     res.datasources = [];
 
+    res.asString = function() {
+      return this.join('\n');
+    };
+
     res.append = function (s) {
         this.push((this.lineStart ? _.repeat('    ', this.deep) : '') + s);
 
@@ -71,14 +75,13 @@ $generatorCommon.builder = function () {
     res.line = function (s) {
         if (s) {
             if (this.needEmptyLine)
-                this.push('\n');
+                this.push('');
 
             this.append(s);
         }
 
         this.needEmptyLine = false;
 
-        this.push('\n');
         this.lineStart = true;
 
         return this;
@@ -88,7 +91,6 @@ $generatorCommon.builder = function () {
         if (s)
             this.append(s);
 
-        this.push('\n');
         this.lineStart = true;
         this.deep++;
 
@@ -101,7 +103,6 @@ $generatorCommon.builder = function () {
         if (s)
             this.append(s);
 
-        this.push('\n');
         this.lineStart = true;
 
         return this;
@@ -109,7 +110,7 @@ $generatorCommon.builder = function () {
 
     res.emptyLineIfNeeded = function () {
         if (this.needEmptyLine) {
-            this.push('\n');
+            this.push('');
             this.lineStart = true;
 
             this.needEmptyLine = false;

http://git-wip-us.apache.org/repos/asf/ignite/blob/5780f96d/modules/control-center-web/src/main/js/routes/generator/generator-java.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/routes/generator/generator-java.js b/modules/control-center-web/src/main/js/routes/generator/generator-java.js
index 51cd0f6..e936df0 100644
--- a/modules/control-center-web/src/main/js/routes/generator/generator-java.js
+++ b/modules/control-center-web/src/main/js/routes/generator/generator-java.js
@@ -1131,11 +1131,11 @@ $generatorJava.cluster = function (cluster, javaClass, clientNearCfg)
{
             res.endBlock('}');
             res.endBlock('}');
 
-            return res.generateImports() + '\n\n' + res.join('')
+            return res.generateImports() + '\n\n' + res.join('\n');
         }
     }
 
-    return res.join('');
+    return res.join('\n');
 };
 
 // For server side we should export Java code generation entry point.

http://git-wip-us.apache.org/repos/asf/ignite/blob/5780f96d/modules/control-center-web/src/main/js/routes/generator/generator-properties.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/routes/generator/generator-properties.js
b/modules/control-center-web/src/main/js/routes/generator/generator-properties.js
index 3eeedfb..ef1be12 100644
--- a/modules/control-center-web/src/main/js/routes/generator/generator-properties.js
+++ b/modules/control-center-web/src/main/js/routes/generator/generator-properties.js
@@ -58,7 +58,7 @@ $generatorProperties.dataSourcesProperties = function (cluster) {
     }
 
     if (datasources.length > 0)
-        return '# ' + mainComment() + '\n\n' + res.join('');
+        return '# ' + mainComment() + '\n\n' + res.join('\n');
 
     return undefined;
 };

http://git-wip-us.apache.org/repos/asf/ignite/blob/5780f96d/modules/control-center-web/src/main/js/routes/generator/generator-xml.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/routes/generator/generator-xml.js b/modules/control-center-web/src/main/js/routes/generator/generator-xml.js
index a8313bc..e826ca0 100644
--- a/modules/control-center-web/src/main/js/routes/generator/generator-xml.js
+++ b/modules/control-center-web/src/main/js/routes/generator/generator-xml.js
@@ -1048,7 +1048,7 @@ $generatorXml.cluster = function (cluster, clientNearCfg) {
         }
 
         // 3. Add main content.
-        xml += res.join('');
+        xml += res.join('\n');
 
         // 4. Add footer.
         xml += '</beans>\n';

http://git-wip-us.apache.org/repos/asf/ignite/blob/5780f96d/modules/control-center-web/src/main/js/routes/metadata.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/routes/metadata.js b/modules/control-center-web/src/main/js/routes/metadata.js
index f889b99..eb8c09c 100644
--- a/modules/control-center-web/src/main/js/routes/metadata.js
+++ b/modules/control-center-web/src/main/js/routes/metadata.js
@@ -28,6 +28,11 @@ router.get('/metadata-load', function (req, res) {
     res.render('configuration/metadata-load');
 });
 
+/* GET metadata load confirm dialog. */
+router.get('/metadata-load-confirm', function (req, res) {
+    res.render('configuration/metadata-load-confirm');
+});
+
 /**
  * Get spaces and metadata accessed for user account.
  *

http://git-wip-us.apache.org/repos/asf/ignite/blob/5780f96d/modules/control-center-web/src/main/js/views/configuration/metadata-load-confirm.jade
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/views/configuration/metadata-load-confirm.jade
b/modules/control-center-web/src/main/js/views/configuration/metadata-load-confirm.jade
new file mode 100644
index 0000000..2c43a60
--- /dev/null
+++ b/modules/control-center-web/src/main/js/views/configuration/metadata-load-confirm.jade
@@ -0,0 +1,32 @@
+//-
+    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.
+
+.modal(tabindex='-1' role='dialog')
+    .modal-dialog
+        .modal-content
+            .modal-header
+                button.close(type='button' ng-click='cancel()' aria-hidden='true') &times;
+                h4.modal-title Confirmation
+            .modal-body(ng-show='content')
+                p(ng-bind-html='content' style='text-align: center;')
+            .modal-footer
+                .checkbox.labelField
+                    label
+                        input(type='checkbox' ng-model='ui.forAll')
+                        | Apply to all
+                button.btn.btn-default(id='confirm-btn-cancel' type='button' ng-click='cancel()')
Cancel
+                button.btn.btn-default(id='confirm-btn-cancel' type='button' ng-click='skip()')
Skip
+                button.btn.btn-primary(id='confirm-btn-confirm' type='button' ng-click='continue()')
Overwrite

http://git-wip-us.apache.org/repos/asf/ignite/blob/5780f96d/modules/control-center-web/src/main/js/views/configuration/metadata.jade
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/views/configuration/metadata.jade b/modules/control-center-web/src/main/js/views/configuration/metadata.jade
index 0f6cbcc..4653651 100644
--- a/modules/control-center-web/src/main/js/views/configuration/metadata.jade
+++ b/modules/control-center-web/src/main/js/views/configuration/metadata.jade
@@ -27,7 +27,7 @@ block content
         hr
     .docs-body(ng-controller='metadataController')
         +block-callout('{{screenTip.workflowTitle}}', 'joinTip(screenTip.workflowContent)',
'{{screenTip.whatsNextTitle}}', 'joinTip(screenTip.whatsNextContent)')
-        +main-table('Types metadata:', 'metadatas', 'metadataName', 'selectItem(row)', '{{$index
+ 1}}) {{row.name}}')
+        +main-table('Types metadata:', 'metadatas', 'metadataName', 'selectItem(row)', '{{$index
+ 1}}) {{row.valueType}}')
         .padding-top-dflt(bs-affix)
             .panel-tip-container(data-placement='bottom' bs-tooltip data-title='Create new
metadata')
                 button.btn.btn-primary(id='new-item' ng-click='createItem()') New

http://git-wip-us.apache.org/repos/asf/ignite/blob/5780f96d/modules/control-center-web/src/main/js/views/templates/confirm.jade
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/views/templates/confirm.jade b/modules/control-center-web/src/main/js/views/templates/confirm.jade
index c2ead41..21e125b 100644
--- a/modules/control-center-web/src/main/js/views/templates/confirm.jade
+++ b/modules/control-center-web/src/main/js/views/templates/confirm.jade
@@ -23,5 +23,5 @@
             .modal-body(ng-show='content')
                 p(ng-bind-html='content' style='text-align: center;')
             .modal-footer
-                button.btn.btn-default(id='confirm-btn-cancel' type='button' ng-click='cancel()')
{{cancelTitle}}
+                button.btn.btn-default(id='confirm-btn-cancel' type='button' ng-click='$hide()')
Cancel
                 button.btn.btn-primary(id='confirm-btn-confirm' type='button' ng-click='ok()')
Confirm


Mime
View raw message