mirror of
https://github.com/openfaas/faas.git
synced 2025-06-20 13:06:40 +00:00
On funcstore error, change to manual tab
Fixed the UI so that when an error occurs, the tab automatically changes to the manual tab in order to show the errors. Signed-off-by: Ken Fukuyama <kenfdev@gmail.com>
This commit is contained in:
7
gateway/assets/script/bootstrap.js
vendored
7
gateway/assets/script/bootstrap.js
vendored
@ -6,7 +6,10 @@ var app = angular.module('faasGateway', ['ngMaterial', 'faasGateway.funcStore'])
|
||||
|
||||
app.controller("home", ['$scope', '$log', '$http', '$location', '$interval', '$filter', '$mdDialog', '$mdToast', '$mdSidenav',
|
||||
function($scope, $log, $http, $location, $interval, $filter, $mdDialog, $mdToast, $mdSidenav) {
|
||||
var newFuncTabIdx = 0;
|
||||
var FUNCSTORE_DEPLOY_TAB_INDEX = 0;
|
||||
var MANUAL_DEPLOY_TAB_INDEX = 1;
|
||||
|
||||
var newFuncTabIdx = FUNCSTORE_DEPLOY_TAB_INDEX;
|
||||
$scope.functions = [];
|
||||
$scope.invocationInProgress = false;
|
||||
$scope.invocationRequest = "";
|
||||
@ -274,6 +277,8 @@ app.controller("home", ['$scope', '$log', '$http', '$location', '$interval', '$f
|
||||
$scope.closeDialog();
|
||||
showPostInvokedToast("Function created");
|
||||
}).catch(function(error1) {
|
||||
showPostInvokedToast("Error");
|
||||
$scope.selectedTabIdx = MANUAL_DEPLOY_TAB_INDEX;
|
||||
$scope.validationError = error1.data;
|
||||
});
|
||||
};
|
||||
|
Reference in New Issue
Block a user