INNER CODE UNIT · JavaScript
item
1Panel-dev/KubePi · thirdparty/gotty/resources/index.js:89
let item = localStorage.getItem(PREFIX + $scope.item.name);
if (item) {
$scope.msg = "Name already exist.";
return;
}
if ($scope.item.type === TYPE_KUBE_CONFIG) {
if (!$scope.item.kubeConfig) {
$scope.msg = "Kube config is required.";
return;
}
}
if ($scope.item.type === TYPE_TOKEN) {
if (!$scope.item.apiServer) {
$scope.msg = "ApiServer is required.";
return;
}