Hide the namespace selector when on swarm or <2 K8s ns

We now hide the new namespace dropdown selector when
there is only 1 namespace, or when we are on swarm
This is also hidden in the function create page and
the function detail page

Signed-off-by: Alistair Hey <alistair@heyal.co.uk>
This commit is contained in:
Alistair Hey
2019-12-15 16:23:26 +00:00
committed by Alex Ellis
parent d90288143d
commit 04fead5eab
3 changed files with 12 additions and 7 deletions

View File

@ -58,12 +58,12 @@
<input name="network" ng-model="item.network" md-maxlength="200" minlength="0">
</md-input-container>
</div>
<div layout-gt-xs="row">
<div layout-gt-xs="row" ng-if="allNamespaces.length > 1">
<md-input-container class="md-block" flex-gt-sm>
<md-tooltip md-direction="bottom">Namespace your function runs in i.e. 'openfaas-fn'. Only namespaces OpenFaaS can manage will show here</md-tooltip>
<label>Namespace</label>
<md-select name="namespace" ng-model="namespaceSelect" placeholder="Select a Namespace">
<md-option ng-value="namespace" ng-repeat="namespace in allNamespaces">
<md-option ng-click="fnNamespaceSelected(namespace)" ng-value="namespace" ng-repeat="namespace in allNamespaces">
{{ namespace }}
</md-option>
</md-select>