mirror of
https://github.com/rustfs/console.git
synced 2026-09-19 09:52:25 +08:00
fix: add sort for policies list
This commit is contained in:
@@ -112,7 +112,7 @@ const emit = defineEmits<{
|
||||
}>()
|
||||
const getPoliciesList = async () => {
|
||||
const res = await listPolicies()
|
||||
polices.value = Object.keys(res).map((key) => {
|
||||
polices.value = Object.keys(res).sort((a,b)=>a.localeCompare(b)).map((key) => {
|
||||
return {
|
||||
label: key,
|
||||
value: key
|
||||
|
||||
@@ -95,7 +95,7 @@ function filterName(value: string) {
|
||||
const listData = ref<any[]>([])
|
||||
const getPoliciesList = async () => {
|
||||
const res = await listPolicies()
|
||||
listData.value = Object.keys(res).map((key) => {
|
||||
listData.value = Object.keys(res).sort((a,b)=>a.localeCompare(b)).map((key) => {
|
||||
return {
|
||||
name: key,
|
||||
content: res[key],
|
||||
|
||||
@@ -140,7 +140,7 @@ const policiesList = ref<any[]>([])
|
||||
|
||||
const getPoliciesList = async () => {
|
||||
const res = await listPolicies()
|
||||
policiesList.value = Object.keys(res).map((key) => {
|
||||
policiesList.value = Object.keys(res).sort((a,b)=>a.localeCompare(b)).map((key) => {
|
||||
return {
|
||||
label: key,
|
||||
value: key,
|
||||
|
||||
@@ -99,7 +99,7 @@ const emit = defineEmits<{
|
||||
}>()
|
||||
const getPoliciesList = async () => {
|
||||
const res = await listPolicies()
|
||||
policyList.value = Object.keys(res).map((key) => {
|
||||
policyList.value = Object.keys(res).sort((a,b)=>a.localeCompare(b)).map((key) => {
|
||||
return {
|
||||
label: key,
|
||||
value: key,
|
||||
|
||||
@@ -136,7 +136,7 @@ function filterName(value: string) {
|
||||
const fetchPolicies = async () => {
|
||||
try {
|
||||
const res = await $api.get("/list-canned-policies");
|
||||
pilicies.value = Object.keys(res).map((key) => {
|
||||
pilicies.value = Object.keys(res).sort((a,b)=>a.localeCompare(b)).map((key) => {
|
||||
return {
|
||||
name: key,
|
||||
content: res[key],
|
||||
|
||||
Reference in New Issue
Block a user