ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zhew...@apache.org
Subject ambari git commit: AMBARI-17387 Changing HDP repo URL does not leads to sending written URL to ambari-server while registering new HDP version (zhewang)
Date Fri, 24 Jun 2016 20:42:59 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 3ae844f0a -> 36d1f8659


AMBARI-17387 Changing HDP repo URL does not leads to sending written URL to ambari-server
while registering new HDP version (zhewang)


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

Branch: refs/heads/trunk
Commit: 36d1f8659c5c14d65c623c982aabbf63066afc1c
Parents: 3ae844f
Author: Zhe (Joe) Wang <zhewang@apache.org>
Authored: Fri Jun 24 13:42:34 2016 -0700
Committer: Zhe (Joe) Wang <zhewang@apache.org>
Committed: Fri Jun 24 13:42:34 2016 -0700

----------------------------------------------------------------------
 .../controllers/stackVersions/StackVersionsCreateCtrl.js    | 9 ++++++++-
 .../main/resources/ui/admin-web/app/scripts/i18n.config.js  | 8 +++++++-
 .../resources/ui/admin-web/app/scripts/services/Stack.js    | 2 +-
 .../ui/admin-web/app/views/stackVersions/list.html          | 2 +-
 .../admin-web/app/views/stackVersions/stackVersionPage.html | 2 +-
 5 files changed, 18 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/36d1f865/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 6cf6849..82c1c40 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
@@ -332,7 +332,14 @@ angular.module('ambariAdminConsole')
               }));
               $location.path('/stackVersions');
             }).catch(function (data) {
-              Alert.error($t('versions.alerts.versionUpdateError'), data.message);
+              Stack.deleteRepo(versionInfo.stack_name, versionInfo.stack_version, versionInfo.id);
+              ConfirmationModal.show(
+                $t('versions.register.error.header'),
+                $t('versions.register.error.body'),
+                null,
+                null,
+                true
+              )
             });
           }
         })

http://git-wip-us.apache.org/repos/asf/ambari/blob/36d1f865/ambari-admin/src/main/resources/ui/admin-web/app/scripts/i18n.config.js
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/i18n.config.js b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/i18n.config.js
index f896c02..348ae3d 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/i18n.config.js
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/i18n.config.js
@@ -398,7 +398,13 @@ angular.module('ambariAdminConsole')
       'readInfo': 'Read Version Info',
       'browse': 'Browse',
       'installOn': 'Install on...',
-      'register': 'Register Version',
+      'register': {
+        'title': 'Register Version',
+        'error': {
+          'header': 'Unable to Register',
+          'body': 'You are attempting to register a version with a Base URL that is already
in use with an existing registered version. You *must* review your Base URLs and confirm they
are unique for the version you are trying to register.'
+        }
+      },
       'deregister': 'Deregister Version',
       'deregisterConfirmation': 'Are you sure you want to deregister version <strong>{{versionName}}</strong>
?',
       'placeholder': 'Version Number (0.0)',

http://git-wip-us.apache.org/repos/asf/ambari/blob/36d1f865/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 1131041..84d7b33 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
@@ -278,7 +278,7 @@ angular.module('ambariAdminConsole')
 
     postVersionDefinitionFile: function (isXMLdata, data, isDryRun) {
       var deferred = $q.defer(),
-        url = Settings.baseUrl + '/version_definitions' + (isDryRun ? '?dry_run=true' : ''),
+        url = Settings.baseUrl + '/version_definitions?skip_url_check=true' + (isDryRun ?
'&dry_run=true' : ''),
         configs = isXMLdata? { headers: {'Content-Type': 'text/xml'}} : null;
 
       $http.post(url, data, configs)

http://git-wip-us.apache.org/repos/asf/ambari/blob/36d1f865/ambari-admin/src/main/resources/ui/admin-web/app/views/stackVersions/list.html
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/views/stackVersions/list.html
b/ambari-admin/src/main/resources/ui/admin-web/app/views/stackVersions/list.html
index ea577f6..5ac78ca 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/views/stackVersions/list.html
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/views/stackVersions/list.html
@@ -24,7 +24,7 @@
     <div class="pull-right top-margin-4">
       <a href="#/stackVersions/create" class="btn btn-primary">
         <span class="glyphicon glyphicon-plus"></span>
-        {{'versions.register' | translate}}
+        {{'versions.register.title' | translate}}
       </a>
     </div>
   </div>

http://git-wip-us.apache.org/repos/asf/ambari/blob/36d1f865/ambari-admin/src/main/resources/ui/admin-web/app/views/stackVersions/stackVersionPage.html
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/views/stackVersions/stackVersionPage.html
b/ambari-admin/src/main/resources/ui/admin-web/app/views/stackVersions/stackVersionPage.html
index 6268030..e4f32a3 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/views/stackVersions/stackVersionPage.html
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/views/stackVersions/stackVersionPage.html
@@ -21,7 +21,7 @@
     <li><a href="#/stackVersions">{{'common.versions' | translate}}</a></li>
     <li class="active" ng-if="editController">{{displayName}}&nbsp;<span
             class="sub-text">({{repoVersionFullName}})</span></li>
-    <li class="active" ng-if="createController">{{'versions.register' | translate}}</li>
+    <li class="active" ng-if="createController">{{'versions.register.title' | translate}}</li>
   </ol>
 
   <div class="pull-right deregister-button" ng-switch="deleteEnabled"  ng-if="editController">


Mime
View raw message