update doctype-pagetype
This commit is contained in:
parent
380e25c4f7
commit
ce84804aeb
@ -7,5 +7,5 @@ b7d4540c32075cbf569d9c8e256a8ce9898c7115
|
||||
# Fix Agent Job Type fixtures
|
||||
0c88a71473a906c87c58c94cc11743f79711d240
|
||||
|
||||
# Generate DocType types
|
||||
# Generate PageType types
|
||||
a965b98b90fadf438c5f0a22c5778896743a94e7
|
||||
2
.github/workflows/main.yaml
vendored
2
.github/workflows/main.yaml
vendored
@ -168,7 +168,7 @@ jobs:
|
||||
- name: Setup Test Users
|
||||
working-directory: /home/runner/jingrow-bench/apps/jcloude/dashboard
|
||||
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}"
|
||||
bench --site test_site set-password "$JCLOUDE _ADMIN_USER_EMAIL" "$JCLOUDE _ADMIN_USER_PASSWORD"
|
||||
|
||||
|
||||
@ -7,12 +7,12 @@
|
||||
() => {
|
||||
renderDialog(
|
||||
h(DialogComponent, {
|
||||
doctype,
|
||||
pagetype,
|
||||
docname,
|
||||
onOpenRequestDialog: () => {
|
||||
renderDialog(
|
||||
h(AccessRequestDialog, {
|
||||
doctype,
|
||||
pagetype,
|
||||
docname,
|
||||
}),
|
||||
);
|
||||
@ -32,7 +32,7 @@ import AccessRequestDialog from './AccessRequestDialog.vue';
|
||||
import AccessRequestStatusDialog from './AccessRequestStatusDialog.vue';
|
||||
|
||||
const props = defineProps<{
|
||||
doctype: string;
|
||||
pagetype: string;
|
||||
docname: string;
|
||||
pg?: any;
|
||||
error?: Error;
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
<div class="space-y-4 text-base">
|
||||
<p>Are you sure you want to request access to this resource?</p>
|
||||
<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>
|
||||
</div>
|
||||
<Textarea
|
||||
@ -65,7 +65,7 @@ import { toast } from 'vue-sonner';
|
||||
import { Checkbox, Textarea } from 'jingrow-ui';
|
||||
|
||||
const props = defineProps<{
|
||||
doctype: string;
|
||||
pagetype: string;
|
||||
docname: string;
|
||||
}>();
|
||||
|
||||
@ -82,20 +82,20 @@ const permissionsState = reactive({
|
||||
const permissionsMeta = computed(() => ({
|
||||
login_as_administrator: {
|
||||
label: 'Login as Administrator',
|
||||
enabled: props.doctype === 'Site',
|
||||
enabled: props.pagetype === 'Site',
|
||||
},
|
||||
site_domains: {
|
||||
label: 'Domains',
|
||||
enabled: props.doctype === 'Site',
|
||||
enabled: props.pagetype === 'Site',
|
||||
},
|
||||
site_release_group: {
|
||||
label: 'Release Group',
|
||||
enabled: props.doctype === 'Site',
|
||||
enabled: props.pagetype === 'Site',
|
||||
},
|
||||
bench_ssh: {
|
||||
label: 'SSH Access',
|
||||
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 {
|
||||
pg: {
|
||||
doctype: 'Support Access',
|
||||
pagetype: 'Support Access',
|
||||
reason: reason.value,
|
||||
resources: [
|
||||
{
|
||||
document_type: props.doctype,
|
||||
document_type: props.pagetype,
|
||||
document_name: props.docname,
|
||||
},
|
||||
],
|
||||
|
||||
@ -24,7 +24,7 @@
|
||||
<p>You have access to this resource via access request.</p>
|
||||
</div>
|
||||
<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">Expiry:</span>
|
||||
@ -63,7 +63,7 @@ import { ref } from 'vue';
|
||||
import dayjs from '../utils/dayjs';
|
||||
|
||||
const props = defineProps<{
|
||||
doctype: string;
|
||||
pagetype: string;
|
||||
docname: string;
|
||||
}>();
|
||||
|
||||
@ -77,7 +77,7 @@ const status = createResource({
|
||||
url: 'jcloude.api.access.status',
|
||||
auto: true,
|
||||
params: {
|
||||
doctype: props.doctype,
|
||||
pagetype: props.pagetype,
|
||||
docname: props.docname,
|
||||
},
|
||||
});
|
||||
|
||||
@ -43,7 +43,7 @@ import {
|
||||
|
||||
export default {
|
||||
name: 'AddTagDialog',
|
||||
props: ['doctype', 'docname'],
|
||||
props: ['pagetype', 'docname'],
|
||||
emits: ['added', 'removed'],
|
||||
components: { Dialog, Autocomplete, FormControl },
|
||||
data() {
|
||||
@ -57,8 +57,8 @@ export default {
|
||||
existingTags() {
|
||||
return {
|
||||
type: 'list',
|
||||
doctype: 'Jcloude Tag',
|
||||
filters: { doctype_name: this.doctype },
|
||||
pagetype: 'Jcloude Tag',
|
||||
filters: { pagetype_name: this.pagetype },
|
||||
fields: ['tag'],
|
||||
pageLength: 1000,
|
||||
auto: true,
|
||||
@ -68,7 +68,7 @@ export default {
|
||||
methods: {
|
||||
addNewTag(value) {
|
||||
if (!value) return;
|
||||
let $pg = getCachedDocumentResource(this.doctype, this.docname);
|
||||
let $pg = getCachedDocumentResource(this.pagetype, this.docname);
|
||||
if (!$pg) return;
|
||||
return $pg.addTag.submit({ tag: value }).then(() => {
|
||||
this.$emit('added', value);
|
||||
|
||||
@ -77,7 +77,7 @@ export default {
|
||||
notification() {
|
||||
return {
|
||||
type: 'document',
|
||||
doctype: 'Jcloude Notification',
|
||||
pagetype: 'Jcloude Notification',
|
||||
name: this.name,
|
||||
whitelistedMethods: {
|
||||
markAsAddressed: 'mark_as_addressed',
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
import { computed } from 'vue';
|
||||
|
||||
const props = defineProps<{
|
||||
doctype: string;
|
||||
pagetype: string;
|
||||
docname: string;
|
||||
error?: Error;
|
||||
}>();
|
||||
|
||||
@ -154,7 +154,7 @@ export default {
|
||||
invoice() {
|
||||
return {
|
||||
type: 'document',
|
||||
doctype: 'Invoice',
|
||||
pagetype: 'Invoice',
|
||||
name: this.invoiceId,
|
||||
};
|
||||
},
|
||||
|
||||
@ -40,7 +40,7 @@ export default {
|
||||
return {
|
||||
url: 'jcloude.api.client.search_link',
|
||||
params: {
|
||||
doctype: this.options.doctype,
|
||||
pagetype: this.options.pagetype,
|
||||
order_by: this.options.orderBy,
|
||||
page_length: this.options.pageLength || 10,
|
||||
filters: this.options.filters,
|
||||
|
||||
@ -31,7 +31,7 @@
|
||||
@failure="imageAddFailure"
|
||||
fileTypes="image/*"
|
||||
:upload-args="{
|
||||
doctype: 'Marketplace App',
|
||||
pagetype: 'Marketplace App',
|
||||
docname: app.pg.name,
|
||||
method: 'jcloude.api.marketplace.update_app_image',
|
||||
}"
|
||||
@ -116,7 +116,7 @@
|
||||
@failure="imageAddFailure"
|
||||
fileTypes="image/*"
|
||||
:upload-args="{
|
||||
doctype: 'Marketplace App',
|
||||
pagetype: 'Marketplace App',
|
||||
docname: app.name,
|
||||
method: 'jcloude.api.marketplace.add_app_screenshot',
|
||||
}"
|
||||
|
||||
@ -229,7 +229,7 @@ export default {
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.$socket.emit('doctype_subscribe', 'Jcloude Notification');
|
||||
this.$socket.emit('pagetype_subscribe', 'Jcloude Notification');
|
||||
this.$socket.on('jcloude_notification', (data) => {
|
||||
if (data.team === this.$team.pg.name) {
|
||||
unreadNotificationsCount.setData((data) => data + 1);
|
||||
|
||||
@ -230,11 +230,11 @@ export default {
|
||||
type: 'list',
|
||||
cache: [
|
||||
'ObjectList',
|
||||
this.options.doctype || this.options.url,
|
||||
this.options.pagetype || this.options.url,
|
||||
this.options.filters,
|
||||
],
|
||||
url: this.options.url || null,
|
||||
doctype: this.options.doctype,
|
||||
pagetype: this.options.pagetype,
|
||||
pageLength: this.options.pageLength || 20,
|
||||
fields: [
|
||||
'name',
|
||||
@ -270,26 +270,26 @@ export default {
|
||||
resource.fetch();
|
||||
}
|
||||
}
|
||||
if (this.options.doctype) {
|
||||
const doctype = this.options.doctype;
|
||||
if (subscribed[doctype]) return;
|
||||
this.$socket.emit('doctype_subscribe', doctype);
|
||||
subscribed[doctype] = true;
|
||||
if (this.options.pagetype) {
|
||||
const pagetype = this.options.pagetype;
|
||||
if (subscribed[pagetype]) return;
|
||||
this.$socket.emit('pagetype_subscribe', pagetype);
|
||||
subscribed[pagetype] = true;
|
||||
|
||||
const throttledReload = throttle(this.$list.reload, 5000);
|
||||
this.$socket.on('list_update', (data) => {
|
||||
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();
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
beforeUnmount() {
|
||||
if (this.options.doctype) {
|
||||
const doctype = this.options.doctype;
|
||||
this.$socket.emit('doctype_unsubscribe', doctype);
|
||||
subscribed[doctype] = false;
|
||||
if (this.options.pagetype) {
|
||||
const pagetype = this.options.pagetype;
|
||||
this.$socket.emit('pagetype_unsubscribe', pagetype);
|
||||
subscribed[pagetype] = false;
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
||||
@ -72,7 +72,7 @@ export default {
|
||||
invoice() {
|
||||
return {
|
||||
type: 'document',
|
||||
doctype: 'Payout Order',
|
||||
pagetype: 'Payout Order',
|
||||
name: this.payoutId,
|
||||
};
|
||||
},
|
||||
|
||||
@ -129,7 +129,7 @@ export default {
|
||||
computed: {
|
||||
listOptions() {
|
||||
return {
|
||||
doctype: 'Site Database User',
|
||||
pagetype: 'Site Database User',
|
||||
filters: {
|
||||
site: this.site,
|
||||
status: ['!=', 'Archived'],
|
||||
|
||||
@ -398,7 +398,7 @@ export default {
|
||||
const TagsDialog = defineAsyncComponent(
|
||||
() => import('../dialogs/TagsDialog.vue'),
|
||||
);
|
||||
renderDialog(h(TagsDialog, { doctype: 'Site', docname: this.site }));
|
||||
renderDialog(h(TagsDialog, { pagetype: 'Site', docname: this.site }));
|
||||
},
|
||||
trialDays,
|
||||
},
|
||||
|
||||
@ -107,7 +107,7 @@ export default {
|
||||
// TODO: investigate why
|
||||
url: 'jcloude.api.client.get',
|
||||
params: {
|
||||
doctype: 'Site Update',
|
||||
pagetype: 'Site Update',
|
||||
name: this.existingUpdate,
|
||||
},
|
||||
auto: !!this.existingUpdate,
|
||||
|
||||
@ -87,7 +87,7 @@ const open = ref(true);
|
||||
const team = getTeam();
|
||||
|
||||
const request = createDocumentResource({
|
||||
doctype: 'Support Access',
|
||||
pagetype: 'Support Access',
|
||||
name: props.name,
|
||||
auto: true,
|
||||
});
|
||||
@ -128,7 +128,7 @@ const permissions = computed(() =>
|
||||
const update = createResource({
|
||||
url: 'jcloude.api.client.set_value',
|
||||
makeParams: (args: any) => ({
|
||||
doctype: 'Support Access',
|
||||
pagetype: 'Support Access',
|
||||
name: props.name,
|
||||
fieldname: {
|
||||
status: args.status,
|
||||
|
||||
@ -58,7 +58,7 @@
|
||||
<LinkControl
|
||||
class="w-full"
|
||||
label="Select Team"
|
||||
:options="{ doctype: 'Team', filters: { enabled: 1 } }"
|
||||
:options="{ pagetype: 'Team', filters: { enabled: 1 } }"
|
||||
v-model="selectedTeam"
|
||||
description="This feature is only available to system users"
|
||||
/>
|
||||
|
||||
@ -55,7 +55,7 @@ export default {
|
||||
listOptions() {
|
||||
return {
|
||||
url: 'jcloude.api.client.get_list',
|
||||
doctype: 'SQL Playground Log',
|
||||
pagetype: 'SQL Playground Log',
|
||||
filters: {
|
||||
site: this.site,
|
||||
},
|
||||
|
||||
@ -121,7 +121,7 @@ export default {
|
||||
dependencyVersions() {
|
||||
return {
|
||||
type: 'list',
|
||||
doctype: 'Bench Dependency Version',
|
||||
pagetype: 'Bench Dependency Version',
|
||||
fields: ['version'],
|
||||
filters: {
|
||||
parenttype: 'Bench Dependency',
|
||||
|
||||
@ -262,7 +262,7 @@ export default {
|
||||
apps() {
|
||||
return {
|
||||
type: 'list',
|
||||
doctype: 'Release Group App',
|
||||
pagetype: 'Release Group App',
|
||||
parent: 'Release Group',
|
||||
auto: true,
|
||||
filters: {
|
||||
@ -285,7 +285,7 @@ export default {
|
||||
benches() {
|
||||
return {
|
||||
type: 'list',
|
||||
doctype: 'Bench',
|
||||
pagetype: 'Bench',
|
||||
fields: ['name'],
|
||||
filters: {
|
||||
group: this.group,
|
||||
|
||||
@ -138,7 +138,7 @@ export default {
|
||||
bench() {
|
||||
return {
|
||||
type: 'document',
|
||||
doctype: 'Bench',
|
||||
pagetype: 'Bench',
|
||||
name: this.bench,
|
||||
onSuccess(pg) {
|
||||
if (pg.is_ssh_proxy_setup && pg.user_ssh_key) {
|
||||
|
||||
@ -278,7 +278,7 @@ export default {
|
||||
codeScreening() {
|
||||
return {
|
||||
type: 'document',
|
||||
doctype: 'App Release Approval Request',
|
||||
pagetype: 'App Release Approval Request',
|
||||
name: this.row.approval_request_name,
|
||||
fields: [
|
||||
'name',
|
||||
|
||||
@ -30,7 +30,7 @@
|
||||
class="mt-4"
|
||||
type="autocomplete"
|
||||
label="Choose Version"
|
||||
:options="{ doctype: 'Jingrow Version', filters: { public: 1 } }"
|
||||
:options="{ pagetype: 'Jingrow Version', filters: { public: 1 } }"
|
||||
v-model="selectedVersion"
|
||||
/>
|
||||
<div class="mt-4 space-y-2">
|
||||
@ -129,7 +129,7 @@ export default {
|
||||
return {
|
||||
pg: {
|
||||
...this.app,
|
||||
doctype: 'Marketplace App',
|
||||
pagetype: 'Marketplace App',
|
||||
version: this.selectedVersion,
|
||||
},
|
||||
};
|
||||
|
||||
@ -48,7 +48,7 @@ export default {
|
||||
computed: {
|
||||
$app() {
|
||||
let appDoc = getDocResource({
|
||||
doctype: 'Marketplace App',
|
||||
pagetype: 'Marketplace App',
|
||||
name: this.marketplaceApp,
|
||||
});
|
||||
|
||||
|
||||
@ -274,7 +274,7 @@ async function saveComment() {
|
||||
return;
|
||||
}
|
||||
let comment = await call('jingrow.desk.form.utils.add_comment', {
|
||||
reference_doctype: 'Partner Lead',
|
||||
reference_pagetype: 'Partner Lead',
|
||||
reference_name: route.params.leadId,
|
||||
content: newComment.value,
|
||||
comment_email: session.user,
|
||||
|
||||
@ -18,7 +18,7 @@ const route = useRoute();
|
||||
const showUpdateFollowupDialog = defineModel(false);
|
||||
const leadfollowups = computed(() => {
|
||||
return {
|
||||
doctype: 'Lead Followup',
|
||||
pagetype: 'Lead Followup',
|
||||
filters: {
|
||||
parent: route.params.leadId,
|
||||
parenttype: 'Partner Lead',
|
||||
|
||||
@ -76,7 +76,7 @@ const domainList = computed(() => {
|
||||
});
|
||||
|
||||
const _leadTypeList = createListResource({
|
||||
doctype: 'Partner Lead Type',
|
||||
pagetype: 'Partner Lead Type',
|
||||
fields: ['name'],
|
||||
cache: 'leadTypeList',
|
||||
auto: true,
|
||||
|
||||
@ -17,7 +17,7 @@ export default {
|
||||
computed: {
|
||||
options() {
|
||||
return {
|
||||
doctype: 'Partner Approval Request',
|
||||
pagetype: 'Partner Approval Request',
|
||||
fields: ['approved_by_partner', 'status'],
|
||||
columns: [
|
||||
{
|
||||
|
||||
@ -26,7 +26,7 @@ export default {
|
||||
computed: {
|
||||
partnerCertificatesList() {
|
||||
return {
|
||||
doctype: 'Partner Certificate',
|
||||
pagetype: 'Partner Certificate',
|
||||
fields: ['free', 'certificate_link'],
|
||||
filters: {
|
||||
team: this.$team.pg.name,
|
||||
|
||||
@ -94,7 +94,7 @@ const emit = defineEmits(['success']);
|
||||
const team = inject('team');
|
||||
|
||||
const pressSettings = createDocumentResource({
|
||||
doctype: 'Jcloude Settings',
|
||||
pagetype: 'Jcloude Settings',
|
||||
name: 'Jcloude Settings',
|
||||
auto: true,
|
||||
initialData: {},
|
||||
|
||||
@ -23,7 +23,7 @@ export default {
|
||||
computed: {
|
||||
options() {
|
||||
return {
|
||||
doctype: 'Invoice',
|
||||
pagetype: 'Invoice',
|
||||
fields: ['type'],
|
||||
columns: [
|
||||
{ label: 'Invoice', fieldname: 'name' },
|
||||
|
||||
@ -219,7 +219,7 @@ export default {
|
||||
lead() {
|
||||
return {
|
||||
type: 'document',
|
||||
doctype: 'Partner Lead',
|
||||
pagetype: 'Partner Lead',
|
||||
name: this.$route.params.leadId,
|
||||
};
|
||||
},
|
||||
|
||||
@ -226,7 +226,7 @@ const partnerDetails = createResource({
|
||||
});
|
||||
|
||||
const partnerConsent = createListResource({
|
||||
doctype: 'Partner Consent',
|
||||
pagetype: 'Partner Consent',
|
||||
onSuccess() {
|
||||
showPartnerCreditsDialog.value = true;
|
||||
toast.success('Partner consent recorded successfully');
|
||||
|
||||
@ -22,7 +22,7 @@ export default {
|
||||
computed: {
|
||||
options() {
|
||||
return {
|
||||
doctype: 'Partner Payment Payout',
|
||||
pagetype: 'Partner Payment Payout',
|
||||
fields: ['type'],
|
||||
columns: [
|
||||
{ label: 'Payout ID', fieldname: 'name' },
|
||||
|
||||
@ -20,7 +20,7 @@ export default {
|
||||
computed: {
|
||||
autoScaleRecords() {
|
||||
return {
|
||||
doctype: 'Auto Scale Record',
|
||||
pagetype: 'Auto Scale Record',
|
||||
filters: {
|
||||
primary_server: this.name,
|
||||
status: ['in', 'Scheduled'],
|
||||
|
||||
@ -86,7 +86,7 @@ export default {
|
||||
if (!this.id) return;
|
||||
return {
|
||||
type: 'document',
|
||||
doctype: 'Auto Scale Record',
|
||||
pagetype: 'Auto Scale Record',
|
||||
name: this.id,
|
||||
auto: true,
|
||||
transform: (record) => {
|
||||
|
||||
@ -22,7 +22,7 @@ export default {
|
||||
computed: {
|
||||
autoScaleRecords() {
|
||||
return {
|
||||
doctype: 'Auto Scale Record',
|
||||
pagetype: 'Auto Scale Record',
|
||||
filters: {
|
||||
primary_server: this.name,
|
||||
status: ['not in', 'Scheduled'],
|
||||
|
||||
@ -224,7 +224,7 @@ export default {
|
||||
return {
|
||||
url: 'jcloude.api.client.get_list',
|
||||
params: {
|
||||
doctype: 'Release Group',
|
||||
pagetype: 'Release Group',
|
||||
fields: ['title', 'name'],
|
||||
filters: { server: this.serverName, enabled: 1 },
|
||||
},
|
||||
|
||||
@ -323,7 +323,7 @@ function onDisableAutoDiskExpansion() {
|
||||
|
||||
function onDropServer() {
|
||||
const databaseServer = createDocumentResource({
|
||||
doctype: 'Database Server',
|
||||
pagetype: 'Database Server',
|
||||
name: server.pg.database_server,
|
||||
});
|
||||
|
||||
|
||||
@ -17,7 +17,7 @@
|
||||
<ServerActionCell
|
||||
:group="group.group"
|
||||
:serverName="row.server_name"
|
||||
:serverType="row.server_doctype"
|
||||
:serverType="row.server_pagetype"
|
||||
:actionLabel="row.action"
|
||||
:method="row.pg_method"
|
||||
:description="row.description"
|
||||
@ -45,7 +45,7 @@ export default {
|
||||
];
|
||||
|
||||
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]) {
|
||||
acc[group] = [];
|
||||
}
|
||||
@ -77,7 +77,7 @@ export default {
|
||||
$dbServer() {
|
||||
// Should mirror the whitelistedMethods in ServerOverview.vue
|
||||
return getDocResource({
|
||||
doctype: 'Database Server',
|
||||
pagetype: 'Database Server',
|
||||
name: this.$appServer.pg.database_server,
|
||||
whitelistedMethods: {
|
||||
changePlan: 'change_plan',
|
||||
@ -98,7 +98,7 @@ export default {
|
||||
},
|
||||
$dbReplicaServer() {
|
||||
return getDocResource({
|
||||
doctype: 'Database Server',
|
||||
pagetype: 'Database Server',
|
||||
name: this.$appServer.pg.replication_server,
|
||||
whitelistedMethods: {
|
||||
changePlan: 'change_plan',
|
||||
|
||||
@ -695,14 +695,14 @@ export default {
|
||||
},
|
||||
$appSecondaryServer() {
|
||||
return getDocResource({
|
||||
doctype: 'Server',
|
||||
pagetype: 'Server',
|
||||
name: this.$appServer.pg.secondary_server,
|
||||
});
|
||||
},
|
||||
$dbServer() {
|
||||
// Should mirror the whitelistedMethods in ServerActions.vue
|
||||
return getDocResource({
|
||||
doctype: 'Database Server',
|
||||
pagetype: 'Database Server',
|
||||
name: this.$appServer.pg.database_server,
|
||||
whitelistedMethods: {
|
||||
changePlan: 'change_plan',
|
||||
@ -723,7 +723,7 @@ export default {
|
||||
},
|
||||
$dbReplicaServer() {
|
||||
return getDocResource({
|
||||
doctype: 'Database Server',
|
||||
pagetype: 'Database Server',
|
||||
name: this.$appServer.pg.replication_server,
|
||||
whitelistedMethods: {
|
||||
changePlan: 'change_plan',
|
||||
|
||||
@ -172,7 +172,7 @@ export default {
|
||||
snapshot() {
|
||||
return {
|
||||
type: 'document',
|
||||
doctype: 'Server Snapshot',
|
||||
pagetype: 'Server Snapshot',
|
||||
name: this.name,
|
||||
auto: true,
|
||||
};
|
||||
|
||||
@ -101,7 +101,7 @@ export default {
|
||||
snapshot() {
|
||||
return {
|
||||
type: 'document',
|
||||
doctype: 'Server Snapshot',
|
||||
pagetype: 'Server Snapshot',
|
||||
name: this.name,
|
||||
whitelistedMethods: {
|
||||
lock: 'lock',
|
||||
@ -122,7 +122,7 @@ export default {
|
||||
},
|
||||
snapshotRecoveryOptions() {
|
||||
return {
|
||||
doctype: 'Server Snapshot Recovery',
|
||||
pagetype: 'Server Snapshot Recovery',
|
||||
filters: {
|
||||
snapshot: this.name,
|
||||
},
|
||||
|
||||
@ -32,7 +32,7 @@ export default {
|
||||
snapshotRecovery() {
|
||||
return {
|
||||
type: 'document',
|
||||
doctype: 'Server Snapshot Recovery',
|
||||
pagetype: 'Server Snapshot Recovery',
|
||||
name: this.name,
|
||||
auto: true,
|
||||
whitelistedMethods: {
|
||||
|
||||
@ -243,7 +243,7 @@ const sshKeyListOptions = computed(() => ({
|
||||
label: 'Delete',
|
||||
onClick() {
|
||||
deleteSSHKey.submit({
|
||||
doctype: 'User SSH Key',
|
||||
pagetype: 'User SSH Key',
|
||||
name: row.name,
|
||||
});
|
||||
},
|
||||
@ -274,7 +274,7 @@ function renderAddNewKeyDialog(listResource) {
|
||||
addSSHKey
|
||||
.submit({
|
||||
pg: {
|
||||
doctype: 'User SSH Key',
|
||||
pagetype: 'User SSH Key',
|
||||
ssh_public_key: values.sshKey,
|
||||
user: $team.pg.user_info.name,
|
||||
},
|
||||
@ -294,7 +294,7 @@ function renderAddNewKeyDialog(listResource) {
|
||||
const webhookListResource = createResource({
|
||||
url: 'jcloude.api.client.get_list',
|
||||
params: {
|
||||
doctype: 'Jcloude Webhook',
|
||||
pagetype: 'Jcloude Webhook',
|
||||
fields: ['name', 'enabled', 'endpoint'],
|
||||
},
|
||||
initialData: [],
|
||||
@ -406,7 +406,7 @@ const webhookListOptions = computed(() => ({
|
||||
onClick({ hide }) {
|
||||
deleteWebhook
|
||||
.submit({
|
||||
doctype: 'Jcloude Webhook',
|
||||
pagetype: 'Jcloude Webhook',
|
||||
name: row.name,
|
||||
})
|
||||
.then(hide);
|
||||
|
||||
@ -111,7 +111,7 @@ export default {
|
||||
return {
|
||||
url: 'jcloude.api.client.get',
|
||||
params: {
|
||||
doctype: 'Jcloude Webhook',
|
||||
pagetype: 'Jcloude Webhook',
|
||||
name: this.webhook.name,
|
||||
},
|
||||
auto: true,
|
||||
|
||||
@ -76,7 +76,7 @@ export default {
|
||||
roles() {
|
||||
return {
|
||||
type: 'list',
|
||||
doctype: 'Jcloude Role',
|
||||
pagetype: 'Jcloude Role',
|
||||
fields: ['name', 'title'],
|
||||
initialData: [],
|
||||
auto: true,
|
||||
|
||||
@ -137,7 +137,7 @@ const user = getSessionUser();
|
||||
const tab = ref<'members' | 'resources' | 'permissions'>('members');
|
||||
|
||||
const role = createDocumentResource({
|
||||
doctype: 'Jcloude Role',
|
||||
pagetype: 'Jcloude Role',
|
||||
name: props.id,
|
||||
auto: true,
|
||||
whitelistedMethods: {
|
||||
|
||||
@ -181,7 +181,7 @@ export default {
|
||||
role() {
|
||||
return {
|
||||
type: 'document',
|
||||
doctype: 'Jcloude Role',
|
||||
pagetype: 'Jcloude Role',
|
||||
name: this.roleId,
|
||||
whitelistedMethods: {
|
||||
addUser: 'add_user',
|
||||
|
||||
@ -79,7 +79,7 @@
|
||||
(title, users, resources) => {
|
||||
insert.submit({
|
||||
pg: {
|
||||
doctype: 'Jcloude Role',
|
||||
pagetype: 'Jcloude Role',
|
||||
title,
|
||||
users: users.map((u) => ({
|
||||
user: u,
|
||||
@ -104,7 +104,7 @@ import RoleCreateDialog from './RoleCreateDialog.vue';
|
||||
const showCreateDialog = ref(false);
|
||||
|
||||
const roles = createListResource({
|
||||
doctype: 'Jcloude Role',
|
||||
pagetype: 'Jcloude Role',
|
||||
fields: [
|
||||
'name',
|
||||
'title',
|
||||
|
||||
@ -5,7 +5,7 @@ import { computed } from 'vue';
|
||||
const team = getTeam();
|
||||
|
||||
const sites = createListResource({
|
||||
doctype: 'Site',
|
||||
pagetype: 'Site',
|
||||
auto: true,
|
||||
pageLength: 99999,
|
||||
filters: {
|
||||
@ -14,7 +14,7 @@ const sites = createListResource({
|
||||
});
|
||||
|
||||
const servers = createListResource({
|
||||
doctype: 'Server',
|
||||
pagetype: 'Server',
|
||||
auto: true,
|
||||
pageLength: 99999,
|
||||
filters: {
|
||||
@ -23,7 +23,7 @@ const servers = createListResource({
|
||||
});
|
||||
|
||||
const releaseGroups = createListResource({
|
||||
doctype: 'Release Group',
|
||||
pagetype: 'Release Group',
|
||||
auto: true,
|
||||
pageLength: 99999,
|
||||
filters: {
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
@success="onProfilePhotoChange"
|
||||
fileTypes="image/*"
|
||||
:upload-args="{
|
||||
doctype: 'User',
|
||||
pagetype: 'User',
|
||||
docname: user.name,
|
||||
method: 'jcloude.api.account.update_profile_picture',
|
||||
}"
|
||||
@ -209,7 +209,7 @@
|
||||
v-if="showCommunicationInfoDialog"
|
||||
v-model="showCommunicationInfoDialog"
|
||||
@close="showCommunicationInfoDialog = false"
|
||||
reference-doctype="Team"
|
||||
reference-pagetype="Team"
|
||||
:reference-name="$team.pg.name"
|
||||
/>
|
||||
</Card>
|
||||
|
||||
@ -105,7 +105,7 @@ export default {
|
||||
sites() {
|
||||
return {
|
||||
type: 'list',
|
||||
doctype: 'Site',
|
||||
pagetype: 'Site',
|
||||
fields: ['host_name', 'name'],
|
||||
filters: { name: ['!=', this.site] },
|
||||
pageLength: 500,
|
||||
|
||||
@ -186,7 +186,7 @@ export default {
|
||||
serverOptions() {
|
||||
return {
|
||||
type: 'list',
|
||||
doctype: 'Server',
|
||||
pagetype: 'Server',
|
||||
fields: ['name', 'title'],
|
||||
auto: true,
|
||||
transform(data) {
|
||||
|
||||
@ -119,7 +119,7 @@ export default {
|
||||
ARecords() {
|
||||
return {
|
||||
type: 'list',
|
||||
doctype: 'Site Domain',
|
||||
pagetype: 'Site Domain',
|
||||
filters: {
|
||||
site: this.site,
|
||||
dns_type: 'A',
|
||||
|
||||
@ -93,7 +93,7 @@ export default {
|
||||
siteResource() {
|
||||
return {
|
||||
type: 'document',
|
||||
doctype: 'Site',
|
||||
pagetype: 'Site',
|
||||
name: this.site,
|
||||
auto: true,
|
||||
};
|
||||
|
||||
@ -15,9 +15,9 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
logsOptions() {
|
||||
const doctype = 'Site';
|
||||
const pagetype = 'Site';
|
||||
return {
|
||||
doctype: 'Agent Job',
|
||||
pagetype: 'Agent Job',
|
||||
filters: {
|
||||
site: this.name,
|
||||
},
|
||||
@ -44,7 +44,7 @@ export default {
|
||||
label: 'Type',
|
||||
fieldname: 'job_type',
|
||||
options: {
|
||||
doctype: 'Agent Job Type',
|
||||
pagetype: 'Agent Job Type',
|
||||
orderBy: 'name asc',
|
||||
pageLength: 100,
|
||||
},
|
||||
@ -67,7 +67,7 @@ export default {
|
||||
label: 'Site',
|
||||
fieldname: 'site',
|
||||
width: 1.2,
|
||||
condition: () => doctype !== 'Site',
|
||||
condition: () => pagetype !== 'Site',
|
||||
},
|
||||
{
|
||||
label: 'Duration',
|
||||
|
||||
@ -179,7 +179,7 @@ export default {
|
||||
databaseUser() {
|
||||
return {
|
||||
type: 'document',
|
||||
doctype: 'Site Database User',
|
||||
pagetype: 'Site Database User',
|
||||
name: this.db_user_name,
|
||||
auto: false,
|
||||
onSuccess: (data) => {
|
||||
@ -213,7 +213,7 @@ export default {
|
||||
});
|
||||
return {
|
||||
pg: {
|
||||
doctype: 'Site Database User',
|
||||
pagetype: 'Site Database User',
|
||||
label: this.label,
|
||||
team: this.$team.pg.name,
|
||||
site: this.site,
|
||||
|
||||
@ -81,8 +81,8 @@ export default class FileUploader {
|
||||
form_data.append('file_url', options.file_url);
|
||||
}
|
||||
|
||||
if (options.doctype && options.docname) {
|
||||
form_data.append('doctype', options.doctype);
|
||||
if (options.pagetype && options.docname) {
|
||||
form_data.append('pagetype', options.pagetype);
|
||||
form_data.append('docname', options.docname);
|
||||
}
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@ let team;
|
||||
export function getTeam() {
|
||||
if (!team) {
|
||||
team = createDocumentResource({
|
||||
doctype: 'Team',
|
||||
pagetype: 'Team',
|
||||
name: getCurrentTeam(),
|
||||
whitelistedMethods: {
|
||||
getTeamMembers: 'get_team_members',
|
||||
|
||||
@ -30,7 +30,7 @@ import Autocomplete from '../components/Autocomplete.vue';
|
||||
|
||||
export default {
|
||||
name: 'TagsDialog',
|
||||
props: ['docname', 'doctype'],
|
||||
props: ['docname', 'pagetype'],
|
||||
components: { ErrorMessage, PressAutocomplete: Autocomplete },
|
||||
data() {
|
||||
return {
|
||||
@ -43,8 +43,8 @@ export default {
|
||||
availableTags() {
|
||||
return {
|
||||
type: 'list',
|
||||
doctype: 'Jcloude Tag',
|
||||
filters: { doctype_name: this.doctype },
|
||||
pagetype: 'Jcloude Tag',
|
||||
filters: { pagetype_name: this.pagetype },
|
||||
fields: ['tag'],
|
||||
pageLength: 1000,
|
||||
auto: true,
|
||||
@ -53,7 +53,7 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
$pg() {
|
||||
return getCachedDocumentResource(this.doctype, this.docname);
|
||||
return getCachedDocumentResource(this.pagetype, this.docname);
|
||||
},
|
||||
tagOptions() {
|
||||
const docTags = this.$pg.pg.tags.map((t) => t.tag_name);
|
||||
|
||||
@ -4,7 +4,7 @@ import SupportAccessDialog from '../components/SupportAccessDialog.vue';
|
||||
import { getTeam } from '../data/team';
|
||||
|
||||
export default {
|
||||
doctype: 'Support Access',
|
||||
pagetype: 'Support Access',
|
||||
whitelistedMethods: {},
|
||||
list: {
|
||||
route: '/access-requests',
|
||||
|
||||
@ -28,7 +28,7 @@ import { getLogsTab } from './tabs/site/logs';
|
||||
import { getPatchesTab } from './common/patches';
|
||||
|
||||
export default {
|
||||
doctype: 'Bench',
|
||||
pagetype: 'Bench',
|
||||
whitelistedMethods: {},
|
||||
detail: getDetail(),
|
||||
list: getList(),
|
||||
@ -225,7 +225,7 @@ function filterControls() {
|
||||
label: 'Bench Group',
|
||||
fieldname: 'group',
|
||||
options: {
|
||||
doctype: 'Release Group'
|
||||
pagetype: 'Release Group'
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -244,7 +244,7 @@ export function getSitesTab() {
|
||||
route: 'sites',
|
||||
type: 'list',
|
||||
list: {
|
||||
doctype: 'Site',
|
||||
pagetype: 'Site',
|
||||
filters: r => ({
|
||||
group: r.pg.group,
|
||||
bench: r.name,
|
||||
|
||||
@ -31,7 +31,7 @@ export function getAppsTab(forSite: boolean) {
|
||||
function getAppsTabList(forSite: boolean) {
|
||||
const options = forSite ? siteAppListOptions : benchAppListOptions;
|
||||
const list: TabList = {
|
||||
doctype: '',
|
||||
pagetype: '',
|
||||
filters: () => ({}),
|
||||
...options,
|
||||
columns: getAppsTabColumns(forSite),
|
||||
@ -144,7 +144,7 @@ function getAppsTabColumns(forSite: boolean) {
|
||||
}
|
||||
|
||||
const siteAppListOptions: Partial<TabList> = {
|
||||
doctype: 'Site App',
|
||||
pagetype: 'Site App',
|
||||
pageLength: 999,
|
||||
filters: (res) => {
|
||||
return { parenttype: 'Site', parent: res.pg?.name };
|
||||
@ -228,7 +228,7 @@ const siteAppListOptions: Partial<TabList> = {
|
||||
};
|
||||
|
||||
const benchAppListOptions: Partial<TabList> = {
|
||||
doctype: 'Bench App',
|
||||
pagetype: 'Bench App',
|
||||
filters: (res) => {
|
||||
return { parenttype: 'Bench', parent: res.pg?.name };
|
||||
},
|
||||
|
||||
@ -7,23 +7,23 @@ import { ColumnField, Tab } from './types';
|
||||
|
||||
type JobDocTypes = 'Site' | 'Bench' | 'Server' | 'Release Group';
|
||||
|
||||
export function getJobsTab(doctype: JobDocTypes) {
|
||||
const jobRoute = getJobRoute(doctype);
|
||||
export function getJobsTab(pagetype: JobDocTypes) {
|
||||
const jobRoute = getJobRoute(pagetype);
|
||||
|
||||
return {
|
||||
label: 'Jobs',
|
||||
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],
|
||||
route: 'jobs',
|
||||
type: 'list',
|
||||
list: {
|
||||
doctype: 'Agent Job',
|
||||
pagetype: 'Agent Job',
|
||||
filters: res => {
|
||||
if (doctype === 'Site') return { site: res.name };
|
||||
else if (doctype === 'Bench') return { bench: res.name };
|
||||
else if (doctype === 'Server') return { server: res.name };
|
||||
else if (doctype === 'Release Group') return { group: res.name };
|
||||
if (pagetype === 'Site') return { site: res.name };
|
||||
else if (pagetype === 'Bench') return { bench: res.name };
|
||||
else if (pagetype === 'Server') return { server: res.name };
|
||||
else if (pagetype === 'Release Group') return { group: res.name };
|
||||
throw unreachable;
|
||||
},
|
||||
route(row) {
|
||||
@ -49,7 +49,7 @@ export function getJobsTab(doctype: JobDocTypes) {
|
||||
label: 'Type',
|
||||
fieldname: 'job_type',
|
||||
options: {
|
||||
doctype: 'Agent Job Type',
|
||||
pagetype: 'Agent Job Type',
|
||||
orderBy: 'name asc',
|
||||
pageLength: 100
|
||||
}
|
||||
@ -68,20 +68,20 @@ export function getJobsTab(doctype: JobDocTypes) {
|
||||
}
|
||||
}
|
||||
],
|
||||
columns: getJobTabColumns(doctype)
|
||||
columns: getJobTabColumns(pagetype)
|
||||
}
|
||||
} satisfies Tab as Tab;
|
||||
}
|
||||
|
||||
function getJobRoute(doctype: JobDocTypes) {
|
||||
if (doctype === 'Site') return 'Site Job';
|
||||
else if (doctype === 'Bench') return 'Bench Job';
|
||||
else if (doctype === 'Server') return 'Server Job';
|
||||
else if (doctype === 'Release Group') return 'Release Group Job';
|
||||
function getJobRoute(pagetype: JobDocTypes) {
|
||||
if (pagetype === 'Site') return 'Site Job';
|
||||
else if (pagetype === 'Bench') return 'Bench Job';
|
||||
else if (pagetype === 'Server') return 'Server Job';
|
||||
else if (pagetype === 'Release Group') return 'Release Group Job';
|
||||
throw unreachable;
|
||||
}
|
||||
|
||||
function getJobTabColumns(doctype: JobDocTypes) {
|
||||
function getJobTabColumns(pagetype: JobDocTypes) {
|
||||
const columns: ColumnField[] = [
|
||||
{
|
||||
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');
|
||||
}
|
||||
|
||||
@ -22,9 +22,9 @@ export function getPatchesTab(forBench: boolean) {
|
||||
route: 'patches',
|
||||
type: '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',
|
||||
doctype: 'App Patch',
|
||||
pagetype: 'App Patch',
|
||||
filters: (res) => ({ [forBench ? 'bench' : 'group']: res.name }),
|
||||
searchField: 'filename',
|
||||
filterControls: (r) =>
|
||||
@ -54,7 +54,7 @@ export function getPatchesTab(forBench: boolean) {
|
||||
prefix: icon('plus'),
|
||||
},
|
||||
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: '' }));
|
||||
},
|
||||
|
||||
@ -3,24 +3,24 @@ import { confirmDialog, icon, renderDialog } from '../../utils/components';
|
||||
import { toast } from 'vue-sonner';
|
||||
import { getToastErrorMessage } from '../../utils/toast';
|
||||
|
||||
export function tagTab(doctype) {
|
||||
export function tagTab(pagetype) {
|
||||
return {
|
||||
label: 'Tags',
|
||||
icon: icon('tag'),
|
||||
condition: (record) => {
|
||||
return (
|
||||
doctype != 'Server' ||
|
||||
(doctype == 'Server' && record.pg?.status !== 'Archived')
|
||||
pagetype != 'Server' ||
|
||||
(pagetype == 'Server' && record.pg?.status !== 'Archived')
|
||||
);
|
||||
},
|
||||
route: 'tags',
|
||||
type: 'list',
|
||||
list: {
|
||||
doctype: 'Resource Tag',
|
||||
pagetype: 'Resource Tag',
|
||||
filters: (documentResource) => {
|
||||
return {
|
||||
parent: documentResource.name,
|
||||
parenttype: documentResource.doctype,
|
||||
parenttype: documentResource.pagetype,
|
||||
};
|
||||
},
|
||||
orderBy: 'creation desc',
|
||||
@ -42,7 +42,7 @@ export function tagTab(doctype) {
|
||||
);
|
||||
renderDialog(
|
||||
h(AddTagDialog, {
|
||||
doctype: documentResource.doctype,
|
||||
pagetype: documentResource.pagetype,
|
||||
docname: documentResource.name,
|
||||
onAdded() {
|
||||
tags.reload();
|
||||
|
||||
@ -37,7 +37,7 @@ type Icon = ReturnType<typeof icon>;
|
||||
type AsyncComponent = ReturnType<typeof defineAsyncComponent>;
|
||||
|
||||
export interface DashboardObject {
|
||||
doctype: string;
|
||||
pagetype: string;
|
||||
whitelistedMethods: Record<string, string>;
|
||||
list: List;
|
||||
detail: Detail;
|
||||
@ -93,9 +93,9 @@ export interface FilterField {
|
||||
class?: string;
|
||||
options?:
|
||||
| {
|
||||
doctype: string;
|
||||
pagetype: string;
|
||||
filters?: {
|
||||
doctype_name?: string;
|
||||
pagetype_name?: string;
|
||||
};
|
||||
}
|
||||
| string[];
|
||||
@ -130,7 +130,7 @@ export interface Tab {
|
||||
}
|
||||
|
||||
export interface TabList {
|
||||
doctype?: string;
|
||||
pagetype?: string;
|
||||
orderBy?: string;
|
||||
filters?: (r: DocumentResource) => Record<string, unknown>;
|
||||
route?: (row: Row) => Route;
|
||||
|
||||
@ -5,7 +5,7 @@ export default function generateRoutes() {
|
||||
for (let objectType in objects) {
|
||||
let object = objects[objectType];
|
||||
if (object.list) {
|
||||
let routeName = `${object.doctype} List`;
|
||||
let routeName = `${object.pagetype} List`;
|
||||
object.list.routeName = routeName;
|
||||
routes.push({
|
||||
name: routeName,
|
||||
@ -18,7 +18,7 @@ export default function generateRoutes() {
|
||||
}
|
||||
if (object.detail) {
|
||||
let children = object.detail.tabs.map((tab) => {
|
||||
const routeName = `${object.doctype} Detail ${tab.label}`;
|
||||
const routeName = `${object.pagetype} Detail ${tab.label}`;
|
||||
tab.routeName = routeName;
|
||||
const nestedChildren = [];
|
||||
|
||||
@ -54,7 +54,7 @@ export default function generateRoutes() {
|
||||
}
|
||||
}
|
||||
|
||||
object.detail.routeName = `${object.doctype} Detail`;
|
||||
object.detail.routeName = `${object.pagetype} Detail`;
|
||||
routes.push({
|
||||
name: object.detail.routeName,
|
||||
path: object.detail.route,
|
||||
|
||||
@ -18,7 +18,7 @@ import { getPatchesTab } from './common/patches';
|
||||
import { tagTab } from './common/tags';
|
||||
|
||||
export default {
|
||||
doctype: 'Release Group',
|
||||
pagetype: 'Release Group',
|
||||
whitelistedMethods: {
|
||||
addApp: 'add_app',
|
||||
removeApp: 'remove_app',
|
||||
@ -52,7 +52,7 @@ export default {
|
||||
label: 'Version',
|
||||
fieldname: 'version',
|
||||
options: {
|
||||
doctype: 'Jingrow Version',
|
||||
pagetype: 'Jingrow Version',
|
||||
},
|
||||
},
|
||||
{
|
||||
@ -60,9 +60,9 @@ export default {
|
||||
label: 'Tag',
|
||||
fieldname: 'tags.tag',
|
||||
options: {
|
||||
doctype: 'Jcloude Tag',
|
||||
pagetype: 'Jcloude Tag',
|
||||
filters: {
|
||||
doctype_name: 'Release Group',
|
||||
pagetype_name: 'Release Group',
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -175,7 +175,7 @@ export default {
|
||||
route: 'apps',
|
||||
type: 'list',
|
||||
list: {
|
||||
doctype: 'Release Group App',
|
||||
pagetype: 'Release Group App',
|
||||
filters: (releaseGroup) => {
|
||||
return {
|
||||
parenttype: 'Release Group',
|
||||
@ -412,7 +412,7 @@ export default {
|
||||
childrenRoutes: ['Deploy Candidate'],
|
||||
type: 'list',
|
||||
list: {
|
||||
doctype: 'Deploy Candidate Build',
|
||||
pagetype: 'Deploy Candidate Build',
|
||||
route: (row) => ({
|
||||
name: 'Deploy Candidate',
|
||||
params: { id: row.name },
|
||||
@ -565,7 +565,7 @@ export default {
|
||||
route: 'bench-config',
|
||||
type: 'list',
|
||||
list: {
|
||||
doctype: 'Common Site Config',
|
||||
pagetype: 'Common Site Config',
|
||||
filters: (releaseGroup) => {
|
||||
return {
|
||||
parenttype: 'Release Group',
|
||||
@ -713,7 +713,7 @@ export default {
|
||||
route: 'regions',
|
||||
type: 'list',
|
||||
list: {
|
||||
doctype: 'Cluster',
|
||||
pagetype: 'Cluster',
|
||||
filters: (releaseGroup) => {
|
||||
return { group: releaseGroup.name };
|
||||
},
|
||||
@ -770,7 +770,7 @@ export default {
|
||||
route: 'bench-dependencies',
|
||||
type: 'list',
|
||||
list: {
|
||||
doctype: 'Release Group Dependency',
|
||||
pagetype: 'Release Group Dependency',
|
||||
filters: (releaseGroup) => {
|
||||
return {
|
||||
parenttype: 'Release Group',
|
||||
@ -839,7 +839,7 @@ export default {
|
||||
route: 'bench-environment-variable',
|
||||
type: 'list',
|
||||
list: {
|
||||
doctype: 'Release Group Variable',
|
||||
pagetype: 'Release Group Variable',
|
||||
filters: (releaseGroup) => {
|
||||
return {
|
||||
parenttype: 'Release Group',
|
||||
|
||||
@ -13,7 +13,7 @@ import { isMobile } from '../utils/device';
|
||||
import router from '../router';
|
||||
|
||||
export default {
|
||||
doctype: 'Marketplace App',
|
||||
pagetype: 'Marketplace App',
|
||||
whitelistedMethods: {
|
||||
removeVersion: 'remove_version',
|
||||
addVersion: 'add_version',
|
||||
@ -126,7 +126,7 @@ export default {
|
||||
route: 'versions',
|
||||
type: 'list',
|
||||
list: {
|
||||
doctype: 'Marketplace App Version',
|
||||
pagetype: 'Marketplace App Version',
|
||||
filters: (app) => {
|
||||
return { parent: app.pg.name, parenttype: 'Marketplace App' };
|
||||
},
|
||||
@ -308,7 +308,7 @@ export default {
|
||||
route: 'pricing',
|
||||
type: 'list',
|
||||
list: {
|
||||
doctype: 'Marketplace App Plan',
|
||||
pagetype: 'Marketplace App Plan',
|
||||
filters: (app) => {
|
||||
return { app: app.pg.name };
|
||||
},
|
||||
@ -385,7 +385,7 @@ export default {
|
||||
route: 'subscription',
|
||||
type: 'list',
|
||||
list: {
|
||||
doctype: 'Subscription',
|
||||
pagetype: 'Subscription',
|
||||
filters: (app) => {
|
||||
return {
|
||||
document_type: 'Marketplace App',
|
||||
@ -537,7 +537,7 @@ function showReleases(row, app) {
|
||||
options: {
|
||||
label: 'Version',
|
||||
type: 'list',
|
||||
doctype: 'App Release',
|
||||
pagetype: 'App Release',
|
||||
filters: {
|
||||
app: app.pg.name,
|
||||
source: row.source,
|
||||
|
||||
@ -9,7 +9,7 @@ import { toast } from 'vue-sonner';
|
||||
|
||||
const getNotification = (name) => {
|
||||
return getDocResource({
|
||||
doctype: 'Jcloude Notification',
|
||||
pagetype: 'Jcloude Notification',
|
||||
name: name,
|
||||
whitelistedMethods: {
|
||||
markNotificationAsRead: 'mark_as_read',
|
||||
@ -18,14 +18,14 @@ const getNotification = (name) => {
|
||||
};
|
||||
|
||||
export default {
|
||||
doctype: 'Jcloude Notification',
|
||||
pagetype: 'Jcloude Notification',
|
||||
whitelistedMethods: {},
|
||||
list: {
|
||||
resource() {
|
||||
let $team = getTeam();
|
||||
return {
|
||||
type: 'list',
|
||||
doctype: 'Jcloude Notification',
|
||||
pagetype: 'Jcloude Notification',
|
||||
url: 'jcloude.api.notifications.get_notifications',
|
||||
auto: true,
|
||||
filters: {
|
||||
|
||||
@ -14,7 +14,7 @@ import { getJobsTab } from './common/jobs';
|
||||
import { tagTab } from './common/tags';
|
||||
|
||||
export default {
|
||||
doctype: 'Server',
|
||||
pagetype: 'Server',
|
||||
whitelistedMethods: {
|
||||
increaseDiskSize: 'increase_disk_size_for_server',
|
||||
configureAutoAddStorage: 'configure_auto_add_storage',
|
||||
@ -200,7 +200,7 @@ export default {
|
||||
window.open(
|
||||
`${window.location.protocol}//${
|
||||
window.location.host
|
||||
}/app/${server.doctype.replace(' ', '-').toLowerCase()}/${
|
||||
}/app/${server.pagetype.replace(' ', '-').toLowerCase()}/${
|
||||
server.pg.name
|
||||
}`,
|
||||
'_blank',
|
||||
@ -300,7 +300,7 @@ export default {
|
||||
route: 'sites',
|
||||
type: 'list',
|
||||
list: {
|
||||
doctype: 'Site',
|
||||
pagetype: 'Site',
|
||||
filters: (server) => {
|
||||
return { server: server.pg.name };
|
||||
},
|
||||
@ -332,7 +332,7 @@ export default {
|
||||
label: 'Version',
|
||||
fieldname: 'group.version',
|
||||
options: {
|
||||
doctype: 'Jingrow Version',
|
||||
pagetype: 'Jingrow Version',
|
||||
},
|
||||
},
|
||||
{
|
||||
@ -340,7 +340,7 @@ export default {
|
||||
label: 'Bench Group',
|
||||
fieldname: 'group',
|
||||
options: {
|
||||
doctype: 'Release Group',
|
||||
pagetype: 'Release Group',
|
||||
},
|
||||
},
|
||||
{
|
||||
@ -348,9 +348,9 @@ export default {
|
||||
label: 'Tag',
|
||||
fieldname: 'tags.tag',
|
||||
options: {
|
||||
doctype: 'Jcloude Tag',
|
||||
pagetype: 'Jcloude Tag',
|
||||
filters: {
|
||||
doctype_name: 'Site',
|
||||
pagetype_name: 'Site',
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -409,7 +409,7 @@ export default {
|
||||
route: 'groups',
|
||||
type: 'list',
|
||||
list: {
|
||||
doctype: 'Release Group',
|
||||
pagetype: 'Release Group',
|
||||
filters: (server) => {
|
||||
return { server: server.pg.name };
|
||||
},
|
||||
@ -452,7 +452,7 @@ export default {
|
||||
label: 'Version',
|
||||
fieldname: 'version',
|
||||
options: {
|
||||
doctype: 'Jingrow Version',
|
||||
pagetype: 'Jingrow Version',
|
||||
},
|
||||
},
|
||||
{
|
||||
@ -460,9 +460,9 @@ export default {
|
||||
label: 'Tag',
|
||||
fieldname: 'tags.tag',
|
||||
options: {
|
||||
doctype: 'Jcloude Tag',
|
||||
pagetype: 'Jcloude Tag',
|
||||
filters: {
|
||||
doctype_name: 'Release Group',
|
||||
pagetype_name: 'Release Group',
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -500,7 +500,7 @@ export default {
|
||||
route: 'snapshots',
|
||||
type: 'list',
|
||||
list: {
|
||||
doctype: 'Server Snapshot',
|
||||
pagetype: 'Server Snapshot',
|
||||
filters: (server) => {
|
||||
let filters = {
|
||||
app_server: server.pg?.name,
|
||||
@ -823,7 +823,7 @@ export default {
|
||||
type: 'list',
|
||||
searchField: 'play',
|
||||
list: {
|
||||
doctype: 'Ansible Play',
|
||||
pagetype: 'Ansible Play',
|
||||
filterControls({ documentResource: server }) {
|
||||
return [
|
||||
{
|
||||
@ -950,7 +950,7 @@ export default {
|
||||
return server.pg?.status !== 'Archived';
|
||||
},
|
||||
list: {
|
||||
doctype: 'Server Activity',
|
||||
pagetype: 'Server Activity',
|
||||
filters: (server) => {
|
||||
return {
|
||||
document_name: [
|
||||
|
||||
@ -26,7 +26,7 @@ import { isMobile } from '../utils/device';
|
||||
import { getQueryParam, setQueryParam } from '../utils/index';
|
||||
|
||||
export default {
|
||||
doctype: 'Site',
|
||||
pagetype: 'Site',
|
||||
whitelistedMethods: {
|
||||
activate: 'activate',
|
||||
addDomain: 'add_domain',
|
||||
@ -105,7 +105,7 @@ export default {
|
||||
label: 'Version',
|
||||
fieldname: 'group.version',
|
||||
options: {
|
||||
doctype: 'Jingrow Version',
|
||||
pagetype: 'Jingrow Version',
|
||||
},
|
||||
},
|
||||
{
|
||||
@ -113,7 +113,7 @@ export default {
|
||||
label: 'Bench Group',
|
||||
fieldname: 'group',
|
||||
options: {
|
||||
doctype: 'Release Group',
|
||||
pagetype: 'Release Group',
|
||||
},
|
||||
},
|
||||
{
|
||||
@ -127,9 +127,9 @@ export default {
|
||||
label: 'Tag',
|
||||
fieldname: 'tags.tag',
|
||||
options: {
|
||||
doctype: 'Jcloude Tag',
|
||||
pagetype: 'Jcloude Tag',
|
||||
filters: {
|
||||
doctype_name: 'Site',
|
||||
pagetype_name: 'Site',
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -223,7 +223,7 @@ export default {
|
||||
'creation',
|
||||
];
|
||||
createListResource({
|
||||
doctype: 'Site',
|
||||
pagetype: 'Site',
|
||||
url: 'jcloude.api.site.fetch_sites_data_for_export',
|
||||
auto: true,
|
||||
onSuccess(data) {
|
||||
@ -401,7 +401,7 @@ export default {
|
||||
return site.pg?.status !== 'Archived';
|
||||
},
|
||||
list: {
|
||||
doctype: 'Site Domain',
|
||||
pagetype: 'Site Domain',
|
||||
fields: ['redirect_to_primary'],
|
||||
filters: (site) => {
|
||||
return { site: site.pg?.name };
|
||||
@ -637,7 +637,7 @@ export default {
|
||||
route: 'backups',
|
||||
type: 'list',
|
||||
list: {
|
||||
doctype: 'Site Backup',
|
||||
pagetype: 'Site Backup',
|
||||
filters: (site) => {
|
||||
let filters = {
|
||||
site: site.pg?.name,
|
||||
@ -1081,7 +1081,7 @@ export default {
|
||||
return site.pg?.status !== 'Archived';
|
||||
},
|
||||
list: {
|
||||
doctype: 'Site Config',
|
||||
pagetype: 'Site Config',
|
||||
filters: (site) => {
|
||||
return { parent: site.pg?.name, parenttype: 'Site' };
|
||||
},
|
||||
@ -1226,7 +1226,7 @@ export default {
|
||||
},
|
||||
childrenRoutes: ['Site Update'],
|
||||
list: {
|
||||
doctype: 'Site Update',
|
||||
pagetype: 'Site Update',
|
||||
filters: (site) => {
|
||||
return { site: site.pg?.name };
|
||||
},
|
||||
@ -1343,7 +1343,7 @@ export default {
|
||||
condition: () => row.status === 'Scheduled',
|
||||
onClick() {
|
||||
let siteUpdate = getDocResource({
|
||||
doctype: 'Site Update',
|
||||
pagetype: 'Site Update',
|
||||
name: row.name,
|
||||
whitelistedMethods: {
|
||||
updateNow: 'start',
|
||||
@ -1368,7 +1368,7 @@ export default {
|
||||
label: 'View App Changes',
|
||||
onClick() {
|
||||
createListResource({
|
||||
doctype: 'Deploy Candidate Difference App',
|
||||
pagetype: 'Deploy Candidate Difference App',
|
||||
fields: [
|
||||
'difference.github_diff_url as diff_url',
|
||||
'difference.source_hash as source_hash',
|
||||
@ -1506,7 +1506,7 @@ export default {
|
||||
type: 'list',
|
||||
condition: (site) => site.pg?.status !== 'Archived',
|
||||
list: {
|
||||
doctype: 'Site Activity',
|
||||
pagetype: 'Site Activity',
|
||||
filters: (site) => {
|
||||
return { site: site.pg?.name };
|
||||
},
|
||||
|
||||
@ -16,7 +16,7 @@ export function getLogsTab(forSite: boolean) {
|
||||
resource({ documentResource: res }) {
|
||||
return {
|
||||
makeParams: () => {
|
||||
if (res.doctype === 'Site') {
|
||||
if (res.pagetype === 'Site') {
|
||||
return { name: res.pg.name };
|
||||
} else {
|
||||
return { name: res.pg.group, bench: res.name };
|
||||
|
||||
@ -14,7 +14,7 @@ export default {
|
||||
computed: {
|
||||
options() {
|
||||
return {
|
||||
doctype: 'Balance Transaction',
|
||||
pagetype: 'Balance Transaction',
|
||||
fields: ['type', 'source', 'invoice'],
|
||||
columns: [
|
||||
{
|
||||
|
||||
@ -62,7 +62,7 @@ export default {
|
||||
computed: {
|
||||
options() {
|
||||
return {
|
||||
doctype: 'Invoice',
|
||||
pagetype: 'Invoice',
|
||||
fields: [
|
||||
'type',
|
||||
'invoice_pdf',
|
||||
|
||||
@ -39,7 +39,7 @@ export default {
|
||||
computed: {
|
||||
options() {
|
||||
return {
|
||||
doctype: 'Payout Order',
|
||||
pagetype: 'Payout Order',
|
||||
fields: [
|
||||
'period_end',
|
||||
'mode_of_payment',
|
||||
|
||||
@ -46,7 +46,7 @@ export default {
|
||||
computed: {
|
||||
options() {
|
||||
return {
|
||||
doctype: 'Mpesa Payment Record',
|
||||
pagetype: 'Mpesa Payment Record',
|
||||
fields: [
|
||||
'name',
|
||||
'posting_date',
|
||||
|
||||
@ -18,7 +18,7 @@ export default {
|
||||
computed: {
|
||||
options() {
|
||||
return {
|
||||
doctype: 'Stripe Payment Method',
|
||||
pagetype: 'Stripe Payment Method',
|
||||
fields: [
|
||||
'name',
|
||||
'is_default',
|
||||
|
||||
@ -127,7 +127,7 @@ export default {
|
||||
siteGroupDeploy() {
|
||||
return {
|
||||
type: 'document',
|
||||
doctype: 'Site Group Deploy',
|
||||
pagetype: 'Site Group Deploy',
|
||||
name: this.siteGroupDeployName,
|
||||
onSuccess: (pg) => {
|
||||
if (pg.status === 'Site Created') {
|
||||
|
||||
@ -23,7 +23,7 @@
|
||||
type="warning"
|
||||
class="mb-5"
|
||||
/>
|
||||
<Button :route="{ name: `${object.doctype} Detail Deploys` }">
|
||||
<Button :route="{ name: `${object.pagetype} Detail Deploys` }">
|
||||
<template #prefix>
|
||||
<lucide-arrow-left class="inline-block h-4 w-4" />
|
||||
</template>
|
||||
@ -137,7 +137,7 @@ export default {
|
||||
deploy() {
|
||||
return {
|
||||
type: 'document',
|
||||
doctype: 'Deploy Candidate Build',
|
||||
pagetype: 'Deploy Candidate Build',
|
||||
name: this.id,
|
||||
transform: this.transformDeploy,
|
||||
};
|
||||
@ -151,7 +151,7 @@ export default {
|
||||
'Deploy Candidate Build',
|
||||
this.id,
|
||||
],
|
||||
doctype: 'Jcloude Notification',
|
||||
pagetype: 'Jcloude Notification',
|
||||
auto: true,
|
||||
fields: ['title', 'name'],
|
||||
filters: {
|
||||
@ -171,7 +171,7 @@ export default {
|
||||
'Deploy Candidate Build',
|
||||
this.id,
|
||||
],
|
||||
doctype: 'Jcloude Notification',
|
||||
pagetype: 'Jcloude Notification',
|
||||
auto: true,
|
||||
fields: ['title', 'name'],
|
||||
filters: {
|
||||
|
||||
@ -14,7 +14,7 @@
|
||||
<Badge v-if="$resources.document?.pg && badge" v-bind="badge" />
|
||||
</div>
|
||||
<AccessRequestButton
|
||||
:doctype="object.doctype"
|
||||
:pagetype="object.pagetype"
|
||||
:docname="name"
|
||||
:pg="$resources.document?.pg"
|
||||
:error="$resources.document.get.error"
|
||||
@ -48,7 +48,7 @@
|
||||
</TabsWithRouter>
|
||||
<DetailPageError
|
||||
class="mt-60"
|
||||
:doctype="object.doctype"
|
||||
:pagetype="object.pagetype"
|
||||
:docname="name"
|
||||
:error="$resources.document.get.error"
|
||||
/>
|
||||
@ -89,7 +89,7 @@ export default {
|
||||
document() {
|
||||
return {
|
||||
type: 'document',
|
||||
doctype: this.object.doctype,
|
||||
pagetype: this.object.pagetype,
|
||||
name: this.name,
|
||||
whitelistedMethods: this.object.whitelistedMethods || {},
|
||||
onError(error) {
|
||||
@ -104,21 +104,21 @@ export default {
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
if (!subscribed[`${this.object.doctype}:${this.name}`]) {
|
||||
this.$socket.emit('pg_subscribe', this.object.doctype, this.name);
|
||||
subscribed[`${this.object.doctype}:${this.name}`] = true;
|
||||
if (!subscribed[`${this.object.pagetype}:${this.name}`]) {
|
||||
this.$socket.emit('pg_subscribe', this.object.pagetype, this.name);
|
||||
subscribed[`${this.object.pagetype}:${this.name}`] = true;
|
||||
}
|
||||
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();
|
||||
}
|
||||
});
|
||||
},
|
||||
beforeUnmount() {
|
||||
let doctype = this.object.doctype;
|
||||
if (subscribed[`${doctype}:${this.name}`]) {
|
||||
this.$socket.emit('pg_unsubscribe', doctype, this.name);
|
||||
subscribed[`${doctype}:${this.name}`] = false;
|
||||
let pagetype = this.object.pagetype;
|
||||
if (subscribed[`${pagetype}:${this.name}`]) {
|
||||
this.$socket.emit('pg_unsubscribe', pagetype, this.name);
|
||||
subscribed[`${pagetype}:${this.name}`] = false;
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@ -169,7 +169,7 @@ export default {
|
||||
{
|
||||
label: this.title,
|
||||
route: {
|
||||
name: `${this.object.doctype} Detail`,
|
||||
name: `${this.object.pagetype} Detail`,
|
||||
params: { name: this.name },
|
||||
},
|
||||
},
|
||||
|
||||
@ -338,12 +338,12 @@ export default {
|
||||
}
|
||||
},
|
||||
onSuccess: (pg) => {
|
||||
if (pg.doctype === 'Site') {
|
||||
if (pg.pagetype === 'Site') {
|
||||
this.$router.push({
|
||||
name: 'Site Jobs',
|
||||
params: { name: pg.name },
|
||||
});
|
||||
} else if (pg.doctype === 'Site Group Deploy') {
|
||||
} else if (pg.pagetype === 'Site Group Deploy') {
|
||||
this.$router.push({
|
||||
name: 'CreateSiteForMarketplaceApp',
|
||||
params: { app: this.app },
|
||||
|
||||
@ -10,9 +10,9 @@
|
||||
<Button
|
||||
:route="{
|
||||
name:
|
||||
object.doctype === 'Site'
|
||||
object.pagetype === 'Site'
|
||||
? 'Site Jobs'
|
||||
: `${object.doctype} Detail Jobs`,
|
||||
: `${object.pagetype} Detail Jobs`,
|
||||
}"
|
||||
>
|
||||
<template #prefix>
|
||||
@ -105,7 +105,7 @@ export default {
|
||||
job() {
|
||||
return {
|
||||
type: 'document',
|
||||
doctype: 'Agent Job',
|
||||
pagetype: 'Agent Job',
|
||||
name: this.id,
|
||||
transform(job) {
|
||||
for (let step of job.steps) {
|
||||
@ -133,7 +133,7 @@ export default {
|
||||
return {
|
||||
type: 'list',
|
||||
cache: ['Jcloude Notification', 'Error', 'Agent Job', this.id],
|
||||
doctype: 'Jcloude Notification',
|
||||
pagetype: 'Jcloude Notification',
|
||||
auto: true,
|
||||
fields: ['title', 'name'],
|
||||
filters: {
|
||||
|
||||
@ -99,7 +99,7 @@ export default {
|
||||
methods: {
|
||||
getRoute(row) {
|
||||
return {
|
||||
name: `${this.object.doctype} Detail`,
|
||||
name: `${this.object.pagetype} Detail`,
|
||||
params: {
|
||||
name: row.name,
|
||||
},
|
||||
@ -113,7 +113,7 @@ export default {
|
||||
listOptions() {
|
||||
return {
|
||||
...this.object.list,
|
||||
doctype: this.object.doctype,
|
||||
pagetype: this.object.pagetype,
|
||||
route: this.object.detail ? this.getRoute : null,
|
||||
};
|
||||
},
|
||||
|
||||
@ -4,9 +4,9 @@
|
||||
<Button
|
||||
:route="{
|
||||
name:
|
||||
object.doctype === 'Site'
|
||||
object.pagetype === 'Site'
|
||||
? 'Site Logs'
|
||||
: `${object.doctype} Detail Logs`,
|
||||
: `${object.pagetype} Detail Logs`,
|
||||
}"
|
||||
>
|
||||
<template #icon>
|
||||
@ -19,7 +19,7 @@
|
||||
:route="{
|
||||
name: 'Log Browser',
|
||||
params: {
|
||||
mode: object.doctype === 'Site' ? 'site' : 'bench',
|
||||
mode: object.pagetype === 'Site' ? 'site' : 'bench',
|
||||
docName: name,
|
||||
logId: logName,
|
||||
},
|
||||
|
||||
@ -410,7 +410,7 @@ export default {
|
||||
|
||||
return {
|
||||
pg: {
|
||||
doctype: 'Site',
|
||||
pagetype: 'Site',
|
||||
team: this.$team.pg.name,
|
||||
subdomain: this.subdomain,
|
||||
apps: [
|
||||
|
||||
@ -17,7 +17,7 @@ export default {
|
||||
computed: {
|
||||
partnerCertificatesList() {
|
||||
return {
|
||||
doctype: 'Partner Certificate',
|
||||
pagetype: 'Partner Certificate',
|
||||
fields: ['free', 'certificate_link'],
|
||||
columns: [
|
||||
{
|
||||
|
||||
@ -14,7 +14,7 @@ export default {
|
||||
originList() {
|
||||
return {
|
||||
type: 'list',
|
||||
doctype: 'Partner Lead Origin',
|
||||
pagetype: 'Partner Lead Origin',
|
||||
fields: ['name'],
|
||||
auto: true,
|
||||
};
|
||||
@ -23,7 +23,7 @@ export default {
|
||||
computed: {
|
||||
partnerAdminLeadsList() {
|
||||
return {
|
||||
doctype: 'Partner Lead',
|
||||
pagetype: 'Partner Lead',
|
||||
fields: [],
|
||||
columns: [
|
||||
{
|
||||
|
||||
@ -38,7 +38,7 @@ export default {
|
||||
lead() {
|
||||
return {
|
||||
type: 'document',
|
||||
doctype: 'Partner Lead',
|
||||
pagetype: 'Partner Lead',
|
||||
name: this.$route.params.leadId,
|
||||
};
|
||||
},
|
||||
|
||||
@ -206,7 +206,7 @@ export default {
|
||||
resources: {
|
||||
submitPaymentPayout() {
|
||||
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: {
|
||||
partner: this.partnerInput.value,
|
||||
payment_gateway: this.paymentGateway.value,
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="p-5" v-if="play">
|
||||
<Button :route="{ name: `${object.doctype} Detail Plays` }">
|
||||
<Button :route="{ name: `${object.pagetype} Detail Plays` }">
|
||||
<template #prefix>
|
||||
<lucide-arrow-left class="inline-block h-4 w-4" />
|
||||
</template>
|
||||
@ -88,7 +88,7 @@ export default {
|
||||
play() {
|
||||
return {
|
||||
type: 'document',
|
||||
doctype: 'Ansible Play',
|
||||
pagetype: 'Ansible Play',
|
||||
name: this.id,
|
||||
transform(play) {
|
||||
for (let task of play.tasks) {
|
||||
|
||||
@ -62,7 +62,7 @@ export default {
|
||||
benches() {
|
||||
return {
|
||||
type: 'list',
|
||||
doctype: 'Bench',
|
||||
pagetype: 'Bench',
|
||||
filters: {
|
||||
group: this.$releaseGroup.name,
|
||||
skip_team_filter_for_system_user_and_support_agent: true,
|
||||
@ -79,7 +79,7 @@ export default {
|
||||
sites() {
|
||||
return {
|
||||
type: 'list',
|
||||
doctype: 'Site',
|
||||
pagetype: 'Site',
|
||||
filters: {
|
||||
group: this.$releaseGroup.name,
|
||||
skip_team_filter_for_system_user_and_support_agent: true,
|
||||
|
||||
@ -262,7 +262,7 @@ const isCookieValid = createResource({
|
||||
|
||||
const sites = createResource({
|
||||
url: 'jcloude.api.site_login.get_product_sites_of_user',
|
||||
doctype: 'Site',
|
||||
pagetype: 'Site',
|
||||
auto: session.user,
|
||||
params: {
|
||||
user: email.value || session.user,
|
||||
|
||||
@ -101,7 +101,7 @@ export default {
|
||||
if (!this.id) return;
|
||||
return {
|
||||
type: 'document',
|
||||
doctype: 'Site Update',
|
||||
pagetype: 'Site Update',
|
||||
name: this.id,
|
||||
auto: true,
|
||||
transform: (record) => {
|
||||
|
||||
@ -32,7 +32,7 @@ export default {
|
||||
computed: {
|
||||
listOptions() {
|
||||
return {
|
||||
doctype: 'Server Snapshot',
|
||||
pagetype: 'Server Snapshot',
|
||||
filters: () => {
|
||||
return { status: ['!=', 'Unavailable'] };
|
||||
},
|
||||
@ -156,7 +156,7 @@ export default {
|
||||
label: 'App Server',
|
||||
fieldname: 'app_server',
|
||||
options: {
|
||||
doctype: 'Server',
|
||||
pagetype: 'Server',
|
||||
},
|
||||
},
|
||||
{
|
||||
@ -164,7 +164,7 @@ export default {
|
||||
label: 'Database Server',
|
||||
fieldname: 'database_server',
|
||||
options: {
|
||||
doctype: 'Database Server',
|
||||
pagetype: 'Database Server',
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
@ -32,7 +32,7 @@ export default {
|
||||
computed: {
|
||||
listOptions() {
|
||||
return {
|
||||
doctype: 'Site Backup',
|
||||
pagetype: 'Site Backup',
|
||||
orderBy: 'creation desc',
|
||||
fields: [
|
||||
'name',
|
||||
@ -121,7 +121,7 @@ export default {
|
||||
label: 'Site',
|
||||
fieldname: 'site',
|
||||
options: {
|
||||
doctype: 'Site',
|
||||
pagetype: 'Site',
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user