Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1367579 - append domain name to engineURL if missing. #1203

Merged
merged 2 commits into from Sep 1, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 13 additions & 2 deletions fusor-ember-cli/app/controllers/review/summary.js
Expand Up @@ -33,9 +33,20 @@ export default Ember.Controller.extend(NeedsDeploymentMixin, {
return `http://hello-openshift.${subdomainName}.${domainName}`;
}),

rhevEngineUrl: Ember.computed('selectedRhevEngine.name', function() {
return ('https://' + this.get('selectedRhevEngine.name') + '/ovirt-engine/');
rhevEngineUrl: Ember.computed('selectedRhevEngine.name', 'selectedRhevEngine.domain_name', function() {
// The cached version of the model for selectedRhevEngine has a stale name without the domain name,
// but is of type Host::Managed, so we can't tell if it needs to add the domain based on Discovered/Managed.
// We just add in the domain if we can't find it in the name.
let domainName = this.get('selectedRhevEngine.domain_name');
let engineName = this.get('selectedRhevEngine.name');

if (engineName && domainName && engineName.toLowerCase().indexOf(domainName.toLowerCase()) < 0) {
engineName = `${engineName}.${domainName}`;
}

return ('https://' + engineName + '/ovirt-engine/');
}),

rhevEngineUrlIP: Ember.computed('selectedRhevEngine.ip', function() {
return ('https://' + this.get('selectedRhevEngine.ip') + '/ovirt-engine/');
}),
Expand Down
19 changes: 15 additions & 4 deletions ui/app/assets/javascripts/fusor_ui/fusor-ember-cli.js
Expand Up @@ -5332,9 +5332,20 @@ define('fusor-ember-cli/controllers/review/summary', ['exports', 'ember', 'fusor
return 'http://hello-openshift.' + subdomainName + '.' + domainName;
}),

rhevEngineUrl: _ember['default'].computed('selectedRhevEngine.name', function () {
return 'https://' + this.get('selectedRhevEngine.name') + '/ovirt-engine/';
rhevEngineUrl: _ember['default'].computed('selectedRhevEngine.name', 'selectedRhevEngine.domain_name', function () {
// The cached version of the model for selectedRhevEngine has a stale name without the domain name,
// but is of type Host::Managed, so we can't tell if it needs to add the domain based on Discovered/Managed.
// We just add in the domain if we can't find it in the name.
var domainName = this.get('selectedRhevEngine.domain_name');
var engineName = this.get('selectedRhevEngine.name');

if (engineName && domainName && engineName.toLowerCase().indexOf(domainName.toLowerCase()) < 0) {
engineName = engineName + '.' + domainName;
}

return 'https://' + engineName + '/ovirt-engine/';
}),

rhevEngineUrlIP: _ember['default'].computed('selectedRhevEngine.ip', function () {
return 'https://' + this.get('selectedRhevEngine.ip') + '/ovirt-engine/';
}),
Expand Down Expand Up @@ -55254,11 +55265,11 @@ define('fusor-ember-cli/views/application', ['exports', 'ember'], function (expo
/* jshint ignore:start */

define('fusor-ember-cli/config/environment', ['ember'], function(Ember) {
return { 'default': {"modulePrefix":"fusor-ember-cli","environment":"development","baseURL":"/","locationType":"hash","EmberENV":{"FEATURES":{}},"contentSecurityPolicyHeader":"Disabled-Content-Security-Policy","emberDevTools":{"global":true},"APP":{"LOG_ACTIVE_GENERATION":true,"LOG_TRANSITIONS":true,"LOG_VIEW_LOOKUPS":true,"rootElement":"#ember-app","name":"fusor-ember-cli","version":"0.0.0+37658af3"},"ember-cli-mirage":{"enabled":false,"usingProxy":false},"contentSecurityPolicy":{"default-src":"'none'","script-src":"'self' 'unsafe-eval'","font-src":"'self'","connect-src":"'self'","img-src":"'self'","style-src":"'self'","media-src":"'self'"},"ember-devtools":{"enabled":true,"global":false},"exportApplicationGlobal":true}};
return { 'default': {"modulePrefix":"fusor-ember-cli","environment":"development","baseURL":"/","locationType":"hash","EmberENV":{"FEATURES":{}},"contentSecurityPolicyHeader":"Disabled-Content-Security-Policy","emberDevTools":{"global":true},"APP":{"LOG_ACTIVE_GENERATION":true,"LOG_TRANSITIONS":true,"LOG_VIEW_LOOKUPS":true,"rootElement":"#ember-app","name":"fusor-ember-cli","version":"0.0.0+5acec5ee"},"ember-cli-mirage":{"enabled":false,"usingProxy":false},"contentSecurityPolicy":{"default-src":"'none'","script-src":"'self' 'unsafe-eval'","font-src":"'self'","connect-src":"'self'","img-src":"'self'","style-src":"'self'","media-src":"'self'"},"ember-devtools":{"enabled":true,"global":false},"exportApplicationGlobal":true}};
});

if (!runningTests) {
require("fusor-ember-cli/app")["default"].create({"LOG_ACTIVE_GENERATION":true,"LOG_TRANSITIONS":true,"LOG_VIEW_LOOKUPS":true,"rootElement":"#ember-app","name":"fusor-ember-cli","version":"0.0.0+37658af3"});
require("fusor-ember-cli/app")["default"].create({"LOG_ACTIVE_GENERATION":true,"LOG_TRANSITIONS":true,"LOG_VIEW_LOOKUPS":true,"rootElement":"#ember-app","name":"fusor-ember-cli","version":"0.0.0+5acec5ee"});
}

/* jshint ignore:end */
Expand Down
2 changes: 1 addition & 1 deletion ui/app/assets/javascripts/fusor_ui/fusor-ember-cli.map

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions ui/app/assets/stylesheets/fusor_ui/fusor-ember-cli.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.