ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akuznet...@apache.org
Subject [4/9] ignite git commit: IGNITE-2612 WIP reworking caches screen to Angular directives.
Date Wed, 24 Feb 2016 09:25:39 GMT
IGNITE-2612 WIP reworking caches screen to Angular directives.


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

Branch: refs/heads/ignite-2612
Commit: 18fc89c109763a2b6746bfac4f3328492a2ad01a
Parents: a055afb
Author: Alexey Kuznetsov <akuznetsov@apache.org>
Authored: Sat Feb 20 15:59:10 2016 +0700
Committer: Alexey Kuznetsov <akuznetsov@apache.org>
Committed: Sat Feb 20 15:59:10 2016 +0700

----------------------------------------------------------------------
 .../app/modules/states/configuration.state.js   |  6 ++
 .../configuration/caches/rebalance.directive.js | 27 ++++++
 .../states/configuration/caches/rebalance.jade  | 99 ++++++++++++++++++++
 .../caches/server-near-cache.directive.js       | 27 ++++++
 .../configuration/caches/server-near-cache.jade | 99 ++++++++++++++++++++
 .../caches/statistics.directive.js              | 27 ++++++
 .../states/configuration/caches/statistics.jade | 99 ++++++++++++++++++++
 7 files changed, 384 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/18fc89c1/modules/control-center-web/src/main/js/app/modules/states/configuration.state.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/app/modules/states/configuration.state.js
b/modules/control-center-web/src/main/js/app/modules/states/configuration.state.js
index c2cc37a..68e27b0 100644
--- a/modules/control-center-web/src/main/js/app/modules/states/configuration.state.js
+++ b/modules/control-center-web/src/main/js/app/modules/states/configuration.state.js
@@ -49,6 +49,9 @@ import cachesMemory from './configuration/caches/memory.directive';
 import cachesQuery from './configuration/caches/query.directive';
 import cachesStore from './configuration/caches/store.directive';
 import cachesConcurrency from './configuration/caches/concurrency.directive';
+import cachesRebalance from './configuration/caches/rebalance.directive';
+import cachesServerNearCache from './configuration/caches/server-near-cache.directive';
+import cachesStatistics from './configuration/caches/statistics.directive';
 
 // Summary screen.
 import ConfigurationSummaryCtrl from './configuration/summary/summary.controller';
@@ -90,6 +93,9 @@ angular
 .directive(...cachesQuery)
 .directive(...cachesStore)
 .directive(...cachesConcurrency)
+.directive(...cachesRebalance)
+.directive(...cachesServerNearCache)
+.directive(...cachesStatistics)
 // Summary screen
 .directive(...summaryTabs)
 // Services.

http://git-wip-us.apache.org/repos/asf/ignite/blob/18fc89c1/modules/control-center-web/src/main/js/app/modules/states/configuration/caches/rebalance.directive.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/app/modules/states/configuration/caches/rebalance.directive.js
b/modules/control-center-web/src/main/js/app/modules/states/configuration/caches/rebalance.directive.js
new file mode 100644
index 0000000..b3f24a1
--- /dev/null
+++ b/modules/control-center-web/src/main/js/app/modules/states/configuration/caches/rebalance.directive.js
@@ -0,0 +1,27 @@
+/*
+ * 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 './rebalance.jade!';
+
+export default ['igniteConfigurationCachesRebalance', [() => {
+    return {
+        scope: true,
+        restrict: 'E',
+        template,
+        replace: true
+    };
+}]];

http://git-wip-us.apache.org/repos/asf/ignite/blob/18fc89c1/modules/control-center-web/src/main/js/app/modules/states/configuration/caches/rebalance.jade
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/app/modules/states/configuration/caches/rebalance.jade
b/modules/control-center-web/src/main/js/app/modules/states/configuration/caches/rebalance.jade
new file mode 100644
index 0000000..ff2eed8
--- /dev/null
+++ b/modules/control-center-web/src/main/js/app/modules/states/configuration/caches/rebalance.jade
@@ -0,0 +1,99 @@
+//-
+    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 model = 'backupItem'
+
+form.panel.panel-default(name='rebalance' novalidate)
+    .panel-heading(bs-collapse-toggle)
+        ignite-form-panel-chevron
+        label Rebalance
+        ignite-form-revert
+    .panel-collapse(role='tabpanel' bs-collapse-target id='rebalance')
+        .panel-body
+            .col-sm-6
+                .settings-row
+                    ignite-form-field
+                        ignite-form-field-label
+                            | Name:
+                        ignite-form-field-tooltip
+                            | Cache name
+                        ignite-form-field-input-text(
+                            data-id='cacheName'
+                            data-name='cacheName'
+                            data-ng-model='#{model}.name'
+                            data-ng-required='true'
+                            data-placeholder='Input name'
+                        )
+                .settings-row
+                    ignite-form-field
+                        ignite-form-field-label
+                            | Clusters: #[a(ui-sref='base.configuration.clusters({id: #{model}._id})')
(add)]
+                        ignite-form-field-tooltip
+                            | Associate clusters with the current cache
+                        ignite-form-field-dropdown(
+                            data-id='clusters'
+                            data-name='clusters'
+                            data-options='clusters'
+                            data-multiple='true'
+                            data-ng-model='#{model}.clusters'
+                            data-ng-disabled='!clusters.length'
+                            data-placeholder='{{ clusters.length ? "Choose clusters": "No
clusters configured" }}'
+                        )
+                .settings-row
+                    ignite-form-field
+                        ignite-form-field-label
+                            | Domain models: #[a(ui-sref='base.configuration.domains({id:
#{model}._id})') (add)]
+                        ignite-form-field-tooltip
+                            | Associate clusters with the current cache
+                        ignite-form-field-dropdown(
+                            data-id='domains'
+                            data-name='domains'
+                            data-options='domains'
+                            data-multiple='true'
+                            data-ng-model='#{model}.domains'
+                            data-ng-disabled='!domains.length'
+                            data-placeholder='{{ domains.length ? "Choose domain models":
"No domain models configured" }}'
+                        )
+                .settings-row
+                    ignite-form-field
+                        ignite-form-field-label
+                            | Cache mode:
+                        ignite-form-field-tooltip
+                            | Cache modes:#[br]
+                            ul: li Partitioned - in this mode the overall key set will be
divided into partitions and all partitions will be split equally between participating nodes
+                                li Replicated - in this mode all the keys are distributed
to all participating nodes
+                                li Local - in this mode caches residing on different grid
nodes will not know about each other
+                        ignite-form-field-dropdown(
+                        data-id='cacheMode'
+                        data-name='cacheMode'
+                        data-options='[\
+                            {value: "LOCAL", label: "LOCAL"},\
+                            {value: "REPLICATED", label: "REPLICATED"},\
+                            {value: "PARTITIONED", label: "PARTITIONED"}\
+                        ]'
+                        data-ng-model='#{model}.cacheMode'
+                        data-placeholder='PARTITIONED'
+                        )
+            ignite-ui-ace.col-sm-6
+                .preview-panel(ng-init='mode = false')
+                    .preview-legend
+                        a(ng-class='{active: !mode, inactive: mode}' ng-click='mode = false')
XML
+                        | &nbsp;
+                        a(ng-class='{active: mode, inactive: !mode}' ng-click='mode = true')
Java
+                    .preview-content(ng-if='mode')
+                        ignite-ui-ace-java(data-cluster='backupItem' data-generator='cacheDomains'
data-caches='caches')
+                    .preview-content(ng-if='!mode')
+                        ignite-ui-ace-xml(data-cluster='backupItem' data-generator='cacheDomains'
data-caches='caches')

http://git-wip-us.apache.org/repos/asf/ignite/blob/18fc89c1/modules/control-center-web/src/main/js/app/modules/states/configuration/caches/server-near-cache.directive.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/app/modules/states/configuration/caches/server-near-cache.directive.js
b/modules/control-center-web/src/main/js/app/modules/states/configuration/caches/server-near-cache.directive.js
new file mode 100644
index 0000000..5a4e474
--- /dev/null
+++ b/modules/control-center-web/src/main/js/app/modules/states/configuration/caches/server-near-cache.directive.js
@@ -0,0 +1,27 @@
+/*
+ * 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 './server-near-cache.jade!';
+
+export default ['igniteConfigurationCachesServerNearCache', [() => {
+    return {
+        scope: true,
+        restrict: 'E',
+        template,
+        replace: true
+    };
+}]];

http://git-wip-us.apache.org/repos/asf/ignite/blob/18fc89c1/modules/control-center-web/src/main/js/app/modules/states/configuration/caches/server-near-cache.jade
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/app/modules/states/configuration/caches/server-near-cache.jade
b/modules/control-center-web/src/main/js/app/modules/states/configuration/caches/server-near-cache.jade
new file mode 100644
index 0000000..206fcb8
--- /dev/null
+++ b/modules/control-center-web/src/main/js/app/modules/states/configuration/caches/server-near-cache.jade
@@ -0,0 +1,99 @@
+//-
+    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 model = 'backupItem'
+
+form.panel.panel-default(name='server-near-cache' novalidate)
+    .panel-heading(bs-collapse-toggle)
+        ignite-form-panel-chevron
+        label Store
+        ignite-form-revert
+    .panel-collapse(role='tabpanel' bs-collapse-target id='server-near-cache')
+        .panel-body
+            .col-sm-6
+                .settings-row
+                    ignite-form-field
+                        ignite-form-field-label
+                            | Name:
+                        ignite-form-field-tooltip
+                            | Cache name
+                        ignite-form-field-input-text(
+                            data-id='cacheName'
+                            data-name='cacheName'
+                            data-ng-model='#{model}.name'
+                            data-ng-required='true'
+                            data-placeholder='Input name'
+                        )
+                .settings-row
+                    ignite-form-field
+                        ignite-form-field-label
+                            | Clusters: #[a(ui-sref='base.configuration.clusters({id: #{model}._id})')
(add)]
+                        ignite-form-field-tooltip
+                            | Associate clusters with the current cache
+                        ignite-form-field-dropdown(
+                            data-id='clusters'
+                            data-name='clusters'
+                            data-options='clusters'
+                            data-multiple='true'
+                            data-ng-model='#{model}.clusters'
+                            data-ng-disabled='!clusters.length'
+                            data-placeholder='{{ clusters.length ? "Choose clusters": "No
clusters configured" }}'
+                        )
+                .settings-row
+                    ignite-form-field
+                        ignite-form-field-label
+                            | Domain models: #[a(ui-sref='base.configuration.domains({id:
#{model}._id})') (add)]
+                        ignite-form-field-tooltip
+                            | Associate clusters with the current cache
+                        ignite-form-field-dropdown(
+                            data-id='domains'
+                            data-name='domains'
+                            data-options='domains'
+                            data-multiple='true'
+                            data-ng-model='#{model}.domains'
+                            data-ng-disabled='!domains.length'
+                            data-placeholder='{{ domains.length ? "Choose domain models":
"No domain models configured" }}'
+                        )
+                .settings-row
+                    ignite-form-field
+                        ignite-form-field-label
+                            | Cache mode:
+                        ignite-form-field-tooltip
+                            | Cache modes:#[br]
+                            ul: li Partitioned - in this mode the overall key set will be
divided into partitions and all partitions will be split equally between participating nodes
+                                li Replicated - in this mode all the keys are distributed
to all participating nodes
+                                li Local - in this mode caches residing on different grid
nodes will not know about each other
+                        ignite-form-field-dropdown(
+                        data-id='cacheMode'
+                        data-name='cacheMode'
+                        data-options='[\
+                            {value: "LOCAL", label: "LOCAL"},\
+                            {value: "REPLICATED", label: "REPLICATED"},\
+                            {value: "PARTITIONED", label: "PARTITIONED"}\
+                        ]'
+                        data-ng-model='#{model}.cacheMode'
+                        data-placeholder='PARTITIONED'
+                        )
+            ignite-ui-ace.col-sm-6
+                .preview-panel(ng-init='mode = false')
+                    .preview-legend
+                        a(ng-class='{active: !mode, inactive: mode}' ng-click='mode = false')
XML
+                        | &nbsp;
+                        a(ng-class='{active: mode, inactive: !mode}' ng-click='mode = true')
Java
+                    .preview-content(ng-if='mode')
+                        ignite-ui-ace-java(data-cluster='backupItem' data-generator='cacheDomains'
data-caches='caches')
+                    .preview-content(ng-if='!mode')
+                        ignite-ui-ace-xml(data-cluster='backupItem' data-generator='cacheDomains'
data-caches='caches')

http://git-wip-us.apache.org/repos/asf/ignite/blob/18fc89c1/modules/control-center-web/src/main/js/app/modules/states/configuration/caches/statistics.directive.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/app/modules/states/configuration/caches/statistics.directive.js
b/modules/control-center-web/src/main/js/app/modules/states/configuration/caches/statistics.directive.js
new file mode 100644
index 0000000..d40ac1a
--- /dev/null
+++ b/modules/control-center-web/src/main/js/app/modules/states/configuration/caches/statistics.directive.js
@@ -0,0 +1,27 @@
+/*
+ * 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 './statistics.jade!';
+
+export default ['igniteConfigurationCachesStatistics', [() => {
+    return {
+        scope: true,
+        restrict: 'E',
+        template,
+        replace: true
+    };
+}]];

http://git-wip-us.apache.org/repos/asf/ignite/blob/18fc89c1/modules/control-center-web/src/main/js/app/modules/states/configuration/caches/statistics.jade
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/app/modules/states/configuration/caches/statistics.jade
b/modules/control-center-web/src/main/js/app/modules/states/configuration/caches/statistics.jade
new file mode 100644
index 0000000..f335184
--- /dev/null
+++ b/modules/control-center-web/src/main/js/app/modules/states/configuration/caches/statistics.jade
@@ -0,0 +1,99 @@
+//-
+    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 model = 'backupItem'
+
+form.panel.panel-default(name='store' novalidate)
+    .panel-heading(bs-collapse-toggle)
+        ignite-form-panel-chevron
+        label Store
+        ignite-form-revert
+    .panel-collapse(role='tabpanel' bs-collapse-target id='store')
+        .panel-body
+            .col-sm-6
+                .settings-row
+                    ignite-form-field
+                        ignite-form-field-label
+                            | Name:
+                        ignite-form-field-tooltip
+                            | Cache name
+                        ignite-form-field-input-text(
+                            data-id='cacheName'
+                            data-name='cacheName'
+                            data-ng-model='#{model}.name'
+                            data-ng-required='true'
+                            data-placeholder='Input name'
+                        )
+                .settings-row
+                    ignite-form-field
+                        ignite-form-field-label
+                            | Clusters: #[a(ui-sref='base.configuration.clusters({id: #{model}._id})')
(add)]
+                        ignite-form-field-tooltip
+                            | Associate clusters with the current cache
+                        ignite-form-field-dropdown(
+                            data-id='clusters'
+                            data-name='clusters'
+                            data-options='clusters'
+                            data-multiple='true'
+                            data-ng-model='#{model}.clusters'
+                            data-ng-disabled='!clusters.length'
+                            data-placeholder='{{ clusters.length ? "Choose clusters": "No
clusters configured" }}'
+                        )
+                .settings-row
+                    ignite-form-field
+                        ignite-form-field-label
+                            | Domain models: #[a(ui-sref='base.configuration.domains({id:
#{model}._id})') (add)]
+                        ignite-form-field-tooltip
+                            | Associate clusters with the current cache
+                        ignite-form-field-dropdown(
+                            data-id='domains'
+                            data-name='domains'
+                            data-options='domains'
+                            data-multiple='true'
+                            data-ng-model='#{model}.domains'
+                            data-ng-disabled='!domains.length'
+                            data-placeholder='{{ domains.length ? "Choose domain models":
"No domain models configured" }}'
+                        )
+                .settings-row
+                    ignite-form-field
+                        ignite-form-field-label
+                            | Cache mode:
+                        ignite-form-field-tooltip
+                            | Cache modes:#[br]
+                            ul: li Partitioned - in this mode the overall key set will be
divided into partitions and all partitions will be split equally between participating nodes
+                                li Replicated - in this mode all the keys are distributed
to all participating nodes
+                                li Local - in this mode caches residing on different grid
nodes will not know about each other
+                        ignite-form-field-dropdown(
+                        data-id='cacheMode'
+                        data-name='cacheMode'
+                        data-options='[\
+                            {value: "LOCAL", label: "LOCAL"},\
+                            {value: "REPLICATED", label: "REPLICATED"},\
+                            {value: "PARTITIONED", label: "PARTITIONED"}\
+                        ]'
+                        data-ng-model='#{model}.cacheMode'
+                        data-placeholder='PARTITIONED'
+                        )
+            ignite-ui-ace.col-sm-6
+                .preview-panel(ng-init='mode = false')
+                    .preview-legend
+                        a(ng-class='{active: !mode, inactive: mode}' ng-click='mode = false')
XML
+                        | &nbsp;
+                        a(ng-class='{active: mode, inactive: !mode}' ng-click='mode = true')
Java
+                    .preview-content(ng-if='mode')
+                        ignite-ui-ace-java(data-cluster='backupItem' data-generator='cacheDomains'
data-caches='caches')
+                    .preview-content(ng-if='!mode')
+                        ignite-ui-ace-xml(data-cluster='backupItem' data-generator='cacheDomains'
data-caches='caches')


Mime
View raw message