ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anovi...@apache.org
Subject ignite git commit: IGNITE-2250 added ability to set default value for config if directive has attribute - Fixes #366.
Date Wed, 23 Dec 2015 09:38:09 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-843-rc2 8d0f2b04b -> 1aa14d167


IGNITE-2250 added ability to set default value for config if directive has attribute - Fixes
#366.

Signed-off-by: Andrey <anovikov@gridgain.com>


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

Branch: refs/heads/ignite-843-rc2
Commit: 1aa14d1678e13b75708b43e16582aa19eff350a5
Parents: 8d0f2b0
Author: Dmitriyff <dmitriyff@gmail.com>
Authored: Wed Dec 23 16:36:17 2015 +0700
Committer: Andrey <anovikov@gridgain.com>
Committed: Wed Dec 23 16:36:17 2015 +0700

----------------------------------------------------------------------
 .../app/directives/ui-ace-java/ui-ace-java.directive.js  | 11 +++++++++++
 .../js/app/directives/ui-ace-xml/ui-ace-xml.directive.js | 11 +++++++++++
 2 files changed, 22 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/1aa14d16/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 f6f7bac..35441d0 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
@@ -19,6 +19,16 @@ import template from './ui-ace-java.jade!';
 import controller from './ui-ace-java.controller';
 
 export default ['igniteUiAceJava', [() => {
+    const link = ($scope, $el, {clusterCfg}) => {
+        if (typeof clusterCfg !== 'undefined') {
+            $scope.$watch('cfg', (cfg) => {
+                if (typeof cfg !== 'undefined')
+                    return;
+
+                $scope.cfg = {};
+            });
+        }
+    };
 
     return {
         restrict: 'E',
@@ -26,6 +36,7 @@ export default ['igniteUiAceJava', [() => {
             cluster: '=',
             cfg: '=clusterCfg'
         },
+        link,
         template,
         controller,
         controllerAs: 'ctrl'

http://git-wip-us.apache.org/repos/asf/ignite/blob/1aa14d16/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 5604194..443bbf6 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
@@ -19,6 +19,16 @@ import template from './ui-ace-xml.jade!';
 import controller from './ui-ace-xml.controller';
 
 export default ['igniteUiAceXml', [() => {
+    const link = ($scope, $el, {clusterCfg}) => {
+        if (typeof clusterCfg !== 'undefined') {
+            $scope.$watch('cfg', (cfg) => {
+                if (typeof cfg !== 'undefined')
+                    return;
+
+                $scope.cfg = {};
+            });
+        }
+    };
 
     return {
         restrict: 'E',
@@ -26,6 +36,7 @@ export default ['igniteUiAceXml', [() => {
             cluster: '=',
             cfg: '=clusterCfg'
         },
+        link,
         template,
         controller,
         controllerAs: 'ctrl'


Mime
View raw message