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-16442 VDF UI edits and bugs: #2 (zhewang)
Date Wed, 11 May 2016 01:31:39 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 347dc63e0 -> 19aaa641c


AMBARI-16442 VDF UI edits and bugs: #2 (zhewang)


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

Branch: refs/heads/trunk
Commit: 19aaa641cf6053e5f73a93a5eb8f2f0694694493
Parents: 347dc63
Author: Zhe (Joe) Wang <zhewang@apache.org>
Authored: Tue May 10 21:31:02 2016 -0400
Committer: Zhe (Joe) Wang <zhewang@apache.org>
Committed: Tue May 10 21:31:02 2016 -0400

----------------------------------------------------------------------
 .../ui/admin-web/app/scripts/services/Stack.js  |  5 +++--
 .../resources/ui/admin-web/app/styles/main.css  |  4 ++++
 .../views/stackVersions/stackVersionPage.html   |  4 ++--
 ambari-web/app/controllers/installer.js         |  4 ++++
 .../app/mappers/repository_version_mapper.js    | 20 ++++++++++----------
 .../models/stack_version/repository_version.js  |  2 +-
 ambari-web/app/styles/application.less          |  3 ---
 ambari-web/app/styles/stack_versions.less       | 13 +++++++------
 .../upgrade_version_column_view.js              |  2 +-
 9 files changed, 32 insertions(+), 25 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/19aaa641/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 f406b1a..96f9c9f 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
@@ -224,10 +224,11 @@ angular.module('ambariAdminConsole')
         angular.forEach(data.repository_versions[0].RepositoryVersions.stack_services, function
(service) {
           services.push({
             name: service.name,
-            version: service.versions[0]
+            version: service.versions[0],
+            displayName: service.display_name
           });
         });
-        response.services = services;
+        response.services = services.sort(function(a, b){return a.name.localeCompare(b.name)});
         deferred.resolve(response);
       })
       .error(function (data) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/19aaa641/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 4c81507..c573b72 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
@@ -1630,4 +1630,8 @@ thead.view-permission-header > tr > th {
     border-bottom: 2px solid #ddd;
     padding-bottom: 10px;
     margin-top: 5px;
+}
+
+.glyphicon-question-sign {
+  color: #0572ff;
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/19aaa641/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 8fc0f89..f3f2d86 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
@@ -23,7 +23,7 @@
     <li class="active" ng-if="createController">{{'versions.register' | translate}}</li>
   </ol>
 
-  <div class="pull-right top-margin-4">
+  <div class="pull-right top-margin-4" ng-if="editController">
     <a href="#/stackVersions/create" class="btn btn-primary">
       <span class="glyphicon glyphicon-plus"></span>
         {{'versions.register' | translate}}
@@ -142,7 +142,7 @@
       <div class="col-sm-6 version-contents-section">
         <div class="alert alert-info hide-soft" ng-class="{'visible' : !services || !services.length}"
role="alert">{{'versions.contents.empty' | translate}}</div>
         <div class="clearfix" ng-repeat="service in services">
-          <div class="version-info col-sm-9">{{service.name}} ({{service.version}})</div>
+          <div class="version-info col-sm-9">{{service.displayName}} ({{service.version}})</div>
         </div>
       </div>
     </div>

http://git-wip-us.apache.org/repos/asf/ambari/blob/19aaa641/ambari-web/app/controllers/installer.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/installer.js b/ambari-web/app/controllers/installer.js
index 8981845..421f2dc 100644
--- a/ambari-web/app/controllers/installer.js
+++ b/ambari-web/app/controllers/installer.js
@@ -442,6 +442,10 @@ App.InstallerController = App.WizardController.extend({
     App.db.setStacks(stacks.slice());
     this.set('content.stacks', stacks);
 
+    App.OperatingSystem.find().filterProperty('isSelected', false).map(function (os) {
+      os.deleteRecord();
+      App.store.commit();
+    });
     var repos = App.Repository.find() || [];
     App.db.setRepos(repos.slice());
   },

http://git-wip-us.apache.org/repos/asf/ambari/blob/19aaa641/ambari-web/app/mappers/repository_version_mapper.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/mappers/repository_version_mapper.js b/ambari-web/app/mappers/repository_version_mapper.js
index 04b9d73..248d646 100644
--- a/ambari-web/app/mappers/repository_version_mapper.js
+++ b/ambari-web/app/mappers/repository_version_mapper.js
@@ -35,9 +35,9 @@ App.repoVersionMapper = App.QuickDataMapper.create({
       stack_version_type: repoVersionsKey + '.stack_name',
       stack_version_number: repoVersionsKey + '.stack_version',
       use_redhat_satellite: 'use_redhat_satellite',
-      services_key: 'services',
-      services_type: 'array',
-      services: {
+      stack_services_key: 'stack_services',
+      stack_services_type: 'array',
+      stack_services: {
         item: 'id'
       },
       operating_systems_key: 'operating_systems',
@@ -118,24 +118,24 @@ App.repoVersionMapper = App.QuickDataMapper.create({
               resultOS.push(this.parseIt(os, this.get('modelOS')));
             }, this);
           }
-          if (item[repoVersionsKey].services) {
-            item[repoVersionsKey].services.forEach(function (service) {
+          if (item[repoVersionsKey].stack_services) {
+            item[repoVersionsKey].stack_services.forEach(function (service) {
               var serviceObj = {
                 id: service.name,
                 name: service.name,
                 display_name: service.display_name,
-                latest_version: service.versions[0] ? service.versions[0].version : ''
+                latest_version: service.versions[0] ? service.versions[0] : ''
               };
               serviceArray.pushObject(serviceObj);
               resultService.push(this.parseIt(serviceObj, this.get('modelService')));
             }, this);
-          } else if (item[repoVersionsKey].stack_services) {
-            item[repoVersionsKey].stack_services.forEach(function (service) {
+          } else if (item[repoVersionsKey].services) {
+            item[repoVersionsKey].services.forEach(function (service) {
               var serviceObj = {
                 id: service.name,
                 name: service.name,
                 display_name: service.display_name,
-                latest_version: service.versions[0] ? service.versions[0]: ''
+                latest_version: service.versions[0] ? service.versions[0].version: ''
               };
               serviceArray.pushObject(serviceObj);
               resultService.push(this.parseIt(serviceObj, this.get('modelService')));
@@ -143,7 +143,7 @@ App.repoVersionMapper = App.QuickDataMapper.create({
           }
           repo.use_redhat_satellite = item.operating_systems[0].OperatingSystems.ambari_managed_repositories
=== false;
           repo.operating_systems = osArray;
-          repo.services = serviceArray;
+          repo.stack_services = serviceArray;
           resultRepoVersion.push(this.parseIt(repo, this.modelRepoVersion(isCurrentStackOnly)));
         }
       }, this);

http://git-wip-us.apache.org/repos/asf/ambari/blob/19aaa641/ambari-web/app/models/stack_version/repository_version.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/models/stack_version/repository_version.js b/ambari-web/app/models/stack_version/repository_version.js
index 4141c14..759470d 100644
--- a/ambari-web/app/models/stack_version/repository_version.js
+++ b/ambari-web/app/models/stack_version/repository_version.js
@@ -27,7 +27,7 @@ App.RepositoryVersion = DS.Model.extend({
   stackVersionNumber: DS.attr('string'),
   useRedhatSatellite: DS.attr('boolean'),
   operatingSystems: DS.hasMany('App.OS'),
-  services: DS.hasMany('App.ServiceSimple'),
+  stackServices: DS.hasMany('App.ServiceSimple'),
   stackVersion: DS.belongsTo('App.StackVersion'),
   stack: Em.computed.concat(' ', 'stackVersionType', 'stackVersionNumber'),
   displayNameSimple: function() {

http://git-wip-us.apache.org/repos/asf/ambari/blob/19aaa641/ambari-web/app/styles/application.less
----------------------------------------------------------------------
diff --git a/ambari-web/app/styles/application.less b/ambari-web/app/styles/application.less
index 31bc1f9..0abfc7d 100644
--- a/ambari-web/app/styles/application.less
+++ b/ambari-web/app/styles/application.less
@@ -6350,9 +6350,6 @@ input[type="radio"].align-checkbox, input[type="checkbox"].align-checkbox
{
       margin-top: 13px;
     }
     #use-redhat, #skip-validation {
-      .icon-question-sign {
-        color: #0572ff;
-      }
       input{
         margin: 0px 10px;
       }

http://git-wip-us.apache.org/repos/asf/ambari/blob/19aaa641/ambari-web/app/styles/stack_versions.less
----------------------------------------------------------------------
diff --git a/ambari-web/app/styles/stack_versions.less b/ambari-web/app/styles/stack_versions.less
index 052ae4d..c785913 100644
--- a/ambari-web/app/styles/stack_versions.less
+++ b/ambari-web/app/styles/stack_versions.less
@@ -121,9 +121,6 @@
         margin-right: 8px;
         margin-top: 0;
       }
-      .icon-question-sign {
-        color: @blue;
-      }
     }
   }
 }
@@ -672,9 +669,13 @@
       margin-right: 8px;
       margin-top: 0;
     }
-    .icon-question-sign {
-      color: @blue;
-    }
+  }
+}
+
+#skip-validation,
+#use-redhat {
+  .icon-question-sign {
+    color: @blue;
   }
 }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/19aaa641/ambari-web/app/views/main/admin/stack_upgrade/upgrade_version_column_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/admin/stack_upgrade/upgrade_version_column_view.js
b/ambari-web/app/views/main/admin/stack_upgrade/upgrade_version_column_view.js
index facba5e..6290a5e 100644
--- a/ambari-web/app/views/main/admin/stack_upgrade/upgrade_version_column_view.js
+++ b/ambari-web/app/views/main/admin/stack_upgrade/upgrade_version_column_view.js
@@ -42,7 +42,7 @@ App.UpgradeVersionColumnView = App.UpgradeVersionBoxView.extend({
 
   services: function() {
     var repoRecord = App.RepositoryVersion.find(this.get('content.id'));
-    var originalServices = repoRecord.get('services');
+    var originalServices = repoRecord.get('stackServices');
     // sort the services in the order the same as service menu
     var sorted = App.Service.find().map(function (service) {
       var latestVersion = '';


Mime
View raw message