ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sevdoki...@apache.org
Subject incubator-ignite git commit: # IGNITE-843 Add control to download docker file.
Date Thu, 25 Jun 2015 14:11:18 GMT
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-843 20f6c1548 -> 39e5cf78d


# IGNITE-843 Add control to download docker file.


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

Branch: refs/heads/ignite-843
Commit: 39e5cf78da062c9bfd41e1bd5d53200e2d46edaf
Parents: 20f6c15
Author: sevdokimov <sergey.evdokimov@jetbrains.com>
Authored: Thu Jun 25 17:11:06 2015 +0300
Committer: sevdokimov <sergey.evdokimov@jetbrains.com>
Committed: Thu Jun 25 17:11:06 2015 +0300

----------------------------------------------------------------------
 .../public/javascripts/controllers/summary.js   | 45 ++++++++++++++++----
 modules/webconfig/nodejs/views/summary.jade     | 36 ++++++++++++++--
 2 files changed, 69 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/39e5cf78/modules/webconfig/nodejs/public/javascripts/controllers/summary.js
----------------------------------------------------------------------
diff --git a/modules/webconfig/nodejs/public/javascripts/controllers/summary.js b/modules/webconfig/nodejs/public/javascripts/controllers/summary.js
index b00aee2..9eb2e4d 100644
--- a/modules/webconfig/nodejs/public/javascripts/controllers/summary.js
+++ b/modules/webconfig/nodejs/public/javascripts/controllers/summary.js
@@ -25,18 +25,43 @@ configuratorModule.controller('clustersList', ['$scope', '$http', function
($sco
     $scope.cfgLang = 'xml';
 
     $scope.generateConfig = function(cluster) {
+        var lang = $scope.cfgLang;
+
+        if (lang == 'docker')
+            lang = 'xml';
+        
         $scope.loading = true;
 
-        $http.get('/rest/configGenerator', {params: {name: cluster.name, lang: $scope.cfgLang}}).success(
+        $http.get('/rest/configGenerator', {params: {name: cluster.name, lang: lang}}).success(
             function (data) {
-            $scope.resultCfg = data;
+                if (lang == 'java') {
+                    $scope.resultJava = data;
+                }
+                else if (lang == 'xml') {
+                    $scope.resultXml = data;
+                }
+
+                $scope.loading = false;
+            }).error(function (data) {
+                $scope.generateError = "Failed to generate config: " + data;
 
-            $scope.loading = false;
-        }).error(function (data) {
-            $scope.generateError = "Failed to generate config: " + data;
+                $scope.loading = false;
+            });
+    };
 
-            $scope.loading = false;
-        });
+    $scope.dockerArg = {
+        os: 'debian:8',
+        igniteVersion: '1.1.0'
+    };
+    
+    $scope.dockerFile = function() {
+        if (!$scope.currCluster || !$scope.dockerArg) {
+            return '';
+        }
+        
+        return 'OS: ' + $scope.dockerArg.os + '\n' +
+                'IG ver: ' + $scope.dockerArg.igniteVersion + '\n\n' +
+                'cfg: ' + $scope.currCluster._id
     };
     
     $scope.setSelectedCluster = function(cluster) {
@@ -46,9 +71,13 @@ configuratorModule.controller('clustersList', ['$scope', '$http', function
($sco
     };
     
     $scope.setCfgLang = function(lang) {
+        $scope.resultJava = '';
+        $scope.resultXml = '';
+        $scope.resultDocker = '';
+        
         $scope.cfgLang = lang;
 
         if ($scope.currCluster)
-            $scope.generateConfig($scope.currCluster)
+            $scope.generateConfig($scope.currCluster, lang)
     }
 }]);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/39e5cf78/modules/webconfig/nodejs/views/summary.jade
----------------------------------------------------------------------
diff --git a/modules/webconfig/nodejs/views/summary.jade b/modules/webconfig/nodejs/views/summary.jade
index 200316b..d646fc7 100644
--- a/modules/webconfig/nodejs/views/summary.jade
+++ b/modules/webconfig/nodejs/views/summary.jade
@@ -44,8 +44,36 @@ block content
                         a(href, ng-click='setCfgLang("xml")') XML
                     li(ng-class="{active: cfgLang=='java'}")
                         a(href, ng-click='setCfgLang("java")') Java
+                    li(ng-class="{active: cfgLang=='docker'}")
+                        a(href, ng-click='setCfgLang("docker")') Docker
+
+                div(style='padding-top: 10px')        
+                    #xmlResult(ng-show="cfgLang == 'xml'")
+                        textarea.form-control(rows=30, readonly=true)
+                            | {{resultXml}}
                 
-                textarea(style='width: 100%', rows=30, readonly=true)
-                    | {{resultCfg}}
-                
-            div(ng-show='generateError') {{generateError}}
\ No newline at end of file
+                    #javaResult(ng-show="cfgLang == 'java'")
+                        textarea.form-control(rows=30, readonly=true)
+                            | {{resultJava}}
+                    
+                    #dockerResult(ng-show="cfgLang == 'docker'")
+                        form.form-horizontal
+                            .form-group
+                                label.control-label.col-sm-3(for='os') Operation System
+                                .col-sm-6
+                                    select#os.form-control(ng-model='dockerArg.os')
+                                        option(value='debian:8') debian:8
+                                        option(value='ubuntu:12.04') ubuntu:12.04
+                                
+                            .form-group
+                                label.control-label.col-sm-3(for='igniteVersion') Ignite
version
+                                .col-sm-6
+                                    select#igniteVersion.form-control(ng-model='dockerArg.igniteVersion')
+                                        option(value='1.1.0') 1.1.0
+                                        option(value='1.0.0') 1.0.0
+                                
+                            .form-group
+                                textarea.form-control(rows=30, readonly=true)
+                                    | {{ dockerFile() }}
+
+                div(ng-show='generateError') {{generateError}}
\ No newline at end of file


Mime
View raw message