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 2016/03/03 13:07:17 UTC
[10/28] ignite git commit: IGNITE-843 Fixed speed of very large data
(more than 300 domains and caches) + lazy init.
IGNITE-843 Fixed speed of very large data (more than 300 domains and caches) + lazy init.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/711086a4
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/711086a4
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/711086a4
Branch: refs/heads/ignite-843-rc3
Commit: 711086a4e517526f0cb7d82d3e73d69dcda2a7c0
Parents: 2d178a5
Author: Dmitriyff <dm...@gmail.com>
Authored: Thu Feb 25 18:59:40 2016 +0700
Committer: Alexey Kuznetsov <ak...@apache.org>
Committed: Thu Feb 25 18:59:40 2016 +0700
----------------------------------------------------------------------
.../main/js/app/filters/byName/byName.filter.js | 23 +++++++++++
.../control-center-web/src/main/js/app/index.js | 2 +
.../configuration/summary/summary.controller.js | 9 +++--
.../main/js/views/configuration/summary.jade | 41 ++++++++++++++------
4 files changed, 60 insertions(+), 15 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/711086a4/modules/control-center-web/src/main/js/app/filters/byName/byName.filter.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/app/filters/byName/byName.filter.js b/modules/control-center-web/src/main/js/app/filters/byName/byName.filter.js
new file mode 100644
index 0000000..3b0746f
--- /dev/null
+++ b/modules/control-center-web/src/main/js/app/filters/byName/byName.filter.js
@@ -0,0 +1,23 @@
+/*
+ * 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 ['byName', [() => (arr, search) => {
+ if (!(arr && arr.length) || !search)
+ return arr;
+
+ return _.filter(arr, ({ name }) => name.indexOf(search) >= 0);
+}]];
http://git-wip-us.apache.org/repos/asf/ignite/blob/711086a4/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 eb76256..25ea53f 100644
--- a/modules/control-center-web/src/main/js/app/index.js
+++ b/modules/control-center-web/src/main/js/app/index.js
@@ -102,6 +102,7 @@ import IgniteCountries from './services/Countries/Countries.service';
// Filters.
import hasPojo from './filters/hasPojo/hasPojo.filter';
+import byName from './filters/byName/byName.filter';
angular
.module('ignite-console', [
@@ -149,6 +150,7 @@ angular
// Providers.
// Filters.
.filter(...hasPojo)
+.filter(...byName)
.config(['$stateProvider', '$locationProvider', '$urlRouterProvider', function($stateProvider, $locationProvider, $urlRouterProvider) {
// Set up the states.
$stateProvider
http://git-wip-us.apache.org/repos/asf/ignite/blob/711086a4/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 adcc467..48d7b83 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
@@ -222,15 +222,18 @@ export default [
srvCfg.name = cluster.name + '-server.xml';
};
- const updateTab = (cluster) => {
+ $scope.$watch('cluster', (cluster) => {
if (!cluster)
return;
if (!$filter('hasPojo')(cluster) && $scope.tabsClient.activeTab === 3)
$scope.tabsClient.activeTab = 0;
- };
+ });
- $scope.$watch('cluster', updateTab);
+ $scope.$watch('cluster._id', () => {
+ $scope.tabsClient.init = [];
+ $scope.tabsServer.init = [];
+ });
// TODO IGNITE-2114: implemented as independent logic for download.
$scope.downloadConfiguration = function() {
http://git-wip-us.apache.org/repos/asf/ignite/blob/711086a4/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 efff15c..176c483 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
@@ -32,10 +32,27 @@ mixin ignite-form-field-tooltip(message)
.padding-dflt(ng-if='!clusters || clusters.length == 0')
| You have no clusters configured. Please configure them #[a(ui-sref='base.configuration.clusters') here].
- div(ng-show='clusters || clusters.length > 0')
- +main-table('clusters', 'clusters', 'clusterName', 'selectItem(row)', '{{$index + 1}}) {{row.name}}', 'name')
+ div(ng-show='clusters && clusters.length > 0')
+ .padding-bottom-dflt
+ table.links
+ thead
+ tr
+ th
+ lable.labelHeader.labelFormField clusters:
+ .col-sm-3.pull-right(style='padding: 0')
+ input.form-control(type='text' ng-model='clusterName' placeholder='Filter clusters...' value='')
+ tbody
+ tr
+ td
+ .scrollable-y(ng-show='(clusters | byName:clusterName).length > 0' style='max-height: 200px')
+ table
+ tbody
+ tr(ng-repeat='row in (clusters | byName:clusterName) track by row._id' ignite-bs-affix-update)
+ td
+ a(ng-class='{active: row._id == selectedItem._id}' on-click-focus='clusterName' ng-click='selectItem(row)') {{$index + 1}}) {{row.name}}
+ label.placeholder(ng-show='(clusters | byName:clusterName).length == 0') No clusters found
- div(ng-show='selectedItem && tableVisibleRow(displayedRows, selectedItem)')
+ div(ng-show='selectedItem && (clusters | byName:clusterName).length')
.padding-top-dflt(bs-affix)
button.btn.btn-primary(id='download' ng-click='downloadConfiguration()' bs-tooltip='' data-title='Download project' data-placement='bottom') Download project
.btn.btn-primary(bs-tooltip='' data-title='Preview generated project structure' data-placement='bottom')
@@ -55,13 +72,13 @@ mixin ignite-form-field-tooltip(message)
ignite-ui-ace-tabs.summary-tabs
div(bs-tabs data-bs-active-pane="tabsServer.activeTab" template='configuration/summary-tabs.html')
div(bs-pane title='XML')
- ignite-ui-ace-xml(data-cluster='cluster')
+ ignite-ui-ace-xml(ng-if='tabsServer.activeTab == 0 || tabsServer.init[0]' ng-init='tabsServer.init[0] = true' data-cluster='cluster')
div(bs-pane title='Java')
- ignite-ui-ace-java(data-cluster='cluster')
+ ignite-ui-ace-java(ng-if='tabsServer.activeTab == 1 || tabsServer.init[1]' ng-init='tabsServer.init[1] = true' data-cluster='cluster')
div(bs-pane title='POM')
- ignite-ui-ace-pom(data-cluster='cluster')
+ ignite-ui-ace-pom(ng-if='tabsServer.activeTab == 2 || tabsServer.init[2]' ng-init='tabsServer.init[2] = true' data-cluster='cluster')
div(bs-pane title='Dockerfile')
- ignite-ui-ace-docker(data-cluster='cluster' ng-model='ctrl.data.docker')
+ ignite-ui-ace-docker(ng-if='tabsServer.activeTab == 3 || tabsServer.init[3]' ng-init='tabsServer.init[3] = true' data-cluster='cluster' ng-model='ctrl.data.docker')
.panel.panel-default
.panel-heading(role='tab' bs-collapse-toggle)
@@ -135,10 +152,10 @@ mixin ignite-form-field-tooltip(message)
.summary-tabs(ignite-ui-ace-tabs)
div(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='#{nearCfg}')
+ ignite-ui-ace-xml(ng-if='tabsClient.activeTab == 0 || tabsClient.init[0]' ng-init='tabsClient.init[0] = true' data-cluster='cluster' data-cluster-cfg='#{nearCfg}')
div(bs-pane title='Java')
- ignite-ui-ace-java(data-cluster='cluster' data-cluster-cfg='#{nearCfg}')
+ ignite-ui-ace-java(ng-if='tabsClient.activeTab == 1 || tabsClient.init[1]' ng-init='tabsClient.init[1] = true' data-cluster='cluster' data-cluster-cfg='#{nearCfg}')
div(bs-pane title='POM')
- ignite-ui-ace-pom(data-cluster='cluster')
- div(bs-pane title='POJO' ng-show='cluster | hasPojo')
- ignite-ui-ace-pojos(data-cluster='cluster' ng-model='ctrl.data.pojos')
+ ignite-ui-ace-pom(ng-if='tabsClient.activeTab == 2 || tabsClient.init[2]' ng-init='tabsClient.init[2] = true' data-cluster='cluster')
+ div(bs-pane title='POJO' ng-if='cluster | hasPojo')
+ ignite-ui-ace-pojos(ng-if='tabsClient.activeTab == 3 || tabsClient.init[3]' ng-init='tabsClient.init[3] = true' data-cluster='cluster' ng-model='ctrl.data.pojos')