修改replicationController.ts
This commit is contained in:
parent
30a2d220ef
commit
22902602ff
|
@ -63,6 +63,7 @@ declare module Kubernetes {
|
|||
function getStatus(pod: any): any;
|
||||
function getPorts(service: any): any;
|
||||
function getCreationTimestamp(entity: any): any;
|
||||
function getAnnotations(entity: any): any;
|
||||
var mbean: string;
|
||||
var managerMBean: string;
|
||||
var appViewMBean: string;
|
||||
|
|
|
@ -38,6 +38,7 @@
|
|||
/// <reference path="d.ts/developer/ts/projects.d.ts"/>
|
||||
/// <reference path="d.ts/developer/ts/workspace.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/breadcrumbs.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/tabs.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) =>{
|
||||
angular.forEach(items,(item)=>{
|
||||
console.log(item);
|
||||
Kubernetes.createRC({
|
||||
name: item._key,
|
||||
labels: {
|
||||
|
@ -229,7 +230,8 @@ module Developer {
|
|||
annotations: {
|
||||
cityName: item.cityName,
|
||||
districtName: item.districtName,
|
||||
systemName: item.systemName
|
||||
systemName: item.systemName,
|
||||
id: item.id+""
|
||||
},
|
||||
path: item.dataPath+"app/",
|
||||
isTarget: "false",
|
||||
|
|
|
@ -260,8 +260,9 @@
|
|||
</script>
|
||||
<script type="text/ng-template" id="dataExtractTemplate.html">
|
||||
<div class="ngCellText" ng-init="entity=row.entity">
|
||||
<span ng-show="entity.extractStatus==00">否</span>
|
||||
<span ng-show="entity.extractStatus===1">是</span>
|
||||
<span ng-show="entity.extractStatus == 0" class="badge badge-info"> 待汇总</span>
|
||||
<span ng-show="entity.extractStatus == 1" class="badge badge-success"> 汇总中</span>
|
||||
<span ng-show="entity.extractStatus == 2" class="badge"> 已完成</span>
|
||||
</div>
|
||||
</script>
|
||||
<div ng-controller="Kubernetes.TopLevel">
|
||||
|
|
|
@ -272,6 +272,10 @@ module Kubernetes {
|
|||
return Core.pathGet(entity, ["metadata", "creationTimestamp"]);
|
||||
};
|
||||
|
||||
export function getAnnotations(entity){
|
||||
return Core.pathGet(entity,["metadata","annotations"]);
|
||||
}
|
||||
|
||||
//var fabricDomain = Fabric.jmxDomain;
|
||||
var fabricDomain = "io.fabric8";
|
||||
export var mbean = fabricDomain + ":type=Kubernetes";
|
||||
|
@ -1805,12 +1809,13 @@ module Kubernetes {
|
|||
var answer = targetOracle && true;
|
||||
var inneedOracle = [];
|
||||
selectedReplicationControllers.forEach((rc) => {
|
||||
var annotations = getAnnotations(rc);
|
||||
answer = answer && checkoutOracleIsRunning(rc);
|
||||
inneedOracle.push({
|
||||
"name": getName(rc),
|
||||
"ip": getHost(rc.$pods[0]),
|
||||
"port": rc.$pods[0].spec.containers[0].ports[0].hostPort,
|
||||
"isTarget": false
|
||||
"dataId": annotations["id"]
|
||||
});
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue