mirror of
https://github.com/openfaas/faas.git
synced 2025-06-22 14:53:25 +00:00
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:
9
gateway/assets/script/bootstrap.js
vendored
9
gateway/assets/script/bootstrap.js
vendored
@ -23,7 +23,6 @@ app.controller("home", ['$scope', '$log', '$http', '$location', '$interval', '$f
|
||||
contentType: "text"
|
||||
};
|
||||
|
||||
$scope.namespaceSelect = $scope.selectedNamespace;
|
||||
$scope.baseUrl = $location.absUrl().replace(/\ui\/$/, '');
|
||||
try {
|
||||
$scope.canCopyToClipboard = document.queryCommandSupported('copy');
|
||||
@ -43,6 +42,8 @@ app.controller("home", ['$scope', '$log', '$http', '$location', '$interval', '$f
|
||||
showPostInvokedToast(msg);
|
||||
}
|
||||
|
||||
|
||||
|
||||
$scope.toggleSideNav = function() {
|
||||
$mdSidenav('left').toggle();
|
||||
};
|
||||
@ -310,7 +311,7 @@ app.controller("home", ['$scope', '$log', '$http', '$location', '$interval', '$f
|
||||
$scope.labelsToLabelInputs(func.labels);
|
||||
$scope.annotationsToAnnotationInputs(func.annotations);
|
||||
$scope.secretsToSecretInputs(func.secrets);
|
||||
$scope.item.namespace = func.selectedNamespace;
|
||||
$scope.item.namespace = $scope.namespaceSelected();
|
||||
|
||||
|
||||
$scope.selectedFunc = func;
|
||||
@ -365,6 +366,10 @@ app.controller("home", ['$scope', '$log', '$http', '$location', '$interval', '$f
|
||||
});
|
||||
};
|
||||
|
||||
$scope.fnNamespaceSelected = function(inputNamespace) {
|
||||
$scope.namespaceSelect = inputNamespace;
|
||||
}
|
||||
|
||||
$scope.onEnvInputExpand = function() {
|
||||
$scope.envFieldsVisible = !$scope.envFieldsVisible;
|
||||
}
|
||||
|
Reference in New Issue
Block a user