diff --git a/ambari-web/app/assets/test/tests.js b/ambari-web/app/assets/test/tests.js
index cd31406cec7..22f9e415ad1 100644
--- a/ambari-web/app/assets/test/tests.js
+++ b/ambari-web/app/assets/test/tests.js
@@ -137,6 +137,10 @@ var files = [
'test/controllers/wizard_test',
'test/controllers/wizard/configureDownload_test',
'test/controllers/wizard/selectMpacks_test',
+ 'test/controllers/wizard/downloadMpacks_test',
+ 'test/controllers/wizard/customProductRepos_test',
+ 'test/controllers/wizard/verifyProducts_test',
+ 'test/controllers/wizard/wizardStep_test',
'test/controllers/wizard/step0_test',
'test/controllers/wizard/step1_test',
'test/controllers/wizard/step2_test',
@@ -390,6 +394,8 @@ var files = [
'test/views/wizard/step3/hostWarningPopupBody_view_test',
'test/views/wizard/step3/hostWarningPopupFooter_view_test',
'test/views/wizard/configureDownload_view_test',
+ 'test/views/wizard/customMpackRepos_view_test',
+ 'test/views/wizard/customProductRepos_view_test',
'test/views/wizard/step0_view_test',
'test/views/wizard/step1_view_test',
'test/views/wizard/step2_view_test',
diff --git a/ambari-web/app/controllers/wizard/downloadMpacks_controller.js b/ambari-web/app/controllers/wizard/downloadMpacks_controller.js
index 1266e24dc54..717357e2949 100644
--- a/ambari-web/app/controllers/wizard/downloadMpacks_controller.js
+++ b/ambari-web/app/controllers/wizard/downloadMpacks_controller.js
@@ -64,7 +64,6 @@ App.WizardDownloadMpacksController = App.WizardStepController.extend({
},
downloadMpackSuccess: function (data, opt, params) {
- console.dir("Mpack " + params.name + " download completed with success code " + data.status);
this.get('mpacks').findProperty('name', params.name).set('succeeded', true);
this.get('mpacks').findProperty('name', params.name).set('failed', false);
this.get('mpacks').findProperty('name', params.name).set('inProgress', false);
@@ -74,7 +73,6 @@ App.WizardDownloadMpacksController = App.WizardStepController.extend({
if(request.status == 409) {
this.downloadMpackSuccess(request, opt, params);
} else {
- console.dir("Mpack " + params.name + " download failed with error code " + request.status);
this.get('mpacks').findProperty('name', params.name).set('succeeded', false);
this.get('mpacks').findProperty('name', params.name).set('failed', true);
this.get('mpacks').findProperty('name', params.name).set('inProgress', false);
diff --git a/ambari-web/app/controllers/wizard/selectMpacks_controller.js b/ambari-web/app/controllers/wizard/selectMpacks_controller.js
index da373235687..56ef0acb6db 100644
--- a/ambari-web/app/controllers/wizard/selectMpacks_controller.js
+++ b/ambari-web/app/controllers/wizard/selectMpacks_controller.js
@@ -27,6 +27,14 @@ App.WizardSelectMpacksController = App.WizardStepController.extend({
noRecommendationAvailable: false,
+ filterMpacksText: "",
+
+ filterServicesText: "",
+
+ filterMpacksPlaceholder: Em.I18n.t('installer.selectMpacks.filterMpacks'),
+
+ filterServicesPlaceholder: Em.I18n.t('installer.selectMpacks.filterServices'),
+
loadRegistry: function () {
return App.ajax.send({
name: 'registry.all',
@@ -43,6 +51,15 @@ App.WizardSelectMpacksController = App.WizardStepController.extend({
name: mpack.RegistryMpackInfo.mpack_name,
displayName: mpack.RegistryMpackInfo.mpack_display_name,
description: mpack.RegistryMpackInfo.mpack_description,
+ //this is the text that will be used to filter this mpack in the UI
+ //at this point, this is just the text that comes from this mpack
+ //but additional text will be appended to form the final filterOn value
+ //from the mpack's services, specifically the service name
+ filterOn: (
+ (mpack.RegistryMpackInfo.mpack_name || "") + " "
+ + (mpack.RegistryMpackInfo.mpack_display_name || "") + " "
+ + (mpack.RegistryMpackInfo.mpack_description || "")
+ ).toLowerCase(),
logoUrl: mpack.RegistryMpackInfo.mpack_logo_url,
versions: mpack.versions ? mpack.versions.map((version, index) => {
return Em.Object.create({
@@ -93,10 +110,19 @@ App.WizardSelectMpacksController = App.WizardStepController.extend({
const uniqueServices = {};
mpackServiceVersions.forEach(service => {
+ //append service name to filterOn of the containing mpack
+ const mpackFilterOn = service.get('mpackVersion.mpack.filterOn');
+ service.set('mpackVersion.mpack.filterOn', ((mpackFilterOn) + " " + (service.name || "")).toLowerCase());
+
uniqueServices[service.name] = Em.Object.create({
name: service.name,
displayName: service.displayName,
description: service.description,
+ filterOn: (
+ (service.name || "") + " "
+ + (service.description || "") + " "
+ + (service.get('mpackVersion.mpack.displayName') || "" )
+ ).toLowerCase(),
displayedVersion: function () {
return this.get('versions').filterProperty('displayed')[0];
}.property('versions.@each.displayed')
@@ -495,6 +521,44 @@ App.WizardSelectMpacksController = App.WizardStepController.extend({
this.get('wizardController').setStepUnsaved('selectMpacks');
},
+ filteredMpacks: function () {
+ const mpacks = this.get('content.mpacks');
+ const filterText = this.get('filterMpacksText').toLowerCase();
+
+ if (filterText.length > 2) {
+ const filteredMpacks = mpacks.filter(mpack => {
+ return mpack.get('filterOn').indexOf(filterText) > -1;
+ });
+
+ return filteredMpacks;
+ }
+
+ return mpacks;
+ }.property('content.mpacks', 'filterMpacksText'),
+
+ clearFilterMpacks: function () {
+ this.set('filterMpacksText', "");
+ },
+
+ filteredServices: function () {
+ const services = this.get('content.mpackServices');
+ const filterText = this.get('filterServicesText').toLowerCase();
+
+ if (filterText.length > 2) {
+ const filteredServices = services.filter(service => {
+ return service.get('filterOn').indexOf(filterText) > -1;
+ });
+
+ return filteredServices;
+ }
+
+ return services;
+ }.property('content.mpackServices', 'filterServicesText'),
+
+ clearFilterServices: function () {
+ this.set('filterServicesText', "");
+ },
+
/**
* Onclick handler for Next button.
* Disable 'Next' button while it is already under process. (using Router's property 'nextBtnClickInProgress')
diff --git a/ambari-web/app/controllers/wizard/verifyProducts_controller.js b/ambari-web/app/controllers/wizard/verifyProducts_controller.js
index 6b375096123..3e3b6002ee7 100644
--- a/ambari-web/app/controllers/wizard/verifyProducts_controller.js
+++ b/ambari-web/app/controllers/wizard/verifyProducts_controller.js
@@ -91,7 +91,7 @@ App.WizardVerifyProductsController = App.WizardStepController.extend({
*/
setRepoState: function (repo, state) {
switch (state) {
- case this.get('VERIFYREPO_INPROGRESS:'):
+ case this.get('VERIFYREPO_INPROGRESS'):
repo.set('succeeded', false);
repo.set('failed', false);
repo.set('inProgress', true);
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index bba8fe76003..acf2a002eb3 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -638,6 +638,8 @@ Em.I18n.translations = {
'installer.selectMpacks.advancedModeMessage': 'If you go back to use case selection, all current selections will be removed. Continue?',
'installer.selectMpacks.basicModeHelp': 'This step lets you choose the use case(s) that fit your needs and the management packs that fulfill those use cases will be selected for you; however, if you would rather choose individual management packs and/or services directly, click this button. Be aware that if you return to use case selection mode, any selections you have made will be removed.',
'installer.selectMpacks.advancedModeHelp': 'By clicking this button, you can return to use case selection mode. However, any existing selections will be removed.',
+ 'installer.selectMpacks.filterMpacks': 'Search management packs',
+ 'installer.selectMpacks.filterServices': 'Search services',
'installer.configureDownload.header': 'Configure Download',
'installer.configureDownload.body.title': 'Choose download method',
diff --git a/ambari-web/app/styles/application.less b/ambari-web/app/styles/application.less
index 5f6beae890a..535223c6be9 100644
--- a/ambari-web/app/styles/application.less
+++ b/ambari-web/app/styles/application.less
@@ -2885,15 +2885,9 @@ td .no-data {
}
}
-.input-group.url-input {
- width: 100%;
-
- .input-group-btn {
- width: 1%;
-
- .revert-button {
- padding: 0 10px;
- }
+.input-group-btn {
+ .icon-button-addon {
+ padding: 0 10px;
}
}
diff --git a/ambari-web/app/styles/widgets.less b/ambari-web/app/styles/widgets.less
index 9bf60f0673d..5a77967e8d5 100644
--- a/ambari-web/app/styles/widgets.less
+++ b/ambari-web/app/styles/widgets.less
@@ -493,7 +493,3 @@
background-color: rgba(211, 237, 247, 0.39);
padding: 10px 5px 0 10px;
}
-
-.input-group-btn {
- width: auto;
-}
diff --git a/ambari-web/app/styles/wizard.less b/ambari-web/app/styles/wizard.less
index ad7fcb1132a..0209589fccc 100644
--- a/ambari-web/app/styles/wizard.less
+++ b/ambari-web/app/styles/wizard.less
@@ -1023,4 +1023,8 @@
.dropdown-menu input[type="checkbox"]:checked + label:after,
.table input[type="checkbox"]:checked + label:after {
line-height: 2;
+}
+
+.filter-input {
+ margin: 15px;
}
\ No newline at end of file
diff --git a/ambari-web/app/templates/wizard/customMpackRepos.hbs b/ambari-web/app/templates/wizard/customMpackRepos.hbs
index 2b77b9f6e29..ee3850e338b 100644
--- a/ambari-web/app/templates/wizard/customMpackRepos.hbs
+++ b/ambari-web/app/templates/wizard/customMpackRepos.hbs
@@ -41,10 +41,10 @@