mirror of
https://github.com/harvester/harvester-ui-extension.git
synced 2025-12-13 21:21:44 +00:00
37 lines
1.2 KiB
Vue
37 lines
1.2 KiB
Vue
<script lang="ts">
|
|
import Vue from 'vue';
|
|
// eslint-disable-next-line import/named
|
|
import { Location } from 'vue-router';
|
|
import ExplorerProjectsNamespaces from '@shell/components/ExplorerProjectsNamespaces.vue';
|
|
import { MANAGEMENT, NAMESPACE } from '@shell/config/types';
|
|
import { PRODUCT_NAME as HARVESTER_PRODUCT } from '../../../config/harvester';
|
|
interface Data {
|
|
createProjectLocation: Location,
|
|
createNamespaceLocation: Location
|
|
}
|
|
export default Vue.extend<Data, any, any, any>({
|
|
components: { ExplorerProjectsNamespaces },
|
|
data() {
|
|
return {
|
|
createProjectLocation: {
|
|
name: `${ HARVESTER_PRODUCT }-c-cluster-resource-create`,
|
|
params: {
|
|
product: HARVESTER_PRODUCT,
|
|
cluster: this.$store.getters['currentCluster']?.id,
|
|
resource: MANAGEMENT.PROJECT
|
|
},
|
|
},
|
|
createNamespaceLocation: {
|
|
name: `${ HARVESTER_PRODUCT }-c-cluster-resource-create`,
|
|
params: {
|
|
product: HARVESTER_PRODUCT,
|
|
resource: NAMESPACE
|
|
},
|
|
}
|
|
};
|
|
}
|
|
});
|
|
</script>
|
|
|
|
<template><ExplorerProjectsNamespaces v-bind="$attrs" :create-project-location-override="createProjectLocation" :create-namespace-location-override="createNamespaceLocation" /></template>
|