Skip to content

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

feat: update subscription (#578)

ecmadaoa8cc3964d566
diff --git a/frontend/src/components/Counter.vue b/frontend/src/components/Counter.vue
deleted file mode 100644
index 751cddd1bc..0000000000
--- a/frontend/src/components/Counter.vue
+++ /dev/null
@@ -1,78 +0,0 @@
-<template>
- <div class="h-8 w-24">
- <div
- class="flex flex-row h-8 w-full rounded-lg relative bg-transparent mt-1 bg-gray-200 text-gray-600 items-center"
- >
- <button
- class="hover:text-gray-700 hover:bg-gray-300 h-full w-14 rounded-l cursor-pointer outline-none"
- :disabled="state.count <= minimum"
- @click="onClick(-5)"
- >
- <span class="m-auto text-xl font-thin">−</span>
- </button>
- <div class="w-full text-center">
- {{ state.count }}
- </div>
- <button
- class="hover:text-gray-700 hover:bg-gray-300 h-full w-14 rounded-r cursor-pointer outline-none"
- @click="onClick(5)"
- >
- <span class="m-auto text-xl font-thin">+</span>
- </button>
- </div>
- </div>
-</template>
-
-<script lang="ts">
-import { watch, reactive } from "vue";
-
-export default {
- props: {
- count: {
- default: 0,
- type: Number,
- },
- minimum: {
- default: 1,
- type: Number,
- },
- },
- emits: ["on-change"],
- setup(props, { emit }) {
- const state = reactive<{ count: number }>({
- count: props.count,
- });
- const onClick = (diff: number) => {
- const count = Math.max(props.minimum, state.count + diff);
- state.count = count;
- };
-
- watch(
- () => state.count,
- (val) => {
- emit("on-change", val);
- }
- );
-
- watch(
- () => props.count,
- (val) => {
- state.count = val;
- }
- );
-
- return {
- state,
- onClick,
- };
- },
-};
-</script>
-
-<style scoped>
-input[type="number"]::-webkit-inner-spin-button,
-input[type="number"]::-webkit-outer-spin-button {
- -webkit-appearance: none;
- margin: 0;
-}
-</style>
diff --git a/frontend/src/components/PricingTable.vue b/frontend/src/components/PricingTable.vue
index ee303378cb..f0bb286aaa 100644
--- a/frontend/src/components/PricingTable.vue
+++ b/frontend/src/components/PricingTable.vue
@@ -1,6 +1,6 @@
<template>
<div class="hidden md:block">
- <table id="plans" class="w-full h-px table-fixed mb-16">
+ <table id="plans" class="w-full h-px table-fixed">
<caption class="sr-only">
Pricing plan comparison
</caption>
@@ -13,7 +13,7 @@
<td
v-for="plan in plans"
:key="plan.type"
- class="h-full py-8 px-6 align-top"
+ class="h-full pt-8 px-6 align-top"
>
<div class="flex-1">
<img :src="plan.image" class="hidden lg:block p-5" />
@@ -24,37 +24,18 @@
{{ $t(`subscription.plan.${plan.title}.desc`) }}
</p>
- <p class="mt-4 flex items-baseline text-gray-900">
+ <p class="mt-4 flex items-baseline text-gray-900 text-xl">
<span class="text-4xl">
- {{ plan.price }}
+ ${{ plan.pricePerInstancePerMonth }}
</span>
+ {{ $t("subscription.per-month") }}
</p>
- <div
- :class="[
- isAvailableToPurchase(plan) ? '' : 'opacity-0 disabled',
- 'flex justify-center items-center mt-5',
- ]"
- >
- <div>
- {{
- $t(
- "subscription.feature-sections.database-management.features.instance-count"
- )
- }}
- <br />
- {{
- $t("subscription.instance-price", {
- price: instancePricePerMonth,
- })
- }}
- </div>
- <Counter
- class="ml-auto"
- :count="state.instanceCount"
- :minimum="minimumInstanceCount"
- @on-change="(val) => (state.instanceCount = val)"
- />
+ <div class="text-gray-400">
+ {{ $t("subscription.per-instance") }}
+ </div>
+ <div class="text-gray-400">
+ {{ $t(`subscription.${plan.title}-price-intro`) }}
</div>
<button
@@ -73,6 +54,23 @@
</td>
</tr>
</thead>
+ </table>
+ <div class="px-4 py-8 text-right text-gray-500">
+ <i18n-t keypath="subscription.announcement">
+ <template #cancel>
+ <a
+ class="underline"
+ href="https://bytebase.com/refund"
+ target="_blank"
+ >{{ $t("subscription.cancel") }}</a
+ >
+ </template>
+ </i18n-t>
+ </div>
+ <table class="w-full h-px table-fixed mb-16">
+ <caption class="sr-only">
+ Feature comparison
+ </caption>
<tbody class="border-t border-gray-200 divide-y divide-gray-200">
<template v-for="section in sections" :key="section.id">
<tr>
@@ -99,18 +97,34 @@
)
}}
</th>
- <td v-for="plan in plans" :key="plan.type" class="py-5 px-6">
- <template v-if="getFeature(plan, feature)">
- <span
- v-if="getFeature(plan, feature)?.content"
- class="block text-sm text-gray-700"
- >{{ $t(getFeature(plan, feature)?.content) }}</span
- >
- <heroicons-solid:check v-else class="w-5 h-5 text-green-500" />
- </template>
- <template v-else>
- <heroicons-solid:minus class="w-5 h-5 text-gray-500" />
- </template>
+ <td
+ v-for="plan in plans"
+ :key="plan.type"
+ class="py-5 px-6 font-semibold tooltip-wrapper"
+ :class="plan.highlight ? 'text-indigo-600' : 'text-gray-600'"
+ >
+ <div class="flex justify-center">
+ <template v-if="getFeature(plan, feature)">
+ <span
+ v-if="getFeature(plan, feature)?.content"
+ class="block text-sm"
+ >{{ $t(getFeature(plan, feature)?.content) }}</span
+ >
+ <heroicons-solid:check v-else class="w-5 h-5" />
+ </template>
+ <template v-else>
+ <heroicons-solid:minus class="w-5 h-5" />
+ </template>
+ <template v-if="getFeature(plan, feature)?.tooltip">
+ <heroicons-solid:question-mark-circle class="w-5 h-5 ml-1" />
+ <span
+ v-if="getFeature(plan, feature)?.tooltip"
+ class="tooltip whitespace-nowrap"
+ >
+ {{ $t(getFeature(plan, feature)?.tooltip) }}
+ </span>
+ </template>
+ </div>
</td>
</tr>
</template>
@@ -165,7 +179,6 @@ interface LocalPlan extends Plan {
}
const minimumInstanceCount = 5;
-const instancePricePerMonth = 29;
export default {
name: "PricingTable",
@@ -189,17 +202,17 @@ export default {
(state.instanceCount = val?.instanceCount ?? minimumInstanceCount)
);
- const instancePricePerYear = computed((): number => {
+ const getInstancePricePerYear = (plan: Plan): number => {
return (
(state.instanceCount - minimumInstanceCount) *
- instancePricePerMonth *
+ plan.pricePerInstancePerMonth *
12
);
- });
+ };
const getPlanPrice = (plan: Plan): number => {
if (plan.type !== PlanType.TEAM) return plan.unitPrice;
- return plan.unitPrice + instancePricePerYear.value;
+ return plan.unitPrice + getInstancePricePerYear(plan);
};
const plans = computed((): LocalPlan[] => {
@@ -250,10 +263,6 @@ export default {
}
};
- const isAvailableToPurchase = (plan: Plan): boolean => {
- return plan.type === PlanType.TEAM;
- };
-
return {
state,
plans,
@@ -261,8 +270,6 @@ export default {
getFeature,
onButtonClick,
minimumInstanceCount,
- instancePricePerMonth,
- isAvailableToPurchase,
};
},
};
diff --git a/frontend/src/locales/en.yml b/frontend/src/locales/en.yml
index a416d27103..56b88b8313 100644
--- a/frontend/src/locales/en.yml
+++ b/frontend/src/locales/en.yml
@@ -1137,14 +1137,20 @@ subscription:
trial: You can start a trial with $7 for 7 days.
trial-comment: Only enabled for the first payment. You can cancel the subscription at any time.
upgrade: Upgrade subscription
- price: ${price}/year
- instance-price: ${price}/instance/month
+ per-month: / month
+ per-instance: Per instance
+ free-price-intro: Up to 5
+ team-price-intro: 5 minimum, billed annually
+ enterprise-price-intro: Customized, billed annually
deploy: Deploy
contact-us: Contact us
start-trial: Start trial with ${price} for {days} days
subscribe: Subscribe now
current-plan: Current plan
buy: Buy {plan} plan
+ cancel: cancel your subscription
+ announcement: You can upgrade, downgrade, or {cancel} anytime. No
+ hidden charges.
update:
success:
title: Successfully updated license
@@ -1191,32 +1197,39 @@ subscription:
instance-count: Instance count
instance-upto-5: Up to 5
instance-customized: Customized
- schema-change: Schema change
+ instance-minimum-5: 5 ~ unlimited
+ schema-change: Schema and data change
migration-history: Migration history
sql-editor: SQL Editor
- database-backup-restore: Database backup/restore
+ database-backup-restore: Database backup / restore
archiving: Archiving
sql-check: SQL check
sql-check-basic: Basic
- sql-check-advanced: Advanced (e.g. Backward compatibility check)
+ sql-check-basic-tooltip: Syntax check, connection check
+ sql-check-advanced: Advanced
+ sql-check-advanced-tooltip: Basic + Backward compatibility check
anomaly-detection: Anomaly detection
anomaly-detection-basic: Basic
- anomaly-detection-advanced: Advanced (e.g. Drift detection)
+ anomaly-detection-basic-tooltip: Connection failure, missing backup
+ anomaly-detection-advanced: Advanced
+ anomaly-detection-advanced-tooltip: Basic + Drift detection
+ schedule-change: Scheduled change at specific time
review-and-backup-policy: Review and backup policy
- tenancy: Multi-Region / Multi-Tenancy
+ tenancy: Multi-Region / Multi-Tenancy deployment
collaboration:
title: Collaboration
features:
ui-based-sql-review: UI based SQL review
- gitops-workflow: GitOps workflow
- sql-review-commenting: SQL review commenting
+ vsc-workflow: 'VCS workflow #GitOps'
+ shareable-query-link: Shareable query link
im-integration: IM integration
inbox-notification: Inbox notification
admin-and-security:
title: Admin & Security
features:
- activity-log: Activity Log
- rbac: RBAC
+ activity-log: Activity log
+ rbac: RBAC (Owner, DBA, Developer role)
+ gitlab-login: Login with GitLab account
plan:
title: Plan
free:
@@ -1224,7 +1237,7 @@ subscription:
desc: Personal project or small team, no DBA
team:
title: Team
- desc: Medium size team, has dedicated DBA or TL with management needs
+ desc: Medium size team, has dedicated DBA or TL for engineering velocity
enterprise:
title: Enterprise
- desc: Large organization, has dedicated DBA group
+ desc: Large organization, has dedicated DBA group to manage database fleet
diff --git a/frontend/src/locales/zh-CN.yml b/frontend/src/locales/zh-CN.yml
index f4fd8fdbc8..f9855c0932 100644
--- a/frontend/src/locales/zh-CN.yml
+++ b/frontend/src/locales/zh-CN.yml
@@ -1008,14 +1008,19 @@ subscription:
trial: 您可以以 $7 的价格试用 7 天
trial-comment: 仅首次付费可以试用,可随时退款。
upgrade: 升级订阅
- price: ${price}/年
- instance-price: ${price}/实例/月
+ per-month: / 月
+ per-instance: 每个实例
+ free-price-intro: 最多 5 个实例
+ team-price-intro: 5 个起步,按年付费
+ enterprise-price-intro: 自定义实例数,按年付费
deploy: 部署
contact-us: 联系我们
start-trial: 以 {days} 天 {price} 美元的价格试用
subscribe: 开始订阅
current-plan: 当前订阅
buy: 购买{plan}
+ cancel: 取消订阅
+ announcement: 您可以随时升级、降级或{cancel}。没有任何隐藏费用。
update:
success:
title: 证书更新成功
@@ -1061,26 +1066,32 @@ subscription:
features:
instance-count: 实例数
instance-upto-5: 不多于 5 个
+ instance-minimum-5: 5 ~ 无限制
instance-customized: 自定义
- schema-change: Schema 变更
+ schema-change: Schema 和数据变更
migration-history: 迁移历史
sql-editor: SQL 编辑器
database-backup-restore: 数据库备份和恢复
archiving: 归档
sql-check: SQL 检查
sql-check-basic: 基础
- sql-check-advanced: 高级 (例如向后兼容性检查)
+ sql-check-basic-tooltip: 语法检查、数据库连接检查
+ sql-check-advanced: 高级
+ sql-check-advanced-tooltip: 基础版功能+向后兼容性检查
anomaly-detection: 异常检测
anomaly-detection-basic: 基础
- anomaly-detection-advanced: 高级 (例如 Schema 偏差检测)
+ anomaly-detection-basic-tooltip: 数据库连接异常、备份缺失
+ anomaly-detection-advanced: 高级
+ anomaly-detection-advanced-tooltip: 基础版功能+ Schema 偏差检测
+ schedule-change: 设定任务执行时间
review-and-backup-policy: 审核和备份策略
- tenancy: 多地域/多租户
+ tenancy: 多地域/多租户部署
collaboration:
title: 团队协作
features:
ui-based-sql-review: 基于 UI 的 SQL 审查
- gitops-workflow: GitOps 工作流
- sql-review-commenting: SQL 审核中的批注
+ vsc-workflow: 'VCS 工作流 #GitOps'
+ shareable-query-link: 分享查询链接
im-integration: IM 集成
inbox-notification: 站内信通知
admin-and-security:
@@ -1088,6 +1099,7 @@ subscription:
features:
activity-log: 活动日志
rbac: RBAC 权限管理
+ gitlab-login: 通过 GitLab 账户登录
plan:
title: 版本
free:
@@ -1095,7 +1107,7 @@ subscription:
desc: 个人或小团队,无专职 DBA
team:
title: 团队版
- desc: 中型团队,有专职 DBA 或者 TL 有管控需求
+ desc: 中型团队,有专职 DBA 或 TL 以提高工程速度
enterprise:
title: 企业版
- desc: 大型组织,有专属 DBA 团队
+ desc: 大型组织,有专属 DBA 团队来管理数据库
diff --git a/frontend/src/types/plan.ts b/frontend/src/types/plan.ts
index 41dccb00de..0bc46ebee8 100644
--- a/frontend/src/types/plan.ts
+++ b/frontend/src/types/plan.ts
@@ -26,6 +26,7 @@ export type PlanPatch = {
export interface Plan {
// Plan meta data
+ label?: string;
type: PlanType;
trialDays: number;
unitPrice: number;
@@ -34,7 +35,7 @@ export interface Plan {
pricePerInstancePerMonth: number;
// Plan desc and feature
title: string;
- features: { id: string; content?: string }[];
+ features: { id: string; content?: string; tooltip?: string }[];
}
// A map from the a particular feature to the respective enablement of a particular plan
@@ -70,6 +71,7 @@ export const FEATURE_SECTIONS = [
"archiving",
"sql-check",
"anomaly-detection",
+ "schedule-change",
"review-and-backup-policy",
"tenancy",
],
@@ -78,15 +80,15 @@ export const FEATURE_SECTIONS = [
id: "collaboration",
features: [
"ui-based-sql-review",
- "gitops-workflow",
- "sql-review-commenting",
+ "vsc-workflow",
+ "shareable-query-link",
"im-integration",
"inbox-notification",
],
},
{
id: "admin-and-security",
- features: ["activity-log", "rbac"],
+ features: ["activity-log", "rbac", "gitlab-login"],
},
];
@@ -115,15 +117,19 @@ export const FREE_PLAN: Plan = {
id: "sql-check",
content:
"subscription.feature-sections.database-management.features.sql-check-basic",
+ tooltip:
+ "subscription.feature-sections.database-management.features.sql-check-basic-tooltip",
},
{
id: "anomaly-detection",
content:
"subscription.feature-sections.database-management.features.anomaly-detection-basic",
+ tooltip:
+ "subscription.feature-sections.database-management.features.anomaly-detection-basic-tooltip",
},
{ id: "ui-based-sql-review" },
- { id: "gitops-workflow" },
- { id: "sql-review-commenting" },
+ { id: "vsc-workflow" },
+ { id: "shareable-query-link" },
{ id: "im-integration" },
{ id: "inbox-notification" },
{ id: "activity-log" },
@@ -132,6 +138,7 @@ export const FREE_PLAN: Plan = {
export const TEAM_PLAN: Plan = {
// Plan meta data
+ label: "Beta",
type: PlanType.TEAM,
trialDays: 7,
unitPrice: 1740,
@@ -144,7 +151,7 @@ export const TEAM_PLAN: Plan = {
{
id: "instance-count",
content:
- "subscription.feature-sections.database-management.features.instance-customized",
+ "subscription.feature-sections.database-management.features.instance-minimum-5",
},
{ id: "schema-change" },
{ id: "migration-history" },
@@ -155,31 +162,38 @@ export const TEAM_PLAN: Plan = {
id: "sql-check",
content:
"subscription.feature-sections.database-management.features.sql-check-advanced",
+ tooltip:
+ "subscription.feature-sections.database-management.features.sql-check-advanced-tooltip",
},
{
id: "anomaly-detection",
content:
"subscription.feature-sections.database-management.features.anomaly-detection-advanced",
+ tooltip:
+ "subscription.feature-sections.database-management.features.anomaly-detection-advanced-tooltip",
},
+ { id: "schedule-change" },
{ id: "review-and-backup-policy" },
{ id: "ui-based-sql-review" },
- { id: "gitops-workflow" },
- { id: "sql-review-commenting" },
+ { id: "vsc-workflow" },
+ { id: "shareable-query-link" },
{ id: "im-integration" },
{ id: "inbox-notification" },
{ id: "activity-log" },
{ id: "rbac" },
+ { id: "gitlab-login" },
],
};
export const ENTERPRISE_PLAN: Plan = {
// Plan meta data
+ label: "Early access",
type: PlanType.ENTERPRISE,
trialDays: 7,
unitPrice: 0,
trialPrice: 0,
freeInstanceCount: 5,
- pricePerInstancePerMonth: 29,
+ pricePerInstancePerMonth: 199,
// Plan desc and feature
title: "enterprise",
features: [
@@ -197,20 +211,26 @@ export const ENTERPRISE_PLAN: Plan = {
id: "sql-check",
content:
"subscription.feature-sections.database-management.features.sql-check-advanced",
+ tooltip:
+ "subscription.feature-sections.database-management.features.sql-check-advanced-tooltip",
},
{
id: "anomaly-detection",
content:
"subscription.feature-sections.database-management.features.anomaly-detection-advanced",
+ tooltip:
+ "subscription.feature-sections.database-management.features.anomaly-detection-advanced-tooltip",
},
+ { id: "schedule-change" },
{ id: "review-and-backup-policy" },
{ id: "tenancy" },
{ id: "ui-based-sql-review" },
- { id: "gitops-workflow" },
- { id: "sql-review-commenting" },
+ { id: "vsc-workflow" },
+ { id: "shareable-query-link" },
{ id: "im-integration" },
{ id: "inbox-notification" },
{ id: "activity-log" },
{ id: "rbac" },
+ { id: "gitlab-login" },
],
};