duration: ' + y + ' seconds
'; - if (date) { - tooltip += 'started: ' + date + '
'; - } - if (result) { - tooltip += 'result: ' + result + '
'; - } - if (x) { - var data = buildsSucceeded; - var key = successBuildKey; - if (!successBuildKey && (!result || !result.startsWith("SUCC"))) { - data = buildsFailed; - key = failedBuildKey; + else + return labelColors[labelType] + ' mouse-pointer'; + }; + Kubernetes.initShared($scope, $location, $http, $timeout, $routeParams, KubernetesModel, KubernetesState, KubernetesApiURL); + $scope.deletePrompt = function (selected) { + UI.multiItemConfirmActionDialog({ + collection: selected, + index: '$name', + onClose: function (result) { + if (result) { + function deleteSelected(selected, next) { + if (next) { + deleteEntity(next, function () { + deleteSelected(selected, selected.shift()); + }); + } + else { + updateData(); + } + } + deleteSelected(selected, selected.shift()); } - data.push({ - tooltip: tooltip, - color: color, - x: x, y: y }); - } - }); - $scope.data = []; - if (buildsSucceeded.length) { - $scope.data.push({ - key: successBuildKey, - values: buildsSucceeded + }, + title: 'Delete Image Repository?', + action: 'The following Image Repositories will be deleted:', + okText: 'Delete', + okClass: 'btn-danger', + custom: "This operation is permanent once completed!", + customClass: "alert alert-warning" + }).open(); + }; + function deleteEntity(selection, nextCallback) { + var name = (selection || {}).$name; + if (name) { + console.log("About to delete image repository: " + name); + var url = Kubernetes.imageRepositoryRestUrl(name); + $http.delete(url). + success(function (data, status, headers, config) { + nextCallback(); + }). + error(function (data, status, headers, config) { + Kubernetes.log.warn("Failed to delete image repository on " + url + " " + data + " " + status); }); } - if (buildsFailed.length) { - $scope.data.push({ - key: failedBuildKey, - values: buildsFailed - }); + else { + console.log("warning: no name for selection: " + angular.toJson(selection)); } - $scope.api.updateWithData($scope.data); - $timeout(function () { - $scope.api.update(); - }, 50); } function updateData() { - var metricsPath = $scope.jobId ? UrlHelpers.join("job", $scope.jobId, "fabric8/metrics") : "fabric8/metrics"; - var url = Kubernetes.kubernetesProxyUrlForServiceCurrentNamespace(Developer.jenkinsServiceNameAndPort, metricsPath); - Developer.log.info(""); - if (url && (!$scope.jenkins || Kubernetes.keepPollingModel)) { - $http.get(url, Developer.jenkinsHttpConfig). - success(function (data, status, headers, config) { - if (data) { - if (Developer.hasObjectChanged(data, $scope.entityChangedCache)) { - Developer.log.info("entity has changed!"); - $scope.metrics = data; - updateChartData(); - } - } - $scope.model.fetched = true; + var url = Kubernetes.imageRepositoriesRestURL(); + $http.get(url). + success(function (data, status, headers, config) { + if (data) { + //console.log("got data " + angular.toJson(data, true)); + $scope.imageRepositories = Kubernetes.enrichImageRepositories(data.items); + $scope.fetched = true; Core.$apply($scope); - }). - error(function (data, status, headers, config) { - Developer.log.warn("Failed to load " + url + " " + data + " " + status); - }); - } + } + }). + error(function (data, status, headers, config) { + Kubernetes.log.warn("Failed to load " + url + " " + data + " " + status); + }); } + updateData(); }]); -})(Developer || (Developer = {})); +})(Kubernetes || (Kubernetes = {})); ///Please wait, fetching logs...
\nView previous container logs?
\n \nPlease wait, fetching logs...
\nView previous container logs?
\n \nduration: ' + y + ' seconds
'; + if (date) { + tooltip += 'started: ' + date + '
'; + } + if (result) { + tooltip += 'result: ' + result + '
'; + } + if (x) { + var data = buildsSucceeded; + var key = successBuildKey; + if (!successBuildKey && (!result || !result.startsWith("SUCC"))) { + data = buildsFailed; + key = failedBuildKey; + } + data.push({ + tooltip: tooltip, + color: color, + x: x, y: y }); } + }); + $scope.data = []; + if (buildsSucceeded.length) { + $scope.data.push({ + key: successBuildKey, + values: buildsSucceeded + }); } - else if (key === "password") { - type = "password"; + if (buildsFailed.length) { + $scope.data.push({ + key: failedBuildKey, + values: buildsFailed + }); } - var property = { - key: key, - label: label, - tooltip: tooltip, - rows: rows, - value: text, - type: type - }; - return property; + $scope.api.updateWithData($scope.data); + $timeout(function () { + $scope.api.update(); + }, 50); } function updateData() { - $scope.item = null; - $scope.changed = false; - $scope.entity = { - name: $scope.id, - properties: {} - }; - if ($scope.id) { - angular.forEach($scope.model.secrets, function (secret) { - var name = Kubernetes.getName(secret); - if (name === $scope.id) { - $scope.secret = secret; - angular.forEach(secret.data, function (value, key) { - var text = ""; - if (angular.isString(value) && value) { - text = window.atob(value); - } - var property = createProperty(key, text); - $scope.entity.properties[key] = property; - }); - $scope.fetched = true; - Core.$apply($scope); + var metricsPath = $scope.jobId ? UrlHelpers.join("job", $scope.jobId, "fabric8/metrics") : "fabric8/metrics"; + var url = Kubernetes.kubernetesProxyUrlForServiceCurrentNamespace(Developer.jenkinsServiceNameAndPort, metricsPath); + Developer.log.info(""); + if (url && (!$scope.jenkins || Kubernetes.keepPollingModel)) { + $http.get(url, Developer.jenkinsHttpConfig). + success(function (data, status, headers, config) { + if (data) { + if (Developer.hasObjectChanged(data, $scope.entityChangedCache)) { + Developer.log.info("entity has changed!"); + $scope.metrics = data; + updateChartData(); + } } + $scope.model.fetched = true; + Core.$apply($scope); + }). + error(function (data, status, headers, config) { + Developer.log.warn("Failed to load " + url + " " + data + " " + status); }); } - else { - if (createKind === "ssh") { - $scope.addFields($scope.sshKeys); + } + }]); +})(Developer || (Developer = {})); + +///已启用 | \r\n已停止 | \r\n\r\n {{volume.name}}\r\n | \r\n\r\n 云路径:{{volume.path}}\r\n | \r\n\r\n 存储类型:\r\n 热区\r\n 冷区\r\n | \r\n\r\n 已用 {{volume.formatUsedSize}} / 共 {{volume.formatTotalSize}}\r\n | \r\n\r\n \r\n \r\n | \r\n
---|---|---|---|---|---|---|
\r\n \r\n \r\n | \r\n\r\n 服务器{{$index+1}}\r\n | \r\n\r\n {{row.ip}}\r\n | \r\n\r\n 存储路径:{{row.path}}\r\n | \r\n\r\n 已用 {{row.formatUsedSize}} / 可用 {{row.formatAllSize}}\r\n | \r\n\r\n |
\r\n 是否删除:{{showDeleteVolume.item.name}} 云盘?\r\n
\r\nThere are no projects in this workspace.
\r\nThere are no tools currently available.
\r\nThere are no tools currently available.
\r\n当前没有可以查看的数据.
\r\n当前没有可以查看的数据.
\r\n\r\n \r\n | \r\n\r\n \r\n \r\n \r\n | \r\n\r\n \r\n Pod {{pod.idAbbrev}}\r\n \r\n \r\n IP:\r\n {{pod.status.podIP}}\r\n \r\n | \r\n \r\n \r\n | \r\n
There are no image repositories available.
\r\n Create Image Repository\r\n\r\n Create a project by entering or copy/pasting the Git URL for a repository, and give the project a name. By default the name will be based on the repository name.\r\n
\r\n\r\n \r\n\r\n \r\n\r\nPipeline is a kind of build which uses Jenkins Workflow internally which has multiple Stages. You will see the active pipelines here after you add a build to this project
\r\nThere are no build pipelines available.
\r\n Create Build Configuration\r\n