浏览代码

AMBARI-18245 Upgrade node to version 4.x (zhewang)

Zhe (Joe) Wang 8 年之前
父节点
当前提交
1b32cd0427

+ 1 - 0
.gitignore

@@ -10,6 +10,7 @@ target
 /ambari-web/npm-debug.log
 /ambari-web/npm-debug.log
 /ambari-web/public/
 /ambari-web/public/
 /ambari-web/node_modules/
 /ambari-web/node_modules/
+/ambari-web/node/
 *.pyc
 *.pyc
 *.py~
 *.py~
 *.iml
 *.iml

+ 1 - 1
ambari-admin/pom.xml

@@ -63,7 +63,7 @@
         <artifactId>frontend-maven-plugin</artifactId>
         <artifactId>frontend-maven-plugin</artifactId>
         <version>0.0.16</version>
         <version>0.0.16</version>
         <configuration>
         <configuration>
-          <nodeVersion>v0.10.44</nodeVersion>
+          <nodeVersion>v4.5.0</nodeVersion>
           <npmVersion>2.15.0</npmVersion>
           <npmVersion>2.15.0</npmVersion>
           <workingDirectory>src/main/resources/ui/admin-web/</workingDirectory>
           <workingDirectory>src/main/resources/ui/admin-web/</workingDirectory>
         </configuration>
         </configuration>

+ 1 - 1
ambari-admin/src/main/resources/ui/admin-web/package.json

@@ -24,7 +24,7 @@
     "karma-jasmine": "0.1.5",
     "karma-jasmine": "0.1.5",
     "karma-ng-html2js-preprocessor": "^0.1.0",
     "karma-ng-html2js-preprocessor": "^0.1.0",
     "karma-phantomjs-launcher": "0.1",
     "karma-phantomjs-launcher": "0.1",
-    "phantomjs": "1.9.10",
+    "phantomjs": "1.9.20",
     "protractor": "1.0.0"
     "protractor": "1.0.0"
   },
   },
   "scripts": {
   "scripts": {

+ 5 - 5
ambari-web/app/styles/common.less

@@ -47,19 +47,19 @@
 @spinner-small-width: 30px;
 @spinner-small-width: 30px;
 @spinner-small-height: 30px;
 @spinner-small-height: 30px;
 
 
-(~".@{health-status-red-icon}") {
+.@{health-status-red-icon} {
   color: @health-status-red;
   color: @health-status-red;
 }
 }
-(~".@{health-status-green-icon}") {
+.@{health-status-green-icon} {
   color: @health-status-green;
   color: @health-status-green;
 }
 }
-(~".@{health-status-yellow-icon}") {
+.@{health-status-yellow-icon} {
   color: @health-status-yellow;
   color: @health-status-yellow;
 }
 }
-(~".@{health-status-orange-icon}") {
+.@{health-status-orange-icon} {
   color: @health-status-orange;
   color: @health-status-orange;
 }
 }
-(~".@{maintenance-icon}") {
+.@{maintenance-icon} {
   color: @maintenance-black;
   color: @maintenance-black;
 }
 }
 
 

+ 2 - 2
ambari-web/karma.conf.js

@@ -28,7 +28,7 @@ module.exports = function(config) {
       'karma-sinon',
       'karma-sinon',
       'karma-phantomjs-launcher',
       'karma-phantomjs-launcher',
       'karma-coverage',
       'karma-coverage',
-      'karma-ember-precompiler-brunch',
+      'karma-ember-precompile-brunch',
       'karma-commonjs-require'
       'karma-commonjs-require'
     ],
     ],
 
 
@@ -96,7 +96,7 @@ module.exports = function(config) {
       'app/assets/test/tests.js'
       'app/assets/test/tests.js'
     ],
     ],
 
 
-    emberPrecompilerBrunchPreprocessor: {
+    emberPrecompileBrunchPreprocessor: {
       jqueryPath: 'vendor/scripts/jquery-1.7.2.min.js',
       jqueryPath: 'vendor/scripts/jquery-1.7.2.min.js',
       emberPath: 'vendor/scripts/ember-latest.js',
       emberPath: 'vendor/scripts/ember-latest.js',
       handlebarsPath: 'vendor/scripts/handlebars-1.0.0.beta.6.js'
       handlebarsPath: 'vendor/scripts/handlebars-1.0.0.beta.6.js'

+ 5 - 4
ambari-web/package.json

@@ -8,11 +8,12 @@
     "url": "https://git-wip-us.apache.org/repos/asf/ambari/repo?p=ambari.git;a=summary"
     "url": "https://git-wip-us.apache.org/repos/asf/ambari/repo?p=ambari.git;a=summary"
   },
   },
   "dependencies": {
   "dependencies": {
+    "brunch": "1.7.20",
     "javascript-brunch": ">= 1.0 < 1.5",
     "javascript-brunch": ">= 1.0 < 1.5",
     "css-brunch": ">= 1.0 < 1.5",
     "css-brunch": ">= 1.0 < 1.5",
     "uglify-js-brunch": ">= 1.0 < 1.5",
     "uglify-js-brunch": ">= 1.0 < 1.5",
     "clean-css-brunch": ">= 1.0 < 1.5",
     "clean-css-brunch": ">= 1.0 < 1.5",
-    "ember-precompiler-brunch": ">= 1.0 < 1.5",
+    "ember-precompile-brunch": "^0.1.1",
     "ember-radio-button": "0.1.2",
     "ember-radio-button": "0.1.2",
     "less-brunch": ">= 1.0 < 1.5",
     "less-brunch": ">= 1.0 < 1.5",
     "cssstyle": "0.2.3"
     "cssstyle": "0.2.3"
@@ -25,20 +26,20 @@
     "sinon":"=1.7.3",
     "sinon":"=1.7.3",
     "sinon-chai":"~2.5.0",
     "sinon-chai":"~2.5.0",
     "express":"2.5.8",
     "express":"2.5.8",
-    "karma": "=0.11.14",
+    "karma": ">=0.11.14",
     "karma-mocha": "0.1.1",
     "karma-mocha": "0.1.1",
     "karma-chai": "~0.1.0",
     "karma-chai": "~0.1.0",
     "karma-sinon": "~1.0.2",
     "karma-sinon": "~1.0.2",
     "karma-phantomjs-launcher": "0.1.3",
     "karma-phantomjs-launcher": "0.1.3",
     "karma-coverage": "~0.2.0",
     "karma-coverage": "~0.2.0",
     "karma-commonjs-require": "~0.0.1",
     "karma-commonjs-require": "~0.0.1",
-    "karma-ember-precompiler-brunch": "~0.0.1"
+    "karma-ember-precompile-brunch": "^0.0.1"
   },
   },
   "scripts": {
   "scripts": {
     "start": "brunch watch --server",
     "start": "brunch watch --server",
     "test": "mocha-phantomjs -R min public/test/test.html"
     "test": "mocha-phantomjs -R min public/test/test.html"
   },
   },
   "engines": {
   "engines": {
-    "node": "~0.6.10 || 0.8 || 0.9 || 0.10"
+    "node": "^4.0.0"
   }
   }
 }
 }

+ 39 - 10
ambari-web/pom.xml

@@ -121,28 +121,55 @@
               <commandlineArgs>${args.mkdir} public</commandlineArgs>
               <commandlineArgs>${args.mkdir} public</commandlineArgs>
             </configuration>
             </configuration>
           </execution>
           </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>com.github.eirslett</groupId>
+        <artifactId>frontend-maven-plugin</artifactId>
+        <version>0.0.16</version>
+        <configuration>
+          <nodeVersion>v4.5.0</nodeVersion>
+          <npmVersion>2.15.0</npmVersion>
+          <workingDirectory>${basedir}</workingDirectory>
+        </configuration>
+        <executions>
           <execution>
           <execution>
-            <id>compile-npm</id>
-            <phase>compile</phase>
+            <id>install node and npm</id>
+            <phase>generate-sources</phase>
             <goals>
             <goals>
-              <goal>exec</goal>
+              <goal>install-node-and-npm</goal>
+            </goals>
+          </execution>
+          <execution>
+            <id>npm install</id>
+            <phase>generate-sources</phase>
+            <goals>
+              <goal>npm</goal>
             </goals>
             </goals>
             <configuration>
             <configuration>
-              <executable>${executable.npm}</executable>
-              <workingDirectory>${basedir}</workingDirectory>
-              <commandlineArgs>${args.npm} install</commandlineArgs>
+              <arguments>install</arguments>
             </configuration>
             </configuration>
           </execution>
           </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>exec-maven-plugin</artifactId>
+        <version>1.2.1</version>
+        <executions>
           <execution>
           <execution>
-            <id>compile-brunch</id>
-            <phase>compile</phase>
+            <id>Brunch build</id>
+            <phase>generate-resources</phase>
             <goals>
             <goals>
               <goal>exec</goal>
               <goal>exec</goal>
             </goals>
             </goals>
             <configuration>
             <configuration>
-              <executable>${executable.brunch}</executable>
               <workingDirectory>${basedir}</workingDirectory>
               <workingDirectory>${basedir}</workingDirectory>
-              <commandlineArgs>${args.brunch} build</commandlineArgs>
+              <executable>${basedir}/node/${node.executable}</executable>
+              <arguments>
+                <argument>node_modules/brunch/bin/brunch</argument>
+                <argument>build</argument>
+              </arguments>
             </configuration>
             </configuration>
           </execution>
           </execution>
           <execution>
           <execution>
@@ -291,6 +318,7 @@
         <executable.brunch>cmd</executable.brunch>
         <executable.brunch>cmd</executable.brunch>
         <executable.gzip>${basedir}\gzip-content.cmd</executable.gzip>
         <executable.gzip>${basedir}\gzip-content.cmd</executable.gzip>
         <args.brunch>/C brunch</args.brunch>
         <args.brunch>/C brunch</args.brunch>
+        <node.executable>node.exe</node.executable>
         <executable.mkdir>cmd</executable.mkdir>
         <executable.mkdir>cmd</executable.mkdir>
         <args.mkdir>/C mkdir</args.mkdir>
         <args.mkdir>/C mkdir</args.mkdir>
         <executable.npm>cmd</executable.npm>
         <executable.npm>cmd</executable.npm>
@@ -315,6 +343,7 @@
         <executable.brunch>brunch</executable.brunch>
         <executable.brunch>brunch</executable.brunch>
         <executable.gzip>gzip</executable.gzip>
         <executable.gzip>gzip</executable.gzip>
         <args.brunch></args.brunch>
         <args.brunch></args.brunch>
+        <node.executable>node</node.executable>
         <executable.mkdir>mkdir</executable.mkdir>
         <executable.mkdir>mkdir</executable.mkdir>
         <args.mkdir></args.mkdir>
         <args.mkdir></args.mkdir>
         <executable.npm>npm</executable.npm>
         <executable.npm>npm</executable.npm>

+ 2 - 2
contrib/views/capacity-scheduler/pom.xml

@@ -133,8 +133,8 @@
             <!-- optional: default phase is "generate-resources" -->
             <!-- optional: default phase is "generate-resources" -->
             <phase>initialize</phase>
             <phase>initialize</phase>
             <configuration>
             <configuration>
-                <nodeVersion>v0.10.26</nodeVersion>
-                <npmVersion>1.4.3</npmVersion>
+                <nodeVersion>v4.5.0</nodeVersion>
+                <npmVersion>2.15.0</npmVersion>
             </configuration>
             </configuration>
           </execution>
           </execution>
           <execution>
           <execution>

+ 1 - 1
contrib/views/capacity-scheduler/src/main/resources/ui/package.json

@@ -21,7 +21,7 @@
     "bower": "^1.2.8",
     "bower": "^1.2.8",
     "brunch": "^1.7.13",
     "brunch": "^1.7.13",
     "scaffolt": "^0.4.3",
     "scaffolt": "^0.4.3",
-    "ember-precompiler-brunch": "^1.5.1",
+    "ember-precompile-brunch": "^0.1.0",
     "less-brunch": "^1.7.2"
     "less-brunch": "^1.7.2"
   },
   },
   "devDependencies": {},
   "devDependencies": {},

+ 2 - 2
contrib/views/files/pom.xml

@@ -155,8 +155,8 @@
         <artifactId>frontend-maven-plugin</artifactId>
         <artifactId>frontend-maven-plugin</artifactId>
         <version>0.0.16</version>
         <version>0.0.16</version>
         <configuration>
         <configuration>
-          <nodeVersion>v0.12.2</nodeVersion>
-          <npmVersion>1.4.8</npmVersion>
+          <nodeVersion>v4.5.0</nodeVersion>
+          <npmVersion>2.15.0</npmVersion>
           <workingDirectory>src/main/resources/ui/</workingDirectory>
           <workingDirectory>src/main/resources/ui/</workingDirectory>
         </configuration>
         </configuration>
         <executions>
         <executions>

+ 1 - 1
contrib/views/hawq/pom.xml

@@ -85,7 +85,7 @@
         <groupId>com.github.eirslett</groupId>
         <groupId>com.github.eirslett</groupId>
         <artifactId>frontend-maven-plugin</artifactId>
         <artifactId>frontend-maven-plugin</artifactId>
         <configuration>
         <configuration>
-          <nodeVersion>v0.10.44</nodeVersion>
+          <nodeVersion>v4.5.0</nodeVersion>
           <npmVersion>2.15.0</npmVersion>
           <npmVersion>2.15.0</npmVersion>
           <workingDirectory>${ui.dir}</workingDirectory>
           <workingDirectory>${ui.dir}</workingDirectory>
         </configuration>
         </configuration>

+ 2 - 2
contrib/views/hive-next/pom.xml

@@ -254,8 +254,8 @@
         <artifactId>frontend-maven-plugin</artifactId>
         <artifactId>frontend-maven-plugin</artifactId>
         <version>0.0.16</version>
         <version>0.0.16</version>
         <configuration>
         <configuration>
-          <nodeVersion>v0.12.2</nodeVersion>
-          <npmVersion>1.4.8</npmVersion>
+          <nodeVersion>v4.5.0</nodeVersion>
+          <npmVersion>2.15.0</npmVersion>
           <workingDirectory>src/main/resources/ui/hive-web/</workingDirectory>
           <workingDirectory>src/main/resources/ui/hive-web/</workingDirectory>
         </configuration>
         </configuration>
         <executions>
         <executions>

+ 1 - 1
contrib/views/hive-next/src/main/resources/ui/hive-web/package.json

@@ -23,7 +23,7 @@
     "body-parser": "^1.2.0",
     "body-parser": "^1.2.0",
     "bower": ">= 1.3.12",
     "bower": ">= 1.3.12",
     "broccoli-asset-rev": "^2.0.0",
     "broccoli-asset-rev": "^2.0.0",
-    "broccoli-sass": "0.6.3",
+    "broccoli-sass": "^0.6.3",
     "ember-cli": "0.2.2",
     "ember-cli": "0.2.2",
     "ember-cli-autoprefixer": "0.4.1",
     "ember-cli-autoprefixer": "0.4.1",
     "ember-cli-blanket": "^0.5.0",
     "ember-cli-blanket": "^0.5.0",

+ 2 - 2
contrib/views/hive/pom.xml

@@ -247,8 +247,8 @@
         <artifactId>frontend-maven-plugin</artifactId>
         <artifactId>frontend-maven-plugin</artifactId>
         <version>0.0.16</version>
         <version>0.0.16</version>
         <configuration>
         <configuration>
-          <nodeVersion>v0.12.2</nodeVersion>
-          <npmVersion>1.4.8</npmVersion>
+          <nodeVersion>v4.5.0</nodeVersion>
+          <npmVersion>2.15.0</npmVersion>
           <workingDirectory>src/main/resources/ui/hive-web/</workingDirectory>
           <workingDirectory>src/main/resources/ui/hive-web/</workingDirectory>
         </configuration>
         </configuration>
         <executions>
         <executions>

+ 1 - 1
contrib/views/hive/src/main/resources/ui/hive-web/package.json

@@ -23,7 +23,7 @@
     "body-parser": "^1.2.0",
     "body-parser": "^1.2.0",
     "bower": ">= 1.3.12",
     "bower": ">= 1.3.12",
     "broccoli-asset-rev": "^2.0.0",
     "broccoli-asset-rev": "^2.0.0",
-    "broccoli-sass": "0.6.3",
+    "broccoli-sass": "^0.6.3",
     "ember-cli": "0.2.2",
     "ember-cli": "0.2.2",
     "ember-cli-autoprefixer": "0.4.1",
     "ember-cli-autoprefixer": "0.4.1",
     "ember-cli-blanket": "^0.5.0",
     "ember-cli-blanket": "^0.5.0",

+ 2 - 2
contrib/views/hueambarimigration/pom.xml

@@ -170,8 +170,8 @@
         <artifactId>frontend-maven-plugin</artifactId>
         <artifactId>frontend-maven-plugin</artifactId>
         <version>0.0.16</version>
         <version>0.0.16</version>
         <configuration>
         <configuration>
-          <nodeVersion>v0.12.2</nodeVersion>
-          <npmVersion>1.4.8</npmVersion>
+          <nodeVersion>v4.5.0</nodeVersion>
+          <npmVersion>2.15.0</npmVersion>
           <workingDirectory>${project.basedir}/src/main/resources/ui/hueambarimigration-view/</workingDirectory>
           <workingDirectory>${project.basedir}/src/main/resources/ui/hueambarimigration-view/</workingDirectory>
         </configuration>
         </configuration>
         <executions>
         <executions>

+ 2 - 2
contrib/views/jobs/pom.xml

@@ -65,8 +65,8 @@
                 <artifactId>frontend-maven-plugin</artifactId>
                 <artifactId>frontend-maven-plugin</artifactId>
                 <version>0.0.16</version>
                 <version>0.0.16</version>
                 <configuration>
                 <configuration>
-                    <nodeVersion>v0.10.26</nodeVersion>
-                    <npmVersion>1.4.3</npmVersion>
+                    <nodeVersion>v4.5.0</nodeVersion>
+                    <npmVersion>2.15.0</npmVersion>
                     <workingDirectory>src/main/resources/ui</workingDirectory>
                     <workingDirectory>src/main/resources/ui</workingDirectory>
                 </configuration>
                 </configuration>
                 <executions>
                 <executions>

+ 2 - 2
contrib/views/pig/pom.xml

@@ -180,8 +180,8 @@
         <artifactId>frontend-maven-plugin</artifactId>
         <artifactId>frontend-maven-plugin</artifactId>
         <version>0.0.16</version>
         <version>0.0.16</version>
         <configuration>
         <configuration>
-          <nodeVersion>v0.10.26</nodeVersion>
-          <npmVersion>1.4.3</npmVersion>
+          <nodeVersion>v4.5.0</nodeVersion>
+          <npmVersion>2.15.0</npmVersion>
           <workingDirectory>${ui.directory}</workingDirectory>
           <workingDirectory>${ui.directory}</workingDirectory>
         </configuration>
         </configuration>
         <executions>
         <executions>

+ 1 - 1
contrib/views/pig/src/main/resources/ui/pig-web/package.json

@@ -14,7 +14,7 @@
     "css-brunch": ">= 1.0 < 1.8",
     "css-brunch": ">= 1.0 < 1.8",
     "uglify-js-brunch": ">= 1.0 < 1.8",
     "uglify-js-brunch": ">= 1.0 < 1.8",
     "bower": ">= 1.2.0",
     "bower": ">= 1.2.0",
-    "ember-precompiler-brunch": ">= 1.5.0",
+    "ember-precompile-brunch": "^0.1.0",
     "less-brunch": "~1.7.1",
     "less-brunch": "~1.7.1",
     "scaffolt": "^0.4.3"
     "scaffolt": "^0.4.3"
   },
   },

+ 2 - 2
contrib/views/wfmanager/pom.xml

@@ -159,8 +159,8 @@
 				<artifactId>frontend-maven-plugin</artifactId>
 				<artifactId>frontend-maven-plugin</artifactId>
 				<version>1.0</version>
 				<version>1.0</version>
 				<configuration>
 				<configuration>
-					<nodeVersion>v0.12.2</nodeVersion>
-					<npmVersion>1.4.8</npmVersion>
+					<nodeVersion>v4.5.0</nodeVersion>
+					<npmVersion>2.15.0</npmVersion>
 					<workingDirectory>src/main/resources/ui/</workingDirectory>
 					<workingDirectory>src/main/resources/ui/</workingDirectory>
 				</configuration>
 				</configuration>
 				<executions>
 				<executions>