修改replicationController.ts

Web_Manager_Develope
wu ming 8 years ago
parent 30a2d220ef
commit 22902602ff

@ -63,6 +63,7 @@ declare module Kubernetes {
function getStatus(pod: any): any; function getStatus(pod: any): any;
function getPorts(service: any): any; function getPorts(service: any): any;
function getCreationTimestamp(entity: any): any; function getCreationTimestamp(entity: any): any;
function getAnnotations(entity: any): any;
var mbean: string; var mbean: string;
var managerMBean: string; var managerMBean: string;
var appViewMBean: string; var appViewMBean: string;

2
defs.d.ts vendored

@ -38,6 +38,7 @@
/// <reference path="d.ts/developer/ts/projects.d.ts"/> /// <reference path="d.ts/developer/ts/projects.d.ts"/>
/// <reference path="d.ts/developer/ts/workspace.d.ts"/> /// <reference path="d.ts/developer/ts/workspace.d.ts"/>
/// <reference path="d.ts/developer/ts/workspaces.d.ts"/> /// <reference path="d.ts/developer/ts/workspaces.d.ts"/>
/// <reference path="d.ts/navigation/ts/navigationPlugin.d.ts"/>
/// <reference path="d.ts/kubernetes/ts/apps.d.ts"/> /// <reference path="d.ts/kubernetes/ts/apps.d.ts"/>
/// <reference path="d.ts/kubernetes/ts/breadcrumbs.d.ts"/> /// <reference path="d.ts/kubernetes/ts/breadcrumbs.d.ts"/>
/// <reference path="d.ts/kubernetes/ts/build.d.ts"/> /// <reference path="d.ts/kubernetes/ts/build.d.ts"/>
@ -78,4 +79,3 @@
/// <reference path="d.ts/kubernetes/ts/sharedControllers.d.ts"/> /// <reference path="d.ts/kubernetes/ts/sharedControllers.d.ts"/>
/// <reference path="d.ts/kubernetes/ts/tabs.d.ts"/> /// <reference path="d.ts/kubernetes/ts/tabs.d.ts"/>
/// <reference path="d.ts/kubernetes/ts/templates.d.ts"/> /// <reference path="d.ts/kubernetes/ts/templates.d.ts"/>
/// <reference path="d.ts/navigation/ts/navigationPlugin.d.ts"/>

File diff suppressed because one or more lines are too long

@ -219,6 +219,7 @@ module Developer {
$scope.createOracleService = (items) =>{ $scope.createOracleService = (items) =>{
angular.forEach(items,(item)=>{ angular.forEach(items,(item)=>{
console.log(item);
Kubernetes.createRC({ Kubernetes.createRC({
name: item._key, name: item._key,
labels: { labels: {
@ -229,7 +230,8 @@ module Developer {
annotations: { annotations: {
cityName: item.cityName, cityName: item.cityName,
districtName: item.districtName, districtName: item.districtName,
systemName: item.systemName systemName: item.systemName,
id: item.id+""
}, },
path: item.dataPath+"app/", path: item.dataPath+"app/",
isTarget: "false", isTarget: "false",

@ -260,8 +260,9 @@
</script> </script>
<script type="text/ng-template" id="dataExtractTemplate.html"> <script type="text/ng-template" id="dataExtractTemplate.html">
<div class="ngCellText" ng-init="entity=row.entity"> <div class="ngCellText" ng-init="entity=row.entity">
<span ng-show="entity.extractStatus==00"></span> <span ng-show="entity.extractStatus == 0" class="badge badge-info"> 待汇总</span>
<span ng-show="entity.extractStatus===1"></span> <span ng-show="entity.extractStatus == 1" class="badge badge-success"> 汇总中</span>
<span ng-show="entity.extractStatus == 2" class="badge"> 已完成</span>
</div> </div>
</script> </script>
<div ng-controller="Kubernetes.TopLevel"> <div ng-controller="Kubernetes.TopLevel">

@ -272,6 +272,10 @@ module Kubernetes {
return Core.pathGet(entity, ["metadata", "creationTimestamp"]); return Core.pathGet(entity, ["metadata", "creationTimestamp"]);
}; };
export function getAnnotations(entity){
return Core.pathGet(entity,["metadata","annotations"]);
}
//var fabricDomain = Fabric.jmxDomain; //var fabricDomain = Fabric.jmxDomain;
var fabricDomain = "io.fabric8"; var fabricDomain = "io.fabric8";
export var mbean = fabricDomain + ":type=Kubernetes"; export var mbean = fabricDomain + ":type=Kubernetes";
@ -1805,12 +1809,13 @@ module Kubernetes {
var answer = targetOracle && true; var answer = targetOracle && true;
var inneedOracle = []; var inneedOracle = [];
selectedReplicationControllers.forEach((rc) => { selectedReplicationControllers.forEach((rc) => {
var annotations = getAnnotations(rc);
answer = answer && checkoutOracleIsRunning(rc); answer = answer && checkoutOracleIsRunning(rc);
inneedOracle.push({ inneedOracle.push({
"name": getName(rc), "name": getName(rc),
"ip": getHost(rc.$pods[0]), "ip": getHost(rc.$pods[0]),
"port": rc.$pods[0].spec.containers[0].ports[0].hostPort, "port": rc.$pods[0].spec.containers[0].ports[0].hostPort,
"isTarget": false "dataId": annotations["id"]
}); });
}); });

Loading…
Cancel
Save