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: rename URL to Url in frontend
p0ny1a5cb5ebb372
diff --git a/frontend/src/components/AlterSchemaPrepForm.vue b/frontend/src/components/AlterSchemaPrepForm.vueindex 2aac23f629..206b5e11e9 100644--- a/frontend/src/components/AlterSchemaPrepForm.vue+++ b/frontend/src/components/AlterSchemaPrepForm.vue@@ -203,7 +203,7 @@ import { useStore } from "vuex";import { useRouter } from "vue-router";import DatabaseTable from "../components/DatabaseTable.vue";import {- baseDirectoryWebURL,+ baseDirectoryWebUrl,Database,DatabaseId,EnvironmentId,@@ -337,7 +337,7 @@ export default {database.project.id).then((repository: Repository) => {- window.open(baseDirectoryWebURL(repository), "_blank");+ window.open(baseDirectoryWebUrl(repository), "_blank");});}};diff --git a/frontend/src/components/DatabaseBackupPanel.vue b/frontend/src/components/DatabaseBackupPanel.vueindex 9c9613995e..e9b8c55d5f 100644--- a/frontend/src/components/DatabaseBackupPanel.vue+++ b/frontend/src/components/DatabaseBackupPanel.vue@@ -31,7 +31,7 @@<span class="text-accent"> {{ autoBackupHourText }}</span></div><div class="mt-2">- <label for="hookURL" class="textlabel">+ <label for="hookUrl" class="textlabel">Webhook URL</label><div class="mt-1 textinfolabel">@@ -58,15 +58,15 @@</a></div><input- id="hookURL"- name="hookURL"+ id="hookUrl"+ name="hookUrl"type="text"class="textfield mt-1 w-full"placeholder="https://betteruptime.com/api/v1/heartbeat/...":disabled="!allowEdit"- v-model="state.autoBackupUpdatedHookURL"+ v-model="state.autoBackupUpdatedHookUrl"/>- <button class="btn-primary mt-2" :disabled="!allowEdit || !URLChanged" @click.prevent="updateBackupHookURL()">Update</button>+ <button class="btn-primary mt-2" :disabled="!allowEdit || !UrlChanged" @click.prevent="updateBackupHookUrl()">Update</button></div></div><div@@ -146,8 +146,8 @@ interface LocalState {autoBackupEnabled: boolean;autoBackupHour: number;autoBackupDayOfWeek: number;- autoBackupHookURL: string;- autoBackupUpdatedHookURL: string;+ autoBackupHookUrl: string;+ autoBackupUpdatedHookUrl: string;pollBackupsTimer?: ReturnType<typeof setTimeout>;}@@ -179,8 +179,8 @@ export default {autoBackupEnabled: false,autoBackupHour: 0,autoBackupDayOfWeek: 0,- autoBackupHookURL: '',- autoBackupUpdatedHookURL: '',+ autoBackupHookUrl: '',+ autoBackupUpdatedHookUrl: '',});onUnmounted(() => {@@ -208,8 +208,8 @@ export default {state.autoBackupEnabled = backupSetting.enabled;state.autoBackupHour = backupSetting.hour;state.autoBackupDayOfWeek = backupSetting.dayOfWeek;- state.autoBackupHookURL = backupSetting.hookURL;- state.autoBackupUpdatedHookURL = backupSetting.hookURL;+ state.autoBackupHookUrl = backupSetting.hookUrl;+ state.autoBackupUpdatedHookUrl = backupSetting.hookUrl;};// List PENDING_CREATE backups first, followed by backups in createdTs descending order.@@ -286,8 +286,8 @@ export default {return props.allowAdmin && backupPolicy.value == "UNSET";});- const URLChanged = computed(() => {- return !isEqual(state.autoBackupHookURL, state.autoBackupUpdatedHookURL);+ const UrlChanged = computed(() => {+ return !isEqual(state.autoBackupHookUrl, state.autoBackupUpdatedHookUrl);})const createBackup = (backupName: string) => {@@ -361,7 +361,7 @@ export default {? -1: dayOfWeek: state.autoBackupDayOfWeek,- hookURL: "",+ hookUrl: "",};store.dispatch("backup/upsertBackupSetting", {@@ -378,13 +378,13 @@ export default {});};- const updateBackupHookURL = () => {+ const updateBackupHookUrl = () => {const newBackupSetting: BackupSettingUpsert = {databaseId: props.database.id,enabled: state.autoBackupEnabled,hour: state.autoBackupHour,dayOfWeek: state.autoBackupDayOfWeek,- hookURL: state.autoBackupUpdatedHookURL,+ hookUrl: state.autoBackupUpdatedHookUrl,};store.dispatch("backup/upsertBackupSetting", {@@ -436,8 +436,8 @@ export default {backupPolicy,createBackup,toggleAutoBackup,- URLChanged,- updateBackupHookURL,+ UrlChanged,+ updateBackupHookUrl,};},};diff --git a/frontend/src/components/DatabaseTable.vue b/frontend/src/components/DatabaseTable.vueindex d9cce7bf43..6b057d8f73 100644--- a/frontend/src/components/DatabaseTable.vue+++ b/frontend/src/components/DatabaseTable.vue@@ -280,16 +280,16 @@ export default {return false;}- const consoleURL =+ const consoleUrl =store.getters["setting/settingByName"]("bb.console.url").value;- return !isEmpty(consoleURL);+ return !isEmpty(consoleUrl);});const databaseConsoleLink = (databaseName: string) => {- const consoleURL =+ const consoleUrl =store.getters["setting/settingByName"]("bb.console.url").value;- if (!isEmpty(consoleURL)) {- return consoleLink(consoleURL, databaseName);+ if (!isEmpty(consoleUrl)) {+ return consoleLink(consoleUrl, databaseName);}return "";};diff --git a/frontend/src/components/IssueActivityPanel.vue b/frontend/src/components/IssueActivityPanel.vueindex 15f2805b1f..b056fd9592 100644--- a/frontend/src/components/IssueActivityPanel.vue+++ b/frontend/src/components/IssueActivityPanel.vue@@ -496,7 +496,7 @@v-if="activity.type == 'bb.pipeline.task.file.commit'"><a- :href="`${activity.payload.vcsInstanceURL}/${activity.payload.repositoryFullPath}/-/commit/${activity.payload.commitId}`"+ :href="`${activity.payload.vcsInstanceUrl}/${activity.payload.repositoryFullPath}/-/commit/${activity.payload.commitId}`"target="__blank"class="normal-link flex flex-row items-center">View commitdiff --git a/frontend/src/components/IssueHighlightPanel.vue b/frontend/src/components/IssueHighlightPanel.vueindex d9b270a851..2f7c388952 100644--- a/frontend/src/components/IssueHighlightPanel.vue+++ b/frontend/src/components/IssueHighlightPanel.vue@@ -45,7 +45,7 @@<template v-if="pushEvent.vcsType.startsWith('GITLAB')"><img class="h-4 w-auto" src="../assets/gitlab-logo.svg" /></template>- <a :href="vcsBranchURL" target="_blank" class="normal-link">+ <a :href="vcsBranchUrl" target="_blank" class="normal-link">{{ `${vcsBranch}@${pushEvent.repositoryFullPath}` }}</a><span>@@ -142,10 +142,10 @@ export default {return "";});- const vcsBranchURL = computed((): string => {+ const vcsBranchUrl = computed((): string => {if (pushEvent.value) {if (pushEvent.value.vcsType == "GITLAB_SELF_HOST") {- return `${pushEvent.value.repositoryURL}/-/tree/${vcsBranch.value}`;+ return `${pushEvent.value.repositoryUrl}/-/tree/${vcsBranch.value}`;}}return "";@@ -164,7 +164,7 @@ export default {pushEvent,vcsType,vcsBranch,- vcsBranchURL,+ vcsBranchUrl,trySaveName,};},diff --git a/frontend/src/components/ProjectWebhookCard.vue b/frontend/src/components/ProjectWebhookCard.vueindex ab24b262c1..ba86552f10 100644--- a/frontend/src/components/ProjectWebhookCard.vue+++ b/frontend/src/components/ProjectWebhookCard.vue@@ -89,7 +89,7 @@ import PrincipalAvatar from "../components/PrincipalAvatar.vue";import {ProjectWebhook,PROJECT_HOOK_ACTIVITY_ITEM_LIST,- redirectURL,+ redirectUrl,} from "../types";import { projectWebhookSlug } from "../utils";@@ -134,7 +134,7 @@ export default {return {state,- redirectURL,+ redirectUrl,viewProjectWebhook,activityListStr,};diff --git a/frontend/src/components/RepositoryPanel.vue b/frontend/src/components/RepositoryPanel.vueindex 1e8847b2c3..15d4d0073b 100644--- a/frontend/src/components/RepositoryPanel.vue+++ b/frontend/src/components/RepositoryPanel.vue@@ -4,7 +4,7 @@</div><div class="mt-2 textinfolabel">Database migration scripts are stored in- <a class="normal-link" :href="repository.webURL" target="_blank">{{+ <a class="normal-link" :href="repository.webUrl" target="_blank">{{repository.fullPath}}</a>. To make schema changes, a developer would create a migration script@@ -128,7 +128,7 @@ export default {externalId: props.repository.externalId,name: props.repository.name,fullPath: props.repository.fullPath,- webURL: props.repository.webURL,+ webUrl: props.repository.webUrl,};});diff --git a/frontend/src/components/RepositorySetupWizard.vue b/frontend/src/components/RepositorySetupWizard.vueindex 91fed10778..a883219894 100644--- a/frontend/src/components/RepositorySetupWizard.vue+++ b/frontend/src/components/RepositorySetupWizard.vue@@ -105,7 +105,7 @@ export default {externalId: "",name: "",fullPath: "",- webURL: "",+ webUrl: "",},repositoryConfig: {baseDirectory: "",@@ -143,7 +143,7 @@ export default {projectId: props.project.id,name: state.config.repositoryInfo.name,fullPath: state.config.repositoryInfo.fullPath,- webURL: state.config.repositoryInfo.webURL,+ webUrl: state.config.repositoryInfo.webUrl,branchFilter: state.config.repositoryConfig.branchFilter,baseDirectory: state.config.repositoryConfig.baseDirectory,filePathTemplate: state.config.repositoryConfig.filePathTemplate,diff --git a/frontend/src/components/RepositoryVCSProviderPanel.vue b/frontend/src/components/RepositoryVCSProviderPanel.vueindex 770c03a4b6..e8d0ff50de 100644--- a/frontend/src/components/RepositoryVCSProviderPanel.vue+++ b/frontend/src/components/RepositoryVCSProviderPanel.vue@@ -51,7 +51,7 @@ import {OAuthWindowEventPayload,openWindowForOAuth,ProjectRepositoryConfig,- redirectURL,+ redirectUrl,VCS,} from "../types";import { isOwner } from "../utils";@@ -90,10 +90,10 @@ export default {if (isEmpty(payload.error)) {props.config.code = payload.code;const oAuthConfig: OAuthConfig = {- endpoint: `${state.selectedVCS!.instanceURL}/oauth/token`,+ endpoint: `${state.selectedVCS!.instanceUrl}/oauth/token`,applicationId: state.selectedVCS!.applicationId,secret: state.selectedVCS!.secret,- redirectURL: redirectURL(),+ redirectUrl: redirectUrl(),};store.dispatch("gitlab/exchangeToken", {@@ -125,7 +125,7 @@ export default {const selectVCS = (vcs: VCS) => {state.selectedVCS = vcs;const newWindow = openWindowForOAuth(- `${vcs.instanceURL}/oauth/authorize`,+ `${vcs.instanceUrl}/oauth/authorize`,vcs.applicationId);if (newWindow) {diff --git a/frontend/src/components/VCSCard.vue b/frontend/src/components/VCSCard.vueindex d1e64df3bb..95bdf782c8 100644--- a/frontend/src/components/VCSCard.vue+++ b/frontend/src/components/VCSCard.vue@@ -24,7 +24,7 @@<div class="grid grid-cols-4 gap-4 px-4 py-2 items-center"><dt class="text-sm font-medium text-control-light">Instance URL</dt><dd class="mt-1 flex text-sm text-main col-span-2">- {{ vcs.instanceURL }}+ {{ vcs.instanceUrl }}</dd></div><div class="grid grid-cols-4 gap-4 px-4 py-2 items-center">@@ -47,7 +47,7 @@<script lang="ts">import { reactive, PropType } from "vue";import { useRouter } from "vue-router";-import { VCS, redirectURL } from "../types";+import { VCS, redirectUrl } from "../types";import { vcsSlug } from "../utils";// eslint-disable-next-line @typescript-eslint/no-empty-interface@@ -78,7 +78,7 @@ export default {return {state,- redirectURL,+ redirectUrl,editVCS,};},diff --git a/frontend/src/components/VCSProviderBasicInfoPanel.vue b/frontend/src/components/VCSProviderBasicInfoPanel.vueindex bb0e58fc38..7af2139a65 100644--- a/frontend/src/components/VCSProviderBasicInfoPanel.vue+++ b/frontend/src/components/VCSProviderBasicInfoPanel.vue@@ -46,7 +46,7 @@</div></div><div class="mt-6 pt-6 border-t border-block-border textlabel">- {{ instanceURLLabel }} <span class="text-red-600">*</span>+ {{ instanceUrlLabel }} <span class="text-red-600">*</span></div><p class="mt-1 textinfolabel">The VCS instance URL. Make sure this instance and Bytebase are network@@ -55,10 +55,10 @@<BBTextFieldclass="mt-2 w-full":placeholder="'https://gitlab.example.com'"- :value="config.instanceURL"- @input="changeURL($event.target.value)"+ :value="config.instanceUrl"+ @input="changeUrl($event.target.value)"/>- <p v-if="state.showURLError" class="mt-2 text-sm text-error">+ <p v-if="state.showUrlError" class="mt-2 text-sm text-error">Instance URL must begin with https:// or http://</p><div class="mt-4 textlabel">Display name</div>@@ -78,11 +78,11 @@import { computed, onUnmounted, PropType, reactive } from "@vue/runtime-core";import isEmpty from "lodash-es/isEmpty";import { TEXT_VALIDATION_DELAY, VCSConfig } from "../types";-import { isURL } from "../utils";+import { isUrl } from "../utils";interface LocalState {urlValidationTimer?: ReturnType<typeof setTimeout>;- showURLError: boolean;+ showUrlError: boolean;}export default {@@ -95,8 +95,8 @@ export default {},setup(props) {const state = reactive<LocalState>({- showURLError:- !isEmpty(props.config.instanceURL) && !isURL(props.config.instanceURL),+ showUrlError:+ !isEmpty(props.config.instanceUrl) && !isUrl(props.config.instanceUrl),});onUnmounted(() => {@@ -112,39 +112,39 @@ export default {return "";});- const instanceURLLabel = computed((): string => {+ const instanceUrlLabel = computed((): string => {if (props.config.type == "GITLAB_SELF_HOST") {return "GitLab Instance URL";}return "";});- const changeURL = (value: string) => {- props.config.instanceURL = value;+ const changeUrl = (value: string) => {+ props.config.instanceUrl = value;if (state.urlValidationTimer) {clearInterval(state.urlValidationTimer);}// If text becomes valid, we immediately clear the error.// otherwise, we delay TEXT_VALIDATION_DELAY to do the validation in case there is continous keystroke.- if (isURL(props.config.instanceURL)) {- state.showURLError = false;+ if (isUrl(props.config.instanceUrl)) {+ state.showUrlError = false;} else {state.urlValidationTimer = setTimeout(() => {// If error is already displayed, we hide the error only if there is valid input.// Otherwise, we hide the error if input is either empty or valid.- if (state.showURLError) {- state.showURLError = !isURL(props.config.instanceURL);+ if (state.showUrlError) {+ state.showUrlError = !isUrl(props.config.instanceUrl);} else {- state.showURLError =- !isEmpty(props.config.instanceURL) &&- !isURL(props.config.instanceURL);+ state.showUrlError =+ !isEmpty(props.config.instanceUrl) &&+ !isUrl(props.config.instanceUrl);}}, TEXT_VALIDATION_DELAY);}};- return { state, namePlaceholder, instanceURLLabel, changeURL };+ return { state, namePlaceholder, instanceUrlLabel, changeUrl };},};</script>diff --git a/frontend/src/components/VCSProviderConfirmPanel.vue b/frontend/src/components/VCSProviderConfirmPanel.vueindex 60fc39d0d3..d7da44ae04 100644--- a/frontend/src/components/VCSProviderConfirmPanel.vue+++ b/frontend/src/components/VCSProviderConfirmPanel.vue@@ -42,7 +42,7 @@Instance URL</dt><dd class="col-start-2 col-span-3 text-sm text-main">- {{ config.instanceURL }}+ {{ config.instanceUrl }}</dd></div><div class="grid grid-cols-4 gap-4 px-4 py-2">@@ -67,7 +67,7 @@<script lang="ts">import { PropType, reactive } from "@vue/runtime-core";-import { VCSConfig, redirectURL } from "../types";+import { VCSConfig, redirectUrl } from "../types";// eslint-disable-next-line @typescript-eslint/no-empty-interfaceinterface LocalState {}@@ -84,7 +84,7 @@ export default {const state = reactive<LocalState>({});return {- redirectURL,+ redirectUrl,state,};},diff --git a/frontend/src/components/VCSProviderOAuthPanel.vue b/frontend/src/components/VCSProviderOAuthPanel.vueindex 586d628058..3660d35493 100644--- a/frontend/src/components/VCSProviderOAuthPanel.vue+++ b/frontend/src/components/VCSProviderOAuthPanel.vue@@ -17,7 +17,7 @@2. Go to the Admin page by clicking the wrench icon, then navigate to"Applications" section and click "New application" button.<a- :href="createAdminApplicationURL"+ :href="createAdminApplicationUrl"target="_blank"class="normal-link">Direct link</a@@ -45,7 +45,7 @@Redirect URI</dt><dd class="text-sm text-main items-center flex">- {{ redirectURL() }}+ {{ redirectUrl() }}<buttontabindex="-1"class="@@ -138,7 +138,7 @@ import {isValidVCSApplicationIdOrSecret,TEXT_VALIDATION_DELAY,VCSConfig,- redirectURL,+ redirectUrl,} from "../types";import { useStore } from "vuex";@@ -177,15 +177,15 @@ export default {}});- const createAdminApplicationURL = computed((): string => {+ const createAdminApplicationUrl = computed((): string => {if (props.config.type == "GITLAB_SELF_HOST") {- return `${props.config.instanceURL}/admin/applications/new`;+ return `${props.config.instanceUrl}/admin/applications/new`;}return "";});const copyRedirectURI = () => {- toClipboard(redirectURL()).then(() => {+ toClipboard(redirectUrl()).then(() => {store.dispatch("notification/pushNotification", {module: "bytebase",style: "INFO",@@ -249,9 +249,9 @@ export default {};return {- redirectURL,+ redirectUrl,state,- createAdminApplicationURL,+ createAdminApplicationUrl,copyRedirectURI,changeApplicationId,changeSecret,diff --git a/frontend/src/components/VCSSetupWizard.vue b/frontend/src/components/VCSSetupWizard.vueindex 71df02077d..0df49c7091 100644--- a/frontend/src/components/VCSSetupWizard.vue+++ b/frontend/src/components/VCSSetupWizard.vue@@ -44,10 +44,10 @@ import {OAuthWindowEventPayload,OAuthWindowEvent,OAuthConfig,- redirectURL,+ redirectUrl,OAuthToken,} from "../types";-import { isURL } from "../utils";+import { isUrl } from "../utils";const BASIC_INFO_STEP = 0;const OAUTH_INFO_STEP = 1;@@ -80,7 +80,7 @@ export default {config: {type: "GITLAB_SELF_HOST",name: "GitLab self-host",- instanceURL: "",+ instanceUrl: "",applicationId: "",secret: "",},@@ -92,10 +92,10 @@ export default {if (isEmpty(payload.error)) {if (state.config.type == "GITLAB_SELF_HOST") {const oAuthConfig: OAuthConfig = {- endpoint: `${state.config.instanceURL}/oauth/token`,+ endpoint: `${state.config.instanceUrl}/oauth/token`,applicationId: state.config.applicationId,secret: state.config.secret,- redirectURL: redirectURL(),+ redirectUrl: redirectUrl(),};store.dispatch("gitlab/exchangeToken", {@@ -118,7 +118,7 @@ export default {const allowNext = computed((): boolean => {if (state.currentStep == BASIC_INFO_STEP) {- return isURL(state.config.instanceURL);+ return isUrl(state.config.instanceUrl);} else if (state.currentStep == OAUTH_INFO_STEP) {return (isValidVCSApplicationIdOrSecret(state.config.applicationId) &&@@ -150,7 +150,7 @@ export default {// 2. If step 1 succeeds, we will get a code, we use this code together with the secret to exchange for the access token. (see eventListener)if (state.currentStep == OAUTH_INFO_STEP && newStep > oldStep) {const newWindow = openWindowForOAuth(- `${state.config.instanceURL}/oauth/authorize`,+ `${state.config.instanceUrl}/oauth/authorize`,state.config.applicationId);if (newWindow) {diff --git a/frontend/src/main.ts b/frontend/src/main.tsindex c08914730e..fde8f2cc07 100644--- a/frontend/src/main.ts+++ b/frontend/src/main.ts@@ -93,7 +93,7 @@ axios.interceptors.response.use(// in such case, we shouldn't logout.if (error.response.status == 401) {const host = store.getters["actuator/info"]().host;- if (error.response.request.responseURL.startsWith(host))+ if (error.response.request.responseUrl.startsWith(host))store.dispatch("auth/logout").then(() => {router.push({ name: "auth.signin" });});diff --git a/frontend/src/store/modules/gitlab.ts b/frontend/src/store/modules/gitlab.tsindex 56bca6c827..66c0a4e970 100644--- a/frontend/src/store/modules/gitlab.ts+++ b/frontend/src/store/modules/gitlab.ts@@ -15,7 +15,7 @@ function convertGitLabProject(project: any): ExternalRepositoryInfo {externalId: project.id.toString(),name: project.name,fullPath: project.path_with_namespace,- webURL: project.web_url,+ webUrl: project.web_url,};}@@ -32,7 +32,7 @@ const actions = {): Promise<OAuthToken> {const data = (await axios.post(- `${oAuthConfig.endpoint}?client_id=${oAuthConfig.applicationId}&client_secret=${oAuthConfig.secret}&code=${code}&redirect_uri=${oAuthConfig.redirectURL}&grant_type=authorization_code`+ `${oAuthConfig.endpoint}?client_id=${oAuthConfig.applicationId}&client_secret=${oAuthConfig.secret}&code=${code}&redirect_uri=${oAuthConfig.redirectUrl}&grant_type=authorization_code`)).data;@@ -54,7 +54,7 @@ const actions = {// be at least the project maintainer(40)const data = (await axios.get(- `${vcs.instanceURL}/${GITLAB_API_PATH}/projects?membership=true&simple=true&min_access_level=40`,+ `${vcs.instanceUrl}/${GITLAB_API_PATH}/projects?membership=true&simple=true&min_access_level=40`,{headers: {Authorization: "Bearer " + token,diff --git a/frontend/src/types/activity.ts b/frontend/src/types/activity.tsindex 7c64adc4ee..f28b9f813f 100644--- a/frontend/src/types/activity.ts+++ b/frontend/src/types/activity.ts@@ -101,7 +101,7 @@ export type ActivityTaskStatusUpdatePayload = {export type ActivityTaskFileCommitPayload = {taskId: TaskId;- vcsInstanceURL: string;+ vcsInstanceUrl: string;repositoryFullPath: string;branch: string;filePath: string;diff --git a/frontend/src/types/backup.ts b/frontend/src/types/backup.tsindex 7065cac278..a875db1820 100644--- a/frontend/src/types/backup.ts+++ b/frontend/src/types/backup.ts@@ -56,7 +56,7 @@ export type BackupSetting = {enabled: boolean;hour: number;dayOfWeek: number;- hookURL: string;+ hookUrl: string;};export type BackupSettingUpsert = {@@ -67,5 +67,5 @@ export type BackupSettingUpsert = {enabled: boolean;hour: number;dayOfWeek: number;- hookURL: string;+ hookUrl: string;};diff --git a/frontend/src/types/common.ts b/frontend/src/types/common.tsindex 5664ecb572..03fa9c69b3 100644--- a/frontend/src/types/common.ts+++ b/frontend/src/types/common.ts@@ -278,7 +278,7 @@ export const unknown = (enabled: false,hour: 0,dayOfWeek: 0,- hookURL: "",+ hookUrl: "",};const UNKNOWN_PIPELINE: Pipeline = {@@ -388,8 +388,8 @@ export const unknown = (updatedTs: 0,name: "",type: "GITLAB_SELF_HOST",- instanceURL: "",- apiURL: "",+ instanceUrl: "",+ apiUrl: "",applicationId: "",secret: "",};@@ -404,7 +404,7 @@ export const unknown = (project: UNKNOWN_PROJECT,name: "",fullPath: "",- webURL: "",+ webUrl: "",baseDirectory: "",branchFilter: "",filePathTemplate: "",@@ -629,7 +629,7 @@ export const empty = (enabled: false,hour: 0,dayOfWeek: 0,- hookURL: "",+ hookUrl: "",};const EMPTY_PIPELINE: Pipeline = {@@ -739,8 +739,8 @@ export const empty = (updatedTs: 0,name: "",type: "GITLAB_SELF_HOST",- instanceURL: "",- apiURL: "",+ instanceUrl: "",+ apiUrl: "",applicationId: "",secret: "",};@@ -755,7 +755,7 @@ export const empty = (project: EMPTY_PROJECT,name: "",fullPath: "",- webURL: "",+ webUrl: "",baseDirectory: "",branchFilter: "",filePathTemplate: "",diff --git a/frontend/src/types/oauth.ts b/frontend/src/types/oauth.tsindex 021865f33d..9fa7b3bd45 100644--- a/frontend/src/types/oauth.ts+++ b/frontend/src/types/oauth.ts@@ -4,7 +4,7 @@ export type OAuthConfig = {endpoint: string;applicationId: string;secret: string;- redirectURL: string;+ redirectUrl: string;};export type OAuthToken = {@@ -21,7 +21,7 @@ export type OAuthWindowEventPayload = {code: string;};-export function redirectURL(): string {+export function redirectUrl(): string {return `${window.location.origin}/oauth/callback`;}@@ -34,7 +34,7 @@ export function openWindowForOAuth(return window.open(`${endpoint}?client_id=${applicationId}&redirect_uri=${encodeURIComponent(- redirectURL()+ redirectUrl())}&state=${stateQueryParameter}&response_type=code&scope=api`,"oauth","location=yes,left=200,top=200,height=640,width=480,scrollbars=yes,status=yes"diff --git a/frontend/src/types/repository.ts b/frontend/src/types/repository.tsindex 2678774f23..3884a3ff33 100644--- a/frontend/src/types/repository.ts+++ b/frontend/src/types/repository.ts@@ -23,7 +23,7 @@ export type Repository = {// e.g. bytebase/sample-projectfullPath: string;// e.g. http://gitlab.bytebase.com/bytebase/sample-project- webURL: string;+ webUrl: string;baseDirectory: string;branchFilter: string;filePathTemplate: string;@@ -40,7 +40,7 @@ export type RepositoryCreate = {// Domain specific fieldsname: string;fullPath: string;- webURL: string;+ webUrl: string;branchFilter: string;baseDirectory: string;filePathTemplate: string;@@ -73,10 +73,10 @@ export type ExternalRepositoryInfo = {// e.g. bytebase/sample-projectfullPath: string;// e.g. http://gitlab.bytebase.com/bytebase/sample-project- webURL: string;+ webUrl: string;};-export function baseDirectoryWebURL(repository: Repository): string {+export function baseDirectoryWebUrl(repository: Repository): string {if (repository.vcs.type == "GITLAB_SELF_HOST") {// If branchFilter is empty (default branch) or branch filter contains wildcard,// then we can't locate to the exact branch name, thus we will just return the repository web url@@ -84,14 +84,14 @@ export function baseDirectoryWebURL(repository: Repository): string {isEmpty(repository.branchFilter) ||repository.branchFilter.includes("*")) {- return repository.webURL;+ return repository.webUrl;}- let url = `${repository.webURL}/-/tree/${repository.branchFilter}`;+ let url = `${repository.webUrl}/-/tree/${repository.branchFilter}`;if (!isEmpty(repository.baseDirectory)) {url += `/${repository.baseDirectory}`;}return url;}- return repository.webURL;+ return repository.webUrl;}diff --git a/frontend/src/types/vcs.ts b/frontend/src/types/vcs.tsindex 5f12fdad3c..ef5846336e 100644--- a/frontend/src/types/vcs.ts+++ b/frontend/src/types/vcs.ts@@ -6,7 +6,7 @@ export type VCSType = "GITLAB_SELF_HOST";export interface VCSConfig {type: VCSType;name: string;- instanceURL: string;+ instanceUrl: string;applicationId: string;secret: string;}@@ -23,8 +23,8 @@ export type VCS = {// Domain specific fieldsname: string;type: VCSType;- instanceURL: string;- apiURL: string;+ instanceUrl: string;+ apiUrl: string;applicationId: string;secret: string;};@@ -33,7 +33,7 @@ export type VCSCreate = {// Domain specific fieldsname: string;type: VCSType;- instanceURL: string;+ instanceUrl: string;applicationId: string;secret: string;};@@ -47,7 +47,7 @@ export type VCSPatch = {export type VCSTokenCreate = {code: string;- redirectURL: string;+ redirectUrl: string;};export type VCSFileCommit = {@@ -64,7 +64,7 @@ export type VCSPushEvent = {vcsType: VCSType;ref: string;repositoryId: string;- repositoryURL: string;+ repositoryUrl: string;repositoryFullPath: string;authorName: string;fileCommit: VCSFileCommit;diff --git a/frontend/src/utils/database.ts b/frontend/src/utils/database.tsindex f2f2de3c1f..072c2df06d 100644--- a/frontend/src/utils/database.ts+++ b/frontend/src/utils/database.ts@@ -70,8 +70,8 @@ export function sortDatabaseList(});}-// templateURL corresponds to the "bb.console.url" setting.+// templateUrl corresponds to the "bb.console.url" setting.// This method replaces {{DB_NAME}} with the actual database name.-export function consoleLink(templateURL: string, databaseName: string): string {- return templateURL.replace("{{DB_NAME}}", databaseName);+export function consoleLink(templateUrl: string, databaseName: string): string {+ return templateUrl.replace("{{DB_NAME}}", databaseName);}diff --git a/frontend/src/utils/util.ts b/frontend/src/utils/util.tsindex f3e9b03d7e..d2369adde4 100644--- a/frontend/src/utils/util.ts+++ b/frontend/src/utils/util.ts@@ -58,7 +58,7 @@ export function urlfy(str: string): string {return result;}-export function isURL(str: string): boolean {+export function isUrl(str: string): boolean {let url;try {diff --git a/frontend/src/views/DatabaseDetail.vue b/frontend/src/views/DatabaseDetail.vueindex 3b350b52c8..590aeba779 100644--- a/frontend/src/views/DatabaseDetail.vue+++ b/frontend/src/views/DatabaseDetail.vue@@ -258,7 +258,7 @@ import {UNKNOWN_ID,DEFAULT_PROJECT_ID,Repository,- baseDirectoryWebURL,+ baseDirectoryWebUrl,} from "../types";import { isEmpty } from "lodash";import { BBTabFilterItem } from "../bbkit/types";@@ -318,10 +318,10 @@ export default {});const databaseConsoleLink = computed(() => {- const consoleURL =+ const consoleUrl =store.getters["setting/settingByName"]("bb.console.url").value;- if (!isEmpty(consoleURL)) {- return consoleLink(consoleURL, database.value.name);+ if (!isEmpty(consoleUrl)) {+ return consoleLink(consoleUrl, database.value.name);}return "";});@@ -436,7 +436,7 @@ export default {database.value.project.id).then((repository: Repository) => {- window.open(baseDirectoryWebURL(repository), "_blank");+ window.open(baseDirectoryWebUrl(repository), "_blank");});}};diff --git a/frontend/src/views/MigrationHistoryDetail.vue b/frontend/src/views/MigrationHistoryDetail.vueindex 71e4205b81..d5e638cc34 100644--- a/frontend/src/views/MigrationHistoryDetail.vue+++ b/frontend/src/views/MigrationHistoryDetail.vue@@ -69,7 +69,7 @@<template v-if="pushEvent?.vcsType.startsWith('GITLAB')"><img class="h-4 w-auto" src="../assets/gitlab-logo.svg" /></template>- <a :href="vcsBranchURL" target="_blank" class="normal-link">+ <a :href="vcsBranchUrl" target="_blank" class="normal-link">{{ `${vcsBranch}@${pushEvent.repositoryFullPath}` }}</a><span>@@ -257,10 +257,10 @@ export default {return "";});- const vcsBranchURL = computed((): string => {+ const vcsBranchUrl = computed((): string => {if (pushEvent.value) {if (pushEvent.value.vcsType == "GITLAB_SELF_HOST") {- return `${pushEvent.value.repositoryURL}/-/tree/${vcsBranch.value}`;+ return `${pushEvent.value.repositoryUrl}/-/tree/${vcsBranch.value}`;}}return "";@@ -293,7 +293,7 @@ export default {migrationHistory,pushEvent,vcsBranch,- vcsBranchURL,+ vcsBranchUrl,copyStatement,copySchema,};diff --git a/frontend/src/views/SettingWorkspaceGeneral.vue b/frontend/src/views/SettingWorkspaceGeneral.vueindex 244498da83..14c1495236 100644--- a/frontend/src/views/SettingWorkspaceGeneral.vue+++ b/frontend/src/views/SettingWorkspaceGeneral.vue@@ -17,15 +17,15 @@<div class="mt-4"><input- id="databaseURL"- v-model="state.consoleURL"+ id="databaseUrl"+ v-model="state.consoleUrl"type="text"placeholder="http://phpmyadmin.example.com:8080/index.php?route=/database/sql&db={{DB_NAME}}"autocomplete="off"class="w-full textfield":disabled="!allowEdit"/>- <div for="databaseURL" class="mt-2 textinfolabel">+ <div for="databaseUrl" class="mt-2 textinfolabel">Tip: Use {{ DB_NAME_PLACEHOLDER }} as the placeholder for the actualdatabase name</div>@@ -54,7 +54,7 @@ import { Setting } from "../types/setting";const DB_NAME_PLACEHOLDER = "{{DB_NAME}}";interface LocalState {- consoleURL: string;+ consoleUrl: string;}export default {@@ -63,7 +63,7 @@ export default {const store = useStore();const state = reactive<LocalState>({- consoleURL:+ consoleUrl:store.getters["setting/settingByName"]("bb.console.url").value,});@@ -75,23 +75,23 @@ export default {const allowSave = computed((): boolean => {return (- state.consoleURL !=+ state.consoleUrl !=store.getters["setting/settingByName"]("bb.console.url").value);});const doSave = () => {if (- state.consoleURL !=+ state.consoleUrl !=store.getters["setting/settingByName"]("bb.console.url").value) {store.dispatch("setting/updateSettingByName", {name: "bb.console.url",- value: state.consoleURL,+ value: state.consoleUrl,}).then((setting: Setting) => {- state.consoleURL = setting.value;+ state.consoleUrl = setting.value;});}};diff --git a/frontend/src/views/SettingWorkspaceVCSDetail.vue b/frontend/src/views/SettingWorkspaceVCSDetail.vueindex ab4647b0c4..50bf7f7a91 100644--- a/frontend/src/views/SettingWorkspaceVCSDetail.vue+++ b/frontend/src/views/SettingWorkspaceVCSDetail.vue@@ -25,7 +25,7 @@type="text"class="textfield mt-1 w-full"disabled="true"- :value="vcs.instanceURL"+ :value="vcs.instanceUrl"/></div>@@ -50,7 +50,7 @@<template v-if="vcs.type == 'GITLAB_SELF_HOST'">Application ID for the registered GitLab instance-wide OAuthapplication.- <a :href="adminApplicationURL" target="_blank" class="normal-link"+ <a :href="adminApplicationUrl" target="_blank" class="normal-link">View in GitLab</a></template>@@ -141,7 +141,7 @@ import {OAuthWindowEvent,OAuthWindowEventPayload,OAuthConfig,- redirectURL,+ redirectUrl,OAuthToken,} from "../types";@@ -180,10 +180,10 @@ export default {if (isEmpty(payload.error)) {if (vcs.value.type == "GITLAB_SELF_HOST") {const oAuthConfig: OAuthConfig = {- endpoint: `${vcs.value.instanceURL}/oauth/token`,+ endpoint: `${vcs.value.instanceUrl}/oauth/token`,applicationId: state.applicationId,secret: state.secret,- redirectURL: redirectURL(),+ redirectUrl: redirectUrl(),};store.dispatch("gitlab/exchangeToken", {@@ -210,9 +210,9 @@ export default {watchEffect(prepareRepositoryList);- const adminApplicationURL = computed(() => {+ const adminApplicationUrl = computed(() => {if (vcs.value.type == "GITLAB_SELF_HOST") {- return `${vcs.value.instanceURL}/admin/applications`;+ return `${vcs.value.instanceUrl}/admin/applications`;}return "";});@@ -235,7 +235,7 @@ export default {!isEmpty(state.secret)) {const newWindow = openWindowForOAuth(- `${vcs.value.instanceURL}/oauth/authorize`,+ `${vcs.value.instanceUrl}/oauth/authorize`,vcs.value.applicationId);if (newWindow) {@@ -325,7 +325,7 @@ export default {state,vcs,repositoryList,- adminApplicationURL,+ adminApplicationUrl,allowUpdate,doUpdate,cancel,diff --git a/frontend/src/views/TableDetail.vue b/frontend/src/views/TableDetail.vueindex be783905a7..74dbe17978 100644--- a/frontend/src/views/TableDetail.vue+++ b/frontend/src/views/TableDetail.vue@@ -254,10 +254,10 @@ export default {});const databaseConsoleLink = computed(() => {- const consoleURL =+ const consoleUrl =store.getters["setting/settingByName"]("bb.console.url").value;- if (!isEmpty(consoleURL)) {- return consoleLink(consoleURL, database.value.name);+ if (!isEmpty(consoleUrl)) {+ return consoleLink(consoleUrl, database.value.name);}return "";});