+
{
const name = resource.meta?.name || resource.name;
@@ -178,6 +178,13 @@ export default {
collectionMethods: ['get', 'post'],
resourceFields: { },
attributes: { namespaced: true }
+ }, {
+ product: EPINIO_PRODUCT_NAME,
+ id: EPINIO_TYPES.APP_CHARTS,
+ type: 'schema',
+ links: { collection: '/api/v1/appcharts' },
+ collectionMethods: ['get'],
+ resourceFields: { },
}, {
product: EPINIO_PRODUCT_NAME,
id: EPINIO_TYPES.NAMESPACE,
@@ -264,5 +271,13 @@ export default {
commit('singleProductCNSI', cnsi);
return cnsi;
+ },
+
+ createNamespace(ctx: any, obj: { name : string }) {
+ // Note - created model save --> create
+ return classify(ctx, {
+ type: EPINIO_TYPES.NAMESPACE,
+ meta: { name: obj.name }
+ });
}
};
diff --git a/pkg/epinio/tsconfig.json b/pkg/epinio/tsconfig.json
index c7e99f735a..6ecdf84cbb 100644
--- a/pkg/epinio/tsconfig.json
+++ b/pkg/epinio/tsconfig.json
@@ -42,6 +42,9 @@
"@shell/models/*": [
"../../shell/models/*"
],
+ "@components/*": [
+ "../../pkg/rancher-components/*"
+ ],
"@pkg/*": [
"./*"
]
diff --git a/pkg/epinio/types.ts b/pkg/epinio/types.ts
index 308b4e9558..7ce370e38e 100644
--- a/pkg/epinio/types.ts
+++ b/pkg/epinio/types.ts
@@ -2,6 +2,7 @@ import EpinioApplicationModel from './models/applications';
import EpinioCatalogServiceModel from './models/catalogservices';
import EpinioConfigurationModel from './models/configurations';
import EpinioServiceModel from './models/services';
+import EpinioAppChartModel from './models/appcharts';
export const EPINIO_PRODUCT_NAME = 'epinio';
@@ -13,6 +14,7 @@ export const EPINIO_STANDALONE_CLUSTER_NAME = 'default';
export const EPINIO_TYPES = {
// From API
APP: 'applications',
+ APP_CHARTS: 'appcharts',
NAMESPACE: 'namespaces',
CONFIGURATION: 'configurations',
CATALOG_SERVICE: 'catalogservices',
@@ -65,6 +67,7 @@ export interface EpinioApplicationResource {
configuration: {
instances: number,
configurations: string[],
+ appchart?: string,
environment: Map,
routes: string[]
},
@@ -83,6 +86,15 @@ export interface EpinioApplicationResource {
export type EpinioApplication = EpinioApplicationResource & EpinioApplicationModel & EpinioMetaProperty;
+export interface EpinioApplicationChartResource {
+ meta: EpinioMeta,
+ description: string,
+ helm_chart: string, // eslint-disable-line camelcase
+ short_description: string, // eslint-disable-line camelcase
+}
+
+export type EpinioAppChart = EpinioApplicationChartResource & EpinioAppChartModel & EpinioMetaProperty;
+
export interface EpinioHelmRepoResource {
name: string,
url: string,
@@ -116,6 +128,7 @@ export interface EpinioServiceResource {
meta: EpinioMeta
boundapps: string[],
catalog_service: string, // eslint-disable-line camelcase
+ catalog_service_version: string, // eslint-disable-line camelcase
status: string,
}
diff --git a/shell/components/form/NameNsDescription.vue b/shell/components/form/NameNsDescription.vue
index 4bd7868696..6f7061f25a 100644
--- a/shell/components/form/NameNsDescription.vue
+++ b/shell/components/form/NameNsDescription.vue
@@ -324,7 +324,7 @@ export default {
},
selectNamespace(e) {
- if (e.value === '') { // The blank value in the dropdown is labeled "Create a New Namespace"
+ if (!e || e.value === '') { // The blank value in the dropdown is labeled "Create a New Namespace"
this.createNamespace = true;
this.$parent.$emit('createNamespace', true);
Vue.nextTick(() => this.$refs.namespace.focus());
diff --git a/shell/components/nav/Header.vue b/shell/components/nav/Header.vue
index d35ae174fc..322bd5eef9 100644
--- a/shell/components/nav/Header.vue
+++ b/shell/components/nav/Header.vue
@@ -331,7 +331,7 @@ export default {