Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
chore: update hint text for creating idp form (#4459)
boojack4ced74bc289a
diff --git a/frontend/src/assets/css/tailwind.css b/frontend/src/assets/css/tailwind.cssindex 21c965b47a..7032cd3741 100644--- a/frontend/src/assets/css/tailwind.css+++ b/frontend/src/assets/css/tailwind.css@@ -237,7 +237,11 @@}.tooltip-left {- @apply invisible absolute -top-1 right-6 px-2 py-1 rounded bg-black bg-opacity-75 text-white;+ @apply invisible absolute -top-1 right-6 px-2 py-1 rounded bg-black bg-opacity-75 text-white;+}++.tooltip-top {+ @apply invisible absolute !-top-1 !left-1/2 !-translate-x-1/2 px-2 py-1 rounded bg-black bg-opacity-75 text-white;}.tooltip-wrapper:hover .tooltip,diff --git a/frontend/src/components/IdentityProviderCreateForm.vue b/frontend/src/components/IdentityProviderCreateForm.vueindex 086643fec6..549cf6e486 100644--- a/frontend/src/components/IdentityProviderCreateForm.vue+++ b/frontend/src/components/IdentityProviderCreateForm.vue@@ -1,6 +1,6 @@<template><div- class="w-full flex flex-col justify-start items-start"+ class="w-full flex flex-col justify-start items-start overflow-x-hidden px-1":class="[isCreating && '!w-128']"><div@@ -63,7 +63,10 @@{{ $t("settings.sso.form.basic-information") }}</p><div class="w-full flex flex-col justify-start items-start">- <label for="">{{ $t("settings.sso.form.name") }}</label>+ <p>+ {{ $t("settings.sso.form.name") }}+ <span class="text-red-600">*</span>+ </p><inputv-model="identityProvider.title"type="text"@@ -74,97 +77,175 @@v-if="isCreating"class="w-full flex flex-col justify-start items-start">- <label for="">{{ $t("settings.sso.form.resource-id") }}</label>+ <p>+ {{ $t("settings.sso.form.resource-id") }}+ <span class="text-red-600">*</span>+ </p><inputv-model="identityProvider.name"type="text"class="textfield mt-1 w-full"+ :placeholder="$t('settings.sso.form.resource-id-description')"/></div><div class="w-full flex flex-col justify-start items-start">- <label for="">{{ $t("settings.sso.form.domain") }}</label>+ <p>+ {{ $t("settings.sso.form.domain") }}+ <span class="text-red-600">*</span>+ </p><inputv-model="identityProvider.domain"type="text"class="textfield mt-1 w-full"+ :placeholder="$t('settings.sso.form.domain-description')"+ />+ </div>++ <div class="w-full flex flex-row !mt-4">+ <p class="textinfolabel">+ {{ $t("settings.sso.form.identity-provider-information") }}+ </p>+ <ShowMoreIcon+ class="inline-block ml-1 textinfolabel"+ :content="+ $t('settings.sso.form.identity-provider-information-description')+ "/></div><div class="w-full flex flex-col justify-start items-start">- <label for="">Client ID</label>+ <p>+ Client ID+ <span class="text-red-600">*</span>+ </p><inputv-model="configForOAuth2.clientId"type="text"class="textfield mt-1 w-full"+ placeholder="ex. 6655asd77895265aa110ac0d3"/></div><div class="w-full flex flex-col justify-start items-start">- <label for="">Client secret</label>+ <p>+ Client secret+ <span class="text-red-600">*</span>+ </p><inputv-model="configForOAuth2.clientSecret"type="text"class="textfield mt-1 w-full"+ placeholder="ex. 5bbezxc3972ca304de70c5d70a6aa932asd8"/></div>- <p class="textinfolabel !mt-4">Endpoints</p>+ <div class="w-full flex flex-row !mt-4">+ <p class="textinfolabel">+ {{ $t("settings.sso.form.endpoints") }}+ </p>+ </div><div class="w-full flex flex-col justify-start items-start">- <label for="">Auth URL</label>+ <p>+ Auth URL+ <span class="text-red-600">*</span>+ <span class="textinfolabel"+ >({{ $t("settings.sso.form.auth-url-description") }})</span+ >+ </p><inputv-model="configForOAuth2.authUrl"type="text"class="textfield mt-1 w-full"+ placeholder="ex. https://github.com/login/oauth/authorize"/></div><div class="w-full flex flex-col justify-start items-start">- <label for="">Token URL</label>+ <p>+ Scopes+ <span class="text-red-600">*</span>+ <span class="textinfolabel"+ >({{ $t("settings.sso.form.scopes-description") }})</span+ >+ </p><input- v-model="configForOAuth2.tokenUrl"+ v-model="scopesStringOfConfig"type="text"class="textfield mt-1 w-full"+ placeholder="ex. user"/></div><div class="w-full flex flex-col justify-start items-start">- <label for="">User information URL</label>+ <p>+ Token URL+ <span class="text-red-600">*</span>+ <span class="textinfolabel"+ >({{ $t("settings.sso.form.token-url-description") }})</span+ >+ </p><input- v-model="configForOAuth2.userInfoUrl"+ v-model="configForOAuth2.tokenUrl"type="text"class="textfield mt-1 w-full"+ placeholder="ex. https://github.com/login/oauth/access_token"/></div><div class="w-full flex flex-col justify-start items-start">- <label for="">Scopes</label>+ <p>+ User information URL+ <span class="text-red-600">*</span>+ <span class="textinfolabel"+ >({{ $t("settings.sso.form.user-info-url-description") }})</span+ >+ </p><input- v-model="scopesStringOfConfig"+ v-model="configForOAuth2.userInfoUrl"type="text"class="textfield mt-1 w-full"+ placeholder="ex. https://api.github.com/user"/></div>- <p class="textinfolabel !mt-4">- {{ $t("settings.sso.form.user-information-mapping") }}- </p>+ <div class="w-full flex flex-row !mt-4">+ <p class="textinfolabel">+ {{ $t("settings.sso.form.user-information-mapping") }}+ </p>+ <ShowMoreIcon+ class="inline-block ml-1 textinfolabel"+ :content="+ $t('settings.sso.form.user-information-mapping-description')+ "+ />+ </div><div class="w-full flex flex-col justify-start items-start">- <label for="">{{ $t("settings.sso.form.identifier") }}</label>+ <p>+ {{ $t("settings.sso.form.identifier") }}+ <span class="text-red-600">*</span>+ </p><inputv-model="configForOAuth2.fieldMapping!.identifier"type="text"class="textfield mt-1 w-full"+ placeholder="ex. login"/></div><div class="w-full flex flex-col justify-start items-start">- <label for="">{{ $t("settings.sso.form.display-name") }}</label>+ <p>+ {{ $t("settings.sso.form.display-name") }}+ </p><inputv-model="configForOAuth2.fieldMapping!.displayName"type="text"class="textfield mt-1 w-full"+ placeholder="ex. name"/></div><div class="w-full flex flex-col justify-start items-start">- <label for="">{{ $t("common.email") }}</label>+ <p>+ {{ $t("common.email") }}+ </p><inputv-model="configForOAuth2.fieldMapping!.email"type="text"class="textfield mt-1 w-full"+ placeholder="ex. email"/></div></div>@@ -178,7 +259,7 @@{{ $t("settings.sso.form.basic-information") }}</p><div class="w-full flex flex-col justify-start items-start">- <label for="">{{ $t("settings.sso.form.name") }}</label>+ <label>{{ $t("settings.sso.form.name") }}</label><inputv-model="identityProvider.title"type="text"@@ -189,7 +270,7 @@v-if="isCreating"class="w-full flex flex-col justify-start items-start">- <label for="">{{ $t("settings.sso.form.resource-id") }}</label>+ <label>{{ $t("settings.sso.form.resource-id") }}</label><inputv-model="identityProvider.name"type="text"@@ -197,7 +278,7 @@/></div><div class="w-full flex flex-col justify-start items-start">- <label for="">{{ $t("settings.sso.form.domain") }}</label>+ <label>{{ $t("settings.sso.form.domain") }}</label><inputv-model="identityProvider.domain"type="text"@@ -205,7 +286,7 @@/></div><div class="w-full flex flex-col justify-start items-start">- <label for="">Issuer</label>+ <label>Issuer</label><inputv-model="configForOIDC.issuer"type="text"@@ -213,7 +294,7 @@/></div><div class="w-full flex flex-col justify-start items-start">- <label for="">Client ID</label>+ <label>Client ID</label><inputv-model="configForOIDC.clientId"type="text"@@ -221,7 +302,7 @@/></div><div class="w-full flex flex-col justify-start items-start">- <label for="">Client secret</label>+ <label>Client secret</label><inputv-model="configForOIDC.clientSecret"type="text"@@ -233,7 +314,7 @@{{ $t("settings.sso.form.user-information-mapping") }}</p><div class="w-full flex flex-col justify-start items-start">- <label for="">{{ $t("settings.sso.form.identifier") }}</label>+ <label>{{ $t("settings.sso.form.identifier") }}</label><inputv-model="configForOIDC.fieldMapping!.identifier"type="text"@@ -241,7 +322,7 @@/></div><div class="w-full flex flex-col justify-start items-start">- <label for="">{{ $t("settings.sso.form.display-name") }}</label>+ <label>{{ $t("settings.sso.form.display-name") }}</label><inputv-model="configForOIDC.fieldMapping!.displayName"type="text"@@ -249,7 +330,7 @@/></div><div class="w-full flex flex-col justify-start items-start">- <label for="">{{ $t("common.email") }}</label>+ <label>{{ $t("common.email") }}</label><inputv-model="configForOIDC.fieldMapping!.email"type="text"@@ -349,6 +430,7 @@ import {isDev,} from "@/utils";import OAuth2IdentityProviderTestModal from "./OAuth2IdentityProviderTestModal.vue";+import ShowMoreIcon from "./ShowMoreIcon.vue";interface LocalState {type: IdentityProviderType;@@ -527,7 +609,8 @@ const handleTemplateSelect = (template: IdentityProviderTemplate) => {}selectedTemplate.value = template;- identityProvider.value.title = template.name;+ identityProvider.value.title = template.title;+ identityProvider.value.name = template.name;identityProvider.value.domain = template.domain;if (template.type === IdentityProviderType.OAUTH2) {configForOAuth2.value = {diff --git a/frontend/src/components/ShowMoreIcon.vue b/frontend/src/components/ShowMoreIcon.vuenew file mode 100644index 0000000000..d76246dd81--- /dev/null+++ b/frontend/src/components/ShowMoreIcon.vue@@ -0,0 +1,25 @@+<template>+ <div class="tooltip-wrapper">+ <span+ v-if="content !== ''"+ class="tooltip whitespace-nowrap"+ :class="`tooltip-${position}`"+ >+ {{ content }}+ </span>+ <heroicons-outline:question-mark-circle class="w-5 h-5" />+ </div>+</template>++<script lang="ts" setup>+withDefaults(+ defineProps<{+ content: string;+ position: string;+ }>(),+ {+ content: "",+ position: "top",+ }+);+</script>diff --git a/frontend/src/locales/en-US.json b/frontend/src/locales/en-US.jsonindex 01a91038c0..86ad18a740 100644--- a/frontend/src/locales/en-US.json+++ b/frontend/src/locales/en-US.json@@ -401,6 +401,8 @@"feishu-updated-tip": "Successfully updated the Feishu integration"},"sso": {+ "create": "Create SSO",+ "description": "Single sign-on (SSO) is an authentication method that enables users to authenticate with other applications and websites.","deletion": "Delete this SSO","form": {"callback-url": "Authorization callback url",@@ -409,10 +411,20 @@"type": "Type","basic-information": "Basic information","name": "Name",- "domain": "Domain","resource-id": "Resource ID",+ "resource-id-description": "An unique string, and valid characters are /[a-z][0-9]-/",+ "domain": "Domain",+ "domain-description": "The identity provider's domain name",+ "identity-provider-information": "Identity provider information",+ "identity-provider-information-description": "The information is provided by your OAuth provider.","endpoints": "Endpoints",+ "endpoints-description": "The related urls provided by your OAuth provider.",+ "auth-url-description": "The link to OAuth login page",+ "scopes-description": "The scope parameter carried when accessing the Auth URL",+ "token-url-description": "The API address for obtaining accessToken",+ "user-info-url-description": "The API address for obtaining user information by accessToken","user-information-mapping": "User information mapping",+ "user-information-mapping-description": "Field mapping saves the field names from user info API.","identifier": "Identifier","display-name": "Display name"}diff --git a/frontend/src/locales/zh-CN.json b/frontend/src/locales/zh-CN.jsonindex 02f8b22528..1061e28aca 100644--- a/frontend/src/locales/zh-CN.json+++ b/frontend/src/locales/zh-CN.json@@ -401,6 +401,8 @@"feishu-updated-tip": "飞书配置更新成功"},"sso": {+ "create": "创建 SSO",+ "description": "单点登录(SSO)是一种认证方法,使用户能够通过其他应用程序和网站来进行登录。","deletion": "删除这个 SSO","form": {"callback-url": "回调地址",@@ -409,10 +411,20 @@"type": "类型","basic-information": "基础信息","name": "名称",- "domain": "域名","resource-id": "资源 ID",- "endpoints": "Endpoints",+ "resource-id-description": "唯一的字符串,有效字符为 /[a-z][0-9]-/",+ "domain": "域名",+ "domain-description": "OAuth 提供商的域名",+ "identity-provider-information": "OAuth 提供商信息",+ "identity-provider-information-description": "这些信息是由你的 OAuth 提供商提供的。",+ "endpoints": "链接信息",+ "endpoints-description": "链接信息是由你的 OAuth 提供商提供。",+ "auth-url-description": "登录页面的链接",+ "scopes-description": "访问 Auth URL 时携带的范围参数",+ "token-url-description": "用于获取 accessToken 的 API 地址",+ "user-info-url-description": "用于通过 accessToken 获取用户信息的 API 地址","user-information-mapping": "用户信息映射",+ "user-information-mapping-description": "字段映射保存了来自 API 用户信息的字段名。","identifier": "唯一标识符","display-name": "昵称"}diff --git a/frontend/src/utils/idp.ts b/frontend/src/utils/idp.tsindex b4559fb7db..59b9e7c10a 100644--- a/frontend/src/utils/idp.ts+++ b/frontend/src/utils/idp.ts@@ -16,6 +16,7 @@ export const identityProviderTypeToString = (};interface OAuth2IdentityProviderTemplate {+ title: string;name: string;domain: string;type: IdentityProviderType.OAUTH2;@@ -26,7 +27,8 @@ export type IdentityProviderTemplate = OAuth2IdentityProviderTemplate;export const identityProviderTemplateList: IdentityProviderTemplate[] = [{- name: "Google",+ title: "Google",+ name: "idp-google",domain: "google.com",type: IdentityProviderType.OAUTH2,config: {@@ -47,7 +49,8 @@ export const identityProviderTemplateList: IdentityProviderTemplate[] = [},},{- name: "GitHub",+ title: "GitHub",+ name: "idp-github",domain: "github.com",type: IdentityProviderType.OAUTH2,config: {@@ -65,7 +68,8 @@ export const identityProviderTemplateList: IdentityProviderTemplate[] = [},},{- name: "GitLab",+ title: "GitLab",+ name: "idp-gitlab",domain: "gitlab.com",type: IdentityProviderType.OAUTH2,config: {diff --git a/frontend/src/views/SettingWorkspaceSSO.vue b/frontend/src/views/SettingWorkspaceSSO.vueindex 000580f153..10a3950fe7 100644--- a/frontend/src/views/SettingWorkspaceSSO.vue+++ b/frontend/src/views/SettingWorkspaceSSO.vue@@ -1,7 +1,9 @@<template><div class="w-full mt-4 space-y-4"><div class="w-full flex flex-row justify-between items-center">- <div class="textinfolabel"></div>+ <div class="textinfolabel max-w-xl">+ {{ $t("settings.sso.description") }}+ </div><div><button class="btn-primary" @click="state.showCreatingSSOModal = true">{{ $t("common.create") }}@@ -50,7 +52,7 @@<BBModalv-if="state.showCreatingSSOModal"- title="Create SSO"+ :title="$t('settings.sso.create')"@close="hideCreateSSOModal"><IdentityProviderCreateForm