Skip to content

Commit

Permalink
feat: Show URL for services outside SSO even inside sso projects
Browse files Browse the repository at this point in the history
  • Loading branch information
FOUILLET Guillaume - m089193 committed Mar 15, 2019
1 parent d84f916 commit 5a6485d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions public/modules/groups/controllers/groups.client.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -484,11 +484,11 @@ angular.module('groups').controller('GroupsController', ['$scope', '$stateParams
urlWithoutPort = url.url.substr(pos, url.url.length);
if (!urlWithoutPort) urlWithoutPort = '';
}
var portMapping = _.where(container.ports, { 'internal': parseInt(portInContainer) });
var portMapping = _.where(container.ports, { 'internal': parseInt(portInContainer), 'host': '' });
var portExternal = '';
if (portMapping && portMapping.length > 0) portExternal = ':' + portMapping[0].external;

if (!container.daemon) {
if (!container.daemon || portExternal === '') {
url.urlCompute = '';
} else {
url.urlCompute = 'http:https://' + container.daemon.host + portExternal + urlWithoutPort;
Expand Down
4 changes: 2 additions & 2 deletions public/modules/groups/views/view-container.client.view.html
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,9 @@ <h3>
<h4 ng-hide="group.isSSO">Urls</h4>

<div ng-hide="group.isSSO || container.urls.length > 0" class="label label-info">No url attached to this service.</div>
<div ng-hide="group.isSSO" ng-repeat="url in container.urls">
<div ng-repeat="url in container.urls">
<md-button class="md-accent md-hue-3" href={{url.urlCompute}}>
<i class="fa fa-link"></i> {{url.label}}
<em class="fa fa-link"></em> {{url.label}}
</md-button>
</div>

Expand Down

0 comments on commit 5a6485d

Please sign in to comment.