Skip to content

Commit

Permalink
hide edit cluster and view cluster config (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
mantis-toboggan-md authored Jan 27, 2024
1 parent 0e57bba commit 76afa65
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions pkg/capi/models/cluster.x-k8s.io.cluster.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import SteveModel from '@shell/plugins/steve/steve-class';
import {
_YAML,
AS,
} from '@shell/config/query-params';

export default class CapiCluster extends SteveModel {
get canEditYaml() {
return false;
}

get canUpdate() {
return false;
}

get detailLocation() {
const location = super._detailLocation;

return { ...location, query: { [AS]: _YAML } };
}

get _availableActions() {
const out = super._availableActions;

return out.filter(action => action.action !== 'goToEdit' && action.action !== 'goToViewConfig');
}
}

0 comments on commit 76afa65

Please sign in to comment.