@ -1,16 +1,11 @@
< script type = "text/ng-template" id = "runButton.html" >
< button ng-show = "model.showRunButton"
class="btn btn-success pull-right"
ng-click="viewTemplates()"
title="Run an application from a template">
< button ng-show = "model.showRunButton" class = "btn btn-success pull-right" ng-click = "viewTemplates()" title = "Run an application from a template" >
< i class = "fa fa-play-circle" > < / i > Run ...
< / button >
< / script >
< script type = "text/ng-template" id = "idTemplate.html" >
< div class = "ngCellText nowrap" >
< a href = ""
title="View details for {{row.entity.metadata.name || row.entity.name}}">
< a href = "" title = "View details for {{row.entity.metadata.name || row.entity.name}}" >
<!-- <img class="app - icon - small" ng - src="{{row.entity.$iconUrl}}" ng - show="row.entity.$iconUrl"> -->
< strong > {{row.entity.$oracleName || row.entity.name}}< / strong > < / a >
< / div >
@ -34,7 +29,6 @@
< / a >
< / div >
< / script >
< script type = "text/ng-template" id = "dataSummaryTemplate.html" >
< div class = "ngCellText" ng-init = "entity=row.entity" >
< a ng-show = "row.entity.$podCounters.podsLink" title = "pods status" >
@ -49,51 +43,33 @@
< / a >
< / div >
< / script >
< script type = "text/ng-template" id = "labelTemplate.html" >
< div class = "ngCellText" ng-init = "entity=row.entity" ng-controller = "Kubernetes.Labels" >
< p ng-show = "data" > < strong > Labels< / strong > < / p >
< span ng-repeat = "label in labels track by $index"
class="pod-label badge"
ng-class="labelClass(label.key)"
ng-click="handleClick(entity, label.key, label)"
title="{{label.key}}">{{label.title}}< / span >
< span ng-repeat = "label in labels track by $index" class = "pod-label badge" ng-class = "labelClass(label.key)" ng-click = "handleClick(entity, label.key, label)" title = "{{label.key}}" > {{label.title}}< / span >
< / div >
< / script >
< script type = "text/ng-template" id = "eventSourceTemplate.html" >
< div class = "ngCellText" ng-init = "labels=row.entity.source" >
< p ng-show = "data" > < strong > Labels< / strong > < / p >
< span ng-repeat = "(key, value) in labels track by $index"
class="pod-label badge"
class="background-light-grey mouse-pointer"
title="{{key}}"
ng-click="$emit('labelFilterUpdate', key + '=' + value)">{{value}}< / span >
< span ng-repeat = "(key, value) in labels track by $index" class = "pod-label badge" class = "background-light-grey mouse-pointer" title = "{{key}}" ng-click = "$emit('labelFilterUpdate', key + '=' + value)" > {{value}}< / span >
< / div >
< / script >
< script type = "text/ng-template" id = "dataLabelsTemplate.html" ng-controller = "Kubernetes.DataLabels" >
< div class = "ngCellText" ng-init = "labels=row.entity.labels" >
< p ng-show = "data" > < strong > Labels< / strong > < / p >
< span ng-repeat = "(key, value) in labels track by $index"
class="pod-label badge"
ng-class="labelClass(label.key)"
ng-click="labelClick(entity, label.key, label.value)"
title="{{label.key}}">{{value}}< / span >
< span ng-repeat = "(key, value) in labels track by $index" class = "pod-label badge" ng-class = "labelClass(label.key)" ng-click = "labelClick(entity, label.key, label.value)" title = "{{label.key}}" > {{value}}< / span >
< / div >
< / script >
< script type = "text/ng-template" id = "hostTemplate.html" >
< div class = "ngCellText" ng-init = "host=row.entity.$host" >
< span class = "pod-label badge background-light-grey mouse-pointer"
ng-click="$emit('labelFilterUpdate', 'host=' + host)">{{host}}< / span >
< span class = "pod-label badge background-light-grey mouse-pointer" ng-click = "$emit('labelFilterUpdate', 'host=' + host)" > {{host}}< / span >
< / div >
< / script >
< script type = "text/ng-template" id = "portalAddress.html" >
< div class = "ngCellText" >
< div ng-repeat = "port in row.entity.$ports track by $index" >
< a target = "_blank" href = "{{row.entity.$connectUrl}}"
ng-show="row.entity.$connectUrl & & row.entity.$podCounters.ready"
title="Protocol {{row.entity.spec.protocol}}">
< a target = "_blank" href = "{{row.entity.$connectUrl}}" ng-show = "row.entity.$connectUrl && row.entity.$podCounters.ready" title = "Protocol {{row.entity.spec.protocol}}" >
{{row.entity.$host}}
< / a >
< span ng-hide = "row.entity.$connectUrl && row.entity.$podCounters.ready" > {{row.entity.spec.portalIP || row.entity.spec.clusterIP}}:{{port}}< / span >
@ -122,16 +98,12 @@
< / script >
< script type = "text/ng-template" id = "eventKindTemplate.html" >
< div class = "ngCellText" ng-init = "kind=row.entity.involvedObject.kind" >
< span class = "pod-label badge"
class="background-light-grey mouse-pointer"
ng-click="$emit('labelFilterUpdate', 'kind=' + kind)">{{kind}}< / span >
< span class = "pod-label badge" class = "background-light-grey mouse-pointer" ng-click = "$emit('labelFilterUpdate', 'kind=' + kind)" > {{kind}}< / span >
< / div >
< / script >
< script type = "text/ng-template" id = "eventNameTemplate.html" >
< div class = "ngCellText" ng-init = "name=row.entity.involvedObject.name" >
< span class = "pod-label badge"
class="background-light-grey mouse-pointer"
ng-click="$emit('labelFilterUpdate', 'name=' + name)">{{name}}< / span >
< span class = "pod-label badge" class = "background-light-grey mouse-pointer" ng-click = "$emit('labelFilterUpdate', 'name=' + name)" > {{name}}< / span >
< / div >
< / script >
< script type = "text/ng-template" id = "eventSummaryTemplate.html" >
@ -162,22 +134,18 @@
< i class = "fa fa-file-text" title = "Open up the logs for {{entity.metadata.name}}" ng-click = "openLogs(entity)" > < / i >
< / span >
< / script >
< script type = "text/ng-template" id = "oracleLogTemplate.html" >
< span ng-controller = "Kubernetes.PodLogLinkController" >
< i class = "fa fa-file-text" title = "打开{{entity.$oracleName}}的汇总日志" ng-click = "openLogs(entity)" > < / i >
< / span >
< / script >
< script type = "text/ng-template" id = "connectParamTemplate.html" >
< div class = "ngCellText" ng-init = "entity=row.entity" >
< p ng-show = "row.entity.$pods.length" > < strong > {{row.entity.$pods[0].$host}}:{{row.entity.$pods[0].spec.containers[0].ports[0].hostPort}}/orcl< / strong > < / p >
< / div >
< / script >
< script type = "text/ng-template" id = "statusTemplate.html" >
< div class = "ngCellText nowrap" ng-init = "entity=row.entity" ng-controller = "Kubernetes.PodStatus"
title="Pod {{entity.metadata.name}} is {{entity.status.phase}}">
< div class = "ngCellText nowrap" ng-init = "entity=row.entity" ng-controller = "Kubernetes.PodStatus" title = "Pod {{entity.metadata.name}} is {{entity.status.phase}}" >
<!-- in detail view -->
< p ng-show = "data" > < strong > Status: < / strong > < / p >
< i class = "fa {{entity.$statusCss}}" > < / i >
@ -191,21 +159,18 @@
< script type = "text/ng-template" id = "resizeDialog.html" >
< div modal = "resizeDialog.dialog.show" >
< form class = "form-horizontal" ng-submit = "resizeDialog.onOk()" >
< div class = "modal-header" > < h4 > Scale {{resizeDialog.controller.metadata.name}}< / h4 > < / div >
< div class = "modal-header" >
< h4 > Scale {{resizeDialog.controller.metadata.name}}< / h4 > < / div >
< div class = "modal-body" >
< div class = "control-group" >
< label class = "control-label" for = "replicas" > Number of pods you would like to scale to?< / label >
< div class = "controls" >
< input type = "number" min = "0" id = "replicas" ng-model = "resizeDialog.newReplicas" >
< / div >
< / div >
< / div >
< div class = "modal-footer" >
< input class = "btn btn-primary" type = "submit"
ng-disabled="resizeDialog.newReplicas === resizeDialog.controller.status.replicas"
value="Resize">
< input class = "btn btn-primary" type = "submit" ng-disabled = "resizeDialog.newReplicas === resizeDialog.controller.status.replicas" value = "Resize" >
< button class = "btn btn-warning cancel sj_btn_grey" type = "button" ng-click = "resizeDialog.close()" > 取消< / button >
< / div >
< / form >
@ -242,15 +207,42 @@
< / div >
< / div >
< / script >
< script type = "text/ng-template" id = "taskEdit.html" >
< div class = "ngCellText" ng-init = "entity=row.entity" ng-controller = "Kubernetes.TaskEdit" >
< button class = "btn sj_btn" ng-click = "deleteRow(entity)" >
< span class = "glyphicon glyphicon-pencil" > < / span > 删除
< / button >
< / div >
< / script >
<!-- 迁移进度条 -->
< script type = "text/ng-template" id = "taskProcess.html" >
< div class = "ngCellText progress" ng-init = "entity=row.entity" >
< div ng-show = "entity.status!==3" class = "progress-bar progress-bar-success active sj_progress_bar " role = "progressbar" aria-valuenow = "{{entity.process}}" aria-valuemin = "0" aria-valuemax = "100" style = "width: {{entity.process}}%" >
< span class = "sr-only" > {{entity.process}}< / span >
< span class = "sj_progress_font" > 20%< / span >
< / div >
< div ng-show = "entity.status ===3" class = "progress-bar progress-bar-danger active sj_progress_bar" role = "progressbar" aria-valuenow = "{{entity.process}}" aria-valuemin = "0" aria-valuemax = "100" style = "width: {{entity.process}}%" >
< span class = "sr-only" > {{entity.process}}< / span >
< span class = "sj_progress_font" > 20%< / span >
< / div >
< / div >
< / script >
<!-- 迁移状态显示 -->
< script type = "text/ng-template" id = "taskStatus.html" >
< div class = "ngCellText" ng-init = "entity=row.entity" >
< span ng-show = "entity.status===0" class = "glyphicon glyphicon-minus" > < / span >
< span ng-show = "entity.status===1" class = "glyphicon glyphicon-transfer" > < / span >
< span ng-show = "entity.status===2" class = "glyphicon glyphicon-ok" > < / span >
< span ng-show = "entity.status===3" class = "glyphicon glyphicon-remove" > < / span >
< / div >
< / script >
< script type = "text/ng-template" id = "creationTimeTemplate.html" >
< div class = "ngCellText" title = "created at: {{row.entity.$creationDate | date : 'h:mm:ss a, EEE MMM yyyy'}}" >
{{row.entity.$creationDate.relative()}}
< / div >
< / script >
< div ng-controller = "Kubernetes.TopLevel" >
< div class = "wiki-icon-view" ng-controller = "Kubernetes.FileDropController" nv-file-drop nv-file-over
uploader="uploader" over-class="ready-drop">
< div class = "wiki-icon-view" ng-controller = "Kubernetes.FileDropController" nv-file-drop nv-file-over uploader = "uploader" over-class = "ready-drop" >
< div class = "row kubernetes-view" ng-view > < / div >
< / div >
< / div >