Skip to content

Commit

Permalink
Merge pull request #699 from isratrade/remove-org-tab
Browse files Browse the repository at this point in the history
removed organization selection from WebUI step
  • Loading branch information
jwmatthews committed Mar 7, 2016
2 parents 7094218 + 9b03b99 commit 6041600
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 19 deletions.
Expand Up @@ -4,6 +4,7 @@ import NeedsDeploymentNewMixin from "../../../mixins/needs-deployment-new-mixin"

export default Ember.Controller.extend(ConfigureEnvironmentMixin, NeedsDeploymentNewMixin, {

satelliteTabRouteName: Ember.computed.alias("deploymentNewController.satelliteTabRouteName"),
organizationTabRouteName: Ember.computed.alias("deploymentNewController.organizationTabRouteName"),

selectedOrganization: Ember.computed.alias("deploymentNewController.model.organization"),
Expand Down
Expand Up @@ -4,13 +4,13 @@ import ValidatesDeploymentNameMixin from "../../../mixins/validates-deployment-n

export default Ember.Controller.extend(NeedsDeploymentNewMixin, ValidatesDeploymentNameMixin, {

deploymentNewSatelliteController: Ember.inject.controller('deployment-new/satellite'),
deploymentNewController: Ember.inject.controller('deployment-new'),

name: Ember.computed.alias("deploymentNewController.name"),
description: Ember.computed.alias("deploymentNewController.description"),

organizationTabRouteName: Ember.computed.alias("deploymentNewSatelliteController.organizationTabRouteName"),
organizationTabRouteName: Ember.computed.alias("deploymentNewController.organizationTabRouteName"),
lifecycleEnvironmentTabRouteName: Ember.computed.alias("deploymentNewController.lifecycleEnvironmentTabRouteName"),

disableNextOnDeploymentName: Ember.computed.alias("deploymentNewController.disableNextOnDeploymentName"),

Expand Down
1 change: 1 addition & 0 deletions fusor-ember-cli/app/controllers/satellite/index.js
Expand Up @@ -8,6 +8,7 @@ export default Ember.Controller.extend(NeedsDeploymentMixin, ValidatesDeployment
description: Ember.computed.alias("deploymentController.description"),

organizationTabRouteName: Ember.computed.alias("deploymentController.organizationTabRouteName"),
lifecycleEnvironmentTabRouteName: Ember.computed.alias("deploymentController.lifecycleEnvironmentTabRouteName"),

disableNextOnDeploymentName: Ember.computed.alias("deploymentController.disableNextOnDeploymentName"),

Expand Down
6 changes: 0 additions & 6 deletions fusor-ember-cli/app/mixins/deployment-controller-mixin.js
Expand Up @@ -27,12 +27,6 @@ export default Ember.Mixin.create({
// isOpenStack
// isCloudForms

// route names will be overwrriten by active hook in routes/deployment.js
// and routes/deployment-new.js and routes/start.js and routes/deployment-new/start.js
satelliteTabRouteName: null,
organizationTabRouteName: null,
lifecycleEnvironmentTabRouteName: null,

disableNextOnStart: Ember.computed('isRhev', 'isOpenStack', 'isCloudForms', function () {
return (!(this.get('isRhev') || this.get('isOpenStack') || this.get('isCloudForms')));
}),
Expand Down
Expand Up @@ -9,9 +9,7 @@ export default Ember.Route.extend(DeploymentNewSatelliteRouteMixin, {

setupController(controller, model) {
controller.set('model', model);
var self = this;
var organization = this.modelFor('deployment-new').get('organization');
var lifecycleEnvironments = this.store.query('lifecycle-environment', {organization_id: organization.get('id')});
var lifecycleEnvironments = this.store.query('lifecycle-environment', {organization_id: 1});
lifecycleEnvironments.then(function(results){
controller.set('lifecycleEnvironments', results);
});
Expand Down
7 changes: 7 additions & 0 deletions fusor-ember-cli/app/routes/deployment-new/satellite/index.js
Expand Up @@ -3,6 +3,13 @@ import DeploymentNewSatelliteRouteMixin from "../../../mixins/deployment-new-sat

export default Ember.Route.extend(DeploymentNewSatelliteRouteMixin, {

setupController(controller, model) {
controller.set('model', model);
this.store.findRecord('organization', 1).then(function(result) {
model.set('organization', result);
});
},

deactivate() {
let deploymentName = this.get('controller.model.name');
if (Ember.isPresent(deploymentName)) {
Expand Down
2 changes: 1 addition & 1 deletion fusor-ember-cli/app/templates/configure-environment.hbs
Expand Up @@ -103,7 +103,7 @@

{{partial 'new-environment'}}

{{#cancel-back-next backRouteName=organizationTabRouteName
{{#cancel-back-next backRouteName=satelliteTabRouteName
disableBack=false
disableCancel=isStarted
deploymentName=deploymentName
Expand Down
8 changes: 2 additions & 6 deletions fusor-ember-cli/app/templates/satellite.hbs
Expand Up @@ -4,16 +4,12 @@
<a>1A. Deployment Name</a>
{{/link-to}}

{{#link-to organizationTabRouteName tagName='li' disabled=disableTabConfigureOrganization}}
<a>1B. Configure Organization</a>
{{/link-to}}

{{#link-to lifecycleEnvironmentTabRouteName tagName='li' disabled=disableTabLifecycleEnvironment}}
<a>1C. Configure Lifecycle Environment</a>
<a>1B. Configure Lifecycle Environment</a>
{{/link-to}}

{{#link-to 'satellite.access-insights' tagName='li' disabled=disableTabAccessInsights}}
<a>1D. Insights</a>
<a>1C. Insights</a>
{{/link-to}}

{{/wizard-step}}
2 changes: 1 addition & 1 deletion fusor-ember-cli/app/templates/satellite/index.hbs
Expand Up @@ -12,7 +12,7 @@
</div>
{{cancel-back-next backRouteName=backRouteNameOnSatIndex
disableBack=false
nextRouteName=organizationTabRouteName
nextRouteName=lifecycleEnvironmentTabRouteName
disableNext=disableNextOnDeploymentName
disableCancel=isStarted
deploymentName=deploymentName
Expand Down

0 comments on commit 6041600

Please sign in to comment.