You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by an...@apache.org on 2015/12/21 04:15:25 UTC
[1/2] ignite git commit: IGNITE-2181 added base directive output form
fields - Fixes #353.
Repository: ignite
Updated Branches:
refs/heads/ignite-843-rc2 f888e54fc -> 5fe4ffee1
IGNITE-2181 added base directive output form fields - Fixes #353.
Signed-off-by: Andrey <an...@gridgain.com>
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/9b12610b
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/9b12610b
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/9b12610b
Branch: refs/heads/ignite-843-rc2
Commit: 9b12610b95c8803d1b87e45eafb0dcf7d7ddcfb2
Parents: f888e54
Author: Dmitriyff <dm...@gmail.com>
Authored: Mon Dec 21 09:00:25 2015 +0700
Committer: Andrey <an...@gridgain.com>
Committed: Mon Dec 21 09:00:25 2015 +0700
----------------------------------------------------------------------
.../control-center-web/src/main/js/app/index.js | 4 +-
.../modules/Form/field/dropdown.directive.js | 41 ++++++
.../js/app/modules/Form/field/dropdown.jade | 31 +++++
.../app/modules/Form/field/field.directive.js | 39 ++++++
.../main/js/app/modules/Form/field/field.jade | 19 +++
.../js/app/modules/Form/field/field.link.js | 21 +++
.../Form/field/input/number.directive.js | 45 +++++++
.../js/app/modules/Form/field/input/number.jade | 41 ++++++
.../src/main/js/app/modules/Form/index.js | 36 +++++
.../configuration/summary/summary.controller.js | 20 ---
.../src/main/js/controllers/models/summary.json | 133 -------------------
.../src/main/js/public/stylesheets/style.scss | 12 ++
.../main/js/views/configuration/summary.jade | 91 ++++++++++---
.../src/main/js/views/includes/controls.jade | 3 +
14 files changed, 363 insertions(+), 173 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/9b12610b/modules/control-center-web/src/main/js/app/index.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/app/index.js b/modules/control-center-web/src/main/js/app/index.js
index bc9372f..ffd159e 100644
--- a/modules/control-center-web/src/main/js/app/index.js
+++ b/modules/control-center-web/src/main/js/app/index.js
@@ -54,6 +54,7 @@ window.angular = angular;
import './modules/User/index'
import './modules/Auth/index'
+import './modules/Form/index'
import './modules/states/login/index'
import './modules/states/logout/index'
@@ -90,9 +91,10 @@ import hasPojo from './filters/hasPojo/hasPojo.filter'
angular
.module('ignite-console', [
'ui.router',
- // Services.
+ // Base modules.
'ignite-console.Auth',
'ignite-console.User',
+ 'ignite-console.Form',
// States.
'ignite-console.states.login',
'ignite-console.states.logout',
http://git-wip-us.apache.org/repos/asf/ignite/blob/9b12610b/modules/control-center-web/src/main/js/app/modules/Form/field/dropdown.directive.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/app/modules/Form/field/dropdown.directive.js b/modules/control-center-web/src/main/js/app/modules/Form/field/dropdown.directive.js
new file mode 100644
index 0000000..1056c4c
--- /dev/null
+++ b/modules/control-center-web/src/main/js/app/modules/Form/field/dropdown.directive.js
@@ -0,0 +1,41 @@
+/*
+ * 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.
+ */
+
+import template from './dropdown.jade!';
+
+export default ['igniteFormFieldDropdown', ['IgniteFormGUID', guid => {
+ let link = scope => {
+ let {id} = scope;
+
+ scope.id = id || guid();
+ }
+
+ return {
+ restrict: 'E',
+ scope: {
+ id: '@',
+ name: '@',
+ options: '=',
+ ngModel: '='
+ },
+ link,
+ template,
+ replace: true,
+ transclude: true,
+ require: ['^form', '?^igniteFormField']
+ };
+}]];
http://git-wip-us.apache.org/repos/asf/ignite/blob/9b12610b/modules/control-center-web/src/main/js/app/modules/Form/field/dropdown.jade
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/app/modules/Form/field/dropdown.jade b/modules/control-center-web/src/main/js/app/modules/Form/field/dropdown.jade
new file mode 100644
index 0000000..a2cbafe
--- /dev/null
+++ b/modules/control-center-web/src/main/js/app/modules/Form/field/dropdown.jade
@@ -0,0 +1,31 @@
+//-
+ 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.
+
+.input-tip
+ button.select-toggle.form-control(
+ id='{{ id }}'
+ name='{{ name }}'
+ data-placeholder='{{ placeholder }}'
+
+ bs-select
+ bs-options='item.value as item.label for item in options'
+
+ ng-attr-data-container=''
+ ng-model='ngModel'
+ ng-class='{ placeholder: ngModel === undefined || ngModel === null}'
+ )
+
+ span(ng-transclude='')
http://git-wip-us.apache.org/repos/asf/ignite/blob/9b12610b/modules/control-center-web/src/main/js/app/modules/Form/field/field.directive.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/app/modules/Form/field/field.directive.js b/modules/control-center-web/src/main/js/app/modules/Form/field/field.directive.js
new file mode 100644
index 0000000..91c566a
--- /dev/null
+++ b/modules/control-center-web/src/main/js/app/modules/Form/field/field.directive.js
@@ -0,0 +1,39 @@
+/*
+ * 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.
+ */
+
+import link from './field.link';
+import template from './field.jade!';
+
+export default ['igniteFormField', [() => {
+
+ let controller = () => {}
+
+ return {
+ restrict: 'E',
+ scope: { },
+ bindToController: {
+ for: '@',
+ label: '@'
+ },
+ template,
+ controller,
+ controllerAs: 'field',
+ replace: true,
+ transclude: true,
+ require: '^form'
+ };
+}]];
http://git-wip-us.apache.org/repos/asf/ignite/blob/9b12610b/modules/control-center-web/src/main/js/app/modules/Form/field/field.jade
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/app/modules/Form/field/field.jade b/modules/control-center-web/src/main/js/app/modules/Form/field/field.jade
new file mode 100644
index 0000000..b529d21
--- /dev/null
+++ b/modules/control-center-web/src/main/js/app/modules/Form/field/field.jade
@@ -0,0 +1,19 @@
+//-
+ 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.
+
+div.col-xs-8.col-sm-8.col-md-6
+ label.col-xs-6.col-sm-6.col-md-6(for='{{::field.for}}') {{::field.label}}:
+ div.col-xs-6.col-sm-6.col-md-6(ng-transclude='')
http://git-wip-us.apache.org/repos/asf/ignite/blob/9b12610b/modules/control-center-web/src/main/js/app/modules/Form/field/field.link.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/app/modules/Form/field/field.link.js b/modules/control-center-web/src/main/js/app/modules/Form/field/field.link.js
new file mode 100644
index 0000000..f6f5275
--- /dev/null
+++ b/modules/control-center-web/src/main/js/app/modules/Form/field/field.link.js
@@ -0,0 +1,21 @@
+/*
+ * 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.
+ */
+
+export default function($scope, $element, $attrs, $ctrls) {
+
+
+};
http://git-wip-us.apache.org/repos/asf/ignite/blob/9b12610b/modules/control-center-web/src/main/js/app/modules/Form/field/input/number.directive.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/app/modules/Form/field/input/number.directive.js b/modules/control-center-web/src/main/js/app/modules/Form/field/input/number.directive.js
new file mode 100644
index 0000000..906fd0c
--- /dev/null
+++ b/modules/control-center-web/src/main/js/app/modules/Form/field/input/number.directive.js
@@ -0,0 +1,45 @@
+/*
+ * 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.
+ */
+
+import template from './number.jade!';
+
+export default ['igniteFormFieldInputNumber', ['IgniteFormGUID', guid => {
+ let link = (scope, el, attrs, [form, label]) => {
+ let {id, name} = scope;
+ let field = form[name];
+
+ console.log('label', label);
+
+ scope.field = field;
+ label.for = scope.id = id || guid();
+ }
+
+ return {
+ restrict: 'E',
+ scope: {
+ id: '@',
+ name: '@',
+ placeholder: '@',
+ ngModel: '='
+ },
+ link,
+ template,
+ replace: true,
+ transclude: true,
+ require: ['^form', '?^igniteFormField']
+ };
+}]];
http://git-wip-us.apache.org/repos/asf/ignite/blob/9b12610b/modules/control-center-web/src/main/js/app/modules/Form/field/input/number.jade
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/app/modules/Form/field/input/number.jade b/modules/control-center-web/src/main/js/app/modules/Form/field/input/number.jade
new file mode 100644
index 0000000..973d4ae
--- /dev/null
+++ b/modules/control-center-web/src/main/js/app/modules/Form/field/input/number.jade
@@ -0,0 +1,41 @@
+//-
+ 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.
+
+.input-tip
+ input.form-control(
+ id='{{ id }}'
+ name='{{ name }}'
+ placeholder='{{ placeholder }}'
+ type='number'
+ min='0'
+ max='Number.MAX_VALUE'
+ ng-model='ngModel'
+ )
+
+ i.fa.fa-exclamation-triangle.form-control-feedback(
+ ng-show='field.$error.min'
+ bs-tooltip='"Value is less than allowable minimum."'
+ )
+ i.fa.fa-exclamation-triangle.form-control-feedback(
+ ng-show='field.$error.max'
+ bs-tooltip='"Value is more than allowable maximum."'
+ )
+
+ i.fa.fa-exclamation-triangle.form-control-feedback(
+ ng-show='field.$error.number'
+ bs-tooltip='"Invalid value. Only numbers allowed."'
+ )
+ span(ng-transclude='')
http://git-wip-us.apache.org/repos/asf/ignite/blob/9b12610b/modules/control-center-web/src/main/js/app/modules/Form/index.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/app/modules/Form/index.js b/modules/control-center-web/src/main/js/app/modules/Form/index.js
new file mode 100644
index 0000000..a86b406
--- /dev/null
+++ b/modules/control-center-web/src/main/js/app/modules/Form/index.js
@@ -0,0 +1,36 @@
+/*
+ * 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.
+ */
+
+import igniteFormField from './field/field.directive';
+import igniteFormFieldDropdown from './field/dropdown.directive';
+import igniteFormFieldInputNumber from './field/input/number.directive';
+
+angular
+.module('ignite-console.Form', [
+
+])
+.directive(...igniteFormField)
+.directive(...igniteFormFieldDropdown)
+.directive(...igniteFormFieldInputNumber)
+.factory('IgniteFormGUID', [() => {
+
+ let guid = 0;
+
+ return () => {
+ return `form-field-${guid++}`;
+ }
+}])
http://git-wip-us.apache.org/repos/asf/ignite/blob/9b12610b/modules/control-center-web/src/main/js/app/modules/states/configuration/summary/summary.controller.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/app/modules/states/configuration/summary/summary.controller.js b/modules/control-center-web/src/main/js/app/modules/states/configuration/summary/summary.controller.js
index efa8966..f58e95b 100644
--- a/modules/control-center-web/src/main/js/app/modules/states/configuration/summary/summary.controller.js
+++ b/modules/control-center-web/src/main/js/app/modules/states/configuration/summary/summary.controller.js
@@ -36,31 +36,11 @@ export default [
$scope.panelExpanded = $common.panelExpanded;
$scope.tableVisibleRow = $table.tableVisibleRow;
$scope.joinTip = $common.joinTip;
- $scope.getModel = $common.getModel;
$scope.widthIsSufficient = $common.widthIsSufficient;
- $scope.evictionPolicies = [
- {value: 'LRU', label: 'LRU'},
- {value: 'FIFO', label: 'FIFO'},
- {value: 'SORTED', label: 'Sorted'},
- {value: undefined, label: 'Not set'}
- ];
-
$scope.tabsServer = { activeTab: 0 };
$scope.tabsClient = { activeTab: 0 };
- $scope.backupItem = {javaClassClient: 1};
-
- $http.get('/models/summary.json')
- .success(function (data) {
- $scope.screenTip = data.screenTip;
- $scope.moreInfo = data.moreInfo;
- $scope.clientFields = data.clientFields;
- })
- .error(function (errMsg) {
- $common.showError(errMsg);
- });
-
$scope.selectItem = (cluster) => {
delete ctrl.cluster;
http://git-wip-us.apache.org/repos/asf/ignite/blob/9b12610b/modules/control-center-web/src/main/js/controllers/models/summary.json
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/controllers/models/summary.json b/modules/control-center-web/src/main/js/controllers/models/summary.json
deleted file mode 100644
index 83a699f..0000000
--- a/modules/control-center-web/src/main/js/controllers/models/summary.json
+++ /dev/null
@@ -1,133 +0,0 @@
-{
- "clientFields": [
- {
- "label": "Near cache start size",
- "type": "number",
- "path": "nearConfiguration",
- "model": "nearStartSize",
- "placeholder": 375000,
- "tip": [
- "Initial cache size for near cache which will be used to pre-create internal hash table after start"
- ]
- },
- {
- "label": "Near cache eviction policy",
- "type": "dropdown-details",
- "settings": true,
- "path": "nearConfiguration.nearEvictionPolicy",
- "model": "kind",
- "placeholder": "Choose eviction policy",
- "items": "evictionPolicies",
- "tip": [
- "Cache expiration policy"
- ],
- "details": {
- "LRU": {
- "expanded": false,
- "fields": [
- {
- "label": "Batch size",
- "type": "number",
- "path": "nearConfiguration.nearEvictionPolicy.LRU",
- "model": "batchSize",
- "placeholder": 1,
- "tip": [
- "Number of entries to remove on shrink"
- ]
- },
- {
- "label": "Max memory size",
- "type": "number",
- "path": "nearConfiguration.nearEvictionPolicy.LRU",
- "model": "maxMemorySize",
- "placeholder": 0,
- "tip": [
- "Maximum allowed cache size in bytes"
- ]
- },
- {
- "label": "Max size",
- "type": "number",
- "path": "nearConfiguration.nearEvictionPolicy.LRU",
- "model": "maxSize",
- "placeholder": 100000,
- "tip": [
- "Maximum allowed size of cache before entry will start getting evicted"
- ]
- }
- ]
- },
- "FIFO": {
- "expanded": false,
- "fields": [
- {
- "label": "Batch size",
- "type": "number",
- "path": "nearConfiguration.nearEvictionPolicy.FIFO",
- "model": "batchSize",
- "placeholder": 1,
- "tip": [
- "Number of entries to remove on shrink"
- ]
- },
- {
- "label": "Max memory size",
- "type": "number",
- "path": "nearConfiguration.nearEvictionPolicy.FIFO",
- "model": "maxMemorySize",
- "placeholder": 0,
- "tip": [
- "Maximum allowed cache size in bytes"
- ]
- },
- {
- "label": "Max size",
- "type": "number",
- "path": "nearConfiguration.nearEvictionPolicy.FIFO",
- "model": "maxSize",
- "placeholder": 100000,
- "tip": [
- "Maximum allowed size of cache before entry will start getting evicted"
- ]
- }
- ]
- },
- "SORTED": {
- "expanded": false,
- "fields": [
- {
- "label": "Batch size",
- "type": "number",
- "path": "nearConfiguration.nearEvictionPolicy.SORTED",
- "model": "batchSize",
- "placeholder": 1,
- "tip": [
- "Number of entries to remove on shrink"
- ]
- },
- {
- "label": "Max memory size",
- "type": "number",
- "path": "nearConfiguration.nearEvictionPolicy.SORTED",
- "model": "maxMemorySize",
- "placeholder": 0,
- "tip": [
- "Maximum allowed cache size in bytes"
- ]
- },
- {
- "label": "Max size",
- "type": "number",
- "path": "nearConfiguration.nearEvictionPolicy.SORTED",
- "model": "maxSize",
- "placeholder": 100000,
- "tip": [
- "Maximum allowed size of cache before entry will start getting evicted"
- ]
- }
- ]
- }
- }
- }
- ]
-}
http://git-wip-us.apache.org/repos/asf/ignite/blob/9b12610b/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 d218f46..bd9dbff 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
@@ -1816,3 +1816,15 @@ treecontrol.tree-classic {
margin-right: 10px
}
}
+
+.summary-tabs {
+ .nav-tabs > li:first-child,
+ .nav-tabs > li:first-child.active {
+ & > a,
+ & > a:focus,
+ & > a:hover {
+ border-left: none;
+ border-top-left-radius: 0;
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/9b12610b/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 d931384..e6fc856 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
@@ -19,6 +19,9 @@ include ../includes/controls
mixin hard-link(ref, txt)
a(style='color:#ec1c24' href=ref target='_blank') #{txt}
+mixin ignite-form-field-tooltip(message)
+ i.tipField.fa.fa-question-circle(bs-tooltip='"#{message}"')
+
.docs-header
h1 Configurations Summary
.docs-body
@@ -27,24 +30,16 @@ mixin hard-link(ref, txt)
li Download XML Config
li Download Java Code
li Download Docker File
- li
+ li
ignite-dialog More info
ignite-dialog-title Summary screen
ignite-dialog-content
- | Configurations available in XML, Java and Dockerfile format for Server and Client mode.
- br
- | Database table POJO classes for cluster's metadata available on "POJO" tab.
- br
- | Use "Download" button to receive configurations in ZIP file.
- br
- | Go back to change configuration on
- a(href='/configuration/clusters') clusters
- | ,
- a(href='/configuration/caches') caches
- | or
- a(href='/configuration/metadata') metadata
- | screen.
-
+ | Configurations available in XML, Java and Dockerfile format for Server and Client mode.#[br]
+ | Database table POJO classes for cluster's metadata available on "POJO" tab.#[br]
+ | Use "Download" button to receive configurations in ZIP file.#[br]
+ | Go back to change configuration on #[a(href='/configuration/clusters') clusters] ,
+ | #[a(href='/configuration/caches') caches] or #[a(href='/configuration/metadata') metadata] screen.
+
ignite-callout-cel(data-title='Next Steps')
li Deploy Ignite Servers
li Connect Ignite Clients
@@ -89,13 +84,71 @@ mixin hard-link(ref, txt)
label Client
.panel-collapse(id='client' role='tabpanel' bs-collapse-target)
- .details-row(ng-repeat='field in clientFields')
- +form-row-custom(['col-xs-4 col-sm-4 col-md-3'], ['col-xs-4 col-sm-4 col-md-3'], 'backupItem')
+ form(name='clientForm')
+ .details-row
+ ignite-form-field(data-label='Near cache start size')
+ +ignite-form-field-tooltip("Initial cache size for near cache which will be used to pre-create internal hash table after start")
+ ignite-form-field-input-number(
+ data-name='nearStartSize'
+ data-ng-model='ctrl.cluster.cfg.nearStartSize'
+ data-placeholder='375000'
+ )
+
+ .details-row
+ ignite-form-field(data-label='Near cache eviction policy')
+ +ignite-form-field-tooltip("Cache expiration policy")
+ ignite-form-field-dropdown(
+ data-name='evictionPolicies'
+ data-options="[\
+ {value: 'LRU', label: 'LRU'},\
+ {value: 'FIFO', label: 'FIFO'},\
+ {value: 'SORTED', label: 'Sorted'},\
+ {value: undefined, label: 'Not set'}\
+ ]"
+ data-ng-model='ctrl.cluster.cfg.nearEvictionPolicy.kind'
+ )
+ span(ng-if='ctrl.cluster.cfg.nearEvictionPolicy.kind')
+ a.customize(
+ ng-show='ctrl.__form.expanded'
+ ng-click='ctrl.__form.expanded = false'
+ ) Hide settings
+ a.customize(
+ ng-hide='ctrl.__form.expanded'
+ ng-click='ctrl.__form.expanded = true'
+ ) Show settings
+
+ .details-row
+ .col-sm-12.panel-details(ng-if='ctrl.__form.expanded && ctrl.cluster.cfg.nearEvictionPolicy.kind')
+ .details-row
+ ignite-form-field(data-label='Batch size')
+ +ignite-form-field-tooltip("Number of entries to remove on shrink")
+ ignite-form-field-input-number(
+ data-name='batchSize'
+ data-ng-model='ctrl.cluster.cfg.nearEvictionPolicy[ctrl.cluster.cfg.nearEvictionPolicy.kind].batchSize'
+ data-placeholder='1'
+ )
+ .details-row
+ ignite-form-field(data-label='Max memory size')
+ +ignite-form-field-tooltip("Maximum allowed cache size in bytes")
+ ignite-form-field-input-number(
+ data-name='maxMemorySize'
+ data-ng-model='ctrl.cluster.cfg.nearEvictionPolicy[ctrl.cluster.cfg.nearEvictionPolicy.kind].maxMemorySize'
+ data-placeholder='0'
+ )
+ .details-row
+ ignite-form-field(data-label='Max size')
+ +ignite-form-field-tooltip("Maximum allowed size of cache before entry will start getting evicted")
+ ignite-form-field-input-number(
+ data-name='maxSize'
+ data-ng-model='ctrl.cluster.cfg.nearEvictionPolicy[ctrl.cluster.cfg.nearEvictionPolicy.kind].maxSize'
+ data-placeholder='100000'
+ )
+
.summary-tabs(bs-tabs data-bs-active-pane="tabsClient.activeTab" template='configuration/summary-tabs.html')
div(bs-pane title='XML')
- ignite-ui-ace-xml(data-cluster='cluster' data-cluster-cfg='backupItem.nearConfiguration')
+ ignite-ui-ace-xml(data-cluster='cluster' data-cluster-cfg='ctrl.cluster.cfg')
div(bs-pane title='Java')
- ignite-ui-ace-java(data-cluster='cluster' data-cluster-cfg='backupItem.nearConfiguration')
+ ignite-ui-ace-java(data-cluster='cluster' data-cluster-cfg='ctrl.cluster.cfg')
div(bs-pane title='POM')
ignite-ui-ace-pom(data-cluster='cluster')
div(bs-pane title='POJO' ng-show='cluster | hasPojo')
http://git-wip-us.apache.org/repos/asf/ignite/blob/9b12610b/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 ac155f7..fd49122 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
@@ -14,6 +14,9 @@
See the License for the specific language governing permissions and
limitations under the License.
+mixin tip(message)
+ i.tipField.fa.fa-question-circle(bs-tooltip='"#{message}"')
+
mixin tipField(lines)
i.tipField.fa.fa-question-circle(ng-if=lines bs-tooltip='joinTip(#{lines})')
i.tipField.fa.fa-question-circle.blank(ng-if='!#{lines}')
[2/2] ignite git commit: IGNITE-2181 Review
Posted by an...@apache.org.
IGNITE-2181 Review
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/5fe4ffee
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/5fe4ffee
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/5fe4ffee
Branch: refs/heads/ignite-843-rc2
Commit: 5fe4ffee1f5b462a2ca91f290216df77590df7a5
Parents: 9b12610
Author: Andrey <an...@gridgain.com>
Authored: Mon Dec 21 10:15:10 2015 +0700
Committer: Andrey <an...@gridgain.com>
Committed: Mon Dec 21 10:15:10 2015 +0700
----------------------------------------------------------------------
.../ui-ace-docker/ui-ace-docker.controller.js | 2 +-
.../ui-ace-docker/ui-ace-docker.directive.js | 3 +--
.../ui-ace-java/ui-ace-java.controller.js | 1 -
.../modules/Form/field/dropdown.directive.js | 2 +-
.../app/modules/Form/field/field.directive.js | 6 ++----
.../js/app/modules/Form/field/field.link.js | 21 --------------------
.../Form/field/input/number.directive.js | 4 +---
.../src/main/js/app/modules/Form/index.js | 7 ++-----
.../control-center-web/src/main/js/config.js | 7 ++-----
9 files changed, 10 insertions(+), 43 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/5fe4ffee/modules/control-center-web/src/main/js/app/directives/ui-ace-docker/ui-ace-docker.controller.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/app/directives/ui-ace-docker/ui-ace-docker.controller.js b/modules/control-center-web/src/main/js/app/directives/ui-ace-docker/ui-ace-docker.controller.js
index 906aa43..32687f5 100644
--- a/modules/control-center-web/src/main/js/app/directives/ui-ace-docker/ui-ace-docker.controller.js
+++ b/modules/control-center-web/src/main/js/app/directives/ui-ace-docker/ui-ace-docker.controller.js
@@ -30,7 +30,7 @@ export default ['$scope', 'IgniteUiAceOnLoad', function($scope, onLoad) {
let clusterWatcher = (value) => {
delete ctrl.data;
- if (!value)
+ if (!$scope.cluster)
return;
// TODO IGNITE-2058: need move $generatorDocker to services.
http://git-wip-us.apache.org/repos/asf/ignite/blob/5fe4ffee/modules/control-center-web/src/main/js/app/directives/ui-ace-docker/ui-ace-docker.directive.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/app/directives/ui-ace-docker/ui-ace-docker.directive.js b/modules/control-center-web/src/main/js/app/directives/ui-ace-docker/ui-ace-docker.directive.js
index 356cd2d..bc2b9ae 100644
--- a/modules/control-center-web/src/main/js/app/directives/ui-ace-docker/ui-ace-docker.directive.js
+++ b/modules/control-center-web/src/main/js/app/directives/ui-ace-docker/ui-ace-docker.directive.js
@@ -19,7 +19,6 @@ import template from './ui-ace-docker.jade!'
import controller from './ui-ace-docker.controller'
export default ['igniteUiAceDocker', [() => {
-
return {
restrict: 'E',
scope: {
@@ -34,4 +33,4 @@ export default ['igniteUiAceDocker', [() => {
controller,
controllerAs: 'ctrl'
}
-}]]
\ No newline at end of file
+}]]
http://git-wip-us.apache.org/repos/asf/ignite/blob/5fe4ffee/modules/control-center-web/src/main/js/app/directives/ui-ace-java/ui-ace-java.controller.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/app/directives/ui-ace-java/ui-ace-java.controller.js b/modules/control-center-web/src/main/js/app/directives/ui-ace-java/ui-ace-java.controller.js
index ce835dd..ff60312 100644
--- a/modules/control-center-web/src/main/js/app/directives/ui-ace-java/ui-ace-java.controller.js
+++ b/modules/control-center-web/src/main/js/app/directives/ui-ace-java/ui-ace-java.controller.js
@@ -39,6 +39,5 @@ export default ['$scope', 'IgniteUiAceOnLoad', function($scope, onLoad) {
// Setup watchers.
$scope.$watch('cfg', clusterWatcher, true);
- $scope.$watch('type', clusterWatcher);
$scope.$watch('cluster', clusterWatcher);
}];
http://git-wip-us.apache.org/repos/asf/ignite/blob/5fe4ffee/modules/control-center-web/src/main/js/app/modules/Form/field/dropdown.directive.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/app/modules/Form/field/dropdown.directive.js b/modules/control-center-web/src/main/js/app/modules/Form/field/dropdown.directive.js
index 1056c4c..bf26ebf 100644
--- a/modules/control-center-web/src/main/js/app/modules/Form/field/dropdown.directive.js
+++ b/modules/control-center-web/src/main/js/app/modules/Form/field/dropdown.directive.js
@@ -22,7 +22,7 @@ export default ['igniteFormFieldDropdown', ['IgniteFormGUID', guid => {
let {id} = scope;
scope.id = id || guid();
- }
+ };
return {
restrict: 'E',
http://git-wip-us.apache.org/repos/asf/ignite/blob/5fe4ffee/modules/control-center-web/src/main/js/app/modules/Form/field/field.directive.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/app/modules/Form/field/field.directive.js b/modules/control-center-web/src/main/js/app/modules/Form/field/field.directive.js
index 91c566a..1c30c4f 100644
--- a/modules/control-center-web/src/main/js/app/modules/Form/field/field.directive.js
+++ b/modules/control-center-web/src/main/js/app/modules/Form/field/field.directive.js
@@ -15,16 +15,14 @@
* limitations under the License.
*/
-import link from './field.link';
import template from './field.jade!';
export default ['igniteFormField', [() => {
-
- let controller = () => {}
+ let controller = () => {};
return {
restrict: 'E',
- scope: { },
+ scope: {},
bindToController: {
for: '@',
label: '@'
http://git-wip-us.apache.org/repos/asf/ignite/blob/5fe4ffee/modules/control-center-web/src/main/js/app/modules/Form/field/field.link.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/app/modules/Form/field/field.link.js b/modules/control-center-web/src/main/js/app/modules/Form/field/field.link.js
deleted file mode 100644
index f6f5275..0000000
--- a/modules/control-center-web/src/main/js/app/modules/Form/field/field.link.js
+++ /dev/null
@@ -1,21 +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.
- */
-
-export default function($scope, $element, $attrs, $ctrls) {
-
-
-};
http://git-wip-us.apache.org/repos/asf/ignite/blob/5fe4ffee/modules/control-center-web/src/main/js/app/modules/Form/field/input/number.directive.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/app/modules/Form/field/input/number.directive.js b/modules/control-center-web/src/main/js/app/modules/Form/field/input/number.directive.js
index 906fd0c..90529b1 100644
--- a/modules/control-center-web/src/main/js/app/modules/Form/field/input/number.directive.js
+++ b/modules/control-center-web/src/main/js/app/modules/Form/field/input/number.directive.js
@@ -22,11 +22,9 @@ export default ['igniteFormFieldInputNumber', ['IgniteFormGUID', guid => {
let {id, name} = scope;
let field = form[name];
- console.log('label', label);
-
scope.field = field;
label.for = scope.id = id || guid();
- }
+ };
return {
restrict: 'E',
http://git-wip-us.apache.org/repos/asf/ignite/blob/5fe4ffee/modules/control-center-web/src/main/js/app/modules/Form/index.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/app/modules/Form/index.js b/modules/control-center-web/src/main/js/app/modules/Form/index.js
index a86b406..9f17f57 100644
--- a/modules/control-center-web/src/main/js/app/modules/Form/index.js
+++ b/modules/control-center-web/src/main/js/app/modules/Form/index.js
@@ -27,10 +27,7 @@ angular
.directive(...igniteFormFieldDropdown)
.directive(...igniteFormFieldInputNumber)
.factory('IgniteFormGUID', [() => {
-
let guid = 0;
- return () => {
- return `form-field-${guid++}`;
- }
-}])
+ return () => `form-field-${guid++}`;
+}]);
http://git-wip-us.apache.org/repos/asf/ignite/blob/5fe4ffee/modules/control-center-web/src/main/js/config.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/config.js b/modules/control-center-web/src/main/js/config.js
index d83041a..3b046be 100644
--- a/modules/control-center-web/src/main/js/config.js
+++ b/modules/control-center-web/src/main/js/config.js
@@ -26,9 +26,9 @@ System.config({
"angular-motion": "github:mgcrea/angular-motion@0.4.3",
"angular-nvd3": "github:krispo/angular-nvd3@1.0.5",
"angular-sanitize": "github:angular/bower-angular-sanitize@1.4.8",
- "angular-smart-table": "github:lorenzofox3/Smart-Table@2.1.5",
+ "angular-smart-table": "github:lorenzofox3/Smart-Table@2.1.6",
"angular-strap": "github:akuznetsov-gridgain/angular-strap@fix-1852-2.3.6",
- "angular-tree-control": "github:wix/angular-tree-control@0.2.22",
+ "angular-tree-control": "github:wix/angular-tree-control@0.2.23",
"angular-ui-ace": "github:angular-ui/ui-ace@0.2.3",
"angular-ui-grid": "github:angular-ui/bower-ui-grid@3.0.7",
"angular-ui-router": "github:angular-ui/ui-router@0.2.15",
@@ -142,9 +142,6 @@ System.config({
"github:twbs/bootstrap@3.3.6": {
"jquery": "github:components/jquery@2.1.4"
},
- "github:wix/angular-tree-control@0.2.22": {
- "angular": "github:angular/bower-angular@1.4.8"
- },
"npm:acorn-globals@1.0.9": {
"acorn": "npm:acorn@2.6.4"
},