-
Notifications
You must be signed in to change notification settings - Fork 484
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
240 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import Ember from 'ember'; | ||
|
||
export default Ember.Component.extend({ | ||
k8s: Ember.inject.service(), | ||
|
||
model: null, | ||
expanded: false, | ||
|
||
tagName: '', | ||
|
||
actions: { | ||
toggleExpand() { | ||
this.toggleProperty('expanded'); | ||
} | ||
}, | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<tr> | ||
<td> | ||
<a href="#" {{action "toggleExpand"}}><i class="icon {{if expanded 'icon-minus-square' 'icon-plus-square'}}"/></a> | ||
{{#link-to "k8s-tab.namespace.deployments.deployment" model.displayName}}{{model.displayName}}{{/link-to}} | ||
</td> | ||
<td> | ||
{{model.displayReplicas}} | ||
</td> | ||
<td class="force-wrap"> | ||
{{#each model.selectorsAsArray as |sel|}} | ||
<span class="badge badge-default">{{sel.label}}={{sel.value}}</span> | ||
{{else}} | ||
<span class="text-muted">{{t 'generic.none'}}</span> | ||
{{/each}} | ||
</td> | ||
<td class="force-wrap"> | ||
{{#each model.spec.template.spec.containers as |container index|}} | ||
<span tooltip="{{if (gt model.spec.template.spec.containers.length 1) container.image}}"> | ||
{{~unless (eq index 0) ', '~}} | ||
{{~container.name~}} | ||
{{~#if (eq model.spec.template.spec.containers.length 1)~}} | ||
<span class="text-muted"> ({{container.image}})</span> | ||
{{~/if~}} | ||
</span> | ||
{{else}} | ||
<span class="text-muted">{{t 'generic.none'}}</span> | ||
{{/each}} | ||
</td> | ||
<td class="actions"> | ||
{{action-menu model=model}} | ||
</td> | ||
</tr> | ||
{{#if expanded}} | ||
<tr class="nohover"> | ||
<td colspan="5" class="subtable"> | ||
{{k8s/pod-section model=model.selectedPods}} | ||
</td> | ||
</tr> | ||
{{/if}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import Ember from 'ember'; | ||
|
||
export default Ember.Route.extend({ | ||
k8s: Ember.inject.service(), | ||
|
||
model(params) { | ||
return this.get('k8s').getDeployment(params.name); | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<section class="header"> | ||
<h1>{{#link-to "k8s-tab.namespace.deployments"}}{{t 'k8sTab.namespace.deployments.deployment.header'}}{{/link-to}} {{model.displayName}}</h1> | ||
<div class="pull-right"> | ||
{{action-menu model=model}} | ||
</div> | ||
</section> | ||
|
||
<section> | ||
<div class="container-multi-stat"> | ||
<div class="container-flex bordered"> | ||
<div class="col-flex"><label>{{t 'k8sTab.multistat.header.type'}}</label> {{model.spec.type}}</div> | ||
<div class="col-flex"><label>{{t 'k8sTab.multistat.header.cluster'}}</label> {{model.spec.clusterIP}}</div> | ||
<div class="col-flex"><label>{{t 'k8sTab.multistat.header.balancer'}}</label> {{default-str model.spec.loadBalancerIP default="None"}}</div> | ||
<div class="col-flex"><label>{{t 'k8sTab.multistat.header.session'}}</label> {{model.spec.sessionAffinity}}</div> | ||
<div class="col-flex"> | ||
<label>{{t 'k8sTab.multistat.header.external'}}</label> | ||
{{#each model.spec.externalIPs as |ip index|}} | ||
{{if (eq index 0) '' ','}}{{ip}} | ||
{{else}} | ||
{{t 'generic.none'}} | ||
{{/each}} | ||
</div> | ||
<div class="col-flex"> | ||
<label>{{t 'k8sTab.multistat.header.selectors'}}</label> | ||
{{#each model.selectorsAsArray as |sel|}} | ||
<span class="badge badge-default">{{sel.label}}={{sel.value}}</span> | ||
{{else}} | ||
{{t 'generic.none'}} | ||
{{/each}} | ||
</div> | ||
</div> | ||
</div> | ||
</section> | ||
|
||
<section> | ||
<ul class="nav nav-tabs nav-tabs-well shadowed" role="tablist"> | ||
<li role="tab" class="tab" data-section="pods" {{action "selectTab" "pods" target="view"}}><a href="#">{{t 'k8sTab.navTabs.pods'}}</a></li> | ||
<li role="tab" class="tab" data-section="labels" {{action "selectTab" "labels" target="view"}}><a href="#">{{t 'k8sTab.navTabs.labels'}}</a></li> | ||
<li role="tab" class="tab" data-section="ports" {{action "selectTab" "ports" target="view"}}><a href="#">{{t 'k8sTab.navTabs.ports'}}</a></li> | ||
</ul> | ||
|
||
<div class="horizontal-form well" role="tabpanel"> | ||
<div class="section container-fluid" data-section="pods"> | ||
{{k8s/pod-section model=model.selectedPods}} | ||
</div> | ||
<div class="section container-fluid" data-section="labels"> | ||
{{labels-section model=model labelSource=model.metadata.labels showKind=false sortBy="key"}} | ||
</div> | ||
<div class="section container-fluid" data-section="ports"> | ||
{{k8s/service-ports model=model.spec.ports}} | ||
</div> | ||
</div> | ||
</section> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import Ember from 'ember'; | ||
import SelectTab from 'ui/mixins/select-tab'; | ||
|
||
export default Ember.View.extend(SelectTab, { | ||
didInsertElement() { | ||
this.send('selectTab', 'pods'); | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import Ember from 'ember'; | ||
import Sortable from 'ui/mixins/sortable'; | ||
import FilterNamespace from 'ui/mixins/filter-k8s-namespace'; | ||
|
||
export default Ember.Controller.extend(Sortable, FilterNamespace, { | ||
filterableContent: Ember.computed.alias('model.allDeployments'), | ||
sortableContent: Ember.computed.alias('filtered'), | ||
|
||
sortBy: 'name', | ||
sorts: { | ||
state: ['stateSort','name','id'], | ||
name: ['name','id'], | ||
serviceType: ['serviceType','name','id'], | ||
selector: ['selector','name','id'], | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import Ember from 'ember'; | ||
|
||
export default Ember.Route.extend({ | ||
model() { | ||
return Ember.Object.create({ | ||
namespace: this.modelFor('k8s-tab.namespace'), | ||
allDeployments: this.modelFor('k8s-tab.namespace.deployments'), | ||
}); | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<section class="header"> | ||
<h1>{{t 'k8sTab.namespace.deployments.index.header'}}</h1> | ||
|
||
{{#link-to "k8s-tab.apply" (query-params kind="ReplicationController") classNames="btn btn-sm btn-primary"}}{{t 'k8sTab.namespace.deployments.index.linkTo'}}{{/link-to}} | ||
</section> | ||
|
||
<section class="well instances"> | ||
<table class="grid fixed" style="margin-bottom: 0;"> | ||
<thead> | ||
<tr> | ||
{{sortable-th sortable=this action="changeSort" name="name" label='generic.name'}} | ||
<th width="80">{{t 'k8sTab.namespace.deployments.index.table.header.replicas'}}</th> | ||
<th>{{t 'k8sTab.namespace.deployments.index.table.header.selectors'}}</th> | ||
<th>{{t 'k8sTab.namespace.deployments.index.table.header.containers'}}</th> | ||
<th class="actions" width="85"> </th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
{{#each arranged as |deployment|}} | ||
{{k8s/deployment-row model=deployment}} | ||
{{else}} | ||
<tr><td colspan="5" class="text-center text-muted">{{t 'k8sTab.namespace.deployments.index.table.body.noData'}}</td></tr> | ||
{{/each}} | ||
</tbody> | ||
</table> | ||
</section> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import Ember from 'ember'; | ||
|
||
export default Ember.Route.extend({ | ||
k8s: Ember.inject.service(), | ||
|
||
model() { | ||
return this.get('k8s').allDeployments(); | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import ReplicationController from 'ui/models/k8s-replicationcontroller'; | ||
|
||
var Deployment = ReplicationController.extend(); | ||
|
||
export default Deployment; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters