update doctype-pagetype

This commit is contained in:
jingrow 2025-12-23 21:34:08 +08:00
parent 380e25c4f7
commit ce84804aeb
964 changed files with 4374 additions and 4374 deletions

View File

@ -7,5 +7,5 @@ b7d4540c32075cbf569d9c8e256a8ce9898c7115
# Fix Agent Job Type fixtures # Fix Agent Job Type fixtures
0c88a71473a906c87c58c94cc11743f79711d240 0c88a71473a906c87c58c94cc11743f79711d240
# Generate DocType types # Generate PageType types
a965b98b90fadf438c5f0a22c5778896743a94e7 a965b98b90fadf438c5f0a22c5778896743a94e7

View File

@ -168,7 +168,7 @@ jobs:
- name: Setup Test Users - name: Setup Test Users
working-directory: /home/runner/jingrow-bench/apps/jcloude/dashboard working-directory: /home/runner/jingrow-bench/apps/jcloude/dashboard
run: | run: |
bench --site test_site execute jcloude.jcloude.doctype.team.test_team.create_test_jcloude_admin_team \ bench --site test_site execute jcloude.jcloude.pagetype.team.test_team.create_test_jcloude_admin_team \
--kwargs "{\"email\": \"${JCLOUDE _ADMIN_USER_EMAIL}\", \"free_account\": True, \"skip_onboarding\": True}" --kwargs "{\"email\": \"${JCLOUDE _ADMIN_USER_EMAIL}\", \"free_account\": True, \"skip_onboarding\": True}"
bench --site test_site set-password "$JCLOUDE _ADMIN_USER_EMAIL" "$JCLOUDE _ADMIN_USER_PASSWORD" bench --site test_site set-password "$JCLOUDE _ADMIN_USER_EMAIL" "$JCLOUDE _ADMIN_USER_PASSWORD"

View File

@ -7,12 +7,12 @@
() => { () => {
renderDialog( renderDialog(
h(DialogComponent, { h(DialogComponent, {
doctype, pagetype,
docname, docname,
onOpenRequestDialog: () => { onOpenRequestDialog: () => {
renderDialog( renderDialog(
h(AccessRequestDialog, { h(AccessRequestDialog, {
doctype, pagetype,
docname, docname,
}), }),
); );
@ -32,7 +32,7 @@ import AccessRequestDialog from './AccessRequestDialog.vue';
import AccessRequestStatusDialog from './AccessRequestStatusDialog.vue'; import AccessRequestStatusDialog from './AccessRequestStatusDialog.vue';
const props = defineProps<{ const props = defineProps<{
doctype: string; pagetype: string;
docname: string; docname: string;
pg?: any; pg?: any;
error?: Error; error?: Error;

View File

@ -21,7 +21,7 @@
<div class="space-y-4 text-base"> <div class="space-y-4 text-base">
<p>Are you sure you want to request access to this resource?</p> <p>Are you sure you want to request access to this resource?</p>
<div class="space-y-2"> <div class="space-y-2">
<p><span class="font-medium">Type:</span> {{ props.doctype }}</p> <p><span class="font-medium">Type:</span> {{ props.pagetype }}</p>
<p><span class="font-medium">Resource:</span> {{ props.docname }}</p> <p><span class="font-medium">Resource:</span> {{ props.docname }}</p>
</div> </div>
<Textarea <Textarea
@ -65,7 +65,7 @@ import { toast } from 'vue-sonner';
import { Checkbox, Textarea } from 'jingrow-ui'; import { Checkbox, Textarea } from 'jingrow-ui';
const props = defineProps<{ const props = defineProps<{
doctype: string; pagetype: string;
docname: string; docname: string;
}>(); }>();
@ -82,20 +82,20 @@ const permissionsState = reactive({
const permissionsMeta = computed(() => ({ const permissionsMeta = computed(() => ({
login_as_administrator: { login_as_administrator: {
label: 'Login as Administrator', label: 'Login as Administrator',
enabled: props.doctype === 'Site', enabled: props.pagetype === 'Site',
}, },
site_domains: { site_domains: {
label: 'Domains', label: 'Domains',
enabled: props.doctype === 'Site', enabled: props.pagetype === 'Site',
}, },
site_release_group: { site_release_group: {
label: 'Release Group', label: 'Release Group',
enabled: props.doctype === 'Site', enabled: props.pagetype === 'Site',
}, },
bench_ssh: { bench_ssh: {
label: 'SSH Access', label: 'SSH Access',
enabled: enabled:
props.doctype === 'Release Group' || permissionsState.site_release_group, props.pagetype === 'Release Group' || permissionsState.site_release_group,
}, },
})); }));
@ -113,11 +113,11 @@ const request = createResource({
return { return {
pg: { pg: {
doctype: 'Support Access', pagetype: 'Support Access',
reason: reason.value, reason: reason.value,
resources: [ resources: [
{ {
document_type: props.doctype, document_type: props.pagetype,
document_name: props.docname, document_name: props.docname,
}, },
], ],

View File

@ -24,7 +24,7 @@
<p>You have access to this resource via access request.</p> <p>You have access to this resource via access request.</p>
</div> </div>
<div class="space-y-2"> <div class="space-y-2">
<p><span class="font-medium">Type:</span> {{ props.doctype }}</p> <p><span class="font-medium">Type:</span> {{ props.pagetype }}</p>
<p><span class="font-medium">Resource:</span> {{ props.docname }}</p> <p><span class="font-medium">Resource:</span> {{ props.docname }}</p>
<p> <p>
<span class="font-medium">Expiry:</span> <span class="font-medium">Expiry:</span>
@ -63,7 +63,7 @@ import { ref } from 'vue';
import dayjs from '../utils/dayjs'; import dayjs from '../utils/dayjs';
const props = defineProps<{ const props = defineProps<{
doctype: string; pagetype: string;
docname: string; docname: string;
}>(); }>();
@ -77,7 +77,7 @@ const status = createResource({
url: 'jcloude.api.access.status', url: 'jcloude.api.access.status',
auto: true, auto: true,
params: { params: {
doctype: props.doctype, pagetype: props.pagetype,
docname: props.docname, docname: props.docname,
}, },
}); });

View File

@ -43,7 +43,7 @@ import {
export default { export default {
name: 'AddTagDialog', name: 'AddTagDialog',
props: ['doctype', 'docname'], props: ['pagetype', 'docname'],
emits: ['added', 'removed'], emits: ['added', 'removed'],
components: { Dialog, Autocomplete, FormControl }, components: { Dialog, Autocomplete, FormControl },
data() { data() {
@ -57,8 +57,8 @@ export default {
existingTags() { existingTags() {
return { return {
type: 'list', type: 'list',
doctype: 'Jcloude Tag', pagetype: 'Jcloude Tag',
filters: { doctype_name: this.doctype }, filters: { pagetype_name: this.pagetype },
fields: ['tag'], fields: ['tag'],
pageLength: 1000, pageLength: 1000,
auto: true, auto: true,
@ -68,7 +68,7 @@ export default {
methods: { methods: {
addNewTag(value) { addNewTag(value) {
if (!value) return; if (!value) return;
let $pg = getCachedDocumentResource(this.doctype, this.docname); let $pg = getCachedDocumentResource(this.pagetype, this.docname);
if (!$pg) return; if (!$pg) return;
return $pg.addTag.submit({ tag: value }).then(() => { return $pg.addTag.submit({ tag: value }).then(() => {
this.$emit('added', value); this.$emit('added', value);

View File

@ -77,7 +77,7 @@ export default {
notification() { notification() {
return { return {
type: 'document', type: 'document',
doctype: 'Jcloude Notification', pagetype: 'Jcloude Notification',
name: this.name, name: this.name,
whitelistedMethods: { whitelistedMethods: {
markAsAddressed: 'mark_as_addressed', markAsAddressed: 'mark_as_addressed',

View File

@ -10,7 +10,7 @@
import { computed } from 'vue'; import { computed } from 'vue';
const props = defineProps<{ const props = defineProps<{
doctype: string; pagetype: string;
docname: string; docname: string;
error?: Error; error?: Error;
}>(); }>();

View File

@ -154,7 +154,7 @@ export default {
invoice() { invoice() {
return { return {
type: 'document', type: 'document',
doctype: 'Invoice', pagetype: 'Invoice',
name: this.invoiceId, name: this.invoiceId,
}; };
}, },

View File

@ -40,7 +40,7 @@ export default {
return { return {
url: 'jcloude.api.client.search_link', url: 'jcloude.api.client.search_link',
params: { params: {
doctype: this.options.doctype, pagetype: this.options.pagetype,
order_by: this.options.orderBy, order_by: this.options.orderBy,
page_length: this.options.pageLength || 10, page_length: this.options.pageLength || 10,
filters: this.options.filters, filters: this.options.filters,

View File

@ -31,7 +31,7 @@
@failure="imageAddFailure" @failure="imageAddFailure"
fileTypes="image/*" fileTypes="image/*"
:upload-args="{ :upload-args="{
doctype: 'Marketplace App', pagetype: 'Marketplace App',
docname: app.pg.name, docname: app.pg.name,
method: 'jcloude.api.marketplace.update_app_image', method: 'jcloude.api.marketplace.update_app_image',
}" }"
@ -116,7 +116,7 @@
@failure="imageAddFailure" @failure="imageAddFailure"
fileTypes="image/*" fileTypes="image/*"
:upload-args="{ :upload-args="{
doctype: 'Marketplace App', pagetype: 'Marketplace App',
docname: app.name, docname: app.name,
method: 'jcloude.api.marketplace.add_app_screenshot', method: 'jcloude.api.marketplace.add_app_screenshot',
}" }"

View File

@ -229,7 +229,7 @@ export default {
}, },
}, },
mounted() { mounted() {
this.$socket.emit('doctype_subscribe', 'Jcloude Notification'); this.$socket.emit('pagetype_subscribe', 'Jcloude Notification');
this.$socket.on('jcloude_notification', (data) => { this.$socket.on('jcloude_notification', (data) => {
if (data.team === this.$team.pg.name) { if (data.team === this.$team.pg.name) {
unreadNotificationsCount.setData((data) => data + 1); unreadNotificationsCount.setData((data) => data + 1);

View File

@ -230,11 +230,11 @@ export default {
type: 'list', type: 'list',
cache: [ cache: [
'ObjectList', 'ObjectList',
this.options.doctype || this.options.url, this.options.pagetype || this.options.url,
this.options.filters, this.options.filters,
], ],
url: this.options.url || null, url: this.options.url || null,
doctype: this.options.doctype, pagetype: this.options.pagetype,
pageLength: this.options.pageLength || 20, pageLength: this.options.pageLength || 20,
fields: [ fields: [
'name', 'name',
@ -270,26 +270,26 @@ export default {
resource.fetch(); resource.fetch();
} }
} }
if (this.options.doctype) { if (this.options.pagetype) {
const doctype = this.options.doctype; const pagetype = this.options.pagetype;
if (subscribed[doctype]) return; if (subscribed[pagetype]) return;
this.$socket.emit('doctype_subscribe', doctype); this.$socket.emit('pagetype_subscribe', pagetype);
subscribed[doctype] = true; subscribed[pagetype] = true;
const throttledReload = throttle(this.$list.reload, 5000); const throttledReload = throttle(this.$list.reload, 5000);
this.$socket.on('list_update', (data) => { this.$socket.on('list_update', (data) => {
const names = (this.$list.data || []).map((d) => d.name); const names = (this.$list.data || []).map((d) => d.name);
if (data.doctype === doctype && names.includes(data.name)) { if (data.pagetype === pagetype && names.includes(data.name)) {
throttledReload(); throttledReload();
} }
}); });
} }
}, },
beforeUnmount() { beforeUnmount() {
if (this.options.doctype) { if (this.options.pagetype) {
const doctype = this.options.doctype; const pagetype = this.options.pagetype;
this.$socket.emit('doctype_unsubscribe', doctype); this.$socket.emit('pagetype_unsubscribe', pagetype);
subscribed[doctype] = false; subscribed[pagetype] = false;
} }
}, },
computed: { computed: {

View File

@ -72,7 +72,7 @@ export default {
invoice() { invoice() {
return { return {
type: 'document', type: 'document',
doctype: 'Payout Order', pagetype: 'Payout Order',
name: this.payoutId, name: this.payoutId,
}; };
}, },

View File

@ -129,7 +129,7 @@ export default {
computed: { computed: {
listOptions() { listOptions() {
return { return {
doctype: 'Site Database User', pagetype: 'Site Database User',
filters: { filters: {
site: this.site, site: this.site,
status: ['!=', 'Archived'], status: ['!=', 'Archived'],

View File

@ -398,7 +398,7 @@ export default {
const TagsDialog = defineAsyncComponent( const TagsDialog = defineAsyncComponent(
() => import('../dialogs/TagsDialog.vue'), () => import('../dialogs/TagsDialog.vue'),
); );
renderDialog(h(TagsDialog, { doctype: 'Site', docname: this.site })); renderDialog(h(TagsDialog, { pagetype: 'Site', docname: this.site }));
}, },
trialDays, trialDays,
}, },

View File

@ -107,7 +107,7 @@ export default {
// TODO: investigate why // TODO: investigate why
url: 'jcloude.api.client.get', url: 'jcloude.api.client.get',
params: { params: {
doctype: 'Site Update', pagetype: 'Site Update',
name: this.existingUpdate, name: this.existingUpdate,
}, },
auto: !!this.existingUpdate, auto: !!this.existingUpdate,

View File

@ -87,7 +87,7 @@ const open = ref(true);
const team = getTeam(); const team = getTeam();
const request = createDocumentResource({ const request = createDocumentResource({
doctype: 'Support Access', pagetype: 'Support Access',
name: props.name, name: props.name,
auto: true, auto: true,
}); });
@ -128,7 +128,7 @@ const permissions = computed(() =>
const update = createResource({ const update = createResource({
url: 'jcloude.api.client.set_value', url: 'jcloude.api.client.set_value',
makeParams: (args: any) => ({ makeParams: (args: any) => ({
doctype: 'Support Access', pagetype: 'Support Access',
name: props.name, name: props.name,
fieldname: { fieldname: {
status: args.status, status: args.status,

View File

@ -58,7 +58,7 @@
<LinkControl <LinkControl
class="w-full" class="w-full"
label="Select Team" label="Select Team"
:options="{ doctype: 'Team', filters: { enabled: 1 } }" :options="{ pagetype: 'Team', filters: { enabled: 1 } }"
v-model="selectedTeam" v-model="selectedTeam"
description="This feature is only available to system users" description="This feature is only available to system users"
/> />

View File

@ -55,7 +55,7 @@ export default {
listOptions() { listOptions() {
return { return {
url: 'jcloude.api.client.get_list', url: 'jcloude.api.client.get_list',
doctype: 'SQL Playground Log', pagetype: 'SQL Playground Log',
filters: { filters: {
site: this.site, site: this.site,
}, },

View File

@ -121,7 +121,7 @@ export default {
dependencyVersions() { dependencyVersions() {
return { return {
type: 'list', type: 'list',
doctype: 'Bench Dependency Version', pagetype: 'Bench Dependency Version',
fields: ['version'], fields: ['version'],
filters: { filters: {
parenttype: 'Bench Dependency', parenttype: 'Bench Dependency',

View File

@ -262,7 +262,7 @@ export default {
apps() { apps() {
return { return {
type: 'list', type: 'list',
doctype: 'Release Group App', pagetype: 'Release Group App',
parent: 'Release Group', parent: 'Release Group',
auto: true, auto: true,
filters: { filters: {
@ -285,7 +285,7 @@ export default {
benches() { benches() {
return { return {
type: 'list', type: 'list',
doctype: 'Bench', pagetype: 'Bench',
fields: ['name'], fields: ['name'],
filters: { filters: {
group: this.group, group: this.group,

View File

@ -138,7 +138,7 @@ export default {
bench() { bench() {
return { return {
type: 'document', type: 'document',
doctype: 'Bench', pagetype: 'Bench',
name: this.bench, name: this.bench,
onSuccess(pg) { onSuccess(pg) {
if (pg.is_ssh_proxy_setup && pg.user_ssh_key) { if (pg.is_ssh_proxy_setup && pg.user_ssh_key) {

View File

@ -278,7 +278,7 @@ export default {
codeScreening() { codeScreening() {
return { return {
type: 'document', type: 'document',
doctype: 'App Release Approval Request', pagetype: 'App Release Approval Request',
name: this.row.approval_request_name, name: this.row.approval_request_name,
fields: [ fields: [
'name', 'name',

View File

@ -30,7 +30,7 @@
class="mt-4" class="mt-4"
type="autocomplete" type="autocomplete"
label="Choose Version" label="Choose Version"
:options="{ doctype: 'Jingrow Version', filters: { public: 1 } }" :options="{ pagetype: 'Jingrow Version', filters: { public: 1 } }"
v-model="selectedVersion" v-model="selectedVersion"
/> />
<div class="mt-4 space-y-2"> <div class="mt-4 space-y-2">
@ -129,7 +129,7 @@ export default {
return { return {
pg: { pg: {
...this.app, ...this.app,
doctype: 'Marketplace App', pagetype: 'Marketplace App',
version: this.selectedVersion, version: this.selectedVersion,
}, },
}; };

View File

@ -48,7 +48,7 @@ export default {
computed: { computed: {
$app() { $app() {
let appDoc = getDocResource({ let appDoc = getDocResource({
doctype: 'Marketplace App', pagetype: 'Marketplace App',
name: this.marketplaceApp, name: this.marketplaceApp,
}); });

View File

@ -274,7 +274,7 @@ async function saveComment() {
return; return;
} }
let comment = await call('jingrow.desk.form.utils.add_comment', { let comment = await call('jingrow.desk.form.utils.add_comment', {
reference_doctype: 'Partner Lead', reference_pagetype: 'Partner Lead',
reference_name: route.params.leadId, reference_name: route.params.leadId,
content: newComment.value, content: newComment.value,
comment_email: session.user, comment_email: session.user,

View File

@ -18,7 +18,7 @@ const route = useRoute();
const showUpdateFollowupDialog = defineModel(false); const showUpdateFollowupDialog = defineModel(false);
const leadfollowups = computed(() => { const leadfollowups = computed(() => {
return { return {
doctype: 'Lead Followup', pagetype: 'Lead Followup',
filters: { filters: {
parent: route.params.leadId, parent: route.params.leadId,
parenttype: 'Partner Lead', parenttype: 'Partner Lead',

View File

@ -76,7 +76,7 @@ const domainList = computed(() => {
}); });
const _leadTypeList = createListResource({ const _leadTypeList = createListResource({
doctype: 'Partner Lead Type', pagetype: 'Partner Lead Type',
fields: ['name'], fields: ['name'],
cache: 'leadTypeList', cache: 'leadTypeList',
auto: true, auto: true,

View File

@ -17,7 +17,7 @@ export default {
computed: { computed: {
options() { options() {
return { return {
doctype: 'Partner Approval Request', pagetype: 'Partner Approval Request',
fields: ['approved_by_partner', 'status'], fields: ['approved_by_partner', 'status'],
columns: [ columns: [
{ {

View File

@ -26,7 +26,7 @@ export default {
computed: { computed: {
partnerCertificatesList() { partnerCertificatesList() {
return { return {
doctype: 'Partner Certificate', pagetype: 'Partner Certificate',
fields: ['free', 'certificate_link'], fields: ['free', 'certificate_link'],
filters: { filters: {
team: this.$team.pg.name, team: this.$team.pg.name,

View File

@ -94,7 +94,7 @@ const emit = defineEmits(['success']);
const team = inject('team'); const team = inject('team');
const pressSettings = createDocumentResource({ const pressSettings = createDocumentResource({
doctype: 'Jcloude Settings', pagetype: 'Jcloude Settings',
name: 'Jcloude Settings', name: 'Jcloude Settings',
auto: true, auto: true,
initialData: {}, initialData: {},

View File

@ -23,7 +23,7 @@ export default {
computed: { computed: {
options() { options() {
return { return {
doctype: 'Invoice', pagetype: 'Invoice',
fields: ['type'], fields: ['type'],
columns: [ columns: [
{ label: 'Invoice', fieldname: 'name' }, { label: 'Invoice', fieldname: 'name' },

View File

@ -219,7 +219,7 @@ export default {
lead() { lead() {
return { return {
type: 'document', type: 'document',
doctype: 'Partner Lead', pagetype: 'Partner Lead',
name: this.$route.params.leadId, name: this.$route.params.leadId,
}; };
}, },

View File

@ -226,7 +226,7 @@ const partnerDetails = createResource({
}); });
const partnerConsent = createListResource({ const partnerConsent = createListResource({
doctype: 'Partner Consent', pagetype: 'Partner Consent',
onSuccess() { onSuccess() {
showPartnerCreditsDialog.value = true; showPartnerCreditsDialog.value = true;
toast.success('Partner consent recorded successfully'); toast.success('Partner consent recorded successfully');

View File

@ -22,7 +22,7 @@ export default {
computed: { computed: {
options() { options() {
return { return {
doctype: 'Partner Payment Payout', pagetype: 'Partner Payment Payout',
fields: ['type'], fields: ['type'],
columns: [ columns: [
{ label: 'Payout ID', fieldname: 'name' }, { label: 'Payout ID', fieldname: 'name' },

View File

@ -20,7 +20,7 @@ export default {
computed: { computed: {
autoScaleRecords() { autoScaleRecords() {
return { return {
doctype: 'Auto Scale Record', pagetype: 'Auto Scale Record',
filters: { filters: {
primary_server: this.name, primary_server: this.name,
status: ['in', 'Scheduled'], status: ['in', 'Scheduled'],

View File

@ -86,7 +86,7 @@ export default {
if (!this.id) return; if (!this.id) return;
return { return {
type: 'document', type: 'document',
doctype: 'Auto Scale Record', pagetype: 'Auto Scale Record',
name: this.id, name: this.id,
auto: true, auto: true,
transform: (record) => { transform: (record) => {

View File

@ -22,7 +22,7 @@ export default {
computed: { computed: {
autoScaleRecords() { autoScaleRecords() {
return { return {
doctype: 'Auto Scale Record', pagetype: 'Auto Scale Record',
filters: { filters: {
primary_server: this.name, primary_server: this.name,
status: ['not in', 'Scheduled'], status: ['not in', 'Scheduled'],

View File

@ -224,7 +224,7 @@ export default {
return { return {
url: 'jcloude.api.client.get_list', url: 'jcloude.api.client.get_list',
params: { params: {
doctype: 'Release Group', pagetype: 'Release Group',
fields: ['title', 'name'], fields: ['title', 'name'],
filters: { server: this.serverName, enabled: 1 }, filters: { server: this.serverName, enabled: 1 },
}, },

View File

@ -323,7 +323,7 @@ function onDisableAutoDiskExpansion() {
function onDropServer() { function onDropServer() {
const databaseServer = createDocumentResource({ const databaseServer = createDocumentResource({
doctype: 'Database Server', pagetype: 'Database Server',
name: server.pg.database_server, name: server.pg.database_server,
}); });

View File

@ -17,7 +17,7 @@
<ServerActionCell <ServerActionCell
:group="group.group" :group="group.group"
:serverName="row.server_name" :serverName="row.server_name"
:serverType="row.server_doctype" :serverType="row.server_pagetype"
:actionLabel="row.action" :actionLabel="row.action"
:method="row.pg_method" :method="row.pg_method"
:description="row.description" :description="row.description"
@ -45,7 +45,7 @@ export default {
]; ];
const groupedActions = totalActions.reduce((acc, action) => { const groupedActions = totalActions.reduce((acc, action) => {
const group = action.group || `${action.server_doctype} Actions`; const group = action.group || `${action.server_pagetype} Actions`;
if (!acc[group]) { if (!acc[group]) {
acc[group] = []; acc[group] = [];
} }
@ -77,7 +77,7 @@ export default {
$dbServer() { $dbServer() {
// Should mirror the whitelistedMethods in ServerOverview.vue // Should mirror the whitelistedMethods in ServerOverview.vue
return getDocResource({ return getDocResource({
doctype: 'Database Server', pagetype: 'Database Server',
name: this.$appServer.pg.database_server, name: this.$appServer.pg.database_server,
whitelistedMethods: { whitelistedMethods: {
changePlan: 'change_plan', changePlan: 'change_plan',
@ -98,7 +98,7 @@ export default {
}, },
$dbReplicaServer() { $dbReplicaServer() {
return getDocResource({ return getDocResource({
doctype: 'Database Server', pagetype: 'Database Server',
name: this.$appServer.pg.replication_server, name: this.$appServer.pg.replication_server,
whitelistedMethods: { whitelistedMethods: {
changePlan: 'change_plan', changePlan: 'change_plan',

View File

@ -695,14 +695,14 @@ export default {
}, },
$appSecondaryServer() { $appSecondaryServer() {
return getDocResource({ return getDocResource({
doctype: 'Server', pagetype: 'Server',
name: this.$appServer.pg.secondary_server, name: this.$appServer.pg.secondary_server,
}); });
}, },
$dbServer() { $dbServer() {
// Should mirror the whitelistedMethods in ServerActions.vue // Should mirror the whitelistedMethods in ServerActions.vue
return getDocResource({ return getDocResource({
doctype: 'Database Server', pagetype: 'Database Server',
name: this.$appServer.pg.database_server, name: this.$appServer.pg.database_server,
whitelistedMethods: { whitelistedMethods: {
changePlan: 'change_plan', changePlan: 'change_plan',
@ -723,7 +723,7 @@ export default {
}, },
$dbReplicaServer() { $dbReplicaServer() {
return getDocResource({ return getDocResource({
doctype: 'Database Server', pagetype: 'Database Server',
name: this.$appServer.pg.replication_server, name: this.$appServer.pg.replication_server,
whitelistedMethods: { whitelistedMethods: {
changePlan: 'change_plan', changePlan: 'change_plan',

View File

@ -172,7 +172,7 @@ export default {
snapshot() { snapshot() {
return { return {
type: 'document', type: 'document',
doctype: 'Server Snapshot', pagetype: 'Server Snapshot',
name: this.name, name: this.name,
auto: true, auto: true,
}; };

View File

@ -101,7 +101,7 @@ export default {
snapshot() { snapshot() {
return { return {
type: 'document', type: 'document',
doctype: 'Server Snapshot', pagetype: 'Server Snapshot',
name: this.name, name: this.name,
whitelistedMethods: { whitelistedMethods: {
lock: 'lock', lock: 'lock',
@ -122,7 +122,7 @@ export default {
}, },
snapshotRecoveryOptions() { snapshotRecoveryOptions() {
return { return {
doctype: 'Server Snapshot Recovery', pagetype: 'Server Snapshot Recovery',
filters: { filters: {
snapshot: this.name, snapshot: this.name,
}, },

View File

@ -32,7 +32,7 @@ export default {
snapshotRecovery() { snapshotRecovery() {
return { return {
type: 'document', type: 'document',
doctype: 'Server Snapshot Recovery', pagetype: 'Server Snapshot Recovery',
name: this.name, name: this.name,
auto: true, auto: true,
whitelistedMethods: { whitelistedMethods: {

View File

@ -243,7 +243,7 @@ const sshKeyListOptions = computed(() => ({
label: 'Delete', label: 'Delete',
onClick() { onClick() {
deleteSSHKey.submit({ deleteSSHKey.submit({
doctype: 'User SSH Key', pagetype: 'User SSH Key',
name: row.name, name: row.name,
}); });
}, },
@ -274,7 +274,7 @@ function renderAddNewKeyDialog(listResource) {
addSSHKey addSSHKey
.submit({ .submit({
pg: { pg: {
doctype: 'User SSH Key', pagetype: 'User SSH Key',
ssh_public_key: values.sshKey, ssh_public_key: values.sshKey,
user: $team.pg.user_info.name, user: $team.pg.user_info.name,
}, },
@ -294,7 +294,7 @@ function renderAddNewKeyDialog(listResource) {
const webhookListResource = createResource({ const webhookListResource = createResource({
url: 'jcloude.api.client.get_list', url: 'jcloude.api.client.get_list',
params: { params: {
doctype: 'Jcloude Webhook', pagetype: 'Jcloude Webhook',
fields: ['name', 'enabled', 'endpoint'], fields: ['name', 'enabled', 'endpoint'],
}, },
initialData: [], initialData: [],
@ -406,7 +406,7 @@ const webhookListOptions = computed(() => ({
onClick({ hide }) { onClick({ hide }) {
deleteWebhook deleteWebhook
.submit({ .submit({
doctype: 'Jcloude Webhook', pagetype: 'Jcloude Webhook',
name: row.name, name: row.name,
}) })
.then(hide); .then(hide);

View File

@ -111,7 +111,7 @@ export default {
return { return {
url: 'jcloude.api.client.get', url: 'jcloude.api.client.get',
params: { params: {
doctype: 'Jcloude Webhook', pagetype: 'Jcloude Webhook',
name: this.webhook.name, name: this.webhook.name,
}, },
auto: true, auto: true,

View File

@ -76,7 +76,7 @@ export default {
roles() { roles() {
return { return {
type: 'list', type: 'list',
doctype: 'Jcloude Role', pagetype: 'Jcloude Role',
fields: ['name', 'title'], fields: ['name', 'title'],
initialData: [], initialData: [],
auto: true, auto: true,

View File

@ -137,7 +137,7 @@ const user = getSessionUser();
const tab = ref<'members' | 'resources' | 'permissions'>('members'); const tab = ref<'members' | 'resources' | 'permissions'>('members');
const role = createDocumentResource({ const role = createDocumentResource({
doctype: 'Jcloude Role', pagetype: 'Jcloude Role',
name: props.id, name: props.id,
auto: true, auto: true,
whitelistedMethods: { whitelistedMethods: {

View File

@ -181,7 +181,7 @@ export default {
role() { role() {
return { return {
type: 'document', type: 'document',
doctype: 'Jcloude Role', pagetype: 'Jcloude Role',
name: this.roleId, name: this.roleId,
whitelistedMethods: { whitelistedMethods: {
addUser: 'add_user', addUser: 'add_user',

View File

@ -79,7 +79,7 @@
(title, users, resources) => { (title, users, resources) => {
insert.submit({ insert.submit({
pg: { pg: {
doctype: 'Jcloude Role', pagetype: 'Jcloude Role',
title, title,
users: users.map((u) => ({ users: users.map((u) => ({
user: u, user: u,
@ -104,7 +104,7 @@ import RoleCreateDialog from './RoleCreateDialog.vue';
const showCreateDialog = ref(false); const showCreateDialog = ref(false);
const roles = createListResource({ const roles = createListResource({
doctype: 'Jcloude Role', pagetype: 'Jcloude Role',
fields: [ fields: [
'name', 'name',
'title', 'title',

View File

@ -5,7 +5,7 @@ import { computed } from 'vue';
const team = getTeam(); const team = getTeam();
const sites = createListResource({ const sites = createListResource({
doctype: 'Site', pagetype: 'Site',
auto: true, auto: true,
pageLength: 99999, pageLength: 99999,
filters: { filters: {
@ -14,7 +14,7 @@ const sites = createListResource({
}); });
const servers = createListResource({ const servers = createListResource({
doctype: 'Server', pagetype: 'Server',
auto: true, auto: true,
pageLength: 99999, pageLength: 99999,
filters: { filters: {
@ -23,7 +23,7 @@ const servers = createListResource({
}); });
const releaseGroups = createListResource({ const releaseGroups = createListResource({
doctype: 'Release Group', pagetype: 'Release Group',
auto: true, auto: true,
pageLength: 99999, pageLength: 99999,
filters: { filters: {

View File

@ -7,7 +7,7 @@
@success="onProfilePhotoChange" @success="onProfilePhotoChange"
fileTypes="image/*" fileTypes="image/*"
:upload-args="{ :upload-args="{
doctype: 'User', pagetype: 'User',
docname: user.name, docname: user.name,
method: 'jcloude.api.account.update_profile_picture', method: 'jcloude.api.account.update_profile_picture',
}" }"
@ -209,7 +209,7 @@
v-if="showCommunicationInfoDialog" v-if="showCommunicationInfoDialog"
v-model="showCommunicationInfoDialog" v-model="showCommunicationInfoDialog"
@close="showCommunicationInfoDialog = false" @close="showCommunicationInfoDialog = false"
reference-doctype="Team" reference-pagetype="Team"
:reference-name="$team.pg.name" :reference-name="$team.pg.name"
/> />
</Card> </Card>

View File

@ -105,7 +105,7 @@ export default {
sites() { sites() {
return { return {
type: 'list', type: 'list',
doctype: 'Site', pagetype: 'Site',
fields: ['host_name', 'name'], fields: ['host_name', 'name'],
filters: { name: ['!=', this.site] }, filters: { name: ['!=', this.site] },
pageLength: 500, pageLength: 500,

View File

@ -186,7 +186,7 @@ export default {
serverOptions() { serverOptions() {
return { return {
type: 'list', type: 'list',
doctype: 'Server', pagetype: 'Server',
fields: ['name', 'title'], fields: ['name', 'title'],
auto: true, auto: true,
transform(data) { transform(data) {

View File

@ -119,7 +119,7 @@ export default {
ARecords() { ARecords() {
return { return {
type: 'list', type: 'list',
doctype: 'Site Domain', pagetype: 'Site Domain',
filters: { filters: {
site: this.site, site: this.site,
dns_type: 'A', dns_type: 'A',

View File

@ -93,7 +93,7 @@ export default {
siteResource() { siteResource() {
return { return {
type: 'document', type: 'document',
doctype: 'Site', pagetype: 'Site',
name: this.site, name: this.site,
auto: true, auto: true,
}; };

View File

@ -15,9 +15,9 @@ export default {
}, },
computed: { computed: {
logsOptions() { logsOptions() {
const doctype = 'Site'; const pagetype = 'Site';
return { return {
doctype: 'Agent Job', pagetype: 'Agent Job',
filters: { filters: {
site: this.name, site: this.name,
}, },
@ -44,7 +44,7 @@ export default {
label: 'Type', label: 'Type',
fieldname: 'job_type', fieldname: 'job_type',
options: { options: {
doctype: 'Agent Job Type', pagetype: 'Agent Job Type',
orderBy: 'name asc', orderBy: 'name asc',
pageLength: 100, pageLength: 100,
}, },
@ -67,7 +67,7 @@ export default {
label: 'Site', label: 'Site',
fieldname: 'site', fieldname: 'site',
width: 1.2, width: 1.2,
condition: () => doctype !== 'Site', condition: () => pagetype !== 'Site',
}, },
{ {
label: 'Duration', label: 'Duration',

View File

@ -179,7 +179,7 @@ export default {
databaseUser() { databaseUser() {
return { return {
type: 'document', type: 'document',
doctype: 'Site Database User', pagetype: 'Site Database User',
name: this.db_user_name, name: this.db_user_name,
auto: false, auto: false,
onSuccess: (data) => { onSuccess: (data) => {
@ -213,7 +213,7 @@ export default {
}); });
return { return {
pg: { pg: {
doctype: 'Site Database User', pagetype: 'Site Database User',
label: this.label, label: this.label,
team: this.$team.pg.name, team: this.$team.pg.name,
site: this.site, site: this.site,

View File

@ -81,8 +81,8 @@ export default class FileUploader {
form_data.append('file_url', options.file_url); form_data.append('file_url', options.file_url);
} }
if (options.doctype && options.docname) { if (options.pagetype && options.docname) {
form_data.append('doctype', options.doctype); form_data.append('pagetype', options.pagetype);
form_data.append('docname', options.docname); form_data.append('docname', options.docname);
} }

View File

@ -6,7 +6,7 @@ let team;
export function getTeam() { export function getTeam() {
if (!team) { if (!team) {
team = createDocumentResource({ team = createDocumentResource({
doctype: 'Team', pagetype: 'Team',
name: getCurrentTeam(), name: getCurrentTeam(),
whitelistedMethods: { whitelistedMethods: {
getTeamMembers: 'get_team_members', getTeamMembers: 'get_team_members',

View File

@ -30,7 +30,7 @@ import Autocomplete from '../components/Autocomplete.vue';
export default { export default {
name: 'TagsDialog', name: 'TagsDialog',
props: ['docname', 'doctype'], props: ['docname', 'pagetype'],
components: { ErrorMessage, PressAutocomplete: Autocomplete }, components: { ErrorMessage, PressAutocomplete: Autocomplete },
data() { data() {
return { return {
@ -43,8 +43,8 @@ export default {
availableTags() { availableTags() {
return { return {
type: 'list', type: 'list',
doctype: 'Jcloude Tag', pagetype: 'Jcloude Tag',
filters: { doctype_name: this.doctype }, filters: { pagetype_name: this.pagetype },
fields: ['tag'], fields: ['tag'],
pageLength: 1000, pageLength: 1000,
auto: true, auto: true,
@ -53,7 +53,7 @@ export default {
}, },
computed: { computed: {
$pg() { $pg() {
return getCachedDocumentResource(this.doctype, this.docname); return getCachedDocumentResource(this.pagetype, this.docname);
}, },
tagOptions() { tagOptions() {
const docTags = this.$pg.pg.tags.map((t) => t.tag_name); const docTags = this.$pg.pg.tags.map((t) => t.tag_name);

View File

@ -4,7 +4,7 @@ import SupportAccessDialog from '../components/SupportAccessDialog.vue';
import { getTeam } from '../data/team'; import { getTeam } from '../data/team';
export default { export default {
doctype: 'Support Access', pagetype: 'Support Access',
whitelistedMethods: {}, whitelistedMethods: {},
list: { list: {
route: '/access-requests', route: '/access-requests',

View File

@ -28,7 +28,7 @@ import { getLogsTab } from './tabs/site/logs';
import { getPatchesTab } from './common/patches'; import { getPatchesTab } from './common/patches';
export default { export default {
doctype: 'Bench', pagetype: 'Bench',
whitelistedMethods: {}, whitelistedMethods: {},
detail: getDetail(), detail: getDetail(),
list: getList(), list: getList(),
@ -225,7 +225,7 @@ function filterControls() {
label: 'Bench Group', label: 'Bench Group',
fieldname: 'group', fieldname: 'group',
options: { options: {
doctype: 'Release Group' pagetype: 'Release Group'
} }
}, },
{ {
@ -244,7 +244,7 @@ export function getSitesTab() {
route: 'sites', route: 'sites',
type: 'list', type: 'list',
list: { list: {
doctype: 'Site', pagetype: 'Site',
filters: r => ({ filters: r => ({
group: r.pg.group, group: r.pg.group,
bench: r.name, bench: r.name,

View File

@ -31,7 +31,7 @@ export function getAppsTab(forSite: boolean) {
function getAppsTabList(forSite: boolean) { function getAppsTabList(forSite: boolean) {
const options = forSite ? siteAppListOptions : benchAppListOptions; const options = forSite ? siteAppListOptions : benchAppListOptions;
const list: TabList = { const list: TabList = {
doctype: '', pagetype: '',
filters: () => ({}), filters: () => ({}),
...options, ...options,
columns: getAppsTabColumns(forSite), columns: getAppsTabColumns(forSite),
@ -144,7 +144,7 @@ function getAppsTabColumns(forSite: boolean) {
} }
const siteAppListOptions: Partial<TabList> = { const siteAppListOptions: Partial<TabList> = {
doctype: 'Site App', pagetype: 'Site App',
pageLength: 999, pageLength: 999,
filters: (res) => { filters: (res) => {
return { parenttype: 'Site', parent: res.pg?.name }; return { parenttype: 'Site', parent: res.pg?.name };
@ -228,7 +228,7 @@ const siteAppListOptions: Partial<TabList> = {
}; };
const benchAppListOptions: Partial<TabList> = { const benchAppListOptions: Partial<TabList> = {
doctype: 'Bench App', pagetype: 'Bench App',
filters: (res) => { filters: (res) => {
return { parenttype: 'Bench', parent: res.pg?.name }; return { parenttype: 'Bench', parent: res.pg?.name };
}, },

View File

@ -7,23 +7,23 @@ import { ColumnField, Tab } from './types';
type JobDocTypes = 'Site' | 'Bench' | 'Server' | 'Release Group'; type JobDocTypes = 'Site' | 'Bench' | 'Server' | 'Release Group';
export function getJobsTab(doctype: JobDocTypes) { export function getJobsTab(pagetype: JobDocTypes) {
const jobRoute = getJobRoute(doctype); const jobRoute = getJobRoute(pagetype);
return { return {
label: 'Jobs', label: 'Jobs',
icon: icon('truck'), icon: icon('truck'),
condition: (record) => (doctype === 'Server' && record.pg?.status !== 'Archived') || doctype !== 'Server', condition: (record) => (pagetype === 'Server' && record.pg?.status !== 'Archived') || pagetype !== 'Server',
childrenRoutes: [jobRoute], childrenRoutes: [jobRoute],
route: 'jobs', route: 'jobs',
type: 'list', type: 'list',
list: { list: {
doctype: 'Agent Job', pagetype: 'Agent Job',
filters: res => { filters: res => {
if (doctype === 'Site') return { site: res.name }; if (pagetype === 'Site') return { site: res.name };
else if (doctype === 'Bench') return { bench: res.name }; else if (pagetype === 'Bench') return { bench: res.name };
else if (doctype === 'Server') return { server: res.name }; else if (pagetype === 'Server') return { server: res.name };
else if (doctype === 'Release Group') return { group: res.name }; else if (pagetype === 'Release Group') return { group: res.name };
throw unreachable; throw unreachable;
}, },
route(row) { route(row) {
@ -49,7 +49,7 @@ export function getJobsTab(doctype: JobDocTypes) {
label: 'Type', label: 'Type',
fieldname: 'job_type', fieldname: 'job_type',
options: { options: {
doctype: 'Agent Job Type', pagetype: 'Agent Job Type',
orderBy: 'name asc', orderBy: 'name asc',
pageLength: 100 pageLength: 100
} }
@ -68,20 +68,20 @@ export function getJobsTab(doctype: JobDocTypes) {
} }
} }
], ],
columns: getJobTabColumns(doctype) columns: getJobTabColumns(pagetype)
} }
} satisfies Tab as Tab; } satisfies Tab as Tab;
} }
function getJobRoute(doctype: JobDocTypes) { function getJobRoute(pagetype: JobDocTypes) {
if (doctype === 'Site') return 'Site Job'; if (pagetype === 'Site') return 'Site Job';
else if (doctype === 'Bench') return 'Bench Job'; else if (pagetype === 'Bench') return 'Bench Job';
else if (doctype === 'Server') return 'Server Job'; else if (pagetype === 'Server') return 'Server Job';
else if (doctype === 'Release Group') return 'Release Group Job'; else if (pagetype === 'Release Group') return 'Release Group Job';
throw unreachable; throw unreachable;
} }
function getJobTabColumns(doctype: JobDocTypes) { function getJobTabColumns(pagetype: JobDocTypes) {
const columns: ColumnField[] = [ const columns: ColumnField[] = [
{ {
label: 'Job Type', label: 'Job Type',
@ -121,6 +121,6 @@ function getJobTabColumns(doctype: JobDocTypes) {
} }
]; ];
if (doctype !== 'Site') return columns; if (pagetype !== 'Site') return columns;
return columns.filter(c => c.fieldname !== 'site'); return columns.filter(c => c.fieldname !== 'site');
} }

View File

@ -22,9 +22,9 @@ export function getPatchesTab(forBench: boolean) {
route: 'patches', route: 'patches',
type: 'list', type: 'list',
list: { list: {
experimental: true, // If removing this, uncheck App Patch doctype beta flag. experimental: true, // If removing this, uncheck App Patch pagetype beta flag.
documentation: 'https://docs.framework.jingrow.com/cloud/benches/app-patches', documentation: 'https://docs.framework.jingrow.com/cloud/benches/app-patches',
doctype: 'App Patch', pagetype: 'App Patch',
filters: (res) => ({ [forBench ? 'bench' : 'group']: res.name }), filters: (res) => ({ [forBench ? 'bench' : 'group']: res.name }),
searchField: 'filename', searchField: 'filename',
filterControls: (r) => filterControls: (r) =>
@ -54,7 +54,7 @@ export function getPatchesTab(forBench: boolean) {
prefix: icon('plus'), prefix: icon('plus'),
}, },
onClick() { onClick() {
const group = pg.doctype === 'Bench' ? pg.pg.group : pg.name; const group = pg.pagetype === 'Bench' ? pg.pg.group : pg.name;
renderDialog(h(PatchAppDialog, { group: group, app: '' })); renderDialog(h(PatchAppDialog, { group: group, app: '' }));
}, },

View File

@ -3,24 +3,24 @@ import { confirmDialog, icon, renderDialog } from '../../utils/components';
import { toast } from 'vue-sonner'; import { toast } from 'vue-sonner';
import { getToastErrorMessage } from '../../utils/toast'; import { getToastErrorMessage } from '../../utils/toast';
export function tagTab(doctype) { export function tagTab(pagetype) {
return { return {
label: 'Tags', label: 'Tags',
icon: icon('tag'), icon: icon('tag'),
condition: (record) => { condition: (record) => {
return ( return (
doctype != 'Server' || pagetype != 'Server' ||
(doctype == 'Server' && record.pg?.status !== 'Archived') (pagetype == 'Server' && record.pg?.status !== 'Archived')
); );
}, },
route: 'tags', route: 'tags',
type: 'list', type: 'list',
list: { list: {
doctype: 'Resource Tag', pagetype: 'Resource Tag',
filters: (documentResource) => { filters: (documentResource) => {
return { return {
parent: documentResource.name, parent: documentResource.name,
parenttype: documentResource.doctype, parenttype: documentResource.pagetype,
}; };
}, },
orderBy: 'creation desc', orderBy: 'creation desc',
@ -42,7 +42,7 @@ export function tagTab(doctype) {
); );
renderDialog( renderDialog(
h(AddTagDialog, { h(AddTagDialog, {
doctype: documentResource.doctype, pagetype: documentResource.pagetype,
docname: documentResource.name, docname: documentResource.name,
onAdded() { onAdded() {
tags.reload(); tags.reload();

View File

@ -37,7 +37,7 @@ type Icon = ReturnType<typeof icon>;
type AsyncComponent = ReturnType<typeof defineAsyncComponent>; type AsyncComponent = ReturnType<typeof defineAsyncComponent>;
export interface DashboardObject { export interface DashboardObject {
doctype: string; pagetype: string;
whitelistedMethods: Record<string, string>; whitelistedMethods: Record<string, string>;
list: List; list: List;
detail: Detail; detail: Detail;
@ -93,9 +93,9 @@ export interface FilterField {
class?: string; class?: string;
options?: options?:
| { | {
doctype: string; pagetype: string;
filters?: { filters?: {
doctype_name?: string; pagetype_name?: string;
}; };
} }
| string[]; | string[];
@ -130,7 +130,7 @@ export interface Tab {
} }
export interface TabList { export interface TabList {
doctype?: string; pagetype?: string;
orderBy?: string; orderBy?: string;
filters?: (r: DocumentResource) => Record<string, unknown>; filters?: (r: DocumentResource) => Record<string, unknown>;
route?: (row: Row) => Route; route?: (row: Row) => Route;

View File

@ -5,7 +5,7 @@ export default function generateRoutes() {
for (let objectType in objects) { for (let objectType in objects) {
let object = objects[objectType]; let object = objects[objectType];
if (object.list) { if (object.list) {
let routeName = `${object.doctype} List`; let routeName = `${object.pagetype} List`;
object.list.routeName = routeName; object.list.routeName = routeName;
routes.push({ routes.push({
name: routeName, name: routeName,
@ -18,7 +18,7 @@ export default function generateRoutes() {
} }
if (object.detail) { if (object.detail) {
let children = object.detail.tabs.map((tab) => { let children = object.detail.tabs.map((tab) => {
const routeName = `${object.doctype} Detail ${tab.label}`; const routeName = `${object.pagetype} Detail ${tab.label}`;
tab.routeName = routeName; tab.routeName = routeName;
const nestedChildren = []; const nestedChildren = [];
@ -54,7 +54,7 @@ export default function generateRoutes() {
} }
} }
object.detail.routeName = `${object.doctype} Detail`; object.detail.routeName = `${object.pagetype} Detail`;
routes.push({ routes.push({
name: object.detail.routeName, name: object.detail.routeName,
path: object.detail.route, path: object.detail.route,

View File

@ -18,7 +18,7 @@ import { getPatchesTab } from './common/patches';
import { tagTab } from './common/tags'; import { tagTab } from './common/tags';
export default { export default {
doctype: 'Release Group', pagetype: 'Release Group',
whitelistedMethods: { whitelistedMethods: {
addApp: 'add_app', addApp: 'add_app',
removeApp: 'remove_app', removeApp: 'remove_app',
@ -52,7 +52,7 @@ export default {
label: 'Version', label: 'Version',
fieldname: 'version', fieldname: 'version',
options: { options: {
doctype: 'Jingrow Version', pagetype: 'Jingrow Version',
}, },
}, },
{ {
@ -60,9 +60,9 @@ export default {
label: 'Tag', label: 'Tag',
fieldname: 'tags.tag', fieldname: 'tags.tag',
options: { options: {
doctype: 'Jcloude Tag', pagetype: 'Jcloude Tag',
filters: { filters: {
doctype_name: 'Release Group', pagetype_name: 'Release Group',
}, },
}, },
}, },
@ -175,7 +175,7 @@ export default {
route: 'apps', route: 'apps',
type: 'list', type: 'list',
list: { list: {
doctype: 'Release Group App', pagetype: 'Release Group App',
filters: (releaseGroup) => { filters: (releaseGroup) => {
return { return {
parenttype: 'Release Group', parenttype: 'Release Group',
@ -412,7 +412,7 @@ export default {
childrenRoutes: ['Deploy Candidate'], childrenRoutes: ['Deploy Candidate'],
type: 'list', type: 'list',
list: { list: {
doctype: 'Deploy Candidate Build', pagetype: 'Deploy Candidate Build',
route: (row) => ({ route: (row) => ({
name: 'Deploy Candidate', name: 'Deploy Candidate',
params: { id: row.name }, params: { id: row.name },
@ -565,7 +565,7 @@ export default {
route: 'bench-config', route: 'bench-config',
type: 'list', type: 'list',
list: { list: {
doctype: 'Common Site Config', pagetype: 'Common Site Config',
filters: (releaseGroup) => { filters: (releaseGroup) => {
return { return {
parenttype: 'Release Group', parenttype: 'Release Group',
@ -713,7 +713,7 @@ export default {
route: 'regions', route: 'regions',
type: 'list', type: 'list',
list: { list: {
doctype: 'Cluster', pagetype: 'Cluster',
filters: (releaseGroup) => { filters: (releaseGroup) => {
return { group: releaseGroup.name }; return { group: releaseGroup.name };
}, },
@ -770,7 +770,7 @@ export default {
route: 'bench-dependencies', route: 'bench-dependencies',
type: 'list', type: 'list',
list: { list: {
doctype: 'Release Group Dependency', pagetype: 'Release Group Dependency',
filters: (releaseGroup) => { filters: (releaseGroup) => {
return { return {
parenttype: 'Release Group', parenttype: 'Release Group',
@ -839,7 +839,7 @@ export default {
route: 'bench-environment-variable', route: 'bench-environment-variable',
type: 'list', type: 'list',
list: { list: {
doctype: 'Release Group Variable', pagetype: 'Release Group Variable',
filters: (releaseGroup) => { filters: (releaseGroup) => {
return { return {
parenttype: 'Release Group', parenttype: 'Release Group',

View File

@ -13,7 +13,7 @@ import { isMobile } from '../utils/device';
import router from '../router'; import router from '../router';
export default { export default {
doctype: 'Marketplace App', pagetype: 'Marketplace App',
whitelistedMethods: { whitelistedMethods: {
removeVersion: 'remove_version', removeVersion: 'remove_version',
addVersion: 'add_version', addVersion: 'add_version',
@ -126,7 +126,7 @@ export default {
route: 'versions', route: 'versions',
type: 'list', type: 'list',
list: { list: {
doctype: 'Marketplace App Version', pagetype: 'Marketplace App Version',
filters: (app) => { filters: (app) => {
return { parent: app.pg.name, parenttype: 'Marketplace App' }; return { parent: app.pg.name, parenttype: 'Marketplace App' };
}, },
@ -308,7 +308,7 @@ export default {
route: 'pricing', route: 'pricing',
type: 'list', type: 'list',
list: { list: {
doctype: 'Marketplace App Plan', pagetype: 'Marketplace App Plan',
filters: (app) => { filters: (app) => {
return { app: app.pg.name }; return { app: app.pg.name };
}, },
@ -385,7 +385,7 @@ export default {
route: 'subscription', route: 'subscription',
type: 'list', type: 'list',
list: { list: {
doctype: 'Subscription', pagetype: 'Subscription',
filters: (app) => { filters: (app) => {
return { return {
document_type: 'Marketplace App', document_type: 'Marketplace App',
@ -537,7 +537,7 @@ function showReleases(row, app) {
options: { options: {
label: 'Version', label: 'Version',
type: 'list', type: 'list',
doctype: 'App Release', pagetype: 'App Release',
filters: { filters: {
app: app.pg.name, app: app.pg.name,
source: row.source, source: row.source,

View File

@ -9,7 +9,7 @@ import { toast } from 'vue-sonner';
const getNotification = (name) => { const getNotification = (name) => {
return getDocResource({ return getDocResource({
doctype: 'Jcloude Notification', pagetype: 'Jcloude Notification',
name: name, name: name,
whitelistedMethods: { whitelistedMethods: {
markNotificationAsRead: 'mark_as_read', markNotificationAsRead: 'mark_as_read',
@ -18,14 +18,14 @@ const getNotification = (name) => {
}; };
export default { export default {
doctype: 'Jcloude Notification', pagetype: 'Jcloude Notification',
whitelistedMethods: {}, whitelistedMethods: {},
list: { list: {
resource() { resource() {
let $team = getTeam(); let $team = getTeam();
return { return {
type: 'list', type: 'list',
doctype: 'Jcloude Notification', pagetype: 'Jcloude Notification',
url: 'jcloude.api.notifications.get_notifications', url: 'jcloude.api.notifications.get_notifications',
auto: true, auto: true,
filters: { filters: {

View File

@ -14,7 +14,7 @@ import { getJobsTab } from './common/jobs';
import { tagTab } from './common/tags'; import { tagTab } from './common/tags';
export default { export default {
doctype: 'Server', pagetype: 'Server',
whitelistedMethods: { whitelistedMethods: {
increaseDiskSize: 'increase_disk_size_for_server', increaseDiskSize: 'increase_disk_size_for_server',
configureAutoAddStorage: 'configure_auto_add_storage', configureAutoAddStorage: 'configure_auto_add_storage',
@ -200,7 +200,7 @@ export default {
window.open( window.open(
`${window.location.protocol}//${ `${window.location.protocol}//${
window.location.host window.location.host
}/app/${server.doctype.replace(' ', '-').toLowerCase()}/${ }/app/${server.pagetype.replace(' ', '-').toLowerCase()}/${
server.pg.name server.pg.name
}`, }`,
'_blank', '_blank',
@ -300,7 +300,7 @@ export default {
route: 'sites', route: 'sites',
type: 'list', type: 'list',
list: { list: {
doctype: 'Site', pagetype: 'Site',
filters: (server) => { filters: (server) => {
return { server: server.pg.name }; return { server: server.pg.name };
}, },
@ -332,7 +332,7 @@ export default {
label: 'Version', label: 'Version',
fieldname: 'group.version', fieldname: 'group.version',
options: { options: {
doctype: 'Jingrow Version', pagetype: 'Jingrow Version',
}, },
}, },
{ {
@ -340,7 +340,7 @@ export default {
label: 'Bench Group', label: 'Bench Group',
fieldname: 'group', fieldname: 'group',
options: { options: {
doctype: 'Release Group', pagetype: 'Release Group',
}, },
}, },
{ {
@ -348,9 +348,9 @@ export default {
label: 'Tag', label: 'Tag',
fieldname: 'tags.tag', fieldname: 'tags.tag',
options: { options: {
doctype: 'Jcloude Tag', pagetype: 'Jcloude Tag',
filters: { filters: {
doctype_name: 'Site', pagetype_name: 'Site',
}, },
}, },
}, },
@ -409,7 +409,7 @@ export default {
route: 'groups', route: 'groups',
type: 'list', type: 'list',
list: { list: {
doctype: 'Release Group', pagetype: 'Release Group',
filters: (server) => { filters: (server) => {
return { server: server.pg.name }; return { server: server.pg.name };
}, },
@ -452,7 +452,7 @@ export default {
label: 'Version', label: 'Version',
fieldname: 'version', fieldname: 'version',
options: { options: {
doctype: 'Jingrow Version', pagetype: 'Jingrow Version',
}, },
}, },
{ {
@ -460,9 +460,9 @@ export default {
label: 'Tag', label: 'Tag',
fieldname: 'tags.tag', fieldname: 'tags.tag',
options: { options: {
doctype: 'Jcloude Tag', pagetype: 'Jcloude Tag',
filters: { filters: {
doctype_name: 'Release Group', pagetype_name: 'Release Group',
}, },
}, },
}, },
@ -500,7 +500,7 @@ export default {
route: 'snapshots', route: 'snapshots',
type: 'list', type: 'list',
list: { list: {
doctype: 'Server Snapshot', pagetype: 'Server Snapshot',
filters: (server) => { filters: (server) => {
let filters = { let filters = {
app_server: server.pg?.name, app_server: server.pg?.name,
@ -823,7 +823,7 @@ export default {
type: 'list', type: 'list',
searchField: 'play', searchField: 'play',
list: { list: {
doctype: 'Ansible Play', pagetype: 'Ansible Play',
filterControls({ documentResource: server }) { filterControls({ documentResource: server }) {
return [ return [
{ {
@ -950,7 +950,7 @@ export default {
return server.pg?.status !== 'Archived'; return server.pg?.status !== 'Archived';
}, },
list: { list: {
doctype: 'Server Activity', pagetype: 'Server Activity',
filters: (server) => { filters: (server) => {
return { return {
document_name: [ document_name: [

View File

@ -26,7 +26,7 @@ import { isMobile } from '../utils/device';
import { getQueryParam, setQueryParam } from '../utils/index'; import { getQueryParam, setQueryParam } from '../utils/index';
export default { export default {
doctype: 'Site', pagetype: 'Site',
whitelistedMethods: { whitelistedMethods: {
activate: 'activate', activate: 'activate',
addDomain: 'add_domain', addDomain: 'add_domain',
@ -105,7 +105,7 @@ export default {
label: 'Version', label: 'Version',
fieldname: 'group.version', fieldname: 'group.version',
options: { options: {
doctype: 'Jingrow Version', pagetype: 'Jingrow Version',
}, },
}, },
{ {
@ -113,7 +113,7 @@ export default {
label: 'Bench Group', label: 'Bench Group',
fieldname: 'group', fieldname: 'group',
options: { options: {
doctype: 'Release Group', pagetype: 'Release Group',
}, },
}, },
{ {
@ -127,9 +127,9 @@ export default {
label: 'Tag', label: 'Tag',
fieldname: 'tags.tag', fieldname: 'tags.tag',
options: { options: {
doctype: 'Jcloude Tag', pagetype: 'Jcloude Tag',
filters: { filters: {
doctype_name: 'Site', pagetype_name: 'Site',
}, },
}, },
}, },
@ -223,7 +223,7 @@ export default {
'creation', 'creation',
]; ];
createListResource({ createListResource({
doctype: 'Site', pagetype: 'Site',
url: 'jcloude.api.site.fetch_sites_data_for_export', url: 'jcloude.api.site.fetch_sites_data_for_export',
auto: true, auto: true,
onSuccess(data) { onSuccess(data) {
@ -401,7 +401,7 @@ export default {
return site.pg?.status !== 'Archived'; return site.pg?.status !== 'Archived';
}, },
list: { list: {
doctype: 'Site Domain', pagetype: 'Site Domain',
fields: ['redirect_to_primary'], fields: ['redirect_to_primary'],
filters: (site) => { filters: (site) => {
return { site: site.pg?.name }; return { site: site.pg?.name };
@ -637,7 +637,7 @@ export default {
route: 'backups', route: 'backups',
type: 'list', type: 'list',
list: { list: {
doctype: 'Site Backup', pagetype: 'Site Backup',
filters: (site) => { filters: (site) => {
let filters = { let filters = {
site: site.pg?.name, site: site.pg?.name,
@ -1081,7 +1081,7 @@ export default {
return site.pg?.status !== 'Archived'; return site.pg?.status !== 'Archived';
}, },
list: { list: {
doctype: 'Site Config', pagetype: 'Site Config',
filters: (site) => { filters: (site) => {
return { parent: site.pg?.name, parenttype: 'Site' }; return { parent: site.pg?.name, parenttype: 'Site' };
}, },
@ -1226,7 +1226,7 @@ export default {
}, },
childrenRoutes: ['Site Update'], childrenRoutes: ['Site Update'],
list: { list: {
doctype: 'Site Update', pagetype: 'Site Update',
filters: (site) => { filters: (site) => {
return { site: site.pg?.name }; return { site: site.pg?.name };
}, },
@ -1343,7 +1343,7 @@ export default {
condition: () => row.status === 'Scheduled', condition: () => row.status === 'Scheduled',
onClick() { onClick() {
let siteUpdate = getDocResource({ let siteUpdate = getDocResource({
doctype: 'Site Update', pagetype: 'Site Update',
name: row.name, name: row.name,
whitelistedMethods: { whitelistedMethods: {
updateNow: 'start', updateNow: 'start',
@ -1368,7 +1368,7 @@ export default {
label: 'View App Changes', label: 'View App Changes',
onClick() { onClick() {
createListResource({ createListResource({
doctype: 'Deploy Candidate Difference App', pagetype: 'Deploy Candidate Difference App',
fields: [ fields: [
'difference.github_diff_url as diff_url', 'difference.github_diff_url as diff_url',
'difference.source_hash as source_hash', 'difference.source_hash as source_hash',
@ -1506,7 +1506,7 @@ export default {
type: 'list', type: 'list',
condition: (site) => site.pg?.status !== 'Archived', condition: (site) => site.pg?.status !== 'Archived',
list: { list: {
doctype: 'Site Activity', pagetype: 'Site Activity',
filters: (site) => { filters: (site) => {
return { site: site.pg?.name }; return { site: site.pg?.name };
}, },

View File

@ -16,7 +16,7 @@ export function getLogsTab(forSite: boolean) {
resource({ documentResource: res }) { resource({ documentResource: res }) {
return { return {
makeParams: () => { makeParams: () => {
if (res.doctype === 'Site') { if (res.pagetype === 'Site') {
return { name: res.pg.name }; return { name: res.pg.name };
} else { } else {
return { name: res.pg.group, bench: res.name }; return { name: res.pg.group, bench: res.name };

View File

@ -14,7 +14,7 @@ export default {
computed: { computed: {
options() { options() {
return { return {
doctype: 'Balance Transaction', pagetype: 'Balance Transaction',
fields: ['type', 'source', 'invoice'], fields: ['type', 'source', 'invoice'],
columns: [ columns: [
{ {

View File

@ -62,7 +62,7 @@ export default {
computed: { computed: {
options() { options() {
return { return {
doctype: 'Invoice', pagetype: 'Invoice',
fields: [ fields: [
'type', 'type',
'invoice_pdf', 'invoice_pdf',

View File

@ -39,7 +39,7 @@ export default {
computed: { computed: {
options() { options() {
return { return {
doctype: 'Payout Order', pagetype: 'Payout Order',
fields: [ fields: [
'period_end', 'period_end',
'mode_of_payment', 'mode_of_payment',

View File

@ -46,7 +46,7 @@ export default {
computed: { computed: {
options() { options() {
return { return {
doctype: 'Mpesa Payment Record', pagetype: 'Mpesa Payment Record',
fields: [ fields: [
'name', 'name',
'posting_date', 'posting_date',

View File

@ -18,7 +18,7 @@ export default {
computed: { computed: {
options() { options() {
return { return {
doctype: 'Stripe Payment Method', pagetype: 'Stripe Payment Method',
fields: [ fields: [
'name', 'name',
'is_default', 'is_default',

View File

@ -127,7 +127,7 @@ export default {
siteGroupDeploy() { siteGroupDeploy() {
return { return {
type: 'document', type: 'document',
doctype: 'Site Group Deploy', pagetype: 'Site Group Deploy',
name: this.siteGroupDeployName, name: this.siteGroupDeployName,
onSuccess: (pg) => { onSuccess: (pg) => {
if (pg.status === 'Site Created') { if (pg.status === 'Site Created') {

View File

@ -23,7 +23,7 @@
type="warning" type="warning"
class="mb-5" class="mb-5"
/> />
<Button :route="{ name: `${object.doctype} Detail Deploys` }"> <Button :route="{ name: `${object.pagetype} Detail Deploys` }">
<template #prefix> <template #prefix>
<lucide-arrow-left class="inline-block h-4 w-4" /> <lucide-arrow-left class="inline-block h-4 w-4" />
</template> </template>
@ -137,7 +137,7 @@ export default {
deploy() { deploy() {
return { return {
type: 'document', type: 'document',
doctype: 'Deploy Candidate Build', pagetype: 'Deploy Candidate Build',
name: this.id, name: this.id,
transform: this.transformDeploy, transform: this.transformDeploy,
}; };
@ -151,7 +151,7 @@ export default {
'Deploy Candidate Build', 'Deploy Candidate Build',
this.id, this.id,
], ],
doctype: 'Jcloude Notification', pagetype: 'Jcloude Notification',
auto: true, auto: true,
fields: ['title', 'name'], fields: ['title', 'name'],
filters: { filters: {
@ -171,7 +171,7 @@ export default {
'Deploy Candidate Build', 'Deploy Candidate Build',
this.id, this.id,
], ],
doctype: 'Jcloude Notification', pagetype: 'Jcloude Notification',
auto: true, auto: true,
fields: ['title', 'name'], fields: ['title', 'name'],
filters: { filters: {

View File

@ -14,7 +14,7 @@
<Badge v-if="$resources.document?.pg && badge" v-bind="badge" /> <Badge v-if="$resources.document?.pg && badge" v-bind="badge" />
</div> </div>
<AccessRequestButton <AccessRequestButton
:doctype="object.doctype" :pagetype="object.pagetype"
:docname="name" :docname="name"
:pg="$resources.document?.pg" :pg="$resources.document?.pg"
:error="$resources.document.get.error" :error="$resources.document.get.error"
@ -48,7 +48,7 @@
</TabsWithRouter> </TabsWithRouter>
<DetailPageError <DetailPageError
class="mt-60" class="mt-60"
:doctype="object.doctype" :pagetype="object.pagetype"
:docname="name" :docname="name"
:error="$resources.document.get.error" :error="$resources.document.get.error"
/> />
@ -89,7 +89,7 @@ export default {
document() { document() {
return { return {
type: 'document', type: 'document',
doctype: this.object.doctype, pagetype: this.object.pagetype,
name: this.name, name: this.name,
whitelistedMethods: this.object.whitelistedMethods || {}, whitelistedMethods: this.object.whitelistedMethods || {},
onError(error) { onError(error) {
@ -104,21 +104,21 @@ export default {
}, },
}, },
mounted() { mounted() {
if (!subscribed[`${this.object.doctype}:${this.name}`]) { if (!subscribed[`${this.object.pagetype}:${this.name}`]) {
this.$socket.emit('pg_subscribe', this.object.doctype, this.name); this.$socket.emit('pg_subscribe', this.object.pagetype, this.name);
subscribed[`${this.object.doctype}:${this.name}`] = true; subscribed[`${this.object.pagetype}:${this.name}`] = true;
} }
this.$socket.on('pg_update', (data) => { this.$socket.on('pg_update', (data) => {
if (data.doctype === this.object.doctype && data.name === this.name) { if (data.pagetype === this.object.pagetype && data.name === this.name) {
this.$resources.document.reload(); this.$resources.document.reload();
} }
}); });
}, },
beforeUnmount() { beforeUnmount() {
let doctype = this.object.doctype; let pagetype = this.object.pagetype;
if (subscribed[`${doctype}:${this.name}`]) { if (subscribed[`${pagetype}:${this.name}`]) {
this.$socket.emit('pg_unsubscribe', doctype, this.name); this.$socket.emit('pg_unsubscribe', pagetype, this.name);
subscribed[`${doctype}:${this.name}`] = false; subscribed[`${pagetype}:${this.name}`] = false;
} }
}, },
computed: { computed: {
@ -169,7 +169,7 @@ export default {
{ {
label: this.title, label: this.title,
route: { route: {
name: `${this.object.doctype} Detail`, name: `${this.object.pagetype} Detail`,
params: { name: this.name }, params: { name: this.name },
}, },
}, },

View File

@ -338,12 +338,12 @@ export default {
} }
}, },
onSuccess: (pg) => { onSuccess: (pg) => {
if (pg.doctype === 'Site') { if (pg.pagetype === 'Site') {
this.$router.push({ this.$router.push({
name: 'Site Jobs', name: 'Site Jobs',
params: { name: pg.name }, params: { name: pg.name },
}); });
} else if (pg.doctype === 'Site Group Deploy') { } else if (pg.pagetype === 'Site Group Deploy') {
this.$router.push({ this.$router.push({
name: 'CreateSiteForMarketplaceApp', name: 'CreateSiteForMarketplaceApp',
params: { app: this.app }, params: { app: this.app },

View File

@ -10,9 +10,9 @@
<Button <Button
:route="{ :route="{
name: name:
object.doctype === 'Site' object.pagetype === 'Site'
? 'Site Jobs' ? 'Site Jobs'
: `${object.doctype} Detail Jobs`, : `${object.pagetype} Detail Jobs`,
}" }"
> >
<template #prefix> <template #prefix>
@ -105,7 +105,7 @@ export default {
job() { job() {
return { return {
type: 'document', type: 'document',
doctype: 'Agent Job', pagetype: 'Agent Job',
name: this.id, name: this.id,
transform(job) { transform(job) {
for (let step of job.steps) { for (let step of job.steps) {
@ -133,7 +133,7 @@ export default {
return { return {
type: 'list', type: 'list',
cache: ['Jcloude Notification', 'Error', 'Agent Job', this.id], cache: ['Jcloude Notification', 'Error', 'Agent Job', this.id],
doctype: 'Jcloude Notification', pagetype: 'Jcloude Notification',
auto: true, auto: true,
fields: ['title', 'name'], fields: ['title', 'name'],
filters: { filters: {

View File

@ -99,7 +99,7 @@ export default {
methods: { methods: {
getRoute(row) { getRoute(row) {
return { return {
name: `${this.object.doctype} Detail`, name: `${this.object.pagetype} Detail`,
params: { params: {
name: row.name, name: row.name,
}, },
@ -113,7 +113,7 @@ export default {
listOptions() { listOptions() {
return { return {
...this.object.list, ...this.object.list,
doctype: this.object.doctype, pagetype: this.object.pagetype,
route: this.object.detail ? this.getRoute : null, route: this.object.detail ? this.getRoute : null,
}; };
}, },

View File

@ -4,9 +4,9 @@
<Button <Button
:route="{ :route="{
name: name:
object.doctype === 'Site' object.pagetype === 'Site'
? 'Site Logs' ? 'Site Logs'
: `${object.doctype} Detail Logs`, : `${object.pagetype} Detail Logs`,
}" }"
> >
<template #icon> <template #icon>
@ -19,7 +19,7 @@
:route="{ :route="{
name: 'Log Browser', name: 'Log Browser',
params: { params: {
mode: object.doctype === 'Site' ? 'site' : 'bench', mode: object.pagetype === 'Site' ? 'site' : 'bench',
docName: name, docName: name,
logId: logName, logId: logName,
}, },

View File

@ -410,7 +410,7 @@ export default {
return { return {
pg: { pg: {
doctype: 'Site', pagetype: 'Site',
team: this.$team.pg.name, team: this.$team.pg.name,
subdomain: this.subdomain, subdomain: this.subdomain,
apps: [ apps: [

View File

@ -17,7 +17,7 @@ export default {
computed: { computed: {
partnerCertificatesList() { partnerCertificatesList() {
return { return {
doctype: 'Partner Certificate', pagetype: 'Partner Certificate',
fields: ['free', 'certificate_link'], fields: ['free', 'certificate_link'],
columns: [ columns: [
{ {

View File

@ -14,7 +14,7 @@ export default {
originList() { originList() {
return { return {
type: 'list', type: 'list',
doctype: 'Partner Lead Origin', pagetype: 'Partner Lead Origin',
fields: ['name'], fields: ['name'],
auto: true, auto: true,
}; };
@ -23,7 +23,7 @@ export default {
computed: { computed: {
partnerAdminLeadsList() { partnerAdminLeadsList() {
return { return {
doctype: 'Partner Lead', pagetype: 'Partner Lead',
fields: [], fields: [],
columns: [ columns: [
{ {

View File

@ -38,7 +38,7 @@ export default {
lead() { lead() {
return { return {
type: 'document', type: 'document',
doctype: 'Partner Lead', pagetype: 'Partner Lead',
name: this.$route.params.leadId, name: this.$route.params.leadId,
}; };
}, },

View File

@ -206,7 +206,7 @@ export default {
resources: { resources: {
submitPaymentPayout() { submitPaymentPayout() {
return { return {
url: 'jcloude.jcloude.doctype.partner_payment_payout.partner_payment_payout.submit_payment_payout', url: 'jcloude.jcloude.pagetype.partner_payment_payout.partner_payment_payout.submit_payment_payout',
params: { params: {
partner: this.partnerInput.value, partner: this.partnerInput.value,
payment_gateway: this.paymentGateway.value, payment_gateway: this.paymentGateway.value,

View File

@ -1,6 +1,6 @@
<template> <template>
<div class="p-5" v-if="play"> <div class="p-5" v-if="play">
<Button :route="{ name: `${object.doctype} Detail Plays` }"> <Button :route="{ name: `${object.pagetype} Detail Plays` }">
<template #prefix> <template #prefix>
<lucide-arrow-left class="inline-block h-4 w-4" /> <lucide-arrow-left class="inline-block h-4 w-4" />
</template> </template>
@ -88,7 +88,7 @@ export default {
play() { play() {
return { return {
type: 'document', type: 'document',
doctype: 'Ansible Play', pagetype: 'Ansible Play',
name: this.id, name: this.id,
transform(play) { transform(play) {
for (let task of play.tasks) { for (let task of play.tasks) {

View File

@ -62,7 +62,7 @@ export default {
benches() { benches() {
return { return {
type: 'list', type: 'list',
doctype: 'Bench', pagetype: 'Bench',
filters: { filters: {
group: this.$releaseGroup.name, group: this.$releaseGroup.name,
skip_team_filter_for_system_user_and_support_agent: true, skip_team_filter_for_system_user_and_support_agent: true,
@ -79,7 +79,7 @@ export default {
sites() { sites() {
return { return {
type: 'list', type: 'list',
doctype: 'Site', pagetype: 'Site',
filters: { filters: {
group: this.$releaseGroup.name, group: this.$releaseGroup.name,
skip_team_filter_for_system_user_and_support_agent: true, skip_team_filter_for_system_user_and_support_agent: true,

View File

@ -262,7 +262,7 @@ const isCookieValid = createResource({
const sites = createResource({ const sites = createResource({
url: 'jcloude.api.site_login.get_product_sites_of_user', url: 'jcloude.api.site_login.get_product_sites_of_user',
doctype: 'Site', pagetype: 'Site',
auto: session.user, auto: session.user,
params: { params: {
user: email.value || session.user, user: email.value || session.user,

View File

@ -101,7 +101,7 @@ export default {
if (!this.id) return; if (!this.id) return;
return { return {
type: 'document', type: 'document',
doctype: 'Site Update', pagetype: 'Site Update',
name: this.id, name: this.id,
auto: true, auto: true,
transform: (record) => { transform: (record) => {

View File

@ -32,7 +32,7 @@ export default {
computed: { computed: {
listOptions() { listOptions() {
return { return {
doctype: 'Server Snapshot', pagetype: 'Server Snapshot',
filters: () => { filters: () => {
return { status: ['!=', 'Unavailable'] }; return { status: ['!=', 'Unavailable'] };
}, },
@ -156,7 +156,7 @@ export default {
label: 'App Server', label: 'App Server',
fieldname: 'app_server', fieldname: 'app_server',
options: { options: {
doctype: 'Server', pagetype: 'Server',
}, },
}, },
{ {
@ -164,7 +164,7 @@ export default {
label: 'Database Server', label: 'Database Server',
fieldname: 'database_server', fieldname: 'database_server',
options: { options: {
doctype: 'Database Server', pagetype: 'Database Server',
}, },
}, },
{ {

View File

@ -32,7 +32,7 @@ export default {
computed: { computed: {
listOptions() { listOptions() {
return { return {
doctype: 'Site Backup', pagetype: 'Site Backup',
orderBy: 'creation desc', orderBy: 'creation desc',
fields: [ fields: [
'name', 'name',
@ -121,7 +121,7 @@ export default {
label: 'Site', label: 'Site',
fieldname: 'site', fieldname: 'site',
options: { options: {
doctype: 'Site', pagetype: 'Site',
}, },
}, },
{ {

Some files were not shown because too many files have changed in this diff Show More