mirror of
https://github.com/harvester/harvester-ui-extension.git
synced 2026-10-04 13:16:05 +08:00
fix: resource page detail title link (#459)
* fix: resource page detail title link Signed-off-by: Andy Lee <andy.lee@suse.com> * refactor: extract harvester type in a map Signed-off-by: Andy Lee <andy.lee@suse.com> * refactor: put in config/harvester-map.js Signed-off-by: Andy Lee <andy.lee@suse.com> --------- Signed-off-by: Andy Lee <andy.lee@suse.com>
This commit is contained in:
@@ -1,17 +1,19 @@
|
||||
import SteveModel from '@shell/plugins/steve/steve-class';
|
||||
import { VIEW_IN_API, DEV } from '@shell/store/prefs';
|
||||
import { PRODUCT_NAME as HARVESTER_PRODUCT } from '../config/harvester';
|
||||
import { HARVESTER_CRD_MAP } from '../config/harvester-map';
|
||||
|
||||
export default class HarvesterResource extends SteveModel {
|
||||
get listLocation() {
|
||||
const name = this.harvesterResourcesInExplorer ? 'c-cluster-product-resource' : `${ HARVESTER_PRODUCT }-c-cluster-resource`;
|
||||
const resource = HARVESTER_CRD_MAP[this.type] || this.type;
|
||||
|
||||
return this.$rootGetters['type-map/optionsFor'](this.type).customRoute || {
|
||||
name,
|
||||
params: {
|
||||
product: this.$rootGetters['productId'],
|
||||
cluster: this.$rootGetters['clusterId'],
|
||||
resource: this.type,
|
||||
resource
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user