Skip to content

Commit

Permalink
Merge pull request #2436 from codyrancher/pvc-workloads-events
Browse files Browse the repository at this point in the history
Replacing the custom related workloads and events tabs on the PVC page
  • Loading branch information
codyrancher authored Feb 25, 2021
2 parents 19c1b46 + 04d164a commit 5b94f6c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 25 deletions.
4 changes: 0 additions & 4 deletions assets/translations/en-us.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1699,10 +1699,6 @@ persistentVolumeClaim:
readWriteMany: Many Nodes Read-Write
status:
label: Status
relatedWorkloads:
label: Related Workloads
events:
label: Events
prefs:
title: Preferences
theme:
Expand Down
25 changes: 4 additions & 21 deletions edit/persistentvolumeclaim.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,27 @@ import CreateEditView from '@/mixins/create-edit-view';
import CruResource from '@/components/CruResource';
import NameNsDescription from '@/components/form/NameNsDescription';
import Tab from '@/components/Tabbed/Tab';
import Tabbed from '@/components/Tabbed';
import RadioGroup from '@/components/form/RadioGroup';
import LabeledSelect from '@/components/form/LabeledSelect';
import UnitInput from '@/components/form/UnitInput';
import uniq from 'lodash/uniq';
import { _CREATE } from '@/config/query-params';
import { STORAGE_CLASS, PV } from '@/config/types';
import EventsTable from '@/components/EventsTable';
import RelatedWorkloadsTable from '@/components/RelatedWorkloadsTable';
import StatusTable from '@/components/StatusTable';
import ResourceTabs from '@/components/form/ResourceTabs';
export default {
name: 'PersistentVolumClaim',
components: {
Checkbox,
CruResource,
EventsTable,
LabeledSelect,
NameNsDescription,
RadioGroup,
RelatedWorkloadsTable,
ResourceTabs,
StatusTable,
Tab,
Tabbed,
UnitInput,
},
Expand Down Expand Up @@ -143,13 +139,6 @@ export default {
return persistentVolume.status.phase === 'Available';
},
workloadFilter(workload) {
if (workload.namespace !== this.value.namespace) {
return false;
}
return workload.spec.template.spec.volumes?.find(v => v.persistentVolumeClaim?.claimName === this.value.name);
}
}
};
</script>
Expand All @@ -173,7 +162,7 @@ export default {
:namespaced="true"
/>

<Tabbed :side-tabs="true">
<ResourceTabs v-model="value" :mode="mode" :side-tabs="true">
<Tab name="volumeclaim" :label="t('persistentVolumeClaim.volumeClaim.label')" :weight="4">
<div class="row">
<div class="col span-6">
Expand Down Expand Up @@ -220,12 +209,6 @@ export default {
<Tab v-if="isView" name="status" :label="t('persistentVolumeClaim.status.label')" :weight="2">
<StatusTable :resource="value" />
</Tab>
<Tab v-if="isView" name="related-workloads" :label="t('persistentVolumeClaim.relatedWorkloads.label')" :weight="1">
<RelatedWorkloadsTable :filter="workloadFilter" />
</Tab>
<Tab v-if="isView" name="events" :label="t('persistentVolumeClaim.events.label')" :weight="0">
<EventsTable :resource="value" />
</Tab>
</Tabbed>
</ResourceTabs>
</CruResource>
</template>

0 comments on commit 5b94f6c

Please sign in to comment.