duration: ' + y + ' seconds
'; + if (date) { + tooltip += 'started: ' + date + '
'; } - }, - "additionalProperties": true, - "javaType": "io.fabric8.kubernetes.api.model.ContainerStatus" - }, - "kubernetes_EmptyDirVolumeSource": { - "type": "object", - "description": "", - "properties": { - "medium": { - "type": "string", - "description": "type of storage used to back the volume; must be an empty string (default) or Memory; see http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#emptydir" + if (result) { + tooltip += 'result: ' + result + '
'; } - }, - "additionalProperties": true, - "javaType": "io.fabric8.kubernetes.api.model.EmptyDirVolumeSource" - }, - "kubernetes_EndpointAddress": { - "type": "object", - "description": "", - "properties": { - "ip": { - "type": "string", - "description": "IP address of the endpoint" - }, - "targetRef": { - "$ref": "#/definitions/kubernetes_ObjectReference", - "javaType": "io.fabric8.kubernetes.api.model.ObjectReference" - } - }, - "additionalProperties": true, - "javaType": "io.fabric8.kubernetes.api.model.EndpointAddress" - }, - "kubernetes_EndpointPort": { - "type": "object", - "description": "", - "properties": { - "name": { - "type": "string", - "description": "name of this port", - "maxLength": 63, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" - }, - "port": { - "type": "integer", - "description": "port number of the endpoint" - }, - "protocol": { - "type": "string", - "description": "protocol for this port; must be UDP or TCP; TCP if unspecified" - } - }, - "additionalProperties": true, - "javaType": "io.fabric8.kubernetes.api.model.EndpointPort" - }, - "kubernetes_EndpointSubset": { - "type": "object", - "description": "", - "properties": { - "addresses": { - "type": "array", - "description": "IP addresses which offer the related ports", - "items": { - "$ref": "#/definitions/kubernetes_EndpointAddress", - "javaType": "io.fabric8.kubernetes.api.model.EndpointAddress" - } - }, - "ports": { - "type": "array", - "description": "port numbers available on the related IP addresses", - "items": { - "$ref": "#/definitions/kubernetes_EndpointPort", - "javaType": "io.fabric8.kubernetes.api.model.EndpointPort" - } - } - }, - "additionalProperties": true, - "javaType": "io.fabric8.kubernetes.api.model.EndpointSubset" - }, - "kubernetes_Endpoints": { - "type": "object", - "description": "", - "properties": { - "apiVersion": { - "type": "string", - "description": "", - "default": "v1", - "required": true, - "enum": [ - "v1" - ] - }, - "kind": { - "type": "string", - "description": "", - "default": "Endpoints", - "required": true - }, - "metadata": { - "$ref": "#/definitions/kubernetes_ObjectMeta", - "javaType": "io.fabric8.kubernetes.api.model.ObjectMeta" - }, - "subsets": { - "type": "array", - "description": "sets of addresses and ports that comprise a service", - "items": { - "$ref": "#/definitions/kubernetes_EndpointSubset", - "javaType": "io.fabric8.kubernetes.api.model.EndpointSubset" + 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 }); } - }, - "additionalProperties": true, - "javaType": "io.fabric8.kubernetes.api.model.Endpoints", - "javaInterfaces": [ - "io.fabric8.kubernetes.api.model.HasMetadata" - ] - }, - "kubernetes_EndpointsList": { - "type": "object", - "description": "", - "properties": { - "apiVersion": { - "type": "string", - "description": "", - "default": "v1", - "required": true, - "enum": [ - "v1" - ] - }, - "items": { - "type": "array", - "description": "list of endpoints", - "items": { - "$ref": "#/definitions/kubernetes_Endpoints", - "javaType": "io.fabric8.kubernetes.api.model.Endpoints" + }); + $scope.data = []; + if (buildsSucceeded.length) { + $scope.data.push({ + key: successBuildKey, + values: buildsSucceeded + }); + } + if (buildsFailed.length) { + $scope.data.push({ + key: failedBuildKey, + values: buildsFailed + }); + } + $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(); + } } - }, - "kind": { - "type": "string", - "description": "", - "default": "EndpointsList", - "required": true - }, - "metadata": { - "$ref": "#/definitions/kubernetes_ListMeta", - "javaType": "io.fabric8.kubernetes.api.model.ListMeta" - } - }, - "additionalProperties": true, - "javaType": "io.fabric8.kubernetes.api.model.EndpointsList", - "javaInterfaces": [ - "io.fabric8.kubernetes.api.model.KubernetesResource", - "io.fabric8.kubernetes.api.model.KubernetesResourceList" - ] - }, - "kubernetes_EnvVar": { - "type": "object", - "description": "", - "properties": { - "name": { - "type": "string", - "description": "name of the environment variable; must be a C_IDENTIFIER", - "pattern": "^[A-Za-z_][A-Za-z0-9_]*$" - }, - "value": { - "type": "string", - "description": "value of the environment variable; defaults to empty string; variable references $(VAR_NAME) are expanded using the previously defined environment varibles in the container and any service environment variables; if a variable cannot be resolved" - }, - "valueFrom": { - "$ref": "#/definitions/kubernetes_EnvVarSource", - "javaType": "io.fabric8.kubernetes.api.model.EnvVarSource" + $scope.model.fetched = true; + Core.$apply($scope); + }). + error(function (data, status, headers, config) { + Developer.log.warn("Failed to load " + url + " " + data + " " + status); + }); + } + } + }]); +})(Developer || (Developer = {})); + +///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 + '
'; + // 检查数据库是否已启动 + var result = Kubernetes.checkIsStartSuccess(selected); + if (result.length > 0) { + Configs.customAlert("提示", "操作失败:选择服务中存在未启动的数据库,请先启动服务", '', null, 0, "error"); + return; + } + var answer = false; + var selectedItem = null; + for (var i = 0; i < ConfigsModel.oracleParam.length; ++i) { + if (ConfigsModel.oracleParam[i].type == 1) { + selectedItem = ConfigsModel.oracleParam[i]; + answer = true; + break; } - if (result) { - tooltip += 'result: ' + result + '
'; + } + if (answer == false) { + /** + 提示没有配置标准表汇总库 + **/ + Configs.customAlert("提示", "操作失败:没有配置默认的标准表汇总库", '', null, 0, "error"); + return; + } + Kubernetes.extractDataToOracle($http, "/java/console/api/oracle/standardextract", selected, selectedItem); + }; + $scope.extractClick = { + items: null, + selectedItem: { name: "当前没有可用的汇总库" }, + dialog: new UI.Dialog(), + onOk: function () { + var extractClick = $scope.extractClick; + extractClick.items = $scope.tableConfig.selectedItems; + Kubernetes.extractDataToOracle($http, "/java/console/api/oracle", extractClick.items, extractClick.selectedItem); + //extractClick.selectedItem = $scope.filterReplicationControllers[0] || ""; + extractClick.dialog.close(); + }, + open: function (selected) { + var extractClick = $scope.extractClick; + if ($scope.configs && $scope.configs.oracleParam instanceof Array && $scope.configs.oracleParam.length > 0) + extractClick.selectedItem = $scope.configs.oracleParam[0]; + var result = Kubernetes.checkIsStartSuccess($scope.tableConfig.selectedItems); + if (result.length > 0) { + Configs.customAlert("提示", "操作失败:选择服务中存在未启动的数据库,请先启动服务", '', null, 0, "error"); + return; } - 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 }); + /** + 检查数据库是否正在抽取 + **/ + if (Kubernetes.checkRCIsExtracting(selected)) { + Configs.customAlert("提示", "操作失败:选择的数据库中有正在执行汇总的数据库,请勿重复执行汇总操作", '', null, 0, "error"); + return; } - }); - $scope.data = []; - if (buildsSucceeded.length) { - $scope.data.push({ - key: successBuildKey, - values: buildsSucceeded - }); + extractClick.dialog.open(); + /*extractData.selectedItem = $scope.filterReplicationControllers[0] || ""; + extractData.items = selected;*/ + $timeout(function () { + $('#newDataName').focus(); + }, 50); + }, + close: function () { + $scope.extractClick.selectedItem = { name: "当前没有可用的汇总库" }; + $scope.extractClick.dialog.close(); } - if (buildsFailed.length) { - $scope.data.push({ - key: failedBuildKey, - values: buildsFailed - }); + }; + }]); +})(Kubernetes || (Kubernetes = {})); + +///已启用 | \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\n