ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jonathanhur...@apache.org
Subject [08/45] ambari git commit: AMBARI-20784 Able to hide the "Why public repo not selected" when no stacks have repoinfo.xml with the "latest" section (dili)
Date Mon, 24 Apr 2017 02:20:50 GMT
AMBARI-20784 Able to hide the "Why public repo not selected" when no stacks have repoinfo.xml
with the "latest" section (dili)


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

Branch: refs/heads/branch-feature-AMBARI-12556
Commit: f020edc85ad7cb71d47a7eaabc2bc7361dee5d1f
Parents: cebbff0
Author: Di Li <dili@apache.org>
Authored: Thu Apr 20 11:00:13 2017 -0400
Committer: Di Li <dili@apache.org>
Committed: Thu Apr 20 11:00:13 2017 -0400

----------------------------------------------------------------------
 ambari-web/app/controllers/wizard/step1_controller.js | 7 +++++++
 ambari-web/app/mappers/stack_mapper.js                | 1 +
 ambari-web/app/models/stack.js                        | 1 +
 ambari-web/app/templates/wizard/step1.hbs             | 6 ++++--
 ambari-web/app/utils/ajax/ajax.js                     | 2 +-
 5 files changed, 14 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/f020edc8/ambari-web/app/controllers/wizard/step1_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/wizard/step1_controller.js b/ambari-web/app/controllers/wizard/step1_controller.js
index 2ac295b..22456af 100644
--- a/ambari-web/app/controllers/wizard/step1_controller.js
+++ b/ambari-web/app/controllers/wizard/step1_controller.js
@@ -63,6 +63,13 @@ App.WizardStep1Controller = Em.Controller.extend({
    */
   networkIssuesExist: Em.computed.everyBy('content.stacks', 'stackDefault', true),
 
+  /**
+   * No stacks have repo update URL section (aka "latest") defined in repoinfo.xml
+   *
+   * @type {boolean}
+   */
+  stackRepoUpdateLinkExists: Em.computed.someBy('content.stacks', 'stackRepoUpdateLinkExists',
true),
+
   optionsToSelect: {
     'usePublicRepo': {
       index: 0,

http://git-wip-us.apache.org/repos/asf/ambari/blob/f020edc8/ambari-web/app/mappers/stack_mapper.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/mappers/stack_mapper.js b/ambari-web/app/mappers/stack_mapper.js
index 4b6a6f8..88ffc73 100644
--- a/ambari-web/app/mappers/stack_mapper.js
+++ b/ambari-web/app/mappers/stack_mapper.js
@@ -28,6 +28,7 @@ App.stackMapper = App.QuickDataMapper.create({
     stack_name: 'stack_name',
     stack_version: 'stack_version',
     stack_default: 'stack_default',
+    stack_repo_update_link_exists: 'stack_repo_update_link_exists',
     show_available: 'show_available',
     type: 'type',
     repository_version: 'repository_version',

http://git-wip-us.apache.org/repos/asf/ambari/blob/f020edc8/ambari-web/app/models/stack.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/models/stack.js b/ambari-web/app/models/stack.js
index dbc2d72..47d1c44 100644
--- a/ambari-web/app/models/stack.js
+++ b/ambari-web/app/models/stack.js
@@ -23,6 +23,7 @@ App.Stack = DS.Model.extend({
   stackName: DS.attr('string'),
   stackVersion: DS.attr('string'),
   stackDefault: DS.attr('boolean'),
+  stackRepoUpdateLinkExists: DS.attr('boolean'),
   minJdkVersion: DS.attr('string'),
   maxJdkVersion: DS.attr('string'),
   repositoryVersion: DS.attr('string'),

http://git-wip-us.apache.org/repos/asf/ambari/blob/f020edc8/ambari-web/app/templates/wizard/step1.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/wizard/step1.hbs b/ambari-web/app/templates/wizard/step1.hbs
index 769aca3..5faf056 100644
--- a/ambari-web/app/templates/wizard/step1.hbs
+++ b/ambari-web/app/templates/wizard/step1.hbs
@@ -81,8 +81,10 @@
               {{! Public Repository radio }}
               <div {{bindAttr class=":col-sm-4 :radio :big-radio :public-radio :wizard-plain-text"}}>
                 {{view view.usePublicRepoRadioButton classNames="display-inline-block" labelIdentifier="use-public-repo"}}
-                {{#if networkIssuesExist}}
-                  <a id="public-disabled-link" class="display-inline-block" {{action "openPublicOptionDisabledWindow"
target="view"}}>{{t installer.step1.selectUseRepoOptions.public.networkLost}}</a>
+                {{#if stackRepoUpdateLinkExists}}
+                  {{#if networkIssuesExist}}
+                    <a id="public-disabled-link" class="display-inline-block" {{action
"openPublicOptionDisabledWindow" target="view"}}>{{t installer.step1.selectUseRepoOptions.public.networkLost}}</a>
+                  {{/if}}
                 {{/if}}
               </div>
               {{!--Local repo radio--}}

http://git-wip-us.apache.org/repos/asf/ambari/blob/f020edc8/ambari-web/app/utils/ajax/ajax.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/ajax/ajax.js b/ambari-web/app/utils/ajax/ajax.js
index 2d157fe..2b5e52a 100644
--- a/ambari-web/app/utils/ajax/ajax.js
+++ b/ambari-web/app/utils/ajax/ajax.js
@@ -2240,7 +2240,7 @@ var urls = {
   },
 
   'wizard.stacks_versions_definitions': {
-    'real': '/version_definitions?fields=VersionDefinition/stack_default,VersionDefinition/max_jdk,VersionDefinition/min_jdk,operating_systems/repositories/Repositories/*,operating_systems/OperatingSystems/*,VersionDefinition/stack_services,VersionDefinition/repository_version'
+
+    'real': '/version_definitions?fields=VersionDefinition/stack_default,VersionDefinition/stack_repo_update_link_exists,VersionDefinition/max_jdk,VersionDefinition/min_jdk,operating_systems/repositories/Repositories/*,operating_systems/OperatingSystems/*,VersionDefinition/stack_services,VersionDefinition/repository_version'
+
       '&VersionDefinition/show_available=true&VersionDefinition/stack_name={stackName}',
     'mock': '/data/wizard/stack/{stackName}_version_definitions.json'
   },


Mime
View raw message