ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dbhowm...@apache.org
Subject ambari git commit: AMBARI-16252. Fixed usability issues. Added search by URL. Fixed View instance URL edit UX. (Ashwin Rajeev via dipayanb)
Date Wed, 04 May 2016 18:44:13 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 8b77766f4 -> ff83f4dd8


AMBARI-16252. Fixed usability issues. Added search by URL. Fixed View instance URL edit UX.
(Ashwin Rajeev via dipayanb)


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

Branch: refs/heads/trunk
Commit: ff83f4dd803c6da52fddc3a51650317cb8cd7ac5
Parents: 8b77766
Author: Dipayan Bhowmick <dipayan.bhowmick@gmail.com>
Authored: Thu May 5 00:13:46 2016 +0530
Committer: Dipayan Bhowmick <dipayan.bhowmick@gmail.com>
Committed: Thu May 5 00:13:46 2016 +0530

----------------------------------------------------------------------
 .../controllers/ambariViews/ViewUrlCtrl.js      |  4 ++-
 .../controllers/ambariViews/ViewsEditCtrl.js    | 11 +++++---
 .../controllers/ambariViews/ViewsListCtrl.js    |  7 +++--
 .../ui/admin-web/app/scripts/i18n.config.js     | 11 +++++---
 .../ui/admin-web/app/scripts/services/View.js   |  1 +
 .../resources/ui/admin-web/app/styles/main.css  |  9 ++++++-
 .../admin-web/app/views/ambariViews/edit.html   | 16 +++++++++--
 .../app/views/ambariViews/listUrls.html         | 28 +++++++++++---------
 .../ui/admin-web/app/views/leftNavbar.html      |  2 +-
 .../ui/admin-web/app/views/urls/create.html     |  9 ++++---
 .../ui/admin-web/app/views/urls/edit.html       | 14 ++++++----
 .../internal/ViewInstanceResourceProvider.java  |  3 +++
 12 files changed, 80 insertions(+), 35 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/ff83f4dd/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/ambariViews/ViewUrlCtrl.js
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/ambariViews/ViewUrlCtrl.js
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/ambariViews/ViewUrlCtrl.js
index ef9cfa4..4a663c4 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/ambariViews/ViewUrlCtrl.js
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/ambariViews/ViewUrlCtrl.js
@@ -79,7 +79,9 @@ angular.module('ambariAdminConsole')
   };
 
   $scope.chomp = function(viewNameVersion){
-    return viewNameVersion.substr(0,viewNameVersion.indexOf("{")).trim();
+    if(viewNameVersion) {
+      return viewNameVersion.substr(0, viewNameVersion.indexOf("{")).trim();
+    }
   };
 
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/ff83f4dd/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/ambariViews/ViewsEditCtrl.js
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/ambariViews/ViewsEditCtrl.js
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/ambariViews/ViewsEditCtrl.js
index 243a8e4..480f85d 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/ambariViews/ViewsEditCtrl.js
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/ambariViews/ViewsEditCtrl.js
@@ -39,7 +39,8 @@ angular.module('ambariAdminConsole')
             'visible': $scope.instance.ViewInstanceInfo.visible,
             'label': $scope.instance.ViewInstanceInfo.label,
             'description': $scope.instance.ViewInstanceInfo.description,
-            'shortUrl': $scope.instance.ViewInstanceInfo.short_url
+            'shortUrl': $scope.instance.ViewInstanceInfo.short_url,
+            'shortUrlName': $scope.instance.ViewInstanceInfo.short_url_name
           };
           switch (section) {
             case "details" :
@@ -57,6 +58,7 @@ angular.module('ambariAdminConsole')
         .catch(function(data) {
           Alert.error($t('views.alerts.cannotLoadInstanceInfo'), data.data.message);
         });
+
     }
 
     function initCtrlVariables(instance) {
@@ -269,7 +271,8 @@ angular.module('ambariAdminConsole')
         'visible': $scope.instance.ViewInstanceInfo.visible,
         'label': $scope.instance.ViewInstanceInfo.label,
         'description': $scope.instance.ViewInstanceInfo.description,
-        'shortUrl': $scope.instance.ViewInstanceInfo.short_url
+        'shortUrl': $scope.instance.ViewInstanceInfo.short_url,
+        'shortUrlName': $scope.instance.ViewInstanceInfo.short_url_name
       };
       $scope.editDetailsSettingsDisabled = true;
       $scope.settingsForm.$setPristine();
@@ -374,8 +377,8 @@ angular.module('ambariAdminConsole')
         $scope.savePermissions();
       }
     }, true);
-    
-    
+
+
 
     $scope.deleteInstance = function(instance) {
       ConfirmationModal.show(

http://git-wip-us.apache.org/repos/asf/ambari/blob/ff83f4dd/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/ambariViews/ViewsListCtrl.js
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/ambariViews/ViewsListCtrl.js
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/ambariViews/ViewsListCtrl.js
index 594ac87..e98801c 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/ambariViews/ViewsListCtrl.js
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/ambariViews/ViewsListCtrl.js
@@ -141,6 +141,7 @@ angular.module('ambariAdminConsole')
   $scope.currentPage = 1;
   $scope.totalUrls = 1;
   $scope.urlNameFilter = '';
+  $scope.urlSuffixfilter = '';
   $scope.maxVisiblePages=20;
   $scope.tableInfo = {
     total: 0,
@@ -182,7 +183,7 @@ angular.module('ambariAdminConsole')
         keys.push(key);
         output.push(item);
       }
-    })
+    });
     return output;
     };
 
@@ -190,6 +191,7 @@ angular.module('ambariAdminConsole')
 
   $scope.clearFilters = function () {
     $scope.urlNameFilter = '';
+    $scope.urlSuffixfilter = '';
     $scope.instanceTypeFilter = $scope.typeFilterOptions[0];
     $scope.resetPagination();
   };
@@ -198,7 +200,7 @@ angular.module('ambariAdminConsole')
 
   $scope.$watch(
       function (scope) {
-        return Boolean(scope.urlNameFilter || (scope.instanceTypeFilter && scope.instanceTypeFilter.value
!== '*'));
+        return Boolean(scope.urlNameFilter || scope.urlSuffixfilter || (scope.instanceTypeFilter
&& scope.instanceTypeFilter.value !== '*'));
       },
       function (newValue, oldValue, scope) {
         scope.isNotEmptyFilter = newValue;
@@ -213,6 +215,7 @@ angular.module('ambariAdminConsole')
       currentPage: $scope.currentPage,
       urlsPerPage: $scope.urlsPerPage,
       searchString: $scope.urlNameFilter,
+      suffixSearch: $scope.urlSuffixfilter,
       instanceType: $scope.instanceTypeFilter?$scope.instanceTypeFilter.value:'*'
     }).then(function(urls) {
       $scope.urls = urls;

http://git-wip-us.apache.org/repos/asf/ambari/blob/ff83f4dd/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 7706af4..80a5352 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
@@ -117,7 +117,8 @@ angular.module('ambariAdminConsole')
         'clearFilters': 'clear filters',
         'confirmChange': 'Confirm Change',
         'discard': 'Discard',
-        'remove': 'Remove'
+        'remove': 'Remove',
+        'update':'Update'
       },
 
       'alerts': {
@@ -136,7 +137,7 @@ angular.module('ambariAdminConsole')
         'cannotRenameCluster': 'Cannot rename cluster to {{clusterName}}',
         'tooShort': 'Too short',
         'tooLong': 'Too long',
-        'onlyText': 'Only lower cased text allowed',
+        'onlyText': 'Only lowercase alphanumeric characters are allowed.',
         'onlyAnScore': 'Invalid input, only alphanumerics allowed eg: My_default_view'
       }
     },
@@ -247,6 +248,8 @@ angular.module('ambariAdminConsole')
     'urls':{
       'name':'Name',
       'url':'URL',
+      'viewUrls':'View URLs',
+      'createNewUrl':'Create New URL',
       'create':'Create',
       'edit':'Edit',
       'view':'View',
@@ -254,8 +257,10 @@ angular.module('ambariAdminConsole')
       'step1':'Create URL',
       'step2':'Select instance',
       'step3':'Assign URL',
-      'noUrlsToDisplay':'No URLs to display',
+      'noUrlsToDisplay':'No URLs to display.',
       'noViewInstances':'No view instances',
+      'none':'None',
+      'change':'Change',
       'urlCreated':'Created short URL <a href="/#/main/view/{{viewName}}/{{shortUrl}}">{{urlName}}</a>',
       'urlUpdated':'Updated short URL <a href="/#/main/view/{{viewName}}/{{shortUrl}}">{{urlName}}</a>'
     },

http://git-wip-us.apache.org/repos/asf/ambari/blob/ff83f4dd/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/View.js
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/View.js b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/View.js
index d352508..780352d 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/View.js
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/View.js
@@ -69,6 +69,7 @@ angular.module('ambariAdminConsole')
       dataType: "json",
       url: Settings.baseUrl + '/view/urls?'
       + 'ViewUrlInfo/url_name.matches(.*'+params.searchString+'.*)'
+      + '&ViewUrlInfo/url_suffix.matches(.*'+params.suffixSearch+'.*)'
       + '&fields=*'
       + '&from=' + (params.currentPage-1)*params.urlsPerPage
       + '&page_size=' + params.urlsPerPage

http://git-wip-us.apache.org/repos/asf/ambari/blob/ff83f4dd/ambari-admin/src/main/resources/ui/admin-web/app/styles/main.css
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/styles/main.css b/ambari-admin/src/main/resources/ui/admin-web/app/styles/main.css
index 1bf9472..0f78d34 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/styles/main.css
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/styles/main.css
@@ -569,9 +569,16 @@ a.gotoinstance{
 }
 .views-list-table .search-container .close{
   top: 5px;
-  right: 50px;
+  right: 10px;
   z-index: 10;
 }
+
+.views-list-table .search-container .close-fix{
+  top: 5px;
+  right: 0px;
+  z-index: 10;
+}
+
 .views-list-pane .search-container .close{
   right: 50px;
   top: 5px;

http://git-wip-us.apache.org/repos/asf/ambari/blob/ff83f4dd/ambari-admin/src/main/resources/ui/admin-web/app/views/ambariViews/edit.html
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/views/ambariViews/edit.html
b/ambari-admin/src/main/resources/ui/admin-web/app/views/ambariViews/edit.html
index fb37571..4003137 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/views/ambariViews/edit.html
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/views/ambariViews/edit.html
@@ -80,9 +80,21 @@
 
         <div class="form-group">
           <label for="" class="control-label col-sm-3">{{'views.shortUrl' | translate}}</label>
+
           <div class="col-sm-9">
-            <p class="form-control-static"><a href="/#/main/view/{{instance.ViewInstanceInfo.view_name}}/{{settings.shortUrl}}"
ng-if="settings.shortUrl">{{settings.shortUrl}}</a></p>
-            <a ng-if="!settings.shortUrl" href="#/urls/link/{{instance.ViewInstanceInfo.view_name}}/{{instance.ViewInstanceInfo.version}}/{{instance.ViewInstanceInfo.instance_name}}"
class="btn btn-primary createuser-btn"><span class="glyphicon glyphicon-plus"></span>
{{'views.urlCreate' | translate}}</a>
+            <div ng-if="settings.shortUrl">
+            <p class="form-control-static"><a target="_blank" href="/#/main/view/{{instance.ViewInstanceInfo.view_name}}/{{settings.shortUrl}}"
ng-if="settings.shortUrl">/main/view/{{instance.ViewInstanceInfo.view_name}}/{{settings.shortUrl}}&nbsp;<i
class="fa fa-external-link" aria-hidden="true"></i></a>
+             &nbsp; <a ng-hide="editDetailsSettingsDisabled" href="#/urls/edit/{{settings.shortUrlName}}"
class="btn btn-xs btn-primary">{{'urls.change' | translate}}</a>
+            </p>
+          </div>
+            <div ng-if="!settings.shortUrl">
+              <p ng-hide="!editDetailsSettingsDisabled" class="form-control-static">
+                <span class="label label-block label-default">{{'urls.none' | translate}}</span>
+              </p>
+              <p class="form-control-static" ng-hide="editDetailsSettingsDisabled">
+                <a href="#/urls/link/{{instance.ViewInstanceInfo.view_name}}/{{instance.ViewInstanceInfo.version}}/{{instance.ViewInstanceInfo.instance_name}}"
class="btn btn-primary createuser-btn"><span class="glyphicon glyphicon-plus"></span>
{{'views.urlCreate' | translate}}</a>
+              </p>
+            </div>
           </div>
           </div>
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/ff83f4dd/ambari-admin/src/main/resources/ui/admin-web/app/views/ambariViews/listUrls.html
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/views/ambariViews/listUrls.html
b/ambari-admin/src/main/resources/ui/admin-web/app/views/ambariViews/listUrls.html
index 0613183..e0b8a4e 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/views/ambariViews/listUrls.html
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/views/ambariViews/listUrls.html
@@ -34,16 +34,16 @@
         <thead>
         <tr class="fix-bottom">
 
-            <th class="fix-bottom">
-               <span>{{'urls.name' | translate}}</span>
+            <th class="fix-bottom col-md-2">
+                <span>{{'urls.name' | translate}}</span>
             </th>
-            <th class="fix-bottom">
+            <th class="fix-bottom col-md-3">
                 <span>{{'urls.url' | translate}}</span>
             </th>
-            <th class="fix-bottom">
+            <th class="fix-bottom col-md-2">
                 <span >{{'urls.view' | translate}}</span>
             </th>
-            <th class="fix-bottom">
+            <th class="fix-bottom col-md-2">
                 <span>{{'urls.viewInstance' | translate}}</span>
             </th>
         </tr>
@@ -51,15 +51,17 @@
         <tr>
 
             <th class="fix-top">
-                <div class="input-group m-small-input">
+                <div class="search-container">
                     <input type="text" class="form-control namefilter" placeholder="{{'common.any'
| translate}}" ng-model="urlNameFilter" ng-change="resetPagination()">
-                    <span class="input-group-addon white-bg">
-                        <button type="button" ng-show="urlNameFilter" ng-click="urlNameFilter='';
resetPagination()">
-                            <span aria-hidden="true">&times;</span><span
class="sr-only">{{'common.controls.close' | translate}}</span>
-                        </button></span>
+                    <button type="button" class="close clearfilter" ng-show="urlNameFilter"
ng-click="urlNameFilter=''; resetPagination()"><span class="pull-right" aria-hidden="true">&times;</span><span
class="sr-only">{{'common.controls.close' | translate}}</span></button>
+                    </div>
+            </th>
+            <th class="fix-top">
+                <div class="search-container">
+                    <input type="text" class="form-control namefilter" placeholder="{{'common.any'
| translate}}" ng-model="urlSuffixfilter" ng-change="resetPagination()">
+                    <button type="button" class="close clearfilter" ng-show="urlSuffixfilter"
ng-click="urlSuffixfilter=''; resetPagination()"><span class="pull-right" aria-hidden="true">&times;</span><span
class="sr-only">{{'common.controls.close' | translate}}</span></button>
                 </div>
             </th>
-            <th class="fix-top"></th>
             <th class="fix-top">
                 <select class="form-control typefilter v-small-input"
                         ng-model="instanceTypeFilter"
@@ -79,7 +81,9 @@
                 <a href="#/urls/edit/{{url.ViewUrlInfo.url_name}}">{{url.ViewUrlInfo.url_name}}</a>
             </td>
             <td>
-                <a href="/#/main/view/{{url.ViewUrlInfo.view_instance_common_name}}/{{url.ViewUrlInfo.url_suffix}}">/main/view/{{url.ViewUrlInfo.view_instance_common_name}}/{{url.ViewUrlInfo.url_suffix}}</a>
+                <a target="_blank" href="/#/main/view/{{url.ViewUrlInfo.view_instance_common_name}}/{{url.ViewUrlInfo.url_suffix}}">/main/view/{{url.ViewUrlInfo.view_instance_common_name}}/{{url.ViewUrlInfo.url_suffix}}
+                    &nbsp;<i class="fa fa-external-link" aria-hidden="true"></i></a>
+
             </td>
             <td>
                 <span>{{url.ViewUrlInfo.view_instance_common_name}} {{"{"+url.ViewUrlInfo.view_instance_version+"}"}}
</span>

http://git-wip-us.apache.org/repos/asf/ambari/blob/ff83f4dd/ambari-admin/src/main/resources/ui/admin-web/app/views/leftNavbar.html
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/views/leftNavbar.html b/ambari-admin/src/main/resources/ui/admin-web/app/views/leftNavbar.html
index b155041..f93867c 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/views/leftNavbar.html
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/views/leftNavbar.html
@@ -91,7 +91,7 @@
     <div class="panel-body">
       <ul class="nav nav-pills nav-stacked">
         <li ng-class="{active: isActive('views.list')}"><link-to route="views.list"
class="viewslist-link">{{'common.views' | translate}}</link-to></li>
-        <li ng-class="{active: isActive('views.listViewUrls')}"><link-to route="views.listViewUrls"
class="viewsUrlList-link">{{'common.viewUrls' | translate}}</link-to></li>
+        <li ng-class="{active: isActive('views.listViewUrls') || isActive('views.createViewUrl')
|| isActive('views.editViewUrl') }"><link-to route="views.listViewUrls" class="viewslistviewurls-link">{{'common.viewUrls'
| translate}}</link-to></li>
       </ul>
     </div>
   </div>

http://git-wip-us.apache.org/repos/asf/ambari/blob/ff83f4dd/ambari-admin/src/main/resources/ui/admin-web/app/views/urls/create.html
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/views/urls/create.html b/ambari-admin/src/main/resources/ui/admin-web/app/views/urls/create.html
index 3397299..c98ec3e 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/views/urls/create.html
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/views/urls/create.html
@@ -16,8 +16,8 @@
 * limitations under the License.
 -->
 <ol class="breadcrumb">
-    <li><a href="#/users">{{'urls.url' | translate}}</a></li>
-    <li class="active">{{'urls.create' | translate}}</li>
+    <li> <link-to route="views.listViewUrls">{{'urls.viewUrls' | translate}}</link-to></li>
+    <li class="active">{{'urls.createNewUrl' | translate}}</li>
 </ol>
 <hr>
     <div class="row">
@@ -55,7 +55,7 @@
                     <label for="urlsuffixin" class="col-sm-2 control-label">{{'views.shortUrl'
| translate}}</label>
                     <div class="col-sm-10">
                         <div class="input-group">
-                            <span id="basic-addon1" class="input-group-addon">/main/view/{{chomp(url.selectedView)}}/</span><input
aria-describedby="basic-addon1" type="text" class="form-control" id="urlsuffixin" name="url_view_suffix"
placeholder="{{'views.shortUrl' | translate}}" ng-model="url.suffix" ng-pattern="/[a-z]+/"
ng-minlength="3" ng-maxlength="10" required autocomplete="off">
+                            <span id="basic-addon1" class="input-group-addon">/main/view/{{chomp(url.selectedView)}}/</span><input
aria-describedby="basic-addon1" type="text" class="form-control" id="urlsuffixin" name="url_view_suffix"
placeholder="{{'views.shortUrl' | translate}}" ng-model="url.suffix" ng-pattern="/^[a-z0-9-_]+$/"
ng-minlength="3" ng-maxlength="25" required autocomplete="off">
                         </div>
                         <div class="alert alert-danger top-margin" ng-show="formHolder.form.url_view_suffix.$error.required
  && formHolder.form.submitted">{{'common.alerts.fieldIsRequired' | translate}}</div>
                         <div class="alert alert-danger top-margin" ng-show="formHolder.form.url_view_suffix.$error.minlength
  && formHolder.form.submitted">{{'common.alerts.tooShort' | translate}}</div>
@@ -68,7 +68,8 @@
                 <div class="form-group">
                     <div class="col-sm-offset-2 col-sm-10">
                         <button ng-disabled="stepTwoNotCompleted" class="btn btn-primary
pull-right left-margin saveuser" ng-click="saveUrl()">{{'common.controls.save' | translate}}</button>
-                        <a ng-disabled="stepOneNotCompleted" class="btn btn-default pull-right
cancel" href ng-click="cancelForm()">{{'common.controls.cancel' | translate}}</a>
+                        <link-to route="views.listViewUrls" class="btn btn-default pull-right
cancel">{{'common.controls.cancel' | translate}}</link-to>
+
                     </div>
                 </div>
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/ff83f4dd/ambari-admin/src/main/resources/ui/admin-web/app/views/urls/edit.html
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/views/urls/edit.html b/ambari-admin/src/main/resources/ui/admin-web/app/views/urls/edit.html
index de7722e..9e0ef4c 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/views/urls/edit.html
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/views/urls/edit.html
@@ -16,8 +16,8 @@
 * limitations under the License.
 -->
 <ol class="breadcrumb">
-  <li><a href="#/users">{{'urls.url' | translate}}</a></li>
-  <li class="active">{{'urls.edit' | translate}}</li>
+  <li> <link-to route="views.listViewUrls">{{'urls.viewUrls' | translate}}</link-to></li>
+  <li class="active">{{'urls.edit' | translate}} {{url.url_name}}</li>
   <div class="pull-right top-margin-4">
     <button class="btn deleteuser-btn btn-danger" ng-click="deleteUrl()">{{'views.urlDelete'
| translate}}</button>
   </div>
@@ -57,7 +57,7 @@
     <label for="urlsuffixin" class="col-sm-2 control-label">{{'views.shortUrl' | translate}}</label>
     <div class="col-sm-10">
       <div class="input-group">
-      <span id="basic-addon1" class="input-group-addon">/main/view/{{url.view_instance_common_name}}/</span><input
aria-describedby="basic-addon1" type="text" class="form-control" id="urlsuffixin" name="url_view_suffix"
placeholder="{{'views.shortUrl' | translate}}" ng-model="url.url_suffix" ng-pattern="/[a-z]+/"
ng-minlength="3" ng-maxlength="10" required autocomplete="off">
+      <span id="basic-addon1" class="input-group-addon">/main/view/{{url.view_instance_common_name}}/</span><input
aria-describedby="basic-addon1" type="text" class="form-control" id="urlsuffixin" name="url_view_suffix"
placeholder="{{'views.shortUrl' | translate}}" ng-model="url.url_suffix" ng-pattern="/^[a-z0-9-_]+$/"
ng-minlength="3" ng-maxlength="25" required autocomplete="off">
         </div>
       <div class="alert alert-danger top-margin" ng-show="url_form.url_view_suffix.$error.required
  && url_form.submitted">{{'common.alerts.fieldIsRequired' | translate}}</div>
       <div class="alert alert-danger top-margin" ng-show="url_form.url_view_suffix.$error.minlength
  && url_form.submitted">{{'common.alerts.tooShort' | translate}}</div>
@@ -66,8 +66,12 @@
 
     </div>
   </div>
-  <div class="pull-right">
-    <button ng-disabled="wizard.currentStep != wizard.steps.length" class="btn btn-success"
name="update_url_button" type="button" ng-click="updateUrl()"> <i class="fa fa-edit"></i>
Update</button>
+
+  <div class="form-group">
+    <div class="col-sm-offset-2 col-sm-10">
+      <button ng-disabled="stepTwoNotCompleted" class="btn btn-primary pull-right left-margin
saveuser" ng-click="updateUrl()">{{'common.controls.save' | translate}}</button>
+      <link-to route="views.listViewUrls" class="btn btn-default pull-right cancel">{{'common.controls.cancel'
| translate}}</link-to>
+    </div>
   </div>
 
 </form>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/ff83f4dd/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewInstanceResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewInstanceResourceProvider.java
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewInstanceResourceProvider.java
index 2a9eee7..605f68d 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewInstanceResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewInstanceResourceProvider.java
@@ -73,6 +73,7 @@ public class ViewInstanceResourceProvider extends AbstractAuthorizedResourceProv
   public static final String STATIC_PROPERTY_ID         = "ViewInstanceInfo/static";
   public static final String CLUSTER_HANDLE_PROPERTY_ID = "ViewInstanceInfo/cluster_handle";
   public static final String SHORT_URL_PROPERTY_ID      = "ViewInstanceInfo/short_url";
+  public static final String SHORT_URL_NAME_PROPERTY_ID = "ViewInstanceInfo/short_url_name";
 
   // validation properties
   public static final String VALIDATION_RESULT_PROPERTY_ID           = "ViewInstanceInfo/validation_result";
@@ -113,6 +114,7 @@ public class ViewInstanceResourceProvider extends AbstractAuthorizedResourceProv
     propertyIds.add(STATIC_PROPERTY_ID);
     propertyIds.add(CLUSTER_HANDLE_PROPERTY_ID);
     propertyIds.add(SHORT_URL_PROPERTY_ID);
+    propertyIds.add(SHORT_URL_NAME_PROPERTY_ID);
     propertyIds.add(VALIDATION_RESULT_PROPERTY_ID);
     propertyIds.add(PROPERTY_VALIDATION_RESULTS_PROPERTY_ID);
   }
@@ -246,6 +248,7 @@ public class ViewInstanceResourceProvider extends AbstractAuthorizedResourceProv
     ViewURLEntity viewUrl = viewInstanceEntity.getViewUrl();
     if(viewUrl != null) {
       setResourceProperty(resource, SHORT_URL_PROPERTY_ID, viewUrl.getUrlSuffix(), requestedIds);
+      setResourceProperty(resource, SHORT_URL_NAME_PROPERTY_ID, viewUrl.getUrlName(), requestedIds);
     }
 
     // only allow an admin to access the view properties


Mime
View raw message