Skip to content

Commit

Permalink
Remove chartSteps() from shell/store/catalog.js
Browse files Browse the repository at this point in the history
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
  • Loading branch information
rak-phillip committed Sep 26, 2024
1 parent 4d63a2a commit 7a80f72
Showing 1 changed file with 0 additions and 25 deletions.
25 changes: 0 additions & 25 deletions shell/store/catalog.js
Original file line number Diff line number Diff line change
Expand Up @@ -265,31 +265,6 @@ export const getters = {
};
},

chartSteps(state, getters) {
return (name) => {
const steps = [];

const stepsPath = `./${ name }/steps/`;
// require.context only takes literals, so find all candidate step files and filter out
const allPaths = require.context('@shell/chart', true, /\.vue$/).keys();

allPaths
.filter((path) => path.startsWith(stepsPath))
.forEach((path) => {
try {
steps.push({
name: path.replace(stepsPath, ''),
component: importChart(path.substr(2, path.length)),
});
} catch (e) {
console.warn(`Failed to load step component ${ path } for chart ${ name }`, e); // eslint-disable-line no-console
}
});

return steps;
};
},

inStore(state) {
return state.inStore;
},
Expand Down

0 comments on commit 7a80f72

Please sign in to comment.