Skip to content

Commit e11c03c

Browse files
committed
Fix todos
1 parent 962ce6b commit e11c03c

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

dashboard/pkg/epinio/index.ts

+5-4
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,12 @@ import epinioRoutes from './routing/epinio-routing';
44
import epinioMgmtStore from './store/epinio-mgmt-store';
55
import epinioStore from './store/epinio-store';
66

7-
const onEnter: OnNavToPackage = async(store, config) => {
8-
await store.dispatch(`${ epinioMgmtStore.config.namespace }/loadManagement`);
7+
const onEnter: OnNavToPackage = async({ getters, dispatch }, config) => {
8+
await dispatch(`${ epinioMgmtStore.config.namespace }/loadManagement`);
99

10-
// TODO: RC no current cluster
11-
// await store.dispatch(`${ epinioStore.config.namespace }/info`);
10+
if (getters['isSingleProduct']) {
11+
dispatch(`${ epinioStore.config.namespace }/info`); // We can get this in the background
12+
}
1213
};
1314

1415
const onLeave: OnNavAwayFromPackage = async(store, config) => {

dashboard/pkg/epinio/pages/index.vue

+3-3
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,10 @@ export default Vue.extend<Data, any, any, any>({
8989
}
9090
});
9191
92-
// this.$store.dispatch('epinio/request', { opt: { url: `/ready` }, clusterId: c.id }) // TODO: RC doesn't exist
93-
// .then(() => this.$store.dispatch(`epinio/request`, { opt: { url: `/api/v1/info` }, clusterId: c.id }))
92+
// Calls to `/ready` currently throw CORS error (but not `/api/v1`). This code block will probably change given auth stuff
93+
// this.$store.dispatch('epinio/request', { opt: { url: `/ready` }, clusterId: c.id })
9494
this.$store.dispatch(`epinio/request`, { opt: { url: `/api/v1/info` }, clusterId: c.id })
95-
.then(() => this.$store.dispatch(`epinio/request`, { opt: { url: `/api/v1/info` }, clusterId: c.id }))
95+
// .then(() => this.$store.dispatch(`epinio/request`, { opt: { url: `/api/v1/info` }, clusterId: c.id }))
9696
.then((res: any) => {
9797
Vue.set(c, 'version', res?.version);
9898
this.setClusterState(c, 'available', { state: { transitioning: false } });

0 commit comments

Comments
 (0)