diff --git a/app/components/k8s/namespace-rcs/component.js b/app/components/k8s/namespace-rcs/component.js
deleted file mode 100644
index 35fa90a7a..000000000
--- a/app/components/k8s/namespace-rcs/component.js
+++ /dev/null
@@ -1,15 +0,0 @@
-import Ember from 'ember';
-import FilterState from 'ui/mixins/filter-state';
-
-export default Ember.Component.extend(FilterState, {
- model: null,
- single: false,
- classNames: ['stack-section'],
-
- filtered: function() {
- return (this.get('model.services')||[]).filter((row) => {
- return row.get('kind').toLowerCase() === 'kubernetesreplicationcontroller' &&
- (['removing','removed','purging','purged'].indexOf(row.get('state')) === -1);
- });
- }.property('model.services.@each.{kind,state}'),
-});
diff --git a/app/components/k8s/namespace-rcs/template.hbs b/app/components/k8s/namespace-rcs/template.hbs
deleted file mode 100644
index f5d4a0168..000000000
--- a/app/components/k8s/namespace-rcs/template.hbs
+++ /dev/null
@@ -1,64 +0,0 @@
-{{#unless single}}
-
- {{#if filtered.length}}
-
-
- {{#each filtered as |service|}}
-
- |
- {{badge-state model=service}}
- |
-
-
- {{#link-to "service" service.environmentId service.id}}{{service.displayName}}{{/link-to}}
- |
-
-
-
- {{service.displayPorts}}
- {{service.displaySelectors}}
- |
-
-
- {{#if service.serviceType}}
- {{service.serviceType}}
- {{else}}
- None?
- {{/if}}
- |
-
-
- {{action-menu model=service}}
- |
-
- {{/each}}
-
-
- {{else}}
-
No Services
- {{/if}}
-
-
diff --git a/app/components/k8s/rc-instances/component.js b/app/components/k8s/rc-instances/component.js
new file mode 100644
index 000000000..55dac36eb
--- /dev/null
+++ b/app/components/k8s/rc-instances/component.js
@@ -0,0 +1,17 @@
+import Ember from 'ember';
+import FasterLinksAndMenus from 'ui/mixins/faster-links-and-menus';
+import FilterState from 'ui/mixins/filter-state';
+
+export default Ember.Component.extend(FasterLinksAndMenus, FilterState, {
+ projects: Ember.inject.service(),
+
+ detailBaseUrl: function() {
+ return `/env/${this.get('projects.current.id')}/infra/containers/`;
+ }.property('projects.current.id'),
+
+ model: null,
+ single: false,
+ classNames: ['stack-section'],
+
+ filterableContent: Ember.computed.alias('model.instances'),
+});
diff --git a/app/components/k8s/rc-instances/template.hbs b/app/components/k8s/rc-instances/template.hbs
new file mode 100644
index 000000000..633ba22bc
--- /dev/null
+++ b/app/components/k8s/rc-instances/template.hbs
@@ -0,0 +1,48 @@
+
+ {{#if filtered.length}}
+
+
+ {{#each filtered as |inst|}}
+
+ |
+ {{badge-state model=inst}}
+ |
+
+
+ {{inst.displayName}}
+ |
+
+
+ {{action-menu model=inst}}
+ |
+
+ {{/each}}
+
+
+ {{else}}
+
No Pods
+ {{/if}}
+
+
diff --git a/app/k8s-tab/index/route.js b/app/k8s-tab/index/route.js
index 5126ebe4d..da0d3d1e4 100644
--- a/app/k8s-tab/index/route.js
+++ b/app/k8s-tab/index/route.js
@@ -1,12 +1,21 @@
import Ember from 'ember';
+import C from 'ui/utils/constants';
export default Ember.Route.extend({
k8s: Ember.inject.service(),
+ 'tab-session': Ember.inject.service('tab-session'),
redirect() {
- if ( this.get('k8s.namespaces.length') )
+ var all = this.get('k8s.namespaces')||[];
+ var nsId = this.get(`tab-session.${C.TABSESSION.NAMESPACE}`);
+
+ if ( all.filterBy('id', nsId).get('length') > 0 )
{
- this.transitionTo('k8s-tab.namespace', this.get('k8s.namespaces.firstObject.id'));
+ this.transitionTo('k8s-tab.namespace', nsId);
+ }
+ else if ( all.get('length') )
+ {
+ this.transitionTo('k8s-tab.namespace', all.objectAt(0).get('id'));
}
},
});
diff --git a/app/k8s-tab/namespace/rcs/index/template.hbs b/app/k8s-tab/namespace/rcs/index/template.hbs
index 7937b8eeb..140229c22 100644
--- a/app/k8s-tab/namespace/rcs/index/template.hbs
+++ b/app/k8s-tab/namespace/rcs/index/template.hbs
@@ -4,24 +4,10 @@
{{#link-to "k8s-tab.namespace.rcs.new" classNames="btn btn-sm btn-primary"}}Add Replication Controller{{/link-to}}
-