mirror of https://github.com/rancher/dashboard.git
removed unnecessary try/catch logic
This commit is contained in:
parent
c73e737c7d
commit
c263131927
|
|
@ -128,13 +128,11 @@ export default {
|
||||||
async mounted() {
|
async mounted() {
|
||||||
const nodeId = this.pod.spec?.nodeName;
|
const nodeId = this.pod.spec?.nodeName;
|
||||||
|
|
||||||
try {
|
|
||||||
const schema = this.$store.getters[`cluster/schemaFor`](NODE);
|
const schema = this.$store.getters[`cluster/schemaFor`](NODE);
|
||||||
|
|
||||||
if (schema) {
|
if (schema) {
|
||||||
await this.$store.dispatch('cluster/find', { type: NODE, id: nodeId });
|
await this.$store.dispatch('cluster/find', { type: NODE, id: nodeId });
|
||||||
}
|
}
|
||||||
} catch {}
|
|
||||||
|
|
||||||
await this.setupTerminal();
|
await this.setupTerminal();
|
||||||
await this.connect();
|
await this.connect();
|
||||||
|
|
|
||||||
|
|
@ -34,17 +34,17 @@ export default class Pod extends WorkloadService {
|
||||||
}
|
}
|
||||||
|
|
||||||
get node() {
|
get node() {
|
||||||
try {
|
|
||||||
const schema = this.$store.getters[`cluster/schemaFor`](NODE);
|
const schema = this.$store.getters[`cluster/schemaFor`](NODE);
|
||||||
|
|
||||||
if (schema) {
|
if (schema) {
|
||||||
this.$dispatch(`find`, { type: NODE, id: this.spec.nodeName });
|
this.$dispatch(`find`, { type: NODE, id: this.spec.nodeName });
|
||||||
}
|
|
||||||
} catch {}
|
|
||||||
|
|
||||||
return this.$getters['byId'](NODE, this.spec.nodeName);
|
return this.$getters['byId'](NODE, this.spec.nodeName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
|
||||||
get _availableActions() {
|
get _availableActions() {
|
||||||
const out = super._availableActions;
|
const out = super._availableActions;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue