Skip to content

Commit a8cda3e

Browse files
committed
fix: restore database guide token reuse
1 parent 5395d34 commit a8cda3e

23 files changed

Lines changed: 525 additions & 44 deletions

‎i18n/locales/en.json‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1141,7 +1141,12 @@
11411141
"ExpireTime": "Expire time",
11421142
"ShowPassword": "Show password",
11431143
"ConnectCommand": "Connect command line",
1144-
"CopyCommand": "Copy command"
1144+
"CopyCommand": "Copy command",
1145+
"SetReusable": "Set reusable",
1146+
"ReusableHint": "Re-use for a long time after opening",
1147+
"TokenExpired": "Token has expired",
1148+
"HelpText": "Help text",
1149+
"DatabaseTokenHelp": "The database type token that the client connects to will be cached by the component for 5 minutes, which means that the token will not be invalidated immediately after it is used, but five minutes after the client disconnects"
11451150
},
11461151
"UserProfile": {
11471152
"ViewDetails": "View user details",

‎i18n/locales/es.json‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1141,7 +1141,12 @@
11411141
"ExpireTime": "Hora de caducidad",
11421142
"ShowPassword": "Mostrar contraseña",
11431143
"ConnectCommand": "Línea de comandos de conexión",
1144-
"CopyCommand": "Copiar comando"
1144+
"CopyCommand": "Copiar comando",
1145+
"SetReusable": "Permitir reutilización",
1146+
"ReusableHint": "Tras activarlo, esta información de conexión se puede reutilizar durante mucho tiempo",
1147+
"TokenExpired": "El token ha caducado",
1148+
"HelpText": "Texto de ayuda",
1149+
"DatabaseTokenHelp": "El token de base de datos que usa el cliente se almacena en caché 5 minutos; no caduca al usarse, sino 5 minutos después de que el cliente se desconecte"
11451150
},
11461151
"UserProfile": {
11471152
"ViewDetails": "Ver detalles del usuario",

‎i18n/locales/ja.json‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1141,7 +1141,12 @@
11411141
"ExpireTime": "有効期限",
11421142
"ShowPassword": "パスワードを表示",
11431143
"ConnectCommand": "接続コマンドライン",
1144-
"CopyCommand": "コマンドをコピー"
1144+
"CopyCommand": "コマンドをコピー",
1145+
"SetReusable": "再利用を設定",
1146+
"ReusableHint": "有効にすると、この接続情報を長時間繰り返し利用できます",
1147+
"TokenExpired": "トークンの有効期限が切れました",
1148+
"HelpText": "ヘルプ",
1149+
"DatabaseTokenHelp": "クライアントが接続するデータベース種類のトークンはコンポーネントによって5分間キャッシュされます。つまり、トークンは使用後すぐに無効になるのではなく、クライアント切断から5分後に無効になります"
11451150
},
11461151
"UserProfile": {
11471152
"ViewDetails": "ユーザー詳細を表示",

‎i18n/locales/ko.json‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1141,7 +1141,12 @@
11411141
"ExpireTime": "만료 시간",
11421142
"ShowPassword": "비밀번호 표시",
11431143
"ConnectCommand": "연결 명령줄",
1144-
"CopyCommand": "명령 복사"
1144+
"CopyCommand": "명령 복사",
1145+
"SetReusable": "재사용 설정",
1146+
"ReusableHint": "켜면 이 연결 정보를 오랫동안 여러 번 사용할 수 있습니다",
1147+
"TokenExpired": "토큰이 만료되었습니다",
1148+
"HelpText": "도움말",
1149+
"DatabaseTokenHelp": "클라이언트가 연결하는 데이터베이스 토큰은 구성 요소에 5분 동안 캐시됩니다. 즉, 사용한 직후가 아니라 클라이언트가 끊긴 뒤 5분이 지나야 토큰이 완전히 만료됩니다"
11451150
},
11461151
"UserProfile": {
11471152
"ViewDetails": "사용자 상세 정보 보기",

‎i18n/locales/pt_br.json‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1141,7 +1141,12 @@
11411141
"ExpireTime": "Hora de expiração",
11421142
"ShowPassword": "Mostrar senha",
11431143
"ConnectCommand": "Linha de comando de conexão",
1144-
"CopyCommand": "Copiar comando"
1144+
"CopyCommand": "Copiar comando",
1145+
"SetReusable": "Definir reutilização",
1146+
"ReusableHint": "Depois de ativar, estas informações de conexão podem ser reutilizadas por muito tempo",
1147+
"TokenExpired": "O token expirou",
1148+
"HelpText": "Texto de ajuda",
1149+
"DatabaseTokenHelp": "O token de banco de dados usado pelo cliente fica em cache por 5 minutos; ele não expira imediatamente após o uso, mas sim cinco minutos depois que o cliente se desconecta"
11451150
},
11461151
"UserProfile": {
11471152
"ViewDetails": "Ver detalhes do usuário",

‎i18n/locales/ru.json‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1141,7 +1141,12 @@
11411141
"ExpireTime": "Срок действия",
11421142
"ShowPassword": "Показать пароль",
11431143
"ConnectCommand": "Команда подключения",
1144-
"CopyCommand": "Копировать команду"
1144+
"CopyCommand": "Копировать команду",
1145+
"SetReusable": "Разрешить повторное использование",
1146+
"ReusableHint": "После включения эти данные подключения можно долго использовать повторно",
1147+
"TokenExpired": "Срок действия токена истёк",
1148+
"HelpText": "Справка",
1149+
"DatabaseTokenHelp": "Токен базы данных, которым пользуется клиент, кэшируется компонентом 5 минут: он не становится недействительным сразу после использования, а только через пять минут после отключения клиента"
11451150
},
11461151
"UserProfile": {
11471152
"ViewDetails": "Просмотреть сведения о пользователе",

‎i18n/locales/vi.json‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1141,7 +1141,12 @@
11411141
"ExpireTime": "Thời gian hết hạn",
11421142
"ShowPassword": "Hiện mật khẩu",
11431143
"ConnectCommand": "Dòng lệnh kết nối",
1144-
"CopyCommand": "Sao chép lệnh"
1144+
"CopyCommand": "Sao chép lệnh",
1145+
"SetReusable": "Bật tái sử dụng",
1146+
"ReusableHint": "Sau khi bật, thông tin kết nối này có thể được dùng lại trong thời gian dài",
1147+
"TokenExpired": "Token đã hết hạn",
1148+
"HelpText": "Văn bản trợ giúp",
1149+
"DatabaseTokenHelp": "Token cơ sở dữ liệu mà máy khách kết nối sẽ được thành phần lưu cache 5 phút; token không hết hạn ngay sau khi dùng, mà sau 5 phút kể từ khi máy khách ngắt kết nối"
11451150
},
11461151
"UserProfile": {
11471152
"ViewDetails": "Xem chi tiết người dùng",

‎i18n/locales/zh.json‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1144,7 +1144,12 @@
11441144
"ExpireTime": "过期时间",
11451145
"ShowPassword": "显示密码",
11461146
"ConnectCommand": "连接命令",
1147-
"CopyCommand": "复制命令"
1147+
"CopyCommand": "复制命令",
1148+
"SetReusable": "开启复用",
1149+
"ReusableHint": "开启后该连接信息可长时间多次使用",
1150+
"TokenExpired": "Token 已过期, 请重新连接",
1151+
"HelpText": "说明",
1152+
"DatabaseTokenHelp": "数据库类型 token 会缓存 5 分钟,也就是说 token 使用后,不会立刻失效,而是客户端断开 5 分钟后,这个 token 才会完全失效"
11481153
},
11491154
"UserProfile": {
11501155
"ViewDetails": "查看用户详情",

‎i18n/locales/zh_hant.json‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1141,7 +1141,12 @@
11411141
"ExpireTime": "過期時間",
11421142
"ShowPassword": "顯示密碼",
11431143
"ConnectCommand": "連線命令",
1144-
"CopyCommand": "複製命令"
1144+
"CopyCommand": "複製命令",
1145+
"SetReusable": "開啟複用",
1146+
"ReusableHint": "開啟後該連線資訊可長時間多次使用",
1147+
"TokenExpired": "Token 已過期,請重新連線",
1148+
"HelpText": "說明",
1149+
"DatabaseTokenHelp": "資料庫類型 token 會快取 5 分鐘,也就是說 token 使用後,不會立刻失效,而是用戶端中斷 5 分鐘後,這個 token 才會完全失效"
11451150
},
11461151
"UserProfile": {
11471152
"ViewDetails": "檢視使用者詳情",

‎ui/components/ConnectForm/advancedOptionFlags.test.ts‎

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,4 +83,42 @@ describe("resolveAdvancedOptionFlags", () => {
8383
expect(flags.backspace).toBe(true);
8484
expect(flags.show).toBe(true);
8585
});
86+
87+
it("shows Magnus db_client token reuse without changing Razor/Tinker reusable", () => {
88+
expect(
89+
resolveAdvancedOptionFlags({
90+
protocol: "mysql",
91+
component: "magnus",
92+
connectMethod: "db_client",
93+
connectionTokenReusable: true
94+
})
95+
).toMatchObject({ tokenReusable: true, reusable: false, show: true });
96+
expect(
97+
resolveAdvancedOptionFlags({
98+
protocol: "rdp",
99+
component: "razor",
100+
connectMethod: "mstsc",
101+
hasXPack: true,
102+
connectionTokenReusable: true
103+
})
104+
).toMatchObject({ tokenReusable: false, reusable: true });
105+
expect(
106+
resolveAdvancedOptionFlags({
107+
protocol: "http",
108+
component: "tinker",
109+
connectMethod: "http",
110+
appletConnectMethod: "client",
111+
hasXPack: true,
112+
connectionTokenReusable: true
113+
})
114+
).toMatchObject({ tokenReusable: false, reusable: true });
115+
expect(
116+
resolveAdvancedOptionFlags({
117+
protocol: "mysql",
118+
component: "magnus",
119+
connectMethod: "web_gui",
120+
connectionTokenReusable: true
121+
})
122+
).toMatchObject({ tokenReusable: false });
123+
});
86124
});

0 commit comments

Comments
 (0)