11<script lang="ts" setup>
22import { computed , onMounted , reactive , ref } from ' vue'
33import { useI18n } from ' vue-i18n'
4+ import SuccessFilled from ' @/assets/svg/gou_icon.svg'
5+ import CircleCloseFilled from ' @/assets/svg/icon_ban_filled.svg'
46import icon_warning_filled from ' @/assets/svg/icon_info_colorful.svg'
57import icon_add_outlined from ' @/assets/svg/icon_add_outlined.svg'
68import icon_visible_outlined_blod from ' @/assets/embedded/icon_visible_outlined_blod.svg'
@@ -146,7 +148,7 @@ onMounted(() => {
146148 style =" width : 100% "
147149 @sort-change =" sortChange"
148150 >
149- <el-table-column prop =" access_key" label =" Access Key" width =" 256 " >
151+ <el-table-column prop =" access_key" label =" Access Key" width =" 206 " >
150152 <template #default =" scope " >
151153 <div class =" user-status-container" >
152154 <div :title =" scope.row.access_key" class =" ellipsis" style =" max-width : 208px " >
@@ -169,7 +171,7 @@ onMounted(() => {
169171 </div >
170172 </template >
171173 </el-table-column >
172- <el-table-column prop =" secret_key" label =" Secret Key" width =" 256 " >
174+ <el-table-column prop =" secret_key" label =" Secret Key" width =" 206 " >
173175 <template #default =" scope " >
174176 <div class =" user-status-container" >
175177 <div
@@ -216,6 +218,19 @@ onMounted(() => {
216218 </div >
217219 </template >
218220 </el-table-column >
221+
222+ <el-table-column prop =" status" width =" 100" :label =" t('datasource.enabled_status')" >
223+ <template #default =" scope " >
224+ <div class =" api-status-container" :class =" [scope.row.status ? 'active' : 'disabled']" >
225+ <el-icon size =" 16" >
226+ <SuccessFilled v-if =" scope.row.status" />
227+ <CircleCloseFilled v-else />
228+ </el-icon >
229+ <span >{{ $t(`user.${scope.row.status ? 'enabled' : 'disabled'}`) }}</span >
230+ </div >
231+ </template >
232+ </el-table-column >
233+
219234 <el-table-column prop =" create_time" width =" 180" sortable :label =" t('user.creation_time')" >
220235 <template #default =" scope " >
221236 <span >{{ formatTimestamp(scope.row.create_time, 'YYYY-MM-DD HH:mm:ss') }}</span >
@@ -334,6 +349,17 @@ onMounted(() => {
334349 }
335350 }
336351 }
352+ .api-status-container {
353+ display : flex ;
354+ align-items : center ;
355+ font-weight : 400 ;
356+ font-size : 14px ;
357+ line-height : 22px ;
358+
359+ .ed-icon {
360+ margin-right : 8px ;
361+ }
362+ }
337363 .user-status-container {
338364 display : flex ;
339365 align-items : center ;
0 commit comments