You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by ak...@apache.org on 2015/07/20 08:25:55 UTC
[1/2] incubator-ignite git commit: IGNITE-843 Fixed metadata save to
DB.
Repository: incubator-ignite
Updated Branches:
refs/heads/ignite-843 69889db21 -> 76738eae9
IGNITE-843 Fixed metadata save to DB.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/b60737c0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/b60737c0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/b60737c0
Branch: refs/heads/ignite-843
Commit: b60737c07a6207385f3acae3d5bd2e2c8e8911c3
Parents: 69889db
Author: AKuznetsov <ak...@gridgain.com>
Authored: Mon Jul 20 13:22:31 2015 +0700
Committer: AKuznetsov <ak...@gridgain.com>
Committed: Mon Jul 20 13:22:31 2015 +0700
----------------------------------------------------------------------
modules/web-control-center/nodejs/controllers/models/metadata.json | 2 +-
modules/web-control-center/nodejs/db.js | 1 -
2 files changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b60737c0/modules/web-control-center/nodejs/controllers/models/metadata.json
----------------------------------------------------------------------
diff --git a/modules/web-control-center/nodejs/controllers/models/metadata.json b/modules/web-control-center/nodejs/controllers/models/metadata.json
index 7ee0ce5..cff787f 100644
--- a/modules/web-control-center/nodejs/controllers/models/metadata.json
+++ b/modules/web-control-center/nodejs/controllers/models/metadata.json
@@ -54,7 +54,7 @@
{
"label": "Value type",
"type": "text",
- "model": "value Type",
+ "model": "valueType",
"required": true,
"placeholder": "Full class name for Value",
"tip": ["TODO."]
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b60737c0/modules/web-control-center/nodejs/db.js
----------------------------------------------------------------------
diff --git a/modules/web-control-center/nodejs/db.js b/modules/web-control-center/nodejs/db.js
index 8286674..b8034a3 100644
--- a/modules/web-control-center/nodejs/db.js
+++ b/modules/web-control-center/nodejs/db.js
@@ -70,7 +70,6 @@ var CacheTypeMetadataSchema = new Schema({
databaseTable: String,
keyType: String,
valueType: String,
- valType: String,
keyFields: [{dbName: String, dbType: Number, javaName: String, javaType: String}],
valueFields: [{dbName: String, dbType: Number, javaName: String, javaType: String}],
queryFields: [{name: String, className: String}],
[2/2] incubator-ignite git commit: IGNITE-843 Fixed table inplace
edit.
Posted by ak...@apache.org.
IGNITE-843 Fixed table inplace edit.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/76738eae
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/76738eae
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/76738eae
Branch: refs/heads/ignite-843
Commit: 76738eae9eb1ac960158f621369e6ef815d1e396
Parents: b60737c
Author: AKuznetsov <ak...@gridgain.com>
Authored: Mon Jul 20 13:25:52 2015 +0700
Committer: AKuznetsov <ak...@gridgain.com>
Committed: Mon Jul 20 13:25:52 2015 +0700
----------------------------------------------------------------------
.../nodejs/controllers/caches-controller.js | 4 +--
.../nodejs/controllers/metadata-controller.js | 4 +--
.../nodejs/public/stylesheets/style.less | 26 +++++++++++++++-----
.../nodejs/views/includes/controls.jade | 19 ++++++++------
4 files changed, 35 insertions(+), 18 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/76738eae/modules/web-control-center/nodejs/controllers/caches-controller.js
----------------------------------------------------------------------
diff --git a/modules/web-control-center/nodejs/controllers/caches-controller.js b/modules/web-control-center/nodejs/controllers/caches-controller.js
index 9a7a11b..505ecc0 100644
--- a/modules/web-control-center/nodejs/controllers/caches-controller.js
+++ b/modules/web-control-center/nodejs/controllers/caches-controller.js
@@ -129,7 +129,7 @@ controlCenterModule.controller('cachesController', ['$scope', '$http', '$common'
var idx = _.indexOf(model, fx);
// Found itself.
- if (index > 0 && index == idx)
+ if (index >= 0 && index == idx)
return true;
// Found duplicate.
@@ -150,7 +150,7 @@ controlCenterModule.controller('cachesController', ['$scope', '$http', '$common'
var idx = _.findIndex(model, function (pair) {return pair.keyClass == keyCls});
// Found itself.
- if (index > 0 && index == idx)
+ if (index >= 0 && index == idx)
return true;
// Found duplicate.
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/76738eae/modules/web-control-center/nodejs/controllers/metadata-controller.js
----------------------------------------------------------------------
diff --git a/modules/web-control-center/nodejs/controllers/metadata-controller.js b/modules/web-control-center/nodejs/controllers/metadata-controller.js
index 3fae5c0..017b316 100644
--- a/modules/web-control-center/nodejs/controllers/metadata-controller.js
+++ b/modules/web-control-center/nodejs/controllers/metadata-controller.js
@@ -317,7 +317,7 @@ controlCenterModule.controller('metadataController', ['$scope', '$http', '$commo
var idx = _.indexOf(model, name);
// Found itself.
- if (index > 0 && index == idx)
+ if (index >= 0 && index == idx)
return true;
// Found duplicate.
@@ -338,7 +338,7 @@ controlCenterModule.controller('metadataController', ['$scope', '$http', '$commo
var idx = _.findIndex(model, function (pair) {return pair.name == name});
// Found itself.
- if (index > 0 && index == idx)
+ if (index >= 0 && index == idx)
return true;
// Found duplicate.
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/76738eae/modules/web-control-center/nodejs/public/stylesheets/style.less
----------------------------------------------------------------------
diff --git a/modules/web-control-center/nodejs/public/stylesheets/style.less b/modules/web-control-center/nodejs/public/stylesheets/style.less
index 6165838..2323b9f 100644
--- a/modules/web-control-center/nodejs/public/stylesheets/style.less
+++ b/modules/web-control-center/nodejs/public/stylesheets/style.less
@@ -680,10 +680,6 @@ button .caret, .btn .caret {
}
}
-.table-form-control {
- width: auto;
-}
-
.theme-line .panel-heading {
padding: 10px 10px;
margin: 0;
@@ -837,7 +833,7 @@ label {
.labelField {
float: left;
- margin-right: 4px;
+ margin-right: 5px;
}
.labelFormField {
@@ -1058,4 +1054,22 @@ a {
.ace_editor, #ace_document {
width: 100%;
height: 400px;
-}
\ No newline at end of file
+}
+
+.grid {
+ display: flex;
+ flex-wrap: nowrap;
+ list-style: none;
+ margin: 0;
+ padding: 0;
+}
+
+.grid-cell {
+ flex-basis: 50%;
+}
+
+.grid-fixed-cell {
+ flex-basis: 10px;
+}
+
+
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/76738eae/modules/web-control-center/nodejs/views/includes/controls.jade
----------------------------------------------------------------------
diff --git a/modules/web-control-center/nodejs/views/includes/controls.jade b/modules/web-control-center/nodejs/views/includes/controls.jade
index 4685fb4..9da9d49 100644
--- a/modules/web-control-center/nodejs/views/includes/controls.jade
+++ b/modules/web-control-center/nodejs/views/includes/controls.jade
@@ -37,6 +37,15 @@ mixin btn-up(show, click)
mixin btn-down(show, click)
i.tipField.fa.fa-arrow-down(ng-show=show ng-click=click)
+mixin table-pair-edit(keyModel, valModel, keyPlaceholder, valPlaceholder)
+ .grid
+ .grid-cell
+ input.form-control(type='text' ng-model=keyModel placeholder=keyPlaceholder)
+ div
+ label /
+ .grid-cell
+ input.form-control(type='text' ng-model=valModel placeholder=valPlaceholder)
+
mixin table-pair(header, tblMdl, keyFld, valFld, keyPlaceholder, valPlaceholder)
.col-sm-6
label.table-header #{header}:
@@ -53,18 +62,12 @@ mixin table-pair(header, tblMdl, keyFld, valFld, keyPlaceholder, valPlaceholder)
label.labelField {{$index + 1}})
+btn-save('tablePairSaveVisible(curKey, curValue)', 'tablePairSave(tablePairValid, backupItem, field, curKey, curValue, $index)')
.input-tip
- .col-sm-12
- input.form-control.table-form-control(type='text' ng-model='curKey' placeholder=keyPlaceholder)
- label /
- input.form-control.table-form-control(type='text' ng-model='curValue' placeholder=valPlaceholder)
+ +table-pair-edit('curKey', 'curValue', keyPlaceholder, valPlaceholder)
.settings-row(ng-show='tableNewItemActive(field)')
.col-sm-6
+btn-save('tablePairSaveVisible(newKey, newValue)', 'tablePairSave(tablePairValid, backupItem, field, newKey, newValue, -1)')
.input-tip
- input.form-control.table-form-control(type='text' ng-model='newKey' placeholder=keyPlaceholder)
- label /
- input.form-control.table-form-control(type='text' ng-model='newValue' placeholder=valPlaceholder)
-
+ +table-pair-edit('newKey', 'newValue', keyPlaceholder, valPlaceholder)
mixin details-row
- var lblDetailClasses = ['col-sm-4', 'details-label']