Skip to content

Commit

Permalink
Merge pull request frappe#2189 from frappe/rename-bench-path
Browse files Browse the repository at this point in the history
fix: refac `/benches/` → `/groups/`
  • Loading branch information
18alantom authored Oct 1, 2024
2 parents 0a7689a + 577d910 commit a3f9f46
Show file tree
Hide file tree
Showing 38 changed files with 117 additions and 154 deletions.
4 changes: 2 additions & 2 deletions dashboard/src/components/AlertBenchUpdate.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<Button
v-if="deployInformation.deploy_in_progress"
variant="solid"
:route="`/benches/${bench.name}/deploys/${deployInformation.last_deploy.name}`"
:route="`/groups/${bench.name}/deploys/${deployInformation.last_deploy.name}`"
>View Progress</Button
>
<Tooltip
Expand Down Expand Up @@ -114,7 +114,7 @@ export default {
}
},
onSuccess(candidate) {
this.$router.push(`/benches/${this.bench.name}/deploys/${candidate}`);
this.$router.push(`/groups/${this.bench.name}/deploys/${candidate}`);
this.showDeployDialog = false;
}
};
Expand Down
2 changes: 1 addition & 1 deletion dashboard/src/components/AlertUpdate.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<Button
v-if="deployInformation.deploy_in_progress"
variant="solid"
:route="`/benches/${bench.name}/deploys/${deployInformation.last_deploy.name}`"
:route="`/groups/${bench.name}/deploys/${deployInformation.last_deploy.name}`"
>View Progress</Button
>
<Button
Expand Down
2 changes: 1 addition & 1 deletion dashboard/src/components/CommandPalette.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<Combobox @update:model-value="onSelection">
<ComboboxInput
@keyup.enter="show = false"
placeholder="Search for sites, benches and servers"
placeholder="Search for sites, bench, groups and servers"
class="w-full border-none bg-transparent px-4 text-base text-gray-800 placeholder-gray-500 focus:ring-0"
@input="onInput"
autocomplete="off"
Expand Down
2 changes: 1 addition & 1 deletion dashboard/src/components/Navbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export default {
},
{
label: 'Benches',
route: '/benches',
route: '/groups',
highlight: () => {
return this.$route.fullPath.endsWith('/sites');
}
Expand Down
4 changes: 2 additions & 2 deletions dashboard/src/components/Sidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -184,9 +184,9 @@ export default {
},
{
label: 'Bench Groups',
route: '/benches',
route: '/groups',
highlight: () => {
return this.$route.fullPath.startsWith('/benches');
return this.$route.fullPath.startsWith('/groups');
},
icon: FCIcons.BenchIcon
//condition: () => this.$account.team?.benches_enabled
Expand Down
10 changes: 5 additions & 5 deletions dashboard/src/router/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,12 @@ const routes = [
component: () => import('../views/notifications/Notifications.vue')
},
{
path: '/benches',
path: '/groups',
name: 'BenchesScreen',
component: () => import('../views/bench/Benches.vue')
},
{
path: '/benches/new/:saas_app?',
path: '/groups/new/:saas_app?',
name: 'NewBench',
meta: {
isSaasPage: true
Expand All @@ -82,7 +82,7 @@ const routes = [
props: true
},
{
path: '/benches/:benchName',
path: '/groups/:benchName',
name: 'Bench',
component: () => import('../views/bench/Bench.vue'),
props: true,
Expand Down Expand Up @@ -132,7 +132,7 @@ const routes = [
]
},
{
path: '/benches/:benchName/apps/new',
path: '/groups/:benchName/apps/new',
name: 'NewBenchApp',
component: () => import('../views/bench/NewBenchApp.vue'),
props: true
Expand Down Expand Up @@ -288,7 +288,7 @@ const routes = [
},
{
name: 'ServerBenches',
path: 'benches',
path: 'groups',
component: () => import('../views/server/ServerBenches.vue'),
props: true
},
Expand Down
4 changes: 2 additions & 2 deletions dashboard/src/views/bench/Bench.vue
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ export default {
},
isSaasLogin(app) {
if (localStorage.getItem('saas_login')) {
return `/saas/manage/${app}/benches`;
return `/saas/manage/${app}/groups`;
}
return '/sites';
Expand All @@ -171,7 +171,7 @@ export default {
}
},
tabs() {
let tabRoute = subRoute => `/benches/${this.benchName}/${subRoute}`;
let tabRoute = subRoute => `/groups/${this.benchName}/${subRoute}`;
let tabs = [
{
label: 'Sites',
Expand Down
4 changes: 1 addition & 3 deletions dashboard/src/views/bench/BenchApps.vue
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,7 @@
/>
<p class="mt-4 text-base" @click="showAddAppDialog = false">
Don't find your app here?
<Link :to="`/benches/${benchName}/apps/new`">
Add from GitHub
</Link>
<Link :to="`/groups/${benchName}/apps/new`"> Add from GitHub </Link>
</p>
</template>
<template v-slot:actions>
Expand Down
4 changes: 2 additions & 2 deletions dashboard/src/views/bench/BenchDeploys.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
: 'hover:bg-gray-50'
"
:key="candidate.name"
:to="`/benches/${benchName}/deploys/${candidate.name}`"
:to="`/groups/${benchName}/deploys/${candidate.name}`"
>
<ListItem
:title="`Deploy on ${formatDate(
Expand Down Expand Up @@ -160,7 +160,7 @@ export default {
return h(
'Link',
{
props: { to: `/benches/${bench?.name}/jobs/${job.name}` },
props: { to: `/groups/${bench?.name}/jobs/${job.name}` },
class: 'text-sm'
},
'Job Log →'
Expand Down
2 changes: 1 addition & 1 deletion dashboard/src/views/bench/BenchJobs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export default {
};
},
jobRoute(job) {
return `/benches/${this.benchName}/jobs/${job.name}`;
return `/groups/${this.benchName}/jobs/${job.name}`;
}
}
};
Expand Down
2 changes: 1 addition & 1 deletion dashboard/src/views/bench/BenchLogs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
:class="logName === log.name ? 'bg-gray-100' : 'hover:bg-gray-50'"
v-for="log in $resources.logs.data"
:key="log.name"
:to="`/benches/${bench.name}/logs/${instanceName}/${log.name}`"
:to="`/groups/${bench.name}/logs/${instanceName}/${log.name}`"
>
<ListItem
:title="log.name"
Expand Down
2 changes: 1 addition & 1 deletion dashboard/src/views/bench/BenchSites.vue
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ export default {
label: 'View Logs',
onClick: () => {
this.$router.push(
`/benches/${this.bench.name}/logs/${this.versions[i].name}/`
`/groups/${this.bench.name}/logs/${this.versions[i].name}/`
);
},
condition: () => this.versions[i].status === 'Active'
Expand Down
2 changes: 1 addition & 1 deletion dashboard/src/views/bench/Benches.vue
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ export default {
if (!this.$account.hasBillingInfo) {
this.showAddCardDialog = true;
} else {
this.$router.replace('/benches/new');
this.$router.replace('/groups/new');
}
},
dropdownItems(bench) {
Expand Down
2 changes: 1 addition & 1 deletion dashboard/src/views/bench/NewBench.vue
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ export default {
}
},
onSuccess(benchName) {
this.$router.push(`/benches/${benchName}`);
this.$router.push(`/groups/${benchName}`);
}
};
}
Expand Down
2 changes: 1 addition & 1 deletion dashboard/src/views/bench/NewBenchApp.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export default {
}
},
onSuccess() {
this.$router.push(`/benches/${this.benchName}`);
this.$router.push(`/groups/${this.benchName}`);
}
};
}
Expand Down
4 changes: 2 additions & 2 deletions dashboard/src/views/marketplace/InstallMarketplaceApp.vue
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
</p>
</div>
<template v-slot:actions>
<Button variant="solid" route="/benches/new">New Bench</Button>
<Button variant="solid" route="/groups/new">New Bench</Button>
</template>
</Card>
</div>
Expand Down Expand Up @@ -136,7 +136,7 @@ export default {
color: 'green'
});
this.$router.push(`/benches/${this.selectedBench}/apps`);
this.$router.push(`/groups/${this.selectedBench}/apps`);
}
};
},
Expand Down
2 changes: 1 addition & 1 deletion dashboard/src/views/server/ServerBenches.vue
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ export default {
{
label: 'View Versions',
onClick: () => {
this.$router.push(`/benches/${bench.name}/versions`);
this.$router.push(`/groups/${bench.name}/versions`);
}
}
];
Expand Down
4 changes: 2 additions & 2 deletions dashboard/src/views/site/Site.vue
Original file line number Diff line number Diff line change
Expand Up @@ -340,10 +340,10 @@ export default {
{
label: 'Manage Bench',
icon: 'tool',
route: `/benches/${this.site?.group}`,
route: `/groups/${this.site?.group}`,
condition: () => this.site?.group,
onClick: () => {
this.$router.push(`/benches/${this.site?.group}`);
this.$router.push(`/groups/${this.site?.group}`);
}
},
{
Expand Down
2 changes: 1 addition & 1 deletion dashboard/src/views/site/SiteAppsAndSubscriptions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@

<div v-if="site?.group">
<p class="mt-4 text-sm text-gray-700">
<Link :to="`/benches/${site.group}/apps`" class="font-medium">
<Link :to="`/groups/${site.group}/apps`" class="font-medium">
Add more apps to your bench
</Link>
</p>
Expand Down
2 changes: 1 addition & 1 deletion dashboard/src/views/spaces/CodeServerOverviewInfo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
>
<template v-slot:actions>
<router-link
:to="`/benches/${codeServer.group}/versions/${codeServer.bench}`"
:to="`/groups/${codeServer.group}/versions/${codeServer.bench}`"
class="text-base text-gray-600 hover:text-gray-700"
>
{{ codeServer.bench }} →
Expand Down
2 changes: 1 addition & 1 deletion dashboard/src/views/spaces/NewCodeServerBench.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<div v-else class="ml-2 mt-4 text-sm">
No bench versions found with a code server. Click
<router-link
:to="`/benches/${selectedGroup}`"
:to="`/groups/${selectedGroup}`"
class="text-blue-600 hover:underline"
>here</router-link
>
Expand Down
2 changes: 1 addition & 1 deletion dashboard/src2/components/AlertAddPaymentMode.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<AlertBanner
title="Add a payment mode to start creating sites, benches, and more."
title="Add a payment mode to start creating sites, bench groups, and more."
type="warning"
>
<Button class="ml-auto" @click="addPaymentMode" variant="outline">
Expand Down
2 changes: 1 addition & 1 deletion dashboard/src2/components/NavigationItems.vue
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export default {
{
name: 'Bench Groups',
icon: () => h(Package),
route: '/benches',
route: '/groups',
isActive:
[
'Release Group List',
Expand Down
2 changes: 1 addition & 1 deletion dashboard/src2/components/SiteOverview.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<DismissableBanner
v-if="!$site.doc.current_plan?.private_benches && $site.doc.group_public"
class="col-span-1 lg:col-span-2"
title="Your site is currently on a shared bench. Upgrade plan to enjoy <a href='https://frappecloud.com/shared-hosting#benches' class='underline' target='_blank'>more benefits</a>."
title="Your site is currently on a shared bench group. Upgrade plan to enjoy <a href='https://frappecloud.com/shared-hosting#benches' class='underline' target='_blank'>more benefits</a>."
:id="$site.name"
>
<Button class="ml-auto" variant="outline" @click="showPlanChangeDialog">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ export default {
!this.$site.doc?.group_public &&
this.privateReleaseGroups.length === 0
)
return `Your team doesn't own any private benches available to upgrade this site to ${this.nextVersion}.`;
return `Your team doesn't own any private bench groups available to upgrade this site to ${this.nextVersion}.`;
else if (!this.privateReleaseGroup.value) {
return '';
} else if (!this.$site.doc?.group_public && !this.benchHasCommonServer)
Expand Down
4 changes: 2 additions & 2 deletions dashboard/src2/objects/group.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export default {
initialDeploy: 'initial_deploy'
},
list: {
route: '/benches',
route: '/groups',
title: 'Bench Groups',
fields: [{ apps: ['app'] }],
searchField: 'title',
Expand Down Expand Up @@ -138,7 +138,7 @@ export default {
}
return breadcrumbs;
},
route: '/benches/:name',
route: '/groups/:name',
tabs: [
{
label: 'Sites',
Expand Down
2 changes: 1 addition & 1 deletion dashboard/src2/objects/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ export default {
{
label: 'Bench Groups',
icon: icon('package'),
route: 'benches',
route: 'groups',
type: 'list',
list: {
doctype: 'Release Group',
Expand Down
6 changes: 3 additions & 3 deletions dashboard/src2/objects/site.js
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ export default {
breadcrumbs.push(
{
label: site.doc?.group_title,
route: `/benches/${site.doc?.group}`
route: `/groups/${site.doc?.group}`
},
siteCrumb
);
Expand Down Expand Up @@ -337,7 +337,7 @@ export default {
],
banner({ documentResource: site }) {
const bannerTitle =
'Your site is currently on a shared bench. Upgrade plan to install custom apps, enable server scripts and <a href="https://frappecloud.com/shared-hosting#benches" class="underline" target="_blank">more</a>.';
'Your site is currently on a shared bench group. Upgrade plan to install custom apps, enable server scripts and <a href="https://frappecloud.com/shared-hosting#benches" class="underline" target="_blank">more</a>.';

return upsellBanner(site, bannerTitle);
},
Expand Down Expand Up @@ -973,7 +973,7 @@ export default {
},
banner({ documentResource: site }) {
const bannerTitle =
'Your site is currently on a shared bench. Upgrade plan for offsite backups and <a href="https://frappecloud.com/shared-hosting#benches" class="underline" target="_blank">more</a>.';
'Your site is currently on a shared bench group. Upgrade plan for offsite backups and <a href="https://frappecloud.com/shared-hosting#benches" class="underline" target="_blank">more</a>.';

return upsellBanner(site, bannerTitle);
}
Expand Down
2 changes: 1 addition & 1 deletion dashboard/src2/pages/DeployCandidate.vue
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ export default {
if (!name) {
onError();
} else {
router.push(`/benches/${group}/deploys/${name}`);
router.push(`/groups/${group}/deploys/${name}`);
}
},
onError
Expand Down
8 changes: 4 additions & 4 deletions dashboard/src2/pages/NewReleaseGroup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
},
{
label: 'New Bench Group',
route: '/benches/new'
route: '/groups/new'
}
]
: [
{ label: 'Bench Groups', route: '/benches' },
{ label: 'New Bench Group', route: '/benches/new' }
{ label: 'Bench Groups', route: '/groups' },
{ label: 'New Bench Group', route: '/groups/new' }
]
"
/>
Expand All @@ -32,7 +32,7 @@
class="mx-auto mt-60 w-fit rounded border border-dashed px-12 py-8 text-center text-gray-600"
>
<i-lucide-alert-triangle class="mx-auto mb-4 h-6 w-6 text-red-600" />
<ErrorMessage message="You aren't permitted to create new benches" />
<ErrorMessage message="You aren't permitted to create new bench groups" />
</div>

<div v-else class="mx-auto max-w-2xl px-5">
Expand Down
2 changes: 1 addition & 1 deletion dashboard/src2/pages/NewSite.vue
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,7 @@ export default {
if (this.bench) {
let group = getCachedDocumentResource('Release Group', this.bench);
return [
{ label: 'Bench Groups', route: '/benches' },
{ label: 'Bench Groups', route: '/groups' },
{
label: group ? group.doc.title : this.bench,
route: {
Expand Down
Loading

0 comments on commit a3f9f46

Please sign in to comment.