Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

Show/Hide password

天舟a43e4795a6c4
diff --git a/frontend/src/components/DataSourceTable.vue b/frontend/src/components/DataSourceTable.vue
index d01d494b79..86e0288ddb 100644
--- a/frontend/src/components/DataSourceTable.vue
+++ b/frontend/src/components/DataSourceTable.vue
@@ -1,9 +1,52 @@
<template>
<div class="flex flex-col space-y-2">
<div class="flex justify-between items-center">
- <h3 class="text-lg leading-6 font-medium text-gray-900">
- All Data Source
- </h3>
+ <div class="inline-flex items-center space-x-2">
+ <h3 class="text-lg leading-6 font-medium text-gray-900">
+ All Data Source
+ </h3>
+ <button
+ class="btn-icon"
+ @click.prevent="state.showPassword = !state.showPassword"
+ >
+ <svg
+ v-if="state.showPassword"
+ class="w-6 h-6"
+ fill="none"
+ stroke="currentColor"
+ viewBox="0 0 24 24"
+ xmlns="http://www.w3.org/2000/svg"
+ >
+ <path
+ stroke-linecap="round"
+ stroke-linejoin="round"
+ stroke-width="2"
+ d="M13.875 18.825A10.05 10.05 0 0112 19c-4.478 0-8.268-2.943-9.543-7a9.97 9.97 0 011.563-3.029m5.858.908a3 3 0 114.243 4.243M9.878 9.878l4.242 4.242M9.88 9.88l-3.29-3.29m7.532 7.532l3.29 3.29M3 3l3.59 3.59m0 0A9.953 9.953 0 0112 5c4.478 0 8.268 2.943 9.543 7a10.025 10.025 0 01-4.132 5.411m0 0L21 21"
+ ></path>
+ </svg>
+ <svg
+ v-else
+ class="w-6 h-6"
+ fill="none"
+ stroke="currentColor"
+ viewBox="0 0 24 24"
+ xmlns="http://www.w3.org/2000/svg"
+ >
+ <path
+ stroke-linecap="round"
+ stroke-linejoin="round"
+ stroke-width="2"
+ d="M15 12a3 3 0 11-6 0 3 3 0 016 0z"
+ ></path>
+ <path
+ stroke-linecap="round"
+ stroke-linejoin="round"
+ stroke-width="2"
+ d="M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"
+ ></path>
+ </svg>
+ </button>
+ </div>
<BBTableSearch
class="w-56"
ref="searchField"
@@ -40,7 +83,7 @@
{{ dataSource.username }}
</BBTableCell>
<BBTableCell>
- {{ dataSource.password }}
+ {{ state.showPassword ? dataSource.password : "******" }}
</BBTableCell>
<BBTableCell>
{{ humanizeTs(dataSource.lastUpdatedTs) }}
@@ -85,6 +128,7 @@ const columnList: BBTableColumn[] = [
interface LocalState {
searchText: string;
+ showPassword: boolean;
}
export default {
@@ -102,6 +146,7 @@ export default {
const state = reactive<LocalState>({
searchText: "",
+ showPassword: false,
});
const dataSourceSectionList = computed(() => {