ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akuznet...@apache.org
Subject [15/28] ignite git commit: IGNITE-843 Fixed speed of very large data (more than 300 domains and caches) + lazy init.
Date Thu, 03 Mar 2016 12:07:22 GMT
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/cb1d79dd
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/cb1d79dd
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/cb1d79dd

Branch: refs/heads/ignite-843-rc3
Commit: cb1d79dd52bfbc0153781c4d882d9b4aa33105e3
Parents: aaf139b
Author: Dmitriyff <dmitriyff@gmail.com>
Authored: Fri Feb 26 17:30:29 2016 +0700
Committer: Alexey Kuznetsov <akuznetsov@apache.org>
Committed: Fri Feb 26 17:30:29 2016 +0700

----------------------------------------------------------------------
 .../ui-ace-java/ui-ace-java.directive.js        |  4 ++-
 .../ui-ace-xml/ui-ace-xml.directive.js          |  4 ++-
 .../configuration/summary/summary.controller.js | 11 ++++++
 .../main/js/views/configuration/summary.jade    | 38 ++++++--------------
 4 files changed, 27 insertions(+), 30 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/cb1d79dd/modules/control-center-web/src/main/js/app/directives/ui-ace-java/ui-ace-java.directive.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/app/directives/ui-ace-java/ui-ace-java.directive.js
b/modules/control-center-web/src/main/js/app/directives/ui-ace-java/ui-ace-java.directive.js
index 072ac8f..2ba0b15 100644
--- a/modules/control-center-web/src/main/js/app/directives/ui-ace-java/ui-ace-java.directive.js
+++ b/modules/control-center-web/src/main/js/app/directives/ui-ace-java/ui-ace-java.directive.js
@@ -101,8 +101,10 @@ export default ['igniteUiAceJava', ['GeneratorJava', (generator) =>
{
             scope.$watch('cfg', (data) => ctrl.data = render(data), true);
         }
 
+        const noDeepWatch = !(typeof attrs.noDeepWatch !== 'undefined');
+
         // Setup watchers.
-        scope.$watch('cluster', (data) => ctrl.data = render(data), true);
+        scope.$watch('cluster', (data) => ctrl.data = render(data), noDeepWatch);
     };
 
     return {

http://git-wip-us.apache.org/repos/asf/ignite/blob/cb1d79dd/modules/control-center-web/src/main/js/app/directives/ui-ace-xml/ui-ace-xml.directive.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/app/directives/ui-ace-xml/ui-ace-xml.directive.js
b/modules/control-center-web/src/main/js/app/directives/ui-ace-xml/ui-ace-xml.directive.js
index 6b6e1df..e421135 100644
--- a/modules/control-center-web/src/main/js/app/directives/ui-ace-xml/ui-ace-xml.directive.js
+++ b/modules/control-center-web/src/main/js/app/directives/ui-ace-xml/ui-ace-xml.directive.js
@@ -101,8 +101,10 @@ export default ['igniteUiAceXml', ['GeneratorXml', (generator) =>
{
             scope.$watch('cfg', (data) => ctrl.data = render(data), true);
         }
 
+        const noDeepWatch = !(typeof attrs.noDeepWatch !== 'undefined');
+
         // Setup watchers.
-        scope.$watch('cluster', (data) => ctrl.data = render(data), true);
+        scope.$watch('cluster', (data) => ctrl.data = render(data), noDeepWatch);
     };
 
     return {

http://git-wip-us.apache.org/repos/asf/ignite/blob/cb1d79dd/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 48d7b83..068a03c 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
@@ -15,6 +15,7 @@
  * limitations under the License.
  */
 
+import _ from 'lodash';
 import JSZip from 'jszip';
 
 export default [
@@ -26,6 +27,14 @@ export default [
 
         Resource.read().then(({clusters}) => {
             $scope.clusters = clusters;
+            $scope.clustersMap = {};
+            $scope.clustersView = _.map(clusters, (item) => {
+                const { _id, name } = item;
+
+                $scope.clustersMap[_id] = item;
+
+                return { _id, name };
+            });
 
             $loading.finish('loading');
 
@@ -186,6 +195,8 @@ export default [
             if (!cluster)
                 return;
 
+            cluster = $scope.clustersMap[cluster._id];
+
             ctrl.cluster = cluster;
 
             $scope.cluster = cluster;

http://git-wip-us.apache.org/repos/asf/ignite/blob/cb1d79dd/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 176c483..538f7d9 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
@@ -33,26 +33,8 @@ mixin ignite-form-field-tooltip(message)
             | You have no clusters configured. Please configure them #[a(ui-sref='base.configuration.clusters')
here].
 
         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 && (clusters | byName:clusterName).length')
+            +main-table('clusters', 'clustersView', 'clusterName', 'selectItem(row)', '{{$index
+ 1}}) {{row.name}}', 'name')
+            div(ng-show='selectedItem && tableVisibleRow(displayedRows, selectedItem)')
                 .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')
@@ -72,13 +54,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(ng-if='tabsServer.activeTab ==
0 || tabsServer.init[0]' ng-init='tabsServer.init[0] = true' data-cluster='cluster')
+                                        ignite-ui-ace-xml(ng-if='tabsServer.activeTab ==
0 || tabsServer.init[0]' ng-init='tabsServer.init[0] = true' data-cluster='cluster' data-no-deep-watch)
                                     div(bs-pane title='Java')
-                                        ignite-ui-ace-java(ng-if='tabsServer.activeTab ==
1 || tabsServer.init[1]' ng-init='tabsServer.init[1] = true' data-cluster='cluster')
+                                        ignite-ui-ace-java(ng-if='tabsServer.activeTab ==
1 || tabsServer.init[1]' ng-init='tabsServer.init[1] = true' data-cluster='cluster' data-no-deep-watch)
                                     div(bs-pane title='POM')
-                                        ignite-ui-ace-pom(ng-if='tabsServer.activeTab ==
2 || tabsServer.init[2]' ng-init='tabsServer.init[2] = true' data-cluster='cluster')
+                                        ignite-ui-ace-pom(ng-if='tabsServer.activeTab ==
2 || tabsServer.init[2]' ng-init='tabsServer.init[2] = true' data-cluster='cluster' data-no-deep-watch)
                                     div(bs-pane title='Dockerfile')
-                                        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')
+                                        ignite-ui-ace-docker(ng-if='tabsServer.activeTab
== 3 || tabsServer.init[3]' ng-init='tabsServer.init[3] = true' data-cluster='cluster'  data-no-deep-watch
ng-model='ctrl.data.docker')
 
                     .panel.panel-default
                         .panel-heading(role='tab' bs-collapse-toggle)
@@ -152,10 +134,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(ng-if='tabsClient.activeTab ==
0 || tabsClient.init[0]' ng-init='tabsClient.init[0] = true' 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-no-deep-watch
data-cluster-cfg='#{nearCfg}')
                                     div(bs-pane title='Java')
-                                        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}')
+                                        ignite-ui-ace-java(ng-if='tabsClient.activeTab ==
1 || tabsClient.init[1]' ng-init='tabsClient.init[1] = true' data-cluster='cluster' data-no-deep-watch
data-cluster-cfg='#{nearCfg}')
                                     div(bs-pane title='POM')
-                                        ignite-ui-ace-pom(ng-if='tabsClient.activeTab ==
2 || tabsClient.init[2]' ng-init='tabsClient.init[2] = true' data-cluster='cluster')
+                                        ignite-ui-ace-pom(ng-if='tabsClient.activeTab ==
2 || tabsClient.init[2]' ng-init='tabsClient.init[2] = true' data-cluster='cluster' data-no-deep-watch)
                                     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')
+                                        ignite-ui-ace-pojos(ng-if='tabsClient.activeTab ==
3 || tabsClient.init[3]' ng-init='tabsClient.init[3] = true' data-cluster='cluster' data-no-deep-watch
ng-model='ctrl.data.pojos')


Mime
View raw message