You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by jo...@apache.org on 2016/02/16 19:30:40 UTC
[35/50] [abbrv] ambari git commit: AMBARI-15047. Add UI option to
make Red Hat Satellite work (onechiporenko)
AMBARI-15047. Add UI option to make Red Hat Satellite work (onechiporenko)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/c86964b5
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/c86964b5
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/c86964b5
Branch: refs/heads/branch-dev-patch-upgrade
Commit: c86964b542c5ac64c0f05ecf12fa1b2677e4ece8
Parents: 0ff86b1
Author: Oleg Nechiporenko <on...@apache.org>
Authored: Mon Feb 15 14:08:48 2016 +0200
Committer: Oleg Nechiporenko <on...@apache.org>
Committed: Mon Feb 15 14:38:15 2016 +0200
----------------------------------------------------------------------
.../controllers/stackVersions/StackVersionsCreateCtrl.js | 1 +
.../controllers/stackVersions/StackVersionsEditCtrl.js | 1 +
.../main/resources/ui/admin-web/app/scripts/i18n.config.js | 3 +++
.../admin-web/app/views/stackVersions/stackVersionPage.html | 8 ++++++++
ambari-web/app/config.js | 3 ++-
ambari-web/app/controllers/wizard/step1_controller.js | 2 ++
ambari-web/app/messages.js | 2 ++
.../templates/main/admin/stack_upgrade/edit_repositories.hbs | 7 +++++++
ambari-web/app/templates/wizard/step1.hbs | 7 +++++++
.../main/admin/stack_upgrade/upgrade_version_box_view.js | 8 ++++++--
ambari-web/test/views/common/log_file_search_view_test.js | 2 +-
11 files changed, 40 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/c86964b5/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 532e5f4..002d393 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
@@ -23,6 +23,7 @@ angular.module('ambariAdminConsole')
$scope.createController = true;
$scope.osList = [];
$scope.skipValidation = false;
+ $scope.useRedhatSatellite = false;
$scope.selectedOS = 0;
$scope.repoSubversion = "";
http://git-wip-us.apache.org/repos/asf/ambari/blob/c86964b5/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 39a6700..3c38444 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
@@ -23,6 +23,7 @@ angular.module('ambariAdminConsole')
$scope.editController = true;
$scope.osList = [];
$scope.skipValidation = false;
+ $scope.useRedhatSatellite = false;
$scope.selectedOS = 0;
$scope.loadStackVersionInfo = function () {
http://git-wip-us.apache.org/repos/asf/ambari/blob/c86964b5/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 91a1645..327ae03 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
@@ -304,6 +304,8 @@ angular.module('ambariAdminConsole')
'os': 'OS',
'baseURL': 'Base URL',
'skipValidation': 'Skip Repository Base URL validation (Advanced)',
+ 'useRedhatSatellite': 'Use RedHat Satellite/Spacewalk',
+
'changeBaseURLConfirmation': {
'title': 'Confirm Base URL Change',
@@ -314,6 +316,7 @@ angular.module('ambariAdminConsole')
'baseURLs': 'Provide Base URLs for the Operating Systems you are configuring. Uncheck all other Operating Systems.',
'validationFailed': 'Some of the repositories failed validation. Make changes to the base url or skip validation if you are sure that urls are correct',
'skipValidationWarning': '<b>Warning:</b> This is for advanced users only. Use this option if you want to skip validation for Repository Base URLs.',
+ 'useRedhatSatelliteWarning': 'Disable distributed repositories and use RedHat Satellite/Spacewalk channels instead',
'filterListError': 'Fetch stack version filter list error',
'versionCreated': 'Created version <a href="#/stackVersions/{{stackName}}/{{versionName}}/edit">{{stackName}}-{{versionName}}</a>',
'versionCreationError': 'Version creation error',
http://git-wip-us.apache.org/repos/asf/ambari/blob/c86964b5/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 449d743..6870689 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
@@ -92,6 +92,14 @@
</label>
</div>
</div>
+ <div class="col-sm-12 hidden" id="use-redhat">
+ <div class="checkbox">
+ <label>
+ <input type="checkbox" ng-model="useRedhatSatellite" ng-change="clearErrors()">
+ {{'versions.useRedhatSatellite' | translate}} <span class="glyphicon glyphicon-question-sign" tooltip-html-unsafe="{{'versions.alerts.useRedhatSatelliteWarning' | translate}}"></span>
+ </label>
+ </div>
+ </div>
</div>
</div>
</div>
http://git-wip-us.apache.org/repos/asf/ambari/blob/c86964b5/ambari-web/app/config.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/config.js b/ambari-web/app/config.js
index 7d727d7..bdca3ad 100644
--- a/ambari-web/app/config.js
+++ b/ambari-web/app/config.js
@@ -81,7 +81,8 @@ App.supports = {
preInstallChecks: false,
hostComboSearchBox: false,
serviceAutoStart: false,
- logSearch: false
+ logSearch: false,
+ redhatSatellite: false
};
if (App.enableExperimental) {
http://git-wip-us.apache.org/repos/asf/ambari/blob/c86964b5/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 34e121e..c357bf4 100644
--- a/ambari-web/app/controllers/wizard/step1_controller.js
+++ b/ambari-web/app/controllers/wizard/step1_controller.js
@@ -27,6 +27,8 @@ App.WizardStep1Controller = Em.Controller.extend({
*/
skipValidationChecked: false,
+ useRedhatSatellite: false,
+
selectedStack: function() {
return App.Stack.find().findProperty('isSelected');
}.property('content.stacks.@each.isSelected')
http://git-wip-us.apache.org/repos/asf/ambari/blob/c86964b5/ambari-web/app/messages.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index 909f55c..08ff073 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -542,7 +542,9 @@ Em.I18n.translations = {
'installer.step1.advancedRepo.localRepo.label.baseUrl':'Repository Base URL',
'installer.step1.advancedRepo.localRepo.label.stack':'Stack',
'installer.step1.advancedRepo.skipValidation.tooltip':'<b>Warning:</b> This is for advanced users only. Use this option if you want to skip validation for Repository Base URLs.',
+ 'installer.step1.advancedRepo.useRedhatSatellite.tooltip':'Disable distributed repositories and use RedHat Satellite/Spacewalk channels instead',
'installer.step1.advancedRepo.skipValidation.message':'Skip Repository Base URL validation (Advanced)',
+ 'installer.step1.advancedRepo.useRedhatSatellite.message': 'Use RedHat Satellite/Spacewalk',
'installer.step1.attentionNeeded':'<b>Attention:</b> Repository URLs are REQUIRED before you can proceed.',
'installer.step1.invalidURLAttention': '<b>Attention:</b> Please make sure all repository URLs are valid before proceeding.',
'installer.step1.checkAtLeastOneAttention': '<b>Attention:</b> Please check at least one repository.',
http://git-wip-us.apache.org/repos/asf/ambari/blob/c86964b5/ambari-web/app/templates/main/admin/stack_upgrade/edit_repositories.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/admin/stack_upgrade/edit_repositories.hbs b/ambari-web/app/templates/main/admin/stack_upgrade/edit_repositories.hbs
index 4ee3418..62c3d14 100644
--- a/ambari-web/app/templates/main/admin/stack_upgrade/edit_repositories.hbs
+++ b/ambari-web/app/templates/main/admin/stack_upgrade/edit_repositories.hbs
@@ -50,3 +50,10 @@
<i class="icon-question-sign" rel="skip-validation-tooltip"
data-toggle="tooltip" {{translateAttr title="installer.step1.advancedRepo.skipValidation.tooltip"}}></i></label>
</div>
+{{#if App.supports.redhatSatellite}}
+ <div id="use-redhat">
+ <label>{{view Ember.Checkbox classNames="align-checkbox" checkedBinding="view.parentView.useRedhatSatellite"}}{{t installer.step1.advancedRepo.useRedhatSatellite.message}}
+ <i class="icon-question-sign" rel="use-redhat-tooltip"
+ data-toggle="tooltip" {{translateAttr title="installer.step1.advancedRepo.useRedhatSatellite.tooltip"}}></i></label>
+ </div>
+{{/if}}
http://git-wip-us.apache.org/repos/asf/ambari/blob/c86964b5/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 478e459..e59b76d 100644
--- a/ambari-web/app/templates/wizard/step1.hbs
+++ b/ambari-web/app/templates/wizard/step1.hbs
@@ -98,6 +98,13 @@
<i class="icon-question-sign" rel="skip-validation-tooltip"
data-toggle="tooltip" {{translateAttr title="installer.step1.advancedRepo.skipValidation.tooltip"}}></i></label>
</div>
+ {{#if App.supports.redhatSatellite}}
+ <div id="use-redhat">
+ <label>{{view Ember.Checkbox classNames="align-checkbox" checkedBinding="useRedhatSatellite"}}{{t installer.step1.advancedRepo.useRedhatSatellite.message}}
+ <i class="icon-question-sign" rel="use-redhat-tooltip"
+ data-toggle="tooltip" {{translateAttr title="installer.step1.advancedRepo.useRedhatSatellite.tooltip"}}></i></label>
+ </div>
+ {{/if}}
{{#if view.invalidFormatUrlExist}}
<div class="alert">{{t installer.step1.attentionNeeded}}</div>
{{/if}}
http://git-wip-us.apache.org/repos/asf/ambari/blob/c86964b5/ambari-web/app/views/main/admin/stack_upgrade/upgrade_version_box_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/admin/stack_upgrade/upgrade_version_box_view.js b/ambari-web/app/views/main/admin/stack_upgrade/upgrade_version_box_view.js
index f8dd4f2..20280fe 100644
--- a/ambari-web/app/views/main/admin/stack_upgrade/upgrade_version_box_view.js
+++ b/ambari-web/app/views/main/admin/stack_upgrade/upgrade_version_box_view.js
@@ -307,6 +307,7 @@ App.UpgradeVersionBoxView = Em.View.extend({
return this.get('isRepoUrlsEditDisabled') ? null : App.ModalPopup.show({
classNames: ['repository-list', 'sixty-percent-width-modal'],
skipValidation: false,
+ useRedhatSatellite: false,
autoHeight: false,
/**
* @type {boolean}
@@ -333,14 +334,17 @@ App.UpgradeVersionBoxView = Em.View.extend({
this.get('content.operatingSystems').forEach(function (os) {
os.get('repositories').forEach(function (repo) {
- disablePrimary = (!disablePrimary) ? repo.get('hasError') : disablePrimary;
+ disablePrimary = !disablePrimary ? repo.get('hasError') : disablePrimary;
}, this);
}, this);
this.set('parentView.disablePrimary', disablePrimary);
},
templateName: require('templates/main/admin/stack_upgrade/edit_repositories'),
didInsertElement: function () {
- App.tooltip($("[rel=skip-validation-tooltip]"), {placement: 'right'});
+ App.tooltip($("[rel=skip-validation-tooltip], [rel=use-redhat-tooltip]"), {placement: 'right'});
+ },
+ willDestroyElement: function () {
+ $("[rel=skip-validation-tooltip], [rel=use-redhat-tooltip]").tooltip('destroy');
}
}),
header: Em.I18n.t('common.repositories'),
http://git-wip-us.apache.org/repos/asf/ambari/blob/c86964b5/ambari-web/test/views/common/log_file_search_view_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/views/common/log_file_search_view_test.js b/ambari-web/test/views/common/log_file_search_view_test.js
index ca208b3..850230d 100644
--- a/ambari-web/test/views/common/log_file_search_view_test.js
+++ b/ambari-web/test/views/common/log_file_search_view_test.js
@@ -32,7 +32,7 @@ describe('App.LogFileSearchView', function() {
isIncluded: !!isIncluded
});
};
- var cases = [
+ [
{
viewContent: {
keywordsFilterValue: 'some_keyword'