From 793920e04160f643e7320473bb4097defcf20ded Mon Sep 17 00:00:00 2001 From: weibaohui Date: Sun, 12 Nov 2023 20:04:45 +0800 Subject: [PATCH] add ns localstorage --- .../ClusterRole/ClusterRoleListView.vue | 9 +++---- .../ClusterRoleBindingListView.vue | 9 +++---- .../EndpointSlice/EndpointSliceListView.vue | 10 +++++--- .../HorizontalPodAutoscaler/HpaListView.vue | 10 +++++--- .../IngressClass/IngressClassListView.vue | 9 +++---- .../MutatingWebhookListView.vue | 9 +++---- .../NetworkPolicy/NetpolListView.vue | 10 +++++--- .../PersistentVolumeListView.vue | 9 +++---- .../PersistentVolumeClaim/PvcListView.vue | 10 +++++--- .../PodDisruptionBudget/PdbListView.vue | 10 +++++--- src/frontend/components/Role/RoleListView.vue | 10 +++++--- .../RoleBinding/RoleBindingListView.vue | 10 +++++--- .../components/ServiceAccount/SaListView.vue | 10 +++++--- .../StorageClass/StorageClassListView.vue | 9 +++---- .../ValidatingWebhookListView.vue | 9 +++---- .../components/configmap/CmListView.vue | 10 +++++--- .../container/ContainerReadyCount.vue | 24 ++++++++++++------- .../components/cronjob/CronJobListView.vue | 10 +++++--- .../components/daemonset/DsListView.vue | 10 +++++--- .../components/deployment/DeployListView.vue | 11 ++++++--- .../components/endpoint/EpListView.vue | 10 +++++--- .../components/event/EventListView.vue | 10 +++++--- .../components/ingress/IngListView.vue | 10 +++++--- src/frontend/components/job/JobListView.vue | 10 +++++--- .../components/limitrange/LimitsListView.vue | 10 +++++--- src/frontend/components/ns/NsListView.vue | 9 +++---- src/frontend/components/ns/NsSelect.vue | 9 +++++-- src/frontend/components/pod/PodListView.vue | 11 ++++++--- .../components/priorityclass/PcListView.vue | 9 +++---- .../replicacontroller/RcListView.vue | 10 +++++--- .../components/replicaset/RsListView.vue | 16 ++++++++++--- .../resourcequota/QuotaListView.vue | 10 +++++--- .../components/secret/SecretListView.vue | 10 +++++--- .../components/service/SvcListView.vue | 10 +++++--- .../components/statefulset/StsListView.vue | 10 +++++--- 35 files changed, 244 insertions(+), 118 deletions(-) diff --git a/src/frontend/components/ClusterRole/ClusterRoleListView.vue b/src/frontend/components/ClusterRole/ClusterRoleListView.vue index 53f022ec..c91f9bb1 100644 --- a/src/frontend/components/ClusterRole/ClusterRoleListView.vue +++ b/src/frontend/components/ClusterRole/ClusterRoleListView.vue @@ -8,7 +8,7 @@ import { DialogHelper } from '@frontend/service/page/DialogHelper' import _ from 'lodash' import type { DataTableColumns } from 'naive-ui' import { NButton, useDialog } from 'naive-ui' -import { h, ref } from 'vue' +import { h, onMounted, ref } from 'vue' import { useDrawerService } from '@frontend/service/drawer-service/use-drawer' import { K8sService } from '@frontend/service/k8s/K8sService' import { DrawerHelper } from '@frontend/service/page/DrawerHelper' @@ -89,9 +89,10 @@ function onTextChanged(text: string) { if (!_.isEmpty(searchText.value)) itemList.value = itemList.value.filter(r => r.metadata.name.includes(searchText.value)) } - -getItemList() -TimerUtils.delayTwoSeconds(() => K8sService.watchService.watchChange(itemList, ResType.ClusterRole)) +onMounted(() => { + getItemList() + TimerUtils.delayTwoSeconds(() => K8sService.watchService.watchChange(itemList, ResType.ClusterRole)) +})