[ambari] branch branch-2.6 updated: AMBARI-21858 Not able to enable hive Interactive Query (#1068)

2018-04-25 Thread vivekratnavel
This is an automated email from the ASF dual-hosted git repository.

vivekratnavel pushed a commit to branch branch-2.6
in repository https://gitbox.apache.org/repos/asf/ambari.git


The following commit(s) were added to refs/heads/branch-2.6 by this push:
 new 4c5ee8a  AMBARI-21858 Not able to enable hive Interactive Query (#1068)
4c5ee8a is described below

commit 4c5ee8a3ada99bbc8d67bd46daa28407f2b41f17
Author: Akhil S Naik <asn...@hortonworks.com>
AuthorDate: Wed Apr 25 11:49:56 2018 +0530

AMBARI-21858 Not able to enable hive Interactive Query (#1068)
---
 .../controllers/wizard/step7/assign_master_controller.js   | 14 --
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git 
a/ambari-web/app/controllers/wizard/step7/assign_master_controller.js 
b/ambari-web/app/controllers/wizard/step7/assign_master_controller.js
index 22bbd8c..584706f 100644
--- a/ambari-web/app/controllers/wizard/step7/assign_master_controller.js
+++ b/ambari-web/app/controllers/wizard/step7/assign_master_controller.js
@@ -109,12 +109,14 @@ App.AssignMasterOnStep7Controller = 
Em.Controller.extend(App.BlueprintMixin, App
 var showAlert = false;
 if (data.hasOwnProperty('items') && data.items.length > 0) {
   data.items.forEach( function(_item) {
-_item.RequestSchedule.batch.batch_requests.forEach( 
function(batchRequest) {
-  // Check if a DELETE request on HIVE_SERVER_INTERACTIVE is in 
progress
-  if (batchRequest.request_type == "DELETE" && 
batchRequest.request_uri.indexOf("HIVE_SERVER_INTERACTIVE") > -1) {
-showAlert = true;
-  }
-});
+if (_item && _item.RequestSchedule && _item.RequestSchedule.batch && 
_item.RequestSchedule.batch.batch_requests) {
+  _item.RequestSchedule.batch.batch_requests.forEach(function 
(batchRequest) {
+// Check if a DELETE request on HIVE_SERVER_INTERACTIVE is in 
progress
+if (batchRequest.request_type == "DELETE" && 
batchRequest.request_uri.indexOf("HIVE_SERVER_INTERACTIVE") > -1) {
+  showAlert = true;
+}
+  });
+}
   });
 }
 if (showAlert) {

-- 
To stop receiving notification emails like this one, please contact
vivekratna...@apache.org.


[ambari] branch trunk updated: AMBARI-21858 Not able to enable hive Interactive Query (asnaik) (#1067)

2018-04-25 Thread vivekratnavel
This is an automated email from the ASF dual-hosted git repository.

vivekratnavel pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ambari.git


The following commit(s) were added to refs/heads/trunk by this push:
 new eecb012  AMBARI-21858 Not able to enable hive Interactive Query 
(asnaik) (#1067)
eecb012 is described below

commit eecb012d618fb2865977cfff385be6218f633b17
Author: Akhil S Naik <asn...@hortonworks.com>
AuthorDate: Wed Apr 25 11:49:17 2018 +0530

AMBARI-21858 Not able to enable hive Interactive Query (asnaik) (#1067)
---
 .../controllers/wizard/step7/assign_master_controller.js   | 14 --
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git 
a/ambari-web/app/controllers/wizard/step7/assign_master_controller.js 
b/ambari-web/app/controllers/wizard/step7/assign_master_controller.js
index f94025e..6d5b46d 100644
--- a/ambari-web/app/controllers/wizard/step7/assign_master_controller.js
+++ b/ambari-web/app/controllers/wizard/step7/assign_master_controller.js
@@ -127,12 +127,14 @@ App.AssignMasterOnStep7Controller = 
Em.Controller.extend(App.BlueprintMixin, App
 var showAlert = false;
 if (data.hasOwnProperty('items') && data.items.length > 0) {
   data.items.forEach( function(_item) {
-_item.RequestSchedule.batch.batch_requests.forEach( 
function(batchRequest) {
-  // Check if a DELETE request on HIVE_SERVER_INTERACTIVE is in 
progress
-  if (batchRequest.request_type === "DELETE" && 
batchRequest.request_uri.indexOf("HIVE_SERVER_INTERACTIVE") > -1) {
-showAlert = true;
-  }
-});
+if (_item && _item.RequestSchedule && _item.RequestSchedule.batch && 
_item.RequestSchedule.batch.batch_requests) {
+  _item.RequestSchedule.batch.batch_requests.forEach(function 
(batchRequest) {
+// Check if a DELETE request on HIVE_SERVER_INTERACTIVE is in 
progress
+if (batchRequest.request_type === "DELETE" && 
batchRequest.request_uri.indexOf("HIVE_SERVER_INTERACTIVE") > -1) {
+  showAlert = true;
+}
+  });
+}
   });
 }
 return showAlert;

-- 
To stop receiving notification emails like this one, please contact
vivekratna...@apache.org.


[ambari] branch trunk updated: [AMBARI-22770] Bring jenkins job build script under version control (#98)

2018-01-12 Thread vivekratnavel
This is an automated email from the ASF dual-hosted git repository.

vivekratnavel pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ambari.git


The following commit(s) were added to refs/heads/trunk by this push:
 new c1320ab  [AMBARI-22770] Bring jenkins job build script under version 
control (#98)
c1320ab is described below

commit c1320ab9db69b4bfeeaf2892b6c716e793cba05a
Author: Vivek Ratnavel Subramanian <vivekratnave...@gmail.com>
AuthorDate: Fri Jan 12 10:21:55 2018 -0800

[AMBARI-22770] Bring jenkins job build script under version control (#98)

[AMBARI-22770] Bring jenkins job build script under version control
---
 dev-support/build-ambari.sh | 58 +
 1 file changed, 58 insertions(+)

diff --git a/dev-support/build-ambari.sh b/dev-support/build-ambari.sh
new file mode 100755
index 000..d75edee
--- /dev/null
+++ b/dev-support/build-ambari.sh
@@ -0,0 +1,58 @@
+#!/usr/bin/env bash
+#   Licensed 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.
+
+
+# Clean up files from previous build to make sure there are no artifacts that 
would trigger rat failure.
+pushd .
+cd $WORKSPACE
+git clean -xdf
+popd
+
+# We stash node.js installation into this weird place
+# because on one hand we want it to be somewhere inside
+# the current workspace and on the other hand we don't
+# want RAT to be ran on files that comprise it. The following
+# location is excluded from RAT by default
+REPO_NAME=contrib/views/node.js/target
+
+[ -d "$REPO_NAME"  ] && exit 0
+
+rm -rf $REPO_NAME
+mkdir -p $REPO_NAME.tmp
+pushd $REPO_NAME.tmp
+  curl --retry 3 --retry-delay 5 -k 
http://nodejs.org/dist/v4.5.0/node-v4.5.0-linux-x64.tar.gz | tar xzvf -
+  mv node-v4.5.0-linux-x64/* .
+  rmdir node-v4.5.0-linux-x64
+popd
+mv $REPO_NAME.tmp $REPO_NAME
+
+export PATH=`pwd`/$REPO_NAME/bin:$PATH
+npm install -g brunch@1.7.20
+
+export _JAVA_OPTIONS="-Xmx2048m -Djava.awt.headless=true"
+export JAVA_HOME=/home/jenkins/tools/java/latest1.8
+export MAVEN_HOME=/home/jenkins/tools/maven/latest
+export PATH=$JAVA_HOME/bin:$MAVEN_HOME/bin:$PATH
+PATH=`pwd`/contrib/views/node.js/target/bin:$PATH
+echo "Checking Hudson Java"
+ls -l /home/hudson/tools/java
+echo "Checking Jenkins Java"
+ls -l /home/jenkins/tools/java
+which java
+java -version
+python -V
+uname -a
+
+cd $WORKSPACE
+$MAVEN_HOME/bin/mvn -fae clean install
+

-- 
To stop receiving notification emails like this one, please contact
['"commits@ambari.apache.org" <commits@ambari.apache.org>'].


[ambari] branch trunk updated: [AMBARI-22749] ADDENDUM: Create Pull Request Template - fix rat check (#82)

2018-01-10 Thread vivekratnavel
This is an automated email from the ASF dual-hosted git repository.

vivekratnavel pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ambari.git


The following commit(s) were added to refs/heads/trunk by this push:
 new 1eead54  [AMBARI-22749] ADDENDUM: Create Pull Request Template - fix 
rat check (#82)
1eead54 is described below

commit 1eead54f467c7ff6abafa908abf5b66a7278a45a
Author: Olivér Szabó <oleew...@gmail.com>
AuthorDate: Wed Jan 10 21:13:12 2018 +0100

[AMBARI-22749] ADDENDUM: Create Pull Request Template - fix rat check (#82)
---
 pom.xml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/pom.xml b/pom.xml
index 97900f3..36df69a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -251,6 +251,7 @@
 apache-rat-plugin
 
   
+.github/
 **/repo_*.j2
 **/ambari-log4j.spec
 **/version.txt

-- 
To stop receiving notification emails like this one, please contact
['"commits@ambari.apache.org" <commits@ambari.apache.org>'].


[ambari] branch trunk updated (30f3a04 -> 4936124)

2018-01-09 Thread vivekratnavel
This is an automated email from the ASF dual-hosted git repository.

vivekratnavel pushed a change to branch trunk
in repository https://gitbox.apache.org/repos/asf/ambari.git.


from 30f3a04  Merge pull request #75 from kasakrisz/solr-data-to-hdfs
 add 579cec8  AMBARI-22749. Create Pull Request Template
 add 1bb2355  Added inline style link
 new 4936124  Merge pull request #70 from vivekratnavel/AMBARI-22749-trunk

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .github/PULL_REQUEST_TEMPLATE.md | 10 ++
 1 file changed, 10 insertions(+)
 create mode 100644 .github/PULL_REQUEST_TEMPLATE.md

-- 
To stop receiving notification emails like this one, please contact
['"commits@ambari.apache.org" <commits@ambari.apache.org>'].


[ambari] 01/01: Merge pull request #70 from vivekratnavel/AMBARI-22749-trunk

2018-01-09 Thread vivekratnavel
This is an automated email from the ASF dual-hosted git repository.

vivekratnavel pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ambari.git

commit 493612494740ab9b6a7b1e470951baf5cfbee78e
Merge: 30f3a04 1bb2355
Author: Vivek Ratnavel Subramanian <vivekratnave...@gmail.com>
AuthorDate: Tue Jan 9 13:00:09 2018 -0800

Merge pull request #70 from vivekratnavel/AMBARI-22749-trunk

[AMBARI-22749] Create Pull Request Template

 .github/PULL_REQUEST_TEMPLATE.md | 10 ++
 1 file changed, 10 insertions(+)

-- 
To stop receiving notification emails like this one, please contact
"commits@ambari.apache.org" <commits@ambari.apache.org>.


[2/2] ambari git commit: Revert "AMBARI-22566. Upgrade Angular for Ambari Admin View (alexantonenko)"

2017-12-04 Thread vivekratnavel
Revert "AMBARI-22566. Upgrade Angular for Ambari Admin View (alexantonenko)"

This reverts commit f43277ebbe6e675c842be00ff318c966901d4a6f.


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

Branch: refs/heads/trunk
Commit: 1c9aa9d32804abce454c82ce4d75bfac87182b49
Parents: 6613d45
Author: Vivek Ratnavel Subramanian 
Authored: Mon Dec 4 16:44:29 2017 -0800
Committer: Vivek Ratnavel Subramanian 
Committed: Mon Dec 4 16:44:29 2017 -0800

--
 .../src/main/resources/ui/admin-web/app/scripts/app.js   | 2 +-
 .../controllers/stackVersions/StackVersionsEditCtrl.js   | 2 +-
 ambari-admin/src/main/resources/ui/admin-web/bower.json  | 8 
 ambari-admin/src/main/resources/ui/admin-web/package.json| 2 +-
 4 files changed, 7 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/1c9aa9d3/ambari-admin/src/main/resources/ui/admin-web/app/scripts/app.js
--
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/app.js 
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/app.js
index 98b0383..225eb12 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/app.js
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/app.js
@@ -63,7 +63,7 @@ angular.module('ambariAdminConsole', [
 };
   }]);
 
-  $httpProvider.interceptors.push(['$rootScope', '$q', function (scope, $q) {
+  $httpProvider.responseInterceptors.push(['$rootScope', '$q', function 
(scope, $q) {
 function success(response) {
   return response;
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/1c9aa9d3/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsEditCtrl.js
--
diff --git 
a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsEditCtrl.js
 
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsEditCtrl.js
index a4b121c..542772e 100644
--- 
a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsEditCtrl.js
+++ 
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsEditCtrl.js
@@ -36,7 +36,7 @@ angular.module('ambariAdminConsole')
   $scope.isGPLAccepted = false;
 
   $scope.isGPLRepo = function (repository) {
-return repository.Repositories.tags && 
repository.Repositories.tags.indexOf('GPL') >= 0;
+return repository.Repositories.tags.indexOf('GPL') >= 0;
   };
 
   $scope.showRepo = function (repository) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/1c9aa9d3/ambari-admin/src/main/resources/ui/admin-web/bower.json
--
diff --git a/ambari-admin/src/main/resources/ui/admin-web/bower.json 
b/ambari-admin/src/main/resources/ui/admin-web/bower.json
index c9e67f0..c38f464 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/bower.json
+++ b/ambari-admin/src/main/resources/ui/admin-web/bower.json
@@ -3,18 +3,18 @@
   "private": true,
   "dependencies": {
 "bootstrap": "3.3.7",
-"angular": "1.5.11",
-"angular-route": "1.5.11",
+"angular": "1.2.26",
+"angular-route": "1.2.26",
 "angular-bootstrap": "0.11.0",
 "underscore": "1.7.0",
 "restangular": "1.4.0",
 "angular-bootstrap-toggle-switch": "0.5.1",
-"angular-animate": "1.5.11",
+"angular-animate": "1.2.26",
 "angular-translate": "2.2.0",
 "font-awesome": "4.2.0"
   },
   "devDependencies": {
-"angular-mocks": "1.5.11",
+"angular-mocks": "1.2.26",
 "commonjs": "0.2.0",
 "chai": "1.8.0",
 "mocha": "1.14.0",

http://git-wip-us.apache.org/repos/asf/ambari/blob/1c9aa9d3/ambari-admin/src/main/resources/ui/admin-web/package.json
--
diff --git a/ambari-admin/src/main/resources/ui/admin-web/package.json 
b/ambari-admin/src/main/resources/ui/admin-web/package.json
index ab117ef..b7c514c 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/package.json
+++ b/ambari-admin/src/main/resources/ui/admin-web/package.json
@@ -14,7 +14,7 @@
 "gulp-flatten": "0.0.2",
 "gulp-load-plugins": "0.5.0",
 "gulp-order": "1.1.1",
-"gulp-plumber": "1.1.0",
+"gulp-plumber": "0.6.6",
 "gulp-size": "0.3.0",
 "gulp-uglify": "0.2.1",
 "gulp-useref": "0.4.2",



[1/2] ambari git commit: Revert "AMBARI-22572. During cluster installation bower cannot resolve angularjs version (alexantonenko)"

2017-12-04 Thread vivekratnavel
Repository: ambari
Updated Branches:
  refs/heads/trunk ddcebe23c -> 1c9aa9d32


Revert "AMBARI-22572. During cluster installation bower cannot resolve 
angularjs version (alexantonenko)"

This reverts commit 88b59a6641a0b177f39e32c725acf04d85477c01.


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/6613d45b
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/6613d45b
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/6613d45b

Branch: refs/heads/trunk
Commit: 6613d45b7735b8b6d53eab3f450b36959c7aaee5
Parents: ddcebe2
Author: Vivek Ratnavel Subramanian 
Authored: Mon Dec 4 16:44:01 2017 -0800
Committer: Vivek Ratnavel Subramanian 
Committed: Mon Dec 4 16:44:01 2017 -0800

--
 ambari-admin/src/main/resources/ui/admin-web/bower.json | 3 ---
 1 file changed, 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/6613d45b/ambari-admin/src/main/resources/ui/admin-web/bower.json
--
diff --git a/ambari-admin/src/main/resources/ui/admin-web/bower.json 
b/ambari-admin/src/main/resources/ui/admin-web/bower.json
index 5bbada9..c9e67f0 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/bower.json
+++ b/ambari-admin/src/main/resources/ui/admin-web/bower.json
@@ -19,8 +19,5 @@
 "chai": "1.8.0",
 "mocha": "1.14.0",
 "sinon": "1.10.3"
-  },
-  "resolutions": {
-"angular": "1.5.11"
   }
 }



[1/2] ambari git commit: Revert "AMBARI-22572. During cluster installation bower cannot resolve angularjs version (alexantonenko)"

2017-12-04 Thread vivekratnavel
Repository: ambari
Updated Branches:
  refs/heads/branch-2.6 ab1d01bd1 -> bfca1bd12


Revert "AMBARI-22572. During cluster installation bower cannot resolve 
angularjs version (alexantonenko)"

This reverts commit 76f401b4cf9b6d2d840a14f15c415694c427480e.


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/7aba191e
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/7aba191e
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/7aba191e

Branch: refs/heads/branch-2.6
Commit: 7aba191ee246fbf17627962c2516e13a899e8655
Parents: ab1d01b
Author: Vivek Ratnavel Subramanian 
Authored: Mon Dec 4 16:41:54 2017 -0800
Committer: Vivek Ratnavel Subramanian 
Committed: Mon Dec 4 16:41:54 2017 -0800

--
 ambari-admin/src/main/resources/ui/admin-web/bower.json | 3 ---
 1 file changed, 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/7aba191e/ambari-admin/src/main/resources/ui/admin-web/bower.json
--
diff --git a/ambari-admin/src/main/resources/ui/admin-web/bower.json 
b/ambari-admin/src/main/resources/ui/admin-web/bower.json
index ad14808..df4c434 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/bower.json
+++ b/ambari-admin/src/main/resources/ui/admin-web/bower.json
@@ -19,8 +19,5 @@
 "chai": "1.8.0",
 "mocha": "1.14.0",
 "sinon": "1.10.3"
-  },
-  "resolutions": {
-"angular": "1.5.11"
   }
 }



[2/2] ambari git commit: Revert "AMBARI-22566. Upgrade Angular for Ambari Admin View (alexantonenko)"

2017-12-04 Thread vivekratnavel
Revert "AMBARI-22566. Upgrade Angular for Ambari Admin View (alexantonenko)"

This reverts commit 41329e3b71b49ab9036228a8a9c794bff720cf7a.


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

Branch: refs/heads/branch-2.6
Commit: bfca1bd1296129ab27bf65751177aa0cc1b4b979
Parents: 7aba191
Author: Vivek Ratnavel Subramanian 
Authored: Mon Dec 4 16:42:34 2017 -0800
Committer: Vivek Ratnavel Subramanian 
Committed: Mon Dec 4 16:42:34 2017 -0800

--
 .../src/main/resources/ui/admin-web/app/scripts/app.js   | 2 +-
 .../controllers/stackVersions/StackVersionsEditCtrl.js   | 2 +-
 ambari-admin/src/main/resources/ui/admin-web/bower.json  | 8 
 ambari-admin/src/main/resources/ui/admin-web/package.json| 2 +-
 4 files changed, 7 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/bfca1bd1/ambari-admin/src/main/resources/ui/admin-web/app/scripts/app.js
--
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/app.js 
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/app.js
index 4a4571a..78e538d 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/app.js
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/app.js
@@ -60,7 +60,7 @@ angular.module('ambariAdminConsole', [
 };
   }]);
 
-  $httpProvider.interceptors.push(['$rootScope', '$q', function (scope, $q) {
+  $httpProvider.responseInterceptors.push(['$rootScope', '$q', function 
(scope, $q) {
 function success(response) {
   return response;
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/bfca1bd1/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsEditCtrl.js
--
diff --git 
a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsEditCtrl.js
 
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsEditCtrl.js
index b1c0b54..b7fa741 100644
--- 
a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsEditCtrl.js
+++ 
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsEditCtrl.js
@@ -36,7 +36,7 @@ angular.module('ambariAdminConsole')
   $scope.isGPLAccepted = false;
   
   $scope.isGPLRepo = function (repository) {
-return repository.Repositories.tags && 
repository.Repositories.tags.indexOf('GPL') >= 0;
+return repository.Repositories.tags.indexOf('GPL') >= 0;
   };
 
   $scope.showRepo = function (repository) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/bfca1bd1/ambari-admin/src/main/resources/ui/admin-web/bower.json
--
diff --git a/ambari-admin/src/main/resources/ui/admin-web/bower.json 
b/ambari-admin/src/main/resources/ui/admin-web/bower.json
index df4c434..dbdf005 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/bower.json
+++ b/ambari-admin/src/main/resources/ui/admin-web/bower.json
@@ -3,18 +3,18 @@
   "private": true,
   "dependencies": {
 "bootstrap": "3.1.1",
-"angular": "1.5.11",
-"angular-route": "1.5.11",
+"angular": "1.2.26",
+"angular-route": "1.2.26",
 "angular-bootstrap": "0.11.0",
 "underscore": "1.7.0",
 "restangular": "1.4.0",
 "angular-bootstrap-toggle-switch": "0.5.1",
-"angular-animate": "1.5.11",
+"angular-animate": "1.2.26",
 "angular-translate": "2.2.0",
 "font-awesome": "4.2.0"
   },
   "devDependencies": {
-"angular-mocks": "1.5.11",
+"angular-mocks": "1.2.26",
 "commonjs": "0.2.0",
 "chai": "1.8.0",
 "mocha": "1.14.0",

http://git-wip-us.apache.org/repos/asf/ambari/blob/bfca1bd1/ambari-admin/src/main/resources/ui/admin-web/package.json
--
diff --git a/ambari-admin/src/main/resources/ui/admin-web/package.json 
b/ambari-admin/src/main/resources/ui/admin-web/package.json
index df3c214..efcd9d4 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/package.json
+++ b/ambari-admin/src/main/resources/ui/admin-web/package.json
@@ -12,7 +12,7 @@
 "gulp-filter": "0.4.1",
 "gulp-flatten": "0.0.2",
 "gulp-load-plugins": "0.5.0",
-"gulp-plumber": "1.1.0",
+"gulp-plumber": "0.6.6",
 "gulp-size": "0.3.0",
 "gulp-uglify": "0.2.1",
 "gulp-useref": "0.4.2",



ambari git commit: AMBARI-22445. Warn the user appropriately for default MySQL server install for Hive (Part 2) (vsubramanian)

2017-12-01 Thread vivekratnavel
Repository: ambari
Updated Branches:
  refs/heads/trunk 47be7edce -> 5caac19de


AMBARI-22445. Warn the user appropriately for default MySQL server install for 
Hive (Part 2) (vsubramanian)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/5caac19d
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/5caac19d
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/5caac19d

Branch: refs/heads/trunk
Commit: 5caac19def93748874f50661aabd87f5135d2a0f
Parents: 47be7ed
Author: Vivek Ratnavel Subramanian 
Authored: Fri Dec 1 16:34:33 2017 -0800
Committer: Vivek Ratnavel Subramanian 
Committed: Fri Dec 1 16:34:33 2017 -0800

--
 ambari-web/app/data/db_properties_info.js   | 15 +--
 ambari-web/app/messages.js  |  3 ++
 ambari-web/app/views/common/controls_view.js|  5 ++-
 .../test/views/common/controls_view_test.js | 46 
 4 files changed, 36 insertions(+), 33 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/5caac19d/ambari-web/app/data/db_properties_info.js
--
diff --git a/ambari-web/app/data/db_properties_info.js 
b/ambari-web/app/data/db_properties_info.js
index 6d93c2a..3b4b856 100644
--- a/ambari-web/app/data/db_properties_info.js
+++ b/ambari-web/app/data/db_properties_info.js
@@ -68,19 +68,28 @@ module.exports = {
   },
   'driver': 'com.mysql.jdbc.Driver',
   'sql_jar_connector': '/usr/share/java/mysql-connector-java.jar',
-  'db_type': 'mysql'
+  'db_type': 'mysql',
+  'db_name': 'MySQL',
+  'driver_download_url': 'https://dev.mysql.com/downloads/connector/j/',
+  'driver_name': 'MySQL Connector/J JDBC Driver'
 },
 'POSTGRES': {
   'connection_url': 'jdbc:postgresql://{0}:5432/{1}',
   'driver': 'org.postgresql.Driver',
   'sql_jar_connector': '/usr/share/java/postgresql.jar',
-  'db_type': 'postgres'
+  'db_type': 'postgres',
+  'db_name': 'PostgreSQL',
+  'driver_download_url': 'https://jdbc.postgresql.org/',
+  'driver_name': 'PostgreSQL JDBC Driver'
 },
 'ORACLE': {
   'connection_url': 'jdbc:oracle:thin:@//{0}:1521/{1}',
   'driver': 'oracle.jdbc.driver.OracleDriver',
   'sql_jar_connector': '/usr/share/java/ojdbc6.jar',
-  'db_type': 'oracle'
+  'db_type': 'oracle',
+  'db_name': 'Oracle',
+  'driver_download_url': 
'http://www.oracle.com/technetwork/database/features/jdbc/index-091264.html',
+  'driver_name': 'Oracle JDBC Driver'
 },
 'MSSQL': {
   'connection_url': 'jdbc:sqlserver://{0};databaseName={1}',

http://git-wip-us.apache.org/repos/asf/ambari/blob/5caac19d/ambari-web/app/messages.js
--
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index b294877..06deecb 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -2262,6 +2262,9 @@ Em.I18n.translations = {
   'services.service.config.configHistory.makeCurrent.message': 'Created from 
service config version {0}',
   'services.service.config.configHistory.comparing': 'Comparing',
   'services.service.config.setRecommendedValue': 'Set Recommended',
+  'services.service.config.database.msg.jdbcSetup.detailed': 'To use {0} with 
Hive, you must ' +
+'download the {4} from {0}. Once downloaded to the Ambari Server host, 
run: ' +
+'ambari-server setup --jdbc-db={1} --jdbc-driver=/path/to/{1}/{2}',
 
   'services.service.widgets.list-widget.nothingSelected': 'Nothing selected',
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/5caac19d/ambari-web/app/views/common/controls_view.js
--
diff --git a/ambari-web/app/views/common/controls_view.js 
b/ambari-web/app/views/common/controls_view.js
index 63d08ce..747d96c 100644
--- a/ambari-web/app/views/common/controls_view.js
+++ b/ambari-web/app/views/common/controls_view.js
@@ -762,11 +762,14 @@ App.ServiceConfigRadioButtons = 
Ember.View.extend(App.ServiceConfigCalculateId,
 var shouldAdditionalViewsBeSet = currentDB && checkDatabase && 
handledProperties.contains(this.get('serviceConfig.name')),
   driver = this.getDefaultPropertyValue('sql_jar_connector') ? 
this.getDefaultPropertyValue('sql_jar_connector').split("/").pop() : 
'driver.jar',
   dbType = this.getDefaultPropertyValue('db_type'),
+  dbName = this.getDefaultPropertyValue('db_name'),
+  driverName = this.getDefaultPropertyValue('driver_name'),
+  driverDownloadUrl = this.getDefaultPropertyValue('driver_download_url'),
   additionalView1 = shouldAdditionalViewsBeSet && !this.get('isNewDb') ? 

ambari git commit: AMBARI-22445. Warn the user appropriately for default MySQL server install for Hive (Part 2) (vsubramanian)

2017-12-01 Thread vivekratnavel
Repository: ambari
Updated Branches:
  refs/heads/branch-2.6 2640beacb -> 754aa38ec


AMBARI-22445. Warn the user appropriately for default MySQL server install for 
Hive (Part 2) (vsubramanian)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/754aa38e
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/754aa38e
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/754aa38e

Branch: refs/heads/branch-2.6
Commit: 754aa38eca1cb891f56358e8a95e1c4af15a883c
Parents: 2640bea
Author: Vivek Ratnavel Subramanian 
Authored: Fri Dec 1 16:33:25 2017 -0800
Committer: Vivek Ratnavel Subramanian 
Committed: Fri Dec 1 16:33:25 2017 -0800

--
 ambari-web/app/data/HDP2/site_properties.js |  4 --
 ambari-web/app/data/db_properties_info.js   | 15 +--
 ambari-web/app/messages.js  |  3 ++
 ambari-web/app/views/common/controls_view.js|  5 ++-
 .../test/views/common/controls_view_test.js | 46 
 5 files changed, 36 insertions(+), 37 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/754aa38e/ambari-web/app/data/HDP2/site_properties.js
--
diff --git a/ambari-web/app/data/HDP2/site_properties.js 
b/ambari-web/app/data/HDP2/site_properties.js
index 6c2d5e1..4d2af4b 100644
--- a/ambari-web/app/data/HDP2/site_properties.js
+++ b/ambari-web/app/data/HDP2/site_properties.js
@@ -455,10 +455,6 @@ var hdp2properties = [
   {
 displayName: 'Existing Oracle Database',
 hidden: false
-  },
-  {
-displayName: 'Existing SQL Anywhere Database',
-hidden: App.get('currentStackName') !== 'SAPHD' && 
(App.get('currentStackName') !== 'HDP' || !App.get('isHadoop23Stack'))
   }
 ],
 "displayType": "radio button",

http://git-wip-us.apache.org/repos/asf/ambari/blob/754aa38e/ambari-web/app/data/db_properties_info.js
--
diff --git a/ambari-web/app/data/db_properties_info.js 
b/ambari-web/app/data/db_properties_info.js
index 6d93c2a..3b4b856 100644
--- a/ambari-web/app/data/db_properties_info.js
+++ b/ambari-web/app/data/db_properties_info.js
@@ -68,19 +68,28 @@ module.exports = {
   },
   'driver': 'com.mysql.jdbc.Driver',
   'sql_jar_connector': '/usr/share/java/mysql-connector-java.jar',
-  'db_type': 'mysql'
+  'db_type': 'mysql',
+  'db_name': 'MySQL',
+  'driver_download_url': 'https://dev.mysql.com/downloads/connector/j/',
+  'driver_name': 'MySQL Connector/J JDBC Driver'
 },
 'POSTGRES': {
   'connection_url': 'jdbc:postgresql://{0}:5432/{1}',
   'driver': 'org.postgresql.Driver',
   'sql_jar_connector': '/usr/share/java/postgresql.jar',
-  'db_type': 'postgres'
+  'db_type': 'postgres',
+  'db_name': 'PostgreSQL',
+  'driver_download_url': 'https://jdbc.postgresql.org/',
+  'driver_name': 'PostgreSQL JDBC Driver'
 },
 'ORACLE': {
   'connection_url': 'jdbc:oracle:thin:@//{0}:1521/{1}',
   'driver': 'oracle.jdbc.driver.OracleDriver',
   'sql_jar_connector': '/usr/share/java/ojdbc6.jar',
-  'db_type': 'oracle'
+  'db_type': 'oracle',
+  'db_name': 'Oracle',
+  'driver_download_url': 
'http://www.oracle.com/technetwork/database/features/jdbc/index-091264.html',
+  'driver_name': 'Oracle JDBC Driver'
 },
 'MSSQL': {
   'connection_url': 'jdbc:sqlserver://{0};databaseName={1}',

http://git-wip-us.apache.org/repos/asf/ambari/blob/754aa38e/ambari-web/app/messages.js
--
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index 783baf1..851e331 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -2236,6 +2236,9 @@ Em.I18n.translations = {
   'services.service.config.configHistory.makeCurrent.message': 'Created from 
service config version {0}',
   'services.service.config.configHistory.comparing': 'Comparing',
   'services.service.config.setRecommendedValue': 'Set Recommended',
+  'services.service.config.database.msg.jdbcSetup.detailed': 'To use {0} with 
Hive, you must ' +
+'download the {4} from {0}. Once downloaded to the Ambari Server host, 
run: ' +
+'ambari-server setup --jdbc-db={1} --jdbc-driver=/path/to/{1}/{2}',
 
   'services.service.widgets.list-widget.nothingSelected': 'Nothing selected',
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/754aa38e/ambari-web/app/views/common/controls_view.js
--
diff --git a/ambari-web/app/views/common/controls_view.js 
b/ambari-web/app/views/common/controls_view.js
index 

ambari git commit: AMBARI-22570. Repository Fields missing when register version is clicked (vsubramanian)

2017-11-30 Thread vivekratnavel
Repository: ambari
Updated Branches:
  refs/heads/trunk b2655aa66 -> 7b6fef189


AMBARI-22570. Repository Fields missing when register version is clicked 
(vsubramanian)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/7b6fef18
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/7b6fef18
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/7b6fef18

Branch: refs/heads/trunk
Commit: 7b6fef189b7fa3090b7a10efcdf5e2427e2e0eac
Parents: b2655aa
Author: Vivek Ratnavel Subramanian 
Authored: Thu Nov 30 16:32:17 2017 -0800
Committer: Vivek Ratnavel Subramanian 
Committed: Thu Nov 30 16:32:17 2017 -0800

--
 .../stackVersions/StackVersionsCreateCtrl.js| 28 +++-
 1 file changed, 27 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/7b6fef18/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsCreateCtrl.js
--
diff --git 
a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsCreateCtrl.js
 
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsCreateCtrl.js
index 8ffb29b..3d93b0d 100644
--- 
a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsCreateCtrl.js
+++ 
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsCreateCtrl.js
@@ -40,6 +40,16 @@ angular.module('ambariAdminConsole')
 display_name: ''
   };
 
+  $scope.isGPLAccepted = false;
+
+  $scope.isGPLRepo = function (repository) {
+return repository.Repositories.tags.indexOf('GPL') >= 0;
+  };
+
+  $scope.showRepo = function (repository) {
+return $scope.isGPLAccepted || !$scope.isGPLRepo(repository);
+  };
+
   $scope.publicOption = {
 index: 1,
 hasError: false
@@ -176,6 +186,15 @@ angular.module('ambariAdminConsole')
   };
 
   /**
+   * Load GPL License Accepted value
+   */
+  $scope.fetchGPLLicenseAccepted = function () {
+Stack.getGPLLicenseAccepted().then(function (data) {
+  $scope.isGPLAccepted = data === 'true';
+})
+  };
+
+  /**
* Load supported OS list
*/
   $scope.afterStackVersionRead = function () {
@@ -350,7 +369,11 @@ angular.module('ambariAdminConsole')
 
   $scope.updateRepoVersions = function () {
 var skip = $scope.skipValidation || $scope.useRedhatSatellite;
-return Stack.validateBaseUrls(skip, $scope.osList, 
$scope.upgradeStack).then(function (invalidUrls) {
+// Filter out repositories that are not shown in the UI
+var osList = Object.assign([], $scope.osList).map(function(os) {
+  return Object.assign({}, os, {repositories: 
os.repositories.filter(function(repo) { return $scope.showRepo(repo); })});
+});
+return Stack.validateBaseUrls(skip, osList, 
$scope.upgradeStack).then(function (invalidUrls) {
   if (invalidUrls.length === 0) {
 Stack.updateRepo($scope.upgradeStack.stack_name, 
$scope.upgradeStack.stack_version, $scope.id, $scope.updateObj).then(function 
() {
   Alert.success($t('versions.alerts.versionEdited', {
@@ -477,6 +500,9 @@ angular.module('ambariAdminConsole')
 
 // load supported os type base on stack version
 $scope.afterStackVersionRead();
+
+// Load GPL license accepted value
+$scope.fetchGPLLicenseAccepted();
   };
 
   $scope.selectRepoInList = function() {



ambari git commit: AMBARI-22570. Repository Fields missing when register version is clicked (vsubramanian)

2017-11-30 Thread vivekratnavel
Repository: ambari
Updated Branches:
  refs/heads/branch-2.6 4b428571f -> 2a731ac96


AMBARI-22570. Repository Fields missing when register version is clicked 
(vsubramanian)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/2a731ac9
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/2a731ac9
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/2a731ac9

Branch: refs/heads/branch-2.6
Commit: 2a731ac968d3ce19fdd19b94b8340c6cc8f866ef
Parents: 4b42857
Author: Vivek Ratnavel Subramanian 
Authored: Thu Nov 30 16:31:16 2017 -0800
Committer: Vivek Ratnavel Subramanian 
Committed: Thu Nov 30 16:31:16 2017 -0800

--
 .../stackVersions/StackVersionsCreateCtrl.js| 28 +++-
 1 file changed, 27 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/2a731ac9/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsCreateCtrl.js
--
diff --git 
a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsCreateCtrl.js
 
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsCreateCtrl.js
index c5f1a8c..fed9790 100644
--- 
a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsCreateCtrl.js
+++ 
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsCreateCtrl.js
@@ -40,6 +40,16 @@ angular.module('ambariAdminConsole')
 display_name: ''
   };
 
+  $scope.isGPLAccepted = false;
+
+  $scope.isGPLRepo = function (repository) {
+return repository.Repositories.tags.indexOf('GPL') >= 0;
+  };
+
+  $scope.showRepo = function (repository) {
+return $scope.isGPLAccepted || !$scope.isGPLRepo(repository);
+  };
+
   $scope.publicOption = {
 index: 1,
 hasError: false
@@ -176,6 +186,15 @@ angular.module('ambariAdminConsole')
   };
 
   /**
+   * Load GPL License Accepted value
+   */
+  $scope.fetchGPLLicenseAccepted = function () {
+Stack.getGPLLicenseAccepted().then(function (data) {
+  $scope.isGPLAccepted = data === 'true';
+})
+  };
+
+  /**
* Load supported OS list
*/
   $scope.afterStackVersionRead = function () {
@@ -350,7 +369,11 @@ angular.module('ambariAdminConsole')
 
   $scope.updateRepoVersions = function () {
 var skip = $scope.skipValidation || $scope.useRedhatSatellite;
-return Stack.validateBaseUrls(skip, $scope.osList, 
$scope.upgradeStack).then(function (invalidUrls) {
+// Filter out repositories that are not shown in the UI
+var osList = Object.assign([], $scope.osList).map(function(os) {
+  return Object.assign({}, os, {repositories: 
os.repositories.filter(function(repo) { return $scope.showRepo(repo); })});
+});
+return Stack.validateBaseUrls(skip, osList, 
$scope.upgradeStack).then(function (invalidUrls) {
   if (invalidUrls.length === 0) {
 Stack.updateRepo($scope.upgradeStack.stack_name, 
$scope.upgradeStack.stack_version, $scope.id, $scope.updateObj).then(function 
() {
   Alert.success($t('versions.alerts.versionEdited', {
@@ -477,6 +500,9 @@ angular.module('ambariAdminConsole')
 
 // load supported os type base on stack version
 $scope.afterStackVersionRead();
+
+// Load GPL license accepted value
+$scope.fetchGPLLicenseAccepted();
   };
 
   $scope.selectRepoInList = function() {



ambari git commit: AMBARI-22554. UI should pass repo_name for repository validation (vsubramanian)

2017-11-29 Thread vivekratnavel
Repository: ambari
Updated Branches:
  refs/heads/trunk 323ce7a79 -> ca174fb32


AMBARI-22554. UI should pass repo_name for repository validation (vsubramanian)


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

Branch: refs/heads/trunk
Commit: ca174fb32a0e34582776b0607b6a2d14dc72c20d
Parents: 323ce7a
Author: Vivek Ratnavel Subramanian 
Authored: Wed Nov 29 16:22:20 2017 -0800
Committer: Vivek Ratnavel Subramanian 
Committed: Wed Nov 29 16:22:20 2017 -0800

--
 .../main/resources/ui/admin-web/app/scripts/services/Stack.js   | 3 ++-
 ambari-web/app/controllers/installer.js | 5 -
 2 files changed, 6 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/ca174fb3/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/Stack.js
--
diff --git 
a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/Stack.js 
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/Stack.js
index 90f4f48..f52e687 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/Stack.js
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/Stack.js
@@ -405,7 +405,8 @@ angular.module('ambariAdminConsole')
   $http.post(url + '/operating_systems/' + 
os.OperatingSystems.os_type + '/repositories/' + repo.Repositories.repo_id + 
'?validate_only=true',
 {
   "Repositories": {
-"base_url": repo.Repositories.base_url
+"base_url": repo.Repositories.base_url,
+"repo_name": repo.Repositories.repo_name
   }
 },
 {

http://git-wip-us.apache.org/repos/asf/ambari/blob/ca174fb3/ambari-web/app/controllers/installer.js
--
diff --git a/ambari-web/app/controllers/installer.js 
b/ambari-web/app/controllers/installer.js
index d6be78d..f49fc11 100644
--- a/ambari-web/app/controllers/installer.js
+++ b/ambari-web/app/controllers/installer.js
@@ -315,7 +315,9 @@ App.InstallerController = 
App.WizardController.extend(App.Persist, {
   App.Repository.find().findProperty('id', repo.id).set('baseUrl', 
repo.base_url);
 });
 _oses.forEach(function (os) {
-  App.OperatingSystem.find().findProperty('id', os.id).set('isSelected', 
os.is_selected);
+  if (App.OperatingSystem.find().findProperty('id', os.id)) {
+App.OperatingSystem.find().findProperty('id', os.id).set('isSelected', 
os.is_selected);
+  }
 });
 //should delete the record on going to step 2, on going back to step 1, 
still need the record
 if (App.router.get('currentState.name') != "step1") {
@@ -863,6 +865,7 @@ App.InstallerController = 
App.WizardController.extend(App.Persist, {
   data: {
 'Repositories': {
   'base_url': repo.get('baseUrl'),
+  'repo_name': repo.get('repoName'),
   "verify_base_url": verifyBaseUrl
 }
   }



ambari git commit: AMBARI-22554. UI should pass repo_name for repository validation (vsubramanian)

2017-11-29 Thread vivekratnavel
Repository: ambari
Updated Branches:
  refs/heads/branch-2.6 ec846e180 -> 128c7fb5f


AMBARI-22554. UI should pass repo_name for repository validation (vsubramanian)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/128c7fb5
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/128c7fb5
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/128c7fb5

Branch: refs/heads/branch-2.6
Commit: 128c7fb5fde0afac80d3f4eb1e8884f1700dd64f
Parents: ec846e1
Author: Vivek Ratnavel Subramanian 
Authored: Wed Nov 29 16:20:44 2017 -0800
Committer: Vivek Ratnavel Subramanian 
Committed: Wed Nov 29 16:20:44 2017 -0800

--
 .../main/resources/ui/admin-web/app/scripts/services/Stack.js   | 3 ++-
 ambari-web/app/controllers/installer.js | 5 -
 2 files changed, 6 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/128c7fb5/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/Stack.js
--
diff --git 
a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/Stack.js 
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/Stack.js
index 46f4f42..45da26b 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/Stack.js
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/Stack.js
@@ -369,7 +369,8 @@ angular.module('ambariAdminConsole')
   $http.post(url + '/operating_systems/' + 
os.OperatingSystems.os_type + '/repositories/' + repo.Repositories.repo_id + 
'?validate_only=true',
 {
   "Repositories": {
-"base_url": repo.Repositories.base_url
+"base_url": repo.Repositories.base_url,
+"repo_name": repo.Repositories.repo_name
   }
 },
 {

http://git-wip-us.apache.org/repos/asf/ambari/blob/128c7fb5/ambari-web/app/controllers/installer.js
--
diff --git a/ambari-web/app/controllers/installer.js 
b/ambari-web/app/controllers/installer.js
index afce91a..12a3704 100644
--- a/ambari-web/app/controllers/installer.js
+++ b/ambari-web/app/controllers/installer.js
@@ -315,7 +315,9 @@ App.InstallerController = 
App.WizardController.extend(App.UserPref, {
   App.Repository.find().findProperty('id', repo.id).set('baseUrl', 
repo.base_url);
 });
 _oses.forEach(function (os) {
-  App.OperatingSystem.find().findProperty('id', os.id).set('isSelected', 
os.is_selected);
+  if (App.OperatingSystem.find().findProperty('id', os.id)) {
+App.OperatingSystem.find().findProperty('id', os.id).set('isSelected', 
os.is_selected);
+  }
 });
 //should delete the record on going to step 2, on going back to step 1, 
still need the record
 if (App.router.get('currentState.name') != "step1") {
@@ -857,6 +859,7 @@ App.InstallerController = 
App.WizardController.extend(App.UserPref, {
   data: {
 'Repositories': {
   'base_url': repo.get('baseUrl'),
+  'repo_name': repo.get('repoName'),
   "verify_base_url": verifyBaseUrl
 }
   }



ambari git commit: AMBARI-22495. Installer - Select Version page should show HDP-GPL repo if necessary (vsubramanian)

2017-11-22 Thread vivekratnavel
Repository: ambari
Updated Branches:
  refs/heads/trunk 9fc7223df -> 6b17d0142


AMBARI-22495. Installer - Select Version page should show HDP-GPL repo if 
necessary (vsubramanian)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/6b17d014
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/6b17d014
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/6b17d014

Branch: refs/heads/trunk
Commit: 6b17d0142266f714807bd06e3ce1afbe535a0a73
Parents: 9fc7223
Author: Vivek Ratnavel Subramanian 
Authored: Wed Nov 22 18:00:32 2017 -0800
Committer: Vivek Ratnavel Subramanian 
Committed: Wed Nov 22 18:00:32 2017 -0800

--
 ambari-web/app/controllers/installer.js | 53 +++-
 .../app/controllers/wizard/step8_controller.js  | 12 +++--
 .../app/mappers/repository_version_mapper.js|  3 +-
 ambari-web/app/mappers/stack_mapper.js  |  3 +-
 ambari-web/app/models/repository.js | 17 +++
 .../app/models/stack_version/repository.js  |  3 +-
 ambari-web/app/templates/wizard/step1.hbs   | 36 +
 ambari-web/test/controllers/installer_test.js   | 14 --
 8 files changed, 103 insertions(+), 38 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/6b17d014/ambari-web/app/controllers/installer.js
--
diff --git a/ambari-web/app/controllers/installer.js 
b/ambari-web/app/controllers/installer.js
index 3c50b26..d6be78d 100644
--- a/ambari-web/app/controllers/installer.js
+++ b/ambari-web/app/controllers/installer.js
@@ -813,6 +813,7 @@ App.InstallerController = 
App.WizardController.extend(App.Persist, {
 "repo_id": repository.get('repoId'),
 "repo_name": repository.get('repoName'),
 "components": repository.get('components'),
+"tags": repository.get('tags'),
 "distribution": repository.get('distribution')
   }
 });
@@ -833,7 +834,7 @@ App.InstallerController = 
App.WizardController.extend(App.Persist, {
 var dfd = $.Deferred();
 if (selectedStack && selectedStack.get('operatingSystems')) {
   this.set('validationCnt', 
selectedStack.get('operatingSystems').filterProperty('isSelected').filterProperty('isEmpty',
 false).map(function (os) {
-return os.get('repositories.length');
+return os.get('repositories').filterProperty('showRepo', true).length;
   }).reduce(Em.sum, 0));
   var verifyBaseUrl = !wizardStep1Controller.get('skipValidationChecked') 
&& !wizardStep1Controller.get('selectedStack.useRedhatSatellite');
   if (!verifyBaseUrl) {
@@ -842,32 +843,34 @@ App.InstallerController = 
App.WizardController.extend(App.Persist, {
   selectedStack.get('operatingSystems').forEach(function (os) {
 if (os.get('isSelected') && !os.get('isEmpty')) {
   os.get('repositories').forEach(function (repo) {
-repo.setProperties({
-  errorTitle: '',
-  errorContent: '',
-  validation: 'INPROGRESS'
-});
-this.set('content.isCheckInProgress', true);
-App.ajax.send({
-  name: 'wizard.advanced_repositories.valid_url',
-  sender: this,
-  data: {
-stackName: stackName,
-stackVersion: stackVersion,
-repoId: repo.get('repoId'),
-osType: os.get('osType'),
-osId: os.get('id'),
-dfd: dfd,
+if (repo.get('showRepo')) {
+  repo.setProperties({
+errorTitle: '',
+errorContent: '',
+validation: 'INPROGRESS'
+  });
+  this.set('content.isCheckInProgress', true);
+  App.ajax.send({
+name: 'wizard.advanced_repositories.valid_url',
+sender: this,
 data: {
-  'Repositories': {
-'base_url': repo.get('baseUrl'),
-"verify_base_url": verifyBaseUrl
+  stackName: stackName,
+  stackVersion: stackVersion,
+  repoId: repo.get('repoId'),
+  osType: os.get('osType'),
+  osId: os.get('id'),
+  dfd: dfd,
+  data: {
+'Repositories': {
+  'base_url': repo.get('baseUrl'),
+  "verify_base_url": verifyBaseUrl
+}
   }
-}
-  },
-  success: 'checkRepoURLSuccessCallback',
-  error: 'checkRepoURLErrorCallback'
-});
+},
+

ambari git commit: AMBARI-22495. Installer - Select Version page should show HDP-GPL repo if necessary (vsubramanian)

2017-11-22 Thread vivekratnavel
Repository: ambari
Updated Branches:
  refs/heads/branch-feature-AMBARI-22457 059fadf46 -> 854182987


AMBARI-22495. Installer - Select Version page should show HDP-GPL repo if 
necessary (vsubramanian)


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

Branch: refs/heads/branch-feature-AMBARI-22457
Commit: 8541829876ae3edcfbe96587270ecedad86f36e8
Parents: 059fadf
Author: Vivek Ratnavel Subramanian 
Authored: Wed Nov 22 17:55:46 2017 -0800
Committer: Vivek Ratnavel Subramanian 
Committed: Wed Nov 22 17:55:46 2017 -0800

--
 ambari-web/app/controllers/installer.js | 53 +++-
 .../app/controllers/wizard/step8_controller.js  | 12 +++--
 .../app/mappers/repository_version_mapper.js|  3 +-
 ambari-web/app/mappers/stack_mapper.js  |  3 +-
 ambari-web/app/models/repository.js | 17 +++
 .../app/models/stack_version/repository.js  |  3 +-
 ambari-web/app/templates/wizard/step1.hbs   |  2 +
 ambari-web/test/controllers/installer_test.js   | 14 --
 8 files changed, 69 insertions(+), 38 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/85418298/ambari-web/app/controllers/installer.js
--
diff --git a/ambari-web/app/controllers/installer.js 
b/ambari-web/app/controllers/installer.js
index a45ac57..afce91a 100644
--- a/ambari-web/app/controllers/installer.js
+++ b/ambari-web/app/controllers/installer.js
@@ -807,6 +807,7 @@ App.InstallerController = 
App.WizardController.extend(App.UserPref, {
 "repo_id": repository.get('repoId'),
 "repo_name": repository.get('repoName'),
 "components": repository.get('components'),
+"tags": repository.get('tags'),
 "distribution": repository.get('distribution')
   }
 });
@@ -827,7 +828,7 @@ App.InstallerController = 
App.WizardController.extend(App.UserPref, {
 var dfd = $.Deferred();
 if (selectedStack && selectedStack.get('operatingSystems')) {
   this.set('validationCnt', 
selectedStack.get('operatingSystems').filterProperty('isSelected').filterProperty('isEmpty',
 false).map(function (os) {
-return os.get('repositories.length');
+return os.get('repositories').filterProperty('showRepo', true).length;
   }).reduce(Em.sum, 0));
   var verifyBaseUrl = !wizardStep1Controller.get('skipValidationChecked') 
&& !wizardStep1Controller.get('selectedStack.useRedhatSatellite');
   if (!verifyBaseUrl) {
@@ -836,32 +837,34 @@ App.InstallerController = 
App.WizardController.extend(App.UserPref, {
   selectedStack.get('operatingSystems').forEach(function (os) {
 if (os.get('isSelected') && !os.get('isEmpty')) {
   os.get('repositories').forEach(function (repo) {
-repo.setProperties({
-  errorTitle: '',
-  errorContent: '',
-  validation: App.Repository.validation.INPROGRESS
-});
-this.set('content.isCheckInProgress', true);
-App.ajax.send({
-  name: 'wizard.advanced_repositories.valid_url',
-  sender: this,
-  data: {
-stackName: stackName,
-stackVersion: stackVersion,
-repoId: repo.get('repoId'),
-osType: os.get('osType'),
-osId: os.get('id'),
-dfd: dfd,
+if (repo.get('showRepo')) {
+  repo.setProperties({
+errorTitle: '',
+errorContent: '',
+validation: App.Repository.validation.INPROGRESS
+  });
+  this.set('content.isCheckInProgress', true);
+  App.ajax.send({
+name: 'wizard.advanced_repositories.valid_url',
+sender: this,
 data: {
-  'Repositories': {
-'base_url': repo.get('baseUrl'),
-"verify_base_url": verifyBaseUrl
+  stackName: stackName,
+  stackVersion: stackVersion,
+  repoId: repo.get('repoId'),
+  osType: os.get('osType'),
+  osId: os.get('id'),
+  dfd: dfd,
+  data: {
+'Repositories': {
+  'base_url': repo.get('baseUrl'),
+  "verify_base_url": verifyBaseUrl
+}
   }
-}
-  },
-  success: 'checkRepoURLSuccessCallback',
-  error: 

ambari git commit: AMBARI-22496. Admin View - Manage Versions page should show HDP-GPL repo if necessary (vsubramanian)

2017-11-22 Thread vivekratnavel
Repository: ambari
Updated Branches:
  refs/heads/trunk 1d4cbc8ac -> 9fc7223df


AMBARI-22496. Admin View - Manage Versions page should show HDP-GPL repo if 
necessary (vsubramanian)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/9fc7223d
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/9fc7223d
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/9fc7223d

Branch: refs/heads/trunk
Commit: 9fc7223df9a50fe69f4d8884939718b3f3bcf31b
Parents: 1d4cbc8
Author: Vivek Ratnavel Subramanian 
Authored: Wed Nov 22 17:01:15 2017 -0800
Committer: Vivek Ratnavel Subramanian 
Committed: Wed Nov 22 17:01:15 2017 -0800

--
 .../stackVersions/StackVersionsEditCtrl.js  | 27 ++-
 .../ui/admin-web/app/scripts/services/Stack.js  | 14 ++
 .../views/stackVersions/stackVersionPage.html   | 28 +++-
 3 files changed, 55 insertions(+), 14 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/9fc7223d/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsEditCtrl.js
--
diff --git 
a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsEditCtrl.js
 
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsEditCtrl.js
index 09e3c28..542772e 100644
--- 
a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsEditCtrl.js
+++ 
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsEditCtrl.js
@@ -33,6 +33,15 @@ angular.module('ambariAdminConsole')
 display_name: ''
   };
   $scope.defaulfOSRepos = {}; // a copy of initial loaded repo info for 
"changed" check later
+  $scope.isGPLAccepted = false;
+
+  $scope.isGPLRepo = function (repository) {
+return repository.Repositories.tags.indexOf('GPL') >= 0;
+  };
+
+  $scope.showRepo = function (repository) {
+return $scope.isGPLAccepted || !$scope.isGPLRepo(repository);
+  };
 
   $scope.loadStackVersionInfo = function () {
 return Stack.getRepo($routeParams.versionId, 
$routeParams.stackName).then(function (response) {
@@ -67,6 +76,9 @@ angular.module('ambariAdminConsole')
   // load supported os type base on stack version
   $scope.afterStackVersionRead();
 
+  // Load GPL license accepted value
+  $scope.fetchGPLLicenseAccepted();
+
   // if user reach here from UI click, repo status should be cached
   // otherwise re-fetch repo status from cluster end point.
   $scope.repoStatus = Cluster.repoStatusCache[$scope.id];
@@ -85,6 +97,15 @@ angular.module('ambariAdminConsole')
   };
 
   /**
+   * Load GPL License Accepted value
+   */
+  $scope.fetchGPLLicenseAccepted = function () {
+Stack.getGPLLicenseAccepted().then(function (data) {
+  $scope.isGPLAccepted = data === 'true';
+})
+  };
+
+  /**
* Load supported OS list
*/
   $scope.afterStackVersionRead = function () {
@@ -170,7 +191,11 @@ angular.module('ambariAdminConsole')
 
   $scope.updateRepoVersions = function () {
 var skip = $scope.skipValidation || $scope.useRedhatSatellite;
-return Stack.validateBaseUrls(skip, $scope.osList, 
$scope.upgradeStack).then(function (invalidUrls) {
+// Filter out repositories that are not shown in the UI
+var osList = Object.assign([], $scope.osList).map(function(os) {
+  return Object.assign({}, os, {repositories: 
os.repositories.filter(function(repo) { return $scope.showRepo(repo); })});
+});
+return Stack.validateBaseUrls(skip, osList, 
$scope.upgradeStack).then(function (invalidUrls) {
   if (invalidUrls.length === 0) {
 Stack.updateRepo($scope.upgradeStack.stack_name, 
$scope.upgradeStack.stack_version, $scope.id, $scope.updateObj).then(function 
() {
   Alert.success($t('versions.alerts.versionEdited', {

http://git-wip-us.apache.org/repos/asf/ambari/blob/9fc7223d/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/Stack.js
--
diff --git 
a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/Stack.js 
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/Stack.js
index 8003dd1..90f4f48 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/Stack.js
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/Stack.js
@@ -87,6 +87,20 @@ angular.module('ambariAdminConsole')
   return deferred.promise;
 },
 
+getGPLLicenseAccepted: function() {
+  var deferred = $q.defer();
+
+  $http.get(Settings.baseUrl + 

ambari git commit: AMBARI-22496. Admin View - Manage Versions page should show HDP-GPL repo if necessary (vsubramanian)

2017-11-22 Thread vivekratnavel
Repository: ambari
Updated Branches:
  refs/heads/branch-feature-AMBARI-22457 ba957a869 -> 059fadf46


AMBARI-22496. Admin View - Manage Versions page should show HDP-GPL repo if 
necessary (vsubramanian)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/059fadf4
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/059fadf4
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/059fadf4

Branch: refs/heads/branch-feature-AMBARI-22457
Commit: 059fadf460f2fc59ecb60403141c8b36a4c89668
Parents: ba957a8
Author: Vivek Ratnavel Subramanian 
Authored: Wed Nov 22 16:59:13 2017 -0800
Committer: Vivek Ratnavel Subramanian 
Committed: Wed Nov 22 16:59:13 2017 -0800

--
 .../stackVersions/StackVersionsEditCtrl.js  | 27 ++-
 .../ui/admin-web/app/scripts/services/Stack.js  | 14 ++
 .../views/stackVersions/stackVersionPage.html   | 28 +++-
 3 files changed, 55 insertions(+), 14 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/059fadf4/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsEditCtrl.js
--
diff --git 
a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsEditCtrl.js
 
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsEditCtrl.js
index 09e3c28..b7fa741 100644
--- 
a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsEditCtrl.js
+++ 
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsEditCtrl.js
@@ -33,6 +33,15 @@ angular.module('ambariAdminConsole')
 display_name: ''
   };
   $scope.defaulfOSRepos = {}; // a copy of initial loaded repo info for 
"changed" check later
+  $scope.isGPLAccepted = false;
+  
+  $scope.isGPLRepo = function (repository) {
+return repository.Repositories.tags.indexOf('GPL') >= 0;
+  };
+
+  $scope.showRepo = function (repository) {
+return $scope.isGPLAccepted || !$scope.isGPLRepo(repository);
+  };
 
   $scope.loadStackVersionInfo = function () {
 return Stack.getRepo($routeParams.versionId, 
$routeParams.stackName).then(function (response) {
@@ -67,6 +76,9 @@ angular.module('ambariAdminConsole')
   // load supported os type base on stack version
   $scope.afterStackVersionRead();
 
+  // Load GPL license accepted value
+  $scope.fetchGPLLicenseAccepted();
+
   // if user reach here from UI click, repo status should be cached
   // otherwise re-fetch repo status from cluster end point.
   $scope.repoStatus = Cluster.repoStatusCache[$scope.id];
@@ -85,6 +97,15 @@ angular.module('ambariAdminConsole')
   };
 
   /**
+   * Load GPL License Accepted value
+   */
+  $scope.fetchGPLLicenseAccepted = function () {
+Stack.getGPLLicenseAccepted().then(function (data) {
+  $scope.isGPLAccepted = data === 'true';
+})
+  };
+
+  /**
* Load supported OS list
*/
   $scope.afterStackVersionRead = function () {
@@ -170,7 +191,11 @@ angular.module('ambariAdminConsole')
 
   $scope.updateRepoVersions = function () {
 var skip = $scope.skipValidation || $scope.useRedhatSatellite;
-return Stack.validateBaseUrls(skip, $scope.osList, 
$scope.upgradeStack).then(function (invalidUrls) {
+// Filter out repositories that are not shown in the UI
+var osList = Object.assign([], $scope.osList).map(function(os) {
+  return Object.assign({}, os, {repositories: 
os.repositories.filter(function(repo) { return $scope.showRepo(repo); })});
+});
+return Stack.validateBaseUrls(skip, osList, 
$scope.upgradeStack).then(function (invalidUrls) {
   if (invalidUrls.length === 0) {
 Stack.updateRepo($scope.upgradeStack.stack_name, 
$scope.upgradeStack.stack_version, $scope.id, $scope.updateObj).then(function 
() {
   Alert.success($t('versions.alerts.versionEdited', {

http://git-wip-us.apache.org/repos/asf/ambari/blob/059fadf4/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/Stack.js
--
diff --git 
a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/Stack.js 
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/Stack.js
index d5f4401..46f4f42 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/Stack.js
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/Stack.js
@@ -87,6 +87,20 @@ angular.module('ambariAdminConsole')
   return deferred.promise;
 },
 
+getGPLLicenseAccepted: function() {
+  var deferred = $q.defer();
+
+  

ambari git commit: AMBARI-22445. Warn the user appropriately for default MySQL server install for Hive (vsubramanian)

2017-11-15 Thread vivekratnavel
Repository: ambari
Updated Branches:
  refs/heads/trunk c67a3246e -> 8fe6ac4bd


AMBARI-22445. Warn the user appropriately for default MySQL server install for 
Hive (vsubramanian)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/8fe6ac4b
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/8fe6ac4b
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/8fe6ac4b

Branch: refs/heads/trunk
Commit: 8fe6ac4bd03739202a35f8862270be7dcec95421
Parents: c67a324
Author: Vivek Ratnavel Subramanian 
Authored: Wed Nov 15 14:28:22 2017 -0800
Committer: Vivek Ratnavel Subramanian 
Committed: Wed Nov 15 14:28:22 2017 -0800

--
 ambari-web/app/views/common/controls_view.js   | 9 +++--
 ambari-web/test/views/common/controls_view_test.js | 2 +-
 2 files changed, 8 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/8fe6ac4b/ambari-web/app/views/common/controls_view.js
--
diff --git a/ambari-web/app/views/common/controls_view.js 
b/ambari-web/app/views/common/controls_view.js
index 530b60a..63d08ce 100644
--- a/ambari-web/app/views/common/controls_view.js
+++ b/ambari-web/app/views/common/controls_view.js
@@ -543,8 +543,8 @@ App.ServiceConfigRadioButtons = 
Ember.View.extend(App.ServiceConfigCalculateId,
 if ((App.get('isHadoopWindowsStack') && this.get('inMSSQLWithIA')) || 
this.get('serviceConfig.name') === 'DB_FLAVOR') {
   this.onOptionsChange();
 }
-this.handleDBConnectionProperty();
   }
+  this.handleDBConnectionProperty();
 }
   },
 
@@ -748,6 +748,11 @@ App.ServiceConfigRadioButtons = 
Ember.View.extend(App.ServiceConfigCalculateId,
   // check for all db types when installing Ranger - not only for existing 
ones
   checkDatabase = true;
 }
+// Hive specific
+if (this.get('serviceConfig.serviceName') === 'HIVE') {
+  // check for all db types when installing Hive - not only for existing 
ones
+  checkDatabase = true;
+}
 if (propertyAppendTo1) {
   propertyAppendTo1.set('additionalView', null);
 }
@@ -757,7 +762,7 @@ App.ServiceConfigRadioButtons = 
Ember.View.extend(App.ServiceConfigCalculateId,
 var shouldAdditionalViewsBeSet = currentDB && checkDatabase && 
handledProperties.contains(this.get('serviceConfig.name')),
   driver = this.getDefaultPropertyValue('sql_jar_connector') ? 
this.getDefaultPropertyValue('sql_jar_connector').split("/").pop() : 
'driver.jar',
   dbType = this.getDefaultPropertyValue('db_type'),
-  additionalView1 = shouldAdditionalViewsBeSet ? 
App.CheckDBConnectionView.extend({databaseName: dbType}) : null,
+  additionalView1 = shouldAdditionalViewsBeSet && !this.get('isNewDb') ? 
App.CheckDBConnectionView.extend({databaseName: dbType}) : null,
   additionalView2 = shouldAdditionalViewsBeSet ? Ember.View.extend({
 template: Ember.Handlebars.compile('{{{view.message}}}'),
 message: function() {

http://git-wip-us.apache.org/repos/asf/ambari/blob/8fe6ac4b/ambari-web/test/views/common/controls_view_test.js
--
diff --git a/ambari-web/test/views/common/controls_view_test.js 
b/ambari-web/test/views/common/controls_view_test.js
index 17dd6e1..76742fa 100644
--- a/ambari-web/test/views/common/controls_view_test.js
+++ b/ambari-web/test/views/common/controls_view_test.js
@@ -59,7 +59,7 @@ describe('App.ServiceConfigRadioButtons', function () {
   propertyAppendTo1: 'javax.jdo.option.ConnectionURL',
   propertyAppendTo2: 'hive_database',
   isAdditionalView1Null: true,
-  isAdditionalView2Null: true,
+  isAdditionalView2Null: false,
   title: 'Hive, embedded database'
 },
 {



ambari git commit: AMBARI-22445. Warn the user appropriately for default MySQL server install for Hive (vsubramanian)

2017-11-15 Thread vivekratnavel
Repository: ambari
Updated Branches:
  refs/heads/branch-2.6 6e247b3f5 -> 822fe2d5a


AMBARI-22445. Warn the user appropriately for default MySQL server install for 
Hive (vsubramanian)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/822fe2d5
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/822fe2d5
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/822fe2d5

Branch: refs/heads/branch-2.6
Commit: 822fe2d5aa02c6d7f1fafdf74b5c0e23cf657bbc
Parents: 6e247b3
Author: Vivek Ratnavel Subramanian 
Authored: Wed Nov 15 14:11:28 2017 -0800
Committer: Vivek Ratnavel Subramanian 
Committed: Wed Nov 15 14:13:06 2017 -0800

--
 ambari-web/app/views/common/controls_view.js   | 8 +++-
 ambari-web/test/views/common/controls_view_test.js | 2 +-
 2 files changed, 8 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/822fe2d5/ambari-web/app/views/common/controls_view.js
--
diff --git a/ambari-web/app/views/common/controls_view.js 
b/ambari-web/app/views/common/controls_view.js
index f03e5c0..74c1e6e 100644
--- a/ambari-web/app/views/common/controls_view.js
+++ b/ambari-web/app/views/common/controls_view.js
@@ -519,6 +519,7 @@ App.ServiceConfigRadioButtons = 
Ember.View.extend(App.ServiceConfigCalculateId,
 if (['addServiceController', 
'installerController'].contains(this.get('controller.wizardController.name')) 
&& 
!App.StackService.find(this.get('serviceConfig.serviceName')).get('isInstalled'))
 {
   if (this.get('isNewDb') || 
this.get('dontUseHandleDbConnection').contains(this.get('serviceConfig.name'))) 
{
 this.onOptionsChange();
+this.handleDBConnectionProperty();
   } else {
 if ((App.get('isHadoopWindowsStack') && this.get('inMSSQLWithIA')) || 
this.get('serviceConfig.name') === 'DB_FLAVOR') {
   this.onOptionsChange();
@@ -728,6 +729,11 @@ App.ServiceConfigRadioButtons = 
Ember.View.extend(App.ServiceConfigCalculateId,
   // check for all db types when installing Ranger - not only for existing 
ones
   checkDatabase = true;
 }
+// Hive specific
+if (this.get('serviceConfig.serviceName') === 'HIVE') {
+  // check for all db types when installing Hive - not only for existing 
ones
+  checkDatabase = true;
+}
 if (propertyAppendTo1) {
   propertyAppendTo1.set('additionalView', null);
 }
@@ -737,7 +743,7 @@ App.ServiceConfigRadioButtons = 
Ember.View.extend(App.ServiceConfigCalculateId,
 var shouldAdditionalViewsBeSet = currentDB && checkDatabase && 
handledProperties.contains(this.get('serviceConfig.name')),
   driver = this.getDefaultPropertyValue('sql_jar_connector') ? 
this.getDefaultPropertyValue('sql_jar_connector').split("/").pop() : 
'driver.jar',
   dbType = this.getDefaultPropertyValue('db_type'),
-  additionalView1 = shouldAdditionalViewsBeSet ? 
App.CheckDBConnectionView.extend({databaseName: dbType}) : null,
+  additionalView1 = shouldAdditionalViewsBeSet && !this.get('isNewDb') ? 
App.CheckDBConnectionView.extend({databaseName: dbType}) : null,
   additionalView2 = shouldAdditionalViewsBeSet ? Ember.View.extend({
 template: Ember.Handlebars.compile('{{{view.message}}}'),
 message: function() {

http://git-wip-us.apache.org/repos/asf/ambari/blob/822fe2d5/ambari-web/test/views/common/controls_view_test.js
--
diff --git a/ambari-web/test/views/common/controls_view_test.js 
b/ambari-web/test/views/common/controls_view_test.js
index c5c5338..2d18396 100644
--- a/ambari-web/test/views/common/controls_view_test.js
+++ b/ambari-web/test/views/common/controls_view_test.js
@@ -59,7 +59,7 @@ describe('App.ServiceConfigRadioButtons', function () {
   propertyAppendTo1: 'javax.jdo.option.ConnectionURL',
   propertyAppendTo2: 'hive_database',
   isAdditionalView1Null: true,
-  isAdditionalView2Null: true,
+  isAdditionalView2Null: false,
   title: 'Hive, embedded database'
 },
 {



ambari git commit: AMBARI-21290. Grafana Yarn Queue dashboard is not working (JaySenSharma via vsubramanian)

2017-06-22 Thread vivekratnavel
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 f6bd2b907 -> 4cbd9d7d0


AMBARI-21290. Grafana Yarn Queue dashboard is not working (JaySenSharma via 
vsubramanian)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/4cbd9d7d
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/4cbd9d7d
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/4cbd9d7d

Branch: refs/heads/branch-2.5
Commit: 4cbd9d7d012458cd742a189e76b89fca58781a8d
Parents: f6bd2b9
Author: Vivek Ratnavel Subramanian 
Authored: Thu Jun 22 13:00:14 2017 -0700
Committer: Vivek Ratnavel Subramanian 
Committed: Thu Jun 22 13:00:14 2017 -0700

--
 .../ambari-metrics-grafana/ambari-metrics/datasource.js | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/4cbd9d7d/ambari-metrics/ambari-metrics-grafana/ambari-metrics/datasource.js
--
diff --git a/ambari-metrics/ambari-metrics-grafana/ambari-metrics/datasource.js 
b/ambari-metrics/ambari-metrics-grafana/ambari-metrics/datasource.js
index 72e64e2..b4a339e 100644
--- a/ambari-metrics/ambari-metrics-grafana/ambari-metrics/datasource.js
+++ b/ambari-metrics/ambari-metrics-grafana/ambari-metrics/datasource.js
@@ -275,13 +275,14 @@ define([
 );
   };
   var getYarnAppIdData = function(target) {
-var precision = target.precision === 'default' || typeof 
target.precision == 'undefined'  ? '' : '=' 
+var precision = target.precision === 'default' || typeof 
target.precision == 'undefined'  ? '' : '='
 + target.precision;
+var instanceId = typeof target.templatedCluster == 'undefined'  ? 
'' : '=' + target.templatedCluster;
 var metricAggregator = target.aggregator === "none" ? '' : '._' + 
target.aggregator;
 var metricTransform = !target.transform || target.transform === 
"none" ? '' : '._' + target.transform;
 var seriesAggregator = !target.seriesAggregator || 
target.seriesAggregator === "none" ? '' : '=' + 
target.seriesAggregator;
 return self.doAmbariRequest({ url: 
'/ws/v1/timeline/metrics?metricNames=' + target.queue + metricTransform
-  + metricAggregator + '=resourcemanager=' + + 
'=' + target.templatedCluster + from +
+  + metricAggregator + '=resourcemanager' + instanceId + 
'=' + from +
   '=' + to + precision + seriesAggregator }).then(
   getMetricsData(target)
 );



ambari git commit: AMBARI-21290. Grafana Yarn Queue dashboard is not working (JaySenSharma via vsubramanian)

2017-06-22 Thread vivekratnavel
Repository: ambari
Updated Branches:
  refs/heads/trunk 6305fb6ab -> 845eb86c2


AMBARI-21290. Grafana Yarn Queue dashboard is not working (JaySenSharma via 
vsubramanian)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/845eb86c
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/845eb86c
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/845eb86c

Branch: refs/heads/trunk
Commit: 845eb86c24a5b4a7d4735d50715522bd8795eff4
Parents: 6305fb6
Author: Vivek Ratnavel Subramanian 
Authored: Thu Jun 22 12:57:27 2017 -0700
Committer: Vivek Ratnavel Subramanian 
Committed: Thu Jun 22 12:57:27 2017 -0700

--
 .../ambari-metrics-grafana/ambari-metrics/datasource.js | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/845eb86c/ambari-metrics/ambari-metrics-grafana/ambari-metrics/datasource.js
--
diff --git a/ambari-metrics/ambari-metrics-grafana/ambari-metrics/datasource.js 
b/ambari-metrics/ambari-metrics-grafana/ambari-metrics/datasource.js
index 72e64e2..b4a339e 100644
--- a/ambari-metrics/ambari-metrics-grafana/ambari-metrics/datasource.js
+++ b/ambari-metrics/ambari-metrics-grafana/ambari-metrics/datasource.js
@@ -275,13 +275,14 @@ define([
 );
   };
   var getYarnAppIdData = function(target) {
-var precision = target.precision === 'default' || typeof 
target.precision == 'undefined'  ? '' : '=' 
+var precision = target.precision === 'default' || typeof 
target.precision == 'undefined'  ? '' : '='
 + target.precision;
+var instanceId = typeof target.templatedCluster == 'undefined'  ? 
'' : '=' + target.templatedCluster;
 var metricAggregator = target.aggregator === "none" ? '' : '._' + 
target.aggregator;
 var metricTransform = !target.transform || target.transform === 
"none" ? '' : '._' + target.transform;
 var seriesAggregator = !target.seriesAggregator || 
target.seriesAggregator === "none" ? '' : '=' + 
target.seriesAggregator;
 return self.doAmbariRequest({ url: 
'/ws/v1/timeline/metrics?metricNames=' + target.queue + metricTransform
-  + metricAggregator + '=resourcemanager=' + + 
'=' + target.templatedCluster + from +
+  + metricAggregator + '=resourcemanager' + instanceId + 
'=' + from +
   '=' + to + precision + seriesAggregator }).then(
   getMetricsData(target)
 );



ambari git commit: AMBARI-20548. Grafana dashboard changes for some new llap daemon metrics (vivekratnavel)

2017-04-05 Thread vivekratnavel
Repository: ambari
Updated Branches:
  refs/heads/trunk 7d0baec7d -> e61d11124


AMBARI-20548. Grafana dashboard changes for some new llap daemon metrics 
(vivekratnavel)


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

Branch: refs/heads/trunk
Commit: e61d111245fd7631a4fd0a2d572d88b3f86a4b5f
Parents: 7d0baec
Author: Vivek Ratnavel Subramanian <vivekratnave...@gmail.com>
Authored: Wed Apr 5 15:43:26 2017 -0700
Committer: Vivek Ratnavel Subramanian <vivekratnave...@gmail.com>
Committed: Wed Apr 5 15:43:26 2017 -0700

--
 .../HDP/grafana-llapdaemon-daemons.json | 313 ++-
 1 file changed, 231 insertions(+), 82 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/e61d1112/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/files/grafana-dashboards/HDP/grafana-llapdaemon-daemons.json
--
diff --git 
a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/files/grafana-dashboards/HDP/grafana-llapdaemon-daemons.json
 
b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/files/grafana-dashboards/HDP/grafana-llapdaemon-daemons.json
index 2f69868..849f296 100644
--- 
a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/files/grafana-dashboards/HDP/grafana-llapdaemon-daemons.json
+++ 
b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/files/grafana-dashboards/HDP/grafana-llapdaemon-daemons.json
@@ -1189,7 +1189,7 @@
 "threshold2": null,
 "threshold2Color": "rgba(234, 112, 112, 0.22)"
   },
-  "id": 29,
+  "id": 14,
   "isNew": true,
   "legend": {
 "avg": false,
@@ -1214,21 +1214,21 @@
   "steppedLine": false,
   "targets": [
 {
-  "aggregator": "max",
-  "alias": "95th Percentile",
+  "aggregator": "sum",
+  "alias": "MemHeapUsed",
   "app": "llapdaemon",
   "downsampleAggregator": "avg",
   "errors": {},
-  "metric": 
"io.IOMetrics.PercentileDecodingTime_30s95thPercentileLatency",
+  "metric": "jvm.JvmMetrics.MemHeapUsedM",
   "precision": "default",
-  "refId": "B",
+  "refId": "C",
   "templatedHost": "",
   "transform": "none"
 }
   ],
   "timeFrom": null,
   "timeShift": null,
-  "title": "95th Percentile Column Decoding Time (30s interval)",
+  "title": "Total JVM Heap Used",
   "tooltip": {
 "shared": false,
 "value_type": "cumulative"
@@ -1238,7 +1238,7 @@
   "x-axis": true,
   "y-axis": true,
   "y_formats": [
-"ms",
+"mbytes",
 "short"
   ]
 },
@@ -1261,7 +1261,7 @@
 "threshold2": null,
 "threshold2Color": "rgba(234, 112, 112, 0.22)"
   },
-  "id": 30,
+  "id": 15,
   "isNew": true,
   "legend": {
 "avg": false,
@@ -1286,21 +1286,21 @@
   "steppedLine": false,
   "targets": [
 {
-  "aggregator": "max",
-  "alias": "Max",
+  "aggregator": "sum",
+  "alias": "MemNonHeapUsed",
   "app": "llapdaemon",
   "downsampleAggregator": "avg",
   "errors": {},
-  "metric": "io.IOMetrics.MaxDecodingTime",
+  "metric": "jvm.JvmMetrics.MemNonHeapUsedM",
   "precision": "default",
-  "refId": "A",
+  "refId&qu

ambari git commit: AMBARI-20548. Grafana dashboard changes for some new llap daemon metrics (vivekratnavel)

2017-04-05 Thread vivekratnavel
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 09105035a -> 5d9d73248


AMBARI-20548. Grafana dashboard changes for some new llap daemon metrics 
(vivekratnavel)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/5d9d7324
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/5d9d7324
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/5d9d7324

Branch: refs/heads/branch-2.5
Commit: 5d9d73248fb6cf1906372fa0a2c74530c29b67d9
Parents: 0910503
Author: Vivek Ratnavel Subramanian <vivekratnave...@gmail.com>
Authored: Wed Apr 5 15:40:14 2017 -0700
Committer: Vivek Ratnavel Subramanian <vivekratnave...@gmail.com>
Committed: Wed Apr 5 15:40:14 2017 -0700

--
 .../HDP/grafana-llapdaemon-daemons.json | 313 ++-
 1 file changed, 231 insertions(+), 82 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/5d9d7324/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/files/grafana-dashboards/HDP/grafana-llapdaemon-daemons.json
--
diff --git 
a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/files/grafana-dashboards/HDP/grafana-llapdaemon-daemons.json
 
b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/files/grafana-dashboards/HDP/grafana-llapdaemon-daemons.json
index 2f69868..849f296 100644
--- 
a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/files/grafana-dashboards/HDP/grafana-llapdaemon-daemons.json
+++ 
b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/files/grafana-dashboards/HDP/grafana-llapdaemon-daemons.json
@@ -1189,7 +1189,7 @@
 "threshold2": null,
 "threshold2Color": "rgba(234, 112, 112, 0.22)"
   },
-  "id": 29,
+  "id": 14,
   "isNew": true,
   "legend": {
 "avg": false,
@@ -1214,21 +1214,21 @@
   "steppedLine": false,
   "targets": [
 {
-  "aggregator": "max",
-  "alias": "95th Percentile",
+  "aggregator": "sum",
+  "alias": "MemHeapUsed",
   "app": "llapdaemon",
   "downsampleAggregator": "avg",
   "errors": {},
-  "metric": 
"io.IOMetrics.PercentileDecodingTime_30s95thPercentileLatency",
+  "metric": "jvm.JvmMetrics.MemHeapUsedM",
   "precision": "default",
-  "refId": "B",
+  "refId": "C",
   "templatedHost": "",
   "transform": "none"
 }
   ],
   "timeFrom": null,
   "timeShift": null,
-  "title": "95th Percentile Column Decoding Time (30s interval)",
+  "title": "Total JVM Heap Used",
   "tooltip": {
 "shared": false,
 "value_type": "cumulative"
@@ -1238,7 +1238,7 @@
   "x-axis": true,
   "y-axis": true,
   "y_formats": [
-"ms",
+"mbytes",
 "short"
   ]
 },
@@ -1261,7 +1261,7 @@
 "threshold2": null,
 "threshold2Color": "rgba(234, 112, 112, 0.22)"
   },
-  "id": 30,
+  "id": 15,
   "isNew": true,
   "legend": {
 "avg": false,
@@ -1286,21 +1286,21 @@
   "steppedLine": false,
   "targets": [
 {
-  "aggregator": "max",
-  "alias": "Max",
+  "aggregator": "sum",
+  "alias": "MemNonHeapUsed",
   "app": "llapdaemon",
   "downsampleAggregator": "avg",
   "errors": {},
-  "metric": "io.IOMetrics.MaxDecodingTime",
+  "metric": "jvm.JvmMetrics.MemNonHeapUsedM",
   "precision": "default",
-  "refId": "A",
+  "refId&qu

ambari git commit: AMBARI-20429. Warn users about pending requests while trying to enable Interactive Query immediately after disabling it (vivekratnavel)

2017-04-05 Thread vivekratnavel
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 413db00ff -> 09105035a


AMBARI-20429. Warn users about pending requests while trying to enable 
Interactive Query immediately after disabling it (vivekratnavel)


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

Branch: refs/heads/branch-2.5
Commit: 09105035abd51ef0d820bcafa7ec38cebb079e2f
Parents: 413db00
Author: Vivek Ratnavel Subramanian <vivekratnave...@gmail.com>
Authored: Wed Apr 5 14:59:47 2017 -0700
Committer: Vivek Ratnavel Subramanian <vivekratnave...@gmail.com>
Committed: Wed Apr 5 14:59:47 2017 -0700

--
 .../wizard/step7/assign_master_controller.js| 75 ++--
 ambari-web/app/messages.js  |  2 +
 ambari-web/app/utils/ajax/ajax.js   |  4 ++
 .../configs/widgets/config_widget_view.js   |  3 +
 4 files changed, 78 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/09105035/ambari-web/app/controllers/wizard/step7/assign_master_controller.js
--
diff --git 
a/ambari-web/app/controllers/wizard/step7/assign_master_controller.js 
b/ambari-web/app/controllers/wizard/step7/assign_master_controller.js
index e2c5fa6..b1e3397 100644
--- a/ambari-web/app/controllers/wizard/step7/assign_master_controller.js
+++ b/ambari-web/app/controllers/wizard/step7/assign_master_controller.js
@@ -62,15 +62,13 @@ App.AssignMasterOnStep7Controller = 
Em.Controller.extend(App.BlueprintMixin, App
 this.set('configWidgetContext', context);
 this.set('content', context.get('controller.content'));
 this.set('configActionComponent', hostComponent);
-var missingDependentServices = this.getAllMissingDependentServices();
-var isNonWizardPage = !this.get('content.controllerName');
+
 switch (action) {
   case 'ADD':
-if (missingDependentServices.length && isNonWizardPage) {
-  this.showInstallServicesPopup(missingDependentServices);
+if (hostComponent.componentName == "HIVE_SERVER_INTERACTIVE") {
+  this.getPendingBatchRequests(hostComponent);  
 } else {
-  this.set('mastersToCreate', [hostComponent.componentName]);
-  this.showAssignComponentPopup();
+  this.showPopup(hostComponent);
 }
 break;
   case 'DELETE':
@@ -80,6 +78,71 @@ App.AssignMasterOnStep7Controller = 
Em.Controller.extend(App.BlueprintMixin, App
 }
   },
 
+  getPendingBatchRequests: function(hostComponent) {
+var self = this;
+// Send Ajax request to get status of pending batch requests
+App.ajax.send({
+  name : 'request_schedule.get.pending',
+  sender: self,
+  error : 'pendingBatchRequestsAjaxError',
+  success: 'pendingBatchRequestsAjaxSuccess',
+  data: {
+hostComponent: hostComponent
+  }
+});
+  },
+
+  pendingBatchRequestsAjaxError: function(data) {
+var error = 
Em.I18n.t('services.service.actions.run.yarnRefreshQueues.error');
+if(data && data.responseText){
+  try {
+var json = $.parseJSON(data.responseText);
+error += json.message;
+  } catch (err) {}
+}
+
App.showAlertPopup(Em.I18n.t('services.service.actions.run.yarnRefreshQueues.error'),
 error, null);
+  },
+
+  pendingBatchRequestsAjaxSuccess : function(data, opt, params) {
+var self = this;
+var showAlert = false;
+if (data.hasOwnProperty('items') && data.items.length > 0) {
+  data.items.forEach( function(_item) {
+_item.RequestSchedule.batch.batch_requests.forEach( 
function(batchRequest) {
+  // Check if a DELETE request on HIVE_SERVER_INTERACTIVE is in 
progress
+  if (batchRequest.request_type == "DELETE" && 
batchRequest.request_uri.indexOf("HIVE_SERVER_INTERACTIVE") > -1) {
+showAlert = true;
+  }
+});
+  });
+}
+if (showAlert) {
+  
App.showAlertPopup(Em.I18n.t('services.service.actions.hsi.alertPopup.header'), 
Em.I18n.t('services.service.actions.hsi.alertPopup.body'), function() {
+var configWidgetContext = self.get('configWidgetContext');
+var config = self.get('configWidgetContext.config');
+configWidgetContext.toggleProperty('controller.forceUpdateBoundaries');
+var value = config.get('initialValue');
+config.set('value', value);
+configWidgetContext.setValue(value);
+configWidgetContext.sendRequestRorDependentConfigs(config);
+this.hide();
+  });
+} else {
+  this.showPopup(param