Fix issue with Namespace suffix on Gateway UI

There was a case where a deployment with a single namespace on
faas-netes would show the namespace suffix for all functions.  we didn't
need to show this because the gateway will proxy to the default
namespace for fns without the namespace siffix.

This was tested on Swarm (no suffix), faas-netes (single namespace, no
suffix) and faas-netes, multi-ns, suffix shown.

Signed-off-by: Alistair Hey <alistair@heyal.co.uk>
This commit is contained in:
Alistair Hey
2020-02-23 21:58:35 +00:00
committed by Alex Ellis
parent b4bed58b66
commit 6880fdc524

View File

@ -140,7 +140,7 @@
</md-input-container> </md-input-container>
<md-input-container class="md-block function-url" flex-gt-sm> <md-input-container class="md-block function-url" flex-gt-sm>
<label>URL</label> <label>URL</label>
<input ng-value="(function.namespace && function.namespace.length > 0)? baseUrl + 'function/' + function.name + '.' + function.namespace : baseUrl + 'function/' + function.name" type="text" readonly="readonly"> <input ng-value="(function.namespace && function.namespace.length > 0 && allNamespaces && allNamespaces.length > 1)? baseUrl + 'function/' + function.name + '.' + function.namespace : baseUrl + 'function/' + function.name" type="text" readonly="readonly">
<md-icon ng-if="canCopyToClipboard" md-svg-src="img/icons/outline-file_copy-24px.svg" ng-click="copyClicked($event)"></md-icon> <md-icon ng-if="canCopyToClipboard" md-svg-src="img/icons/outline-file_copy-24px.svg" ng-click="copyClicked($event)"></md-icon>
</md-input-container> </md-input-container>
</div> </div>