[Improvement] Add Set cluster name (#12074)

This commit is contained in:
jackfanwan 2022-09-21 10:05:15 +08:00 committed by GitHub
parent ed1d1e8856
commit 7d80ea34ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -31,11 +31,11 @@ export function useNamespace(): IJsonItem {
loading.value = true loading.value = true
const totalList = await getAllNamespaces() const totalList = await getAllNamespaces()
options.value = (totalList || []).map( options.value = (totalList || []).map(
(item: { id: string; namespace: string; k8s: string }) => ({ (item: { id: string; namespace: string; clusterName: string }) => ({
label: `${item.namespace}(${item.k8s})`, label: `${item.namespace}(${item.clusterName})`,
value: JSON.stringify({ value: JSON.stringify({
name: item.namespace, name: item.namespace,
cluster: item.k8s cluster: item.clusterName
}) })
}) })
) )