refactor: rename idp fields to provider naming

This commit is contained in:
Chris
2026-04-03 01:05:01 +08:00
parent 467f2b4867
commit ef27162903
35 changed files with 239 additions and 235 deletions

View File

@@ -1,16 +1,16 @@
<template>
<div>
<div class="flex items-center justify-between mb-6">
<h2 class="text-xl font-bold text-gray-800">系統管理Keycloak 唯一來源</h2>
<h2 class="text-xl font-bold text-gray-800">系統管理身分提供者唯一來源</h2>
<div class="flex gap-2">
<el-button :loading="syncing" @click="handleSync">同步 Keycloak</el-button>
<el-button :loading="syncing" @click="handleSync">同步 Provider</el-button>
<el-button :loading="loading" @click="load">重新整理</el-button>
</div>
</div>
<el-alert type="info" :closable="false" show-icon class="mb-4">
<template #title>
系統與角色請在 Keycloak 建立與調整member 後台只做顯示與關聯
系統與角色請在身分提供者建立與調整member 後台只做顯示與關聯
</template>
</el-alert>
@@ -21,7 +21,7 @@
<template #empty><el-empty description="目前無系統" /></template>
<el-table-column prop="system_key" label="System Key" width="200" />
<el-table-column prop="name" label="系統名稱" min-width="180" />
<el-table-column prop="idp_client_id" label="Keycloak Client ID" min-width="220" />
<el-table-column prop="provider_client_id" label="Provider Client ID" min-width="220" />
<el-table-column prop="status" label="狀態" width="110" />
<el-table-column label="操作" width="120">
<template #default="{ row }">
@@ -35,7 +35,7 @@
<template #empty><el-empty description="此系統目前沒有角色" /></template>
<el-table-column prop="role_key" label="Role Key" width="200" />
<el-table-column prop="name" label="角色名稱" min-width="200" />
<el-table-column prop="idp_role_name" label="Keycloak Role" min-width="210" />
<el-table-column prop="provider_role_name" label="Provider Role" min-width="210" />
<el-table-column prop="status" label="狀態" width="110" />
</el-table>
<template #footer>
@@ -79,7 +79,7 @@ async function load() {
async function handleSync() {
syncing.value = true
try {
const res = await adminHttp.post('/admin/sync/from-keycloak', null, { params: { force: true } })
const res = await adminHttp.post('/admin/sync/from-provider', null, { params: { force: true } })
const summary = [
`systems +${res.data?.systems_created ?? 0}`,
`roles +${res.data?.roles_created ?? 0}`,