From c92d216c5ac26c0cdfed1ad6c48d5390169f90aa Mon Sep 17 00:00:00 2001 From: mngshm Date: Wed, 30 Jul 2025 14:21:16 +0530 Subject: [PATCH 001/362] refactor(archive-obsolete-benches): Perform checks before enqueueing --- press/press/doctype/bench/bench.py | 57 +++++++++++++++++------------- 1 file changed, 33 insertions(+), 24 deletions(-) diff --git a/press/press/doctype/bench/bench.py b/press/press/doctype/bench/bench.py index 9966471b728..ad2cee57944 100644 --- a/press/press/doctype/bench/bench.py +++ b/press/press/doctype/bench/bench.py @@ -7,7 +7,7 @@ from collections import OrderedDict from functools import cached_property from itertools import groupby -from typing import TYPE_CHECKING, Generator, Iterable, Literal +from typing import TYPE_CHECKING, Literal import frappe import pytz @@ -37,6 +37,8 @@ MIN_BACKGROUND_WORKERS = 1 if TYPE_CHECKING: + from collections.abc import Generator, Iterable + from press.press.doctype.agent_job.agent_job import AgentJob from press.press.doctype.app_source.app_source import AppSource from press.press.doctype.bench_update.bench_update import BenchUpdate @@ -1200,6 +1202,10 @@ def archive_obsolete_benches(group: str | None = None, server: str | None = None """, as_dict=True, ) + for bench in benches: + if _is_bench_ready_to_archive(bench): + return + benches_by_server = groupby(benches, lambda x: x.server) for server_benches in benches_by_server: frappe.enqueue( @@ -1211,31 +1217,34 @@ def archive_obsolete_benches(group: str | None = None, server: str | None = None ) -def archive_obsolete_benches_for_server(benches: Iterable[dict]): - for bench in benches: - # Bench is Broken but a reset to a working state is being attempted - if ( - bench.resetting_bench - or ( - bench.last_archive_failure - and bench.last_archive_failure > frappe.utils.add_to_date(None, hours=-24) - ) - or get_archive_jobs(bench.name) # already being archived - or get_ongoing_jobs(bench.name) - or get_active_site_updates(bench.name) - or get_unfinished_site_migrations(bench.name) - or get_unarchived_sites(bench.name) - ): - continue +def _is_bench_ready_to_archive(bench): + # Skip benches that are in these states + if ( + bench.resetting_bench + or ( + bench.last_archive_failure + and bench.last_archive_failure > frappe.utils.add_to_date(None, hours=-24) + ) + or get_archive_jobs(bench.name) # already being archived + or get_ongoing_jobs(bench.name) + or get_active_site_updates(bench.name) + or get_unfinished_site_migrations(bench.name) + or get_unarchived_sites(bench.name) + ): + return True - if ( - not (bench.public or bench.central_bench) - and bench.creation < frappe.utils.add_days(None, -3) - and not get_scheduled_version_upgrades(bench) - ): - try_archive(bench.name) - continue + if ( + not bench.public + and bench.creation < frappe.utils.add_days(None, -3) + and not get_scheduled_version_upgrades(bench) + ): + return try_archive(bench.name) + return False + + +def archive_obsolete_benches_for_server(benches: Iterable[dict]): + for bench in benches: # If there isn't a Deploy Candidate Difference with this bench's candidate as source # That means this is the most recent bench and should be skipped. From 45a4ee020c415dadaf5119021dd53ec6f433b593 Mon Sep 17 00:00:00 2001 From: mngshm Date: Wed, 30 Jul 2025 14:40:24 +0530 Subject: [PATCH 002/362] fix(archive-obsolete-benches): Avoid early exit & check if central_bench --- press/press/doctype/bench/bench.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/press/press/doctype/bench/bench.py b/press/press/doctype/bench/bench.py index ad2cee57944..c1df525d39d 100644 --- a/press/press/doctype/bench/bench.py +++ b/press/press/doctype/bench/bench.py @@ -1204,7 +1204,7 @@ def archive_obsolete_benches(group: str | None = None, server: str | None = None ) for bench in benches: if _is_bench_ready_to_archive(bench): - return + continue benches_by_server = groupby(benches, lambda x: x.server) for server_benches in benches_by_server: @@ -1234,7 +1234,7 @@ def _is_bench_ready_to_archive(bench): return True if ( - not bench.public + not (bench.public or bench.central_bench) and bench.creation < frappe.utils.add_days(None, -3) and not get_scheduled_version_upgrades(bench) ): From 1e2bdcbd0f7b51ff3f0b20e00778d4868db681a0 Mon Sep 17 00:00:00 2001 From: Aradhya-Tripathi Date: Thu, 31 Jul 2025 11:36:09 +0530 Subject: [PATCH 003/362] wip(storage): Display storage breakdown --- .../src2/components/server/ServerOverview.vue | 1 - .../server/StorageBreakdownDialog.vue | 76 +++++++++++++++++++ press/press/doctype/server/server.py | 5 ++ 3 files changed, 81 insertions(+), 1 deletion(-) diff --git a/dashboard/src2/components/server/ServerOverview.vue b/dashboard/src2/components/server/ServerOverview.vue index e2c5aaa80fe..3fb7d34aa79 100644 --- a/dashboard/src2/components/server/ServerOverview.vue +++ b/dashboard/src2/components/server/ServerOverview.vue @@ -436,7 +436,6 @@ export default { label: 'Storage Breakdown', icon: 'pie-chart', variant: 'ghost', - hidden: serverType !== 'Database Server', onClick: () => { this.showStorageBreakdownDialog(serverType); }, diff --git a/dashboard/src2/components/server/StorageBreakdownDialog.vue b/dashboard/src2/components/server/StorageBreakdownDialog.vue index 5339795234e..f8563c1cbed 100644 --- a/dashboard/src2/components/server/StorageBreakdownDialog.vue +++ b/dashboard/src2/components/server/StorageBreakdownDialog.vue @@ -119,9 +119,27 @@ export default { mounted() { if (this.serverType == 'Database Server') { this.$resources.databaseServerStorageBreakdown.submit(); + } else { + this.$resources.applicationServerStorageBreakdown.submit(); } }, resources: { + applicationServerStorageBreakdown() { + return { + url: 'press.api.client.run_doc_method', + makeParams() { + return { + dt: 'Server', + dn: this.server, + method: 'get_storage_usage', + }; + }, + // onSuccess: (data) => { + // console.log(data.message); + // }, + auto: false, + }; + }, databaseServerStorageBreakdown() { return { url: 'press.api.client.run_doc_method', @@ -140,6 +158,64 @@ export default { }, }, computed: { + applicationServerBreakDown() { + if (!this.$resources.applicationServerBreakDown?.data?.message) { + return {}; + } + + let message = this.$resources.applicationServerBreakDown.data.message; + + const transformNode = (node, isRoot = false) => { + const transformed = { + name: node.name, + label: isRoot ? node.name : `${node.name} (${node.size_formatted})`, + children: [], + }; + + if (node.children && node.children.length > 0) { + transformed.children = node.children.map((child) => + transformNode(child), + ); + } + + return transformed; + }; + + // Create the tree structure + const treeData = { + name: 'server-storage', + label: 'Server Storage Breakdown', + children: [], + }; + + // Add benches data + if (message.benches) { + treeData.children.push(transformNode(message.benches, true)); + } + + // Add docker data as a separate node + if (message.docker) { + const dockerNode = { + name: 'docker', + label: 'Docker', + children: [ + { + name: 'docker-images', + label: `Images (${message.docker.image})`, + children: [], + }, + { + name: 'docker-containers', + label: `Containers (${message.docker.container})`, + children: [], + }, + ], + }; + treeData.children.push(dockerNode); + } + console.log(treeData); + return treeData; + }, databaseStorageBreakdown() { if (!this.$resources.databaseServerStorageBreakdown?.data?.message) return {}; diff --git a/press/press/doctype/server/server.py b/press/press/doctype/server/server.py index 91ad0e7d5c0..6a311213229 100644 --- a/press/press/doctype/server/server.py +++ b/press/press/doctype/server/server.py @@ -130,6 +130,11 @@ def get_doc(self, doc): return doc + @dashboard_whitelist() + def get_storage_usage(self): + """Get storage usage of the application server""" + return self.agent.get("/server/storage-breakdown") + @dashboard_whitelist() def increase_disk_size_for_server( self, From 2315f8ad1ab959749fa4516dd0be00c9a3f214d5 Mon Sep 17 00:00:00 2001 From: Aradhya-Tripathi Date: Thu, 31 Jul 2025 16:46:26 +0530 Subject: [PATCH 004/362] chore(storage): Add agent call to analyze app server --- press/press/doctype/server/server.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/press/press/doctype/server/server.py b/press/press/doctype/server/server.py index 6a311213229..67ac1b9138e 100644 --- a/press/press/doctype/server/server.py +++ b/press/press/doctype/server/server.py @@ -133,7 +133,10 @@ def get_doc(self, doc): @dashboard_whitelist() def get_storage_usage(self): """Get storage usage of the application server""" - return self.agent.get("/server/storage-breakdown") + try: + return self.agent.get("/server/storage-breakdown") + except Exception: + frappe.throw("Failed to fetch storage usage. Try again later.") @dashboard_whitelist() def increase_disk_size_for_server( From 77cc95893bf43ed55e420b81aa0632a60e2dbb5c Mon Sep 17 00:00:00 2001 From: Aradhya-Tripathi Date: Thu, 31 Jul 2025 16:47:15 +0530 Subject: [PATCH 005/362] feat(ui): Add tree view for application storage breakdown --- .../src2/components/StorageBreakupChart.vue | 127 ++++++++++++------ 1 file changed, 84 insertions(+), 43 deletions(-) diff --git a/dashboard/src2/components/StorageBreakupChart.vue b/dashboard/src2/components/StorageBreakupChart.vue index abc7c3db75f..84a8add5e05 100644 --- a/dashboard/src2/components/StorageBreakupChart.vue +++ b/dashboard/src2/components/StorageBreakupChart.vue @@ -1,63 +1,92 @@ - - + diff --git a/dashboard/package.json b/dashboard/package.json index 1ff27d034b0..6cbadfae387 100644 --- a/dashboard/package.json +++ b/dashboard/package.json @@ -4,10 +4,8 @@ "private": true, "type": "module", "scripts": { - "dev": "yarn generate-theme-config && vite", - "build": "yarn generate-theme-config && vite build --base=/assets/press/dashboard/ && yarn copy-html-entry", - "copy-html-entry": "cp ../press/public/dashboard/index.html ../press/www/dashboard.html", - "generate-theme-config": "node ./generateThemeConfig.cjs", + "dev": "vite", + "build": "vite build", "test": "vitest", "coverage": "vitest run --coverage", "lint": "eslint src" @@ -30,7 +28,7 @@ "echarts": "^5.4.3", "feather-icons": "^4.26.0", "frappe-charts": "2.0.0-rc22", - "frappe-ui": "^0.1.108", + "frappe-ui": "0.1.178", "fuse.js": "6.6.2", "libarchive.js": "^1.3.0", "lodash": "^4.17.19", @@ -43,11 +41,11 @@ "sql-formatter": "^15.4.10", "unplugin-icons": "^0.17.0", "unplugin-vue-components": "^0.25.2", - "vue": "^3.4.12", + "vue": "^3.5.15", "vue-codemirror": "^6.1.1", "vue-echarts": "^6.6.1", "vue-qrcode": "^2.2.2", - "vue-router": "^4.0.5", + "vue-router": "^4.1.6", "vue-sonner": "^1.2.5" }, "devDependencies": { @@ -75,7 +73,7 @@ "postcss-easy-import": "^4.0.0", "prettier": "^2.5.1", "prettier-plugin-tailwindcss": "^0.1.8", - "tailwindcss": "^3.2", + "tailwindcss": "^3.4", "typescript": "^5.4.3", "vite": "5.0.13", "vite-plugin-rewrite-all": "^1.0.1", diff --git a/dashboard/src/App.vue b/dashboard/src/App.vue index 8524365608a..1c686d65331 100644 --- a/dashboard/src/App.vue +++ b/dashboard/src/App.vue @@ -1,74 +1,98 @@ - + diff --git a/dashboard/src2/components/ActionButton.vue b/dashboard/src/components/ActionButton.vue similarity index 90% rename from dashboard/src2/components/ActionButton.vue rename to dashboard/src/components/ActionButton.vue index f6eb4f7d9d2..dc7adec02bc 100644 --- a/dashboard/src2/components/ActionButton.vue +++ b/dashboard/src/components/ActionButton.vue @@ -19,7 +19,7 @@ export default { name: 'ActionButton', components: { Button, - Dropdown + Dropdown, }, computed: { buttonProps() { @@ -37,14 +37,14 @@ export default { label: 'Options', variant: 'ghost', slots: { - icon: icon('more-horizontal') - } + icon: icon('more-horizontal'), + }, }, ...this.$attrs, label: this.$attrs.label, - options: this.$attrs.options + options: this.$attrs.options, }; - } - } + }, + }, }; diff --git a/dashboard/src2/components/ActiveServersDialog.vue b/dashboard/src/components/ActiveServersDialog.vue similarity index 94% rename from dashboard/src2/components/ActiveServersDialog.vue rename to dashboard/src/components/ActiveServersDialog.vue index 3aa126884e9..8d3089bd9d1 100644 --- a/dashboard/src2/components/ActiveServersDialog.vue +++ b/dashboard/src/components/ActiveServersDialog.vue @@ -25,19 +25,19 @@ export default { name: 'ActiveServersDialog', data() { return { - showDialog: true + showDialog: true, }; }, resources: { activeServers: { url: 'press.api.account.active_servers', - auto: true - } + auto: true, + }, }, methods: { redirectToServer() { window.location = '/servers'; - } - } + }, + }, }; diff --git a/dashboard/src2/components/AddDomainDialog.vue b/dashboard/src/components/AddDomainDialog.vue similarity index 97% rename from dashboard/src2/components/AddDomainDialog.vue rename to dashboard/src/components/AddDomainDialog.vue index d593539d3db..84c94dc6988 100644 --- a/dashboard/src2/components/AddDomainDialog.vue +++ b/dashboard/src/components/AddDomainDialog.vue @@ -107,7 +107,7 @@ @click=" $resources.checkDNS.submit({ name: site.name, - domain: newDomain + domain: newDomain, }) " > @@ -121,7 +121,7 @@ @click=" $resources.addDomain.submit({ name: site.name, - domain: newDomain + domain: newDomain, }) " > @@ -138,14 +138,14 @@ export default { props: { site: { type: Object, - required: true - } + required: true, + }, }, emits: ['domainAdded'], data() { return { showDialog: true, - newDomain: null + newDomain: null, }; }, resources: { @@ -153,7 +153,7 @@ export default { url: 'press.api.site.check_dns', validate() { if (!this.newDomain) throw new DashboardError('Domain cannot be empty'); - } + }, }, addDomain: { url: 'press.api.site.add_domain', @@ -161,15 +161,15 @@ export default { this.$resources.checkDNS.reset(); this.$emit('domainAdded'); this.showDialog = false; - } + }, }, retryAddDomain: { url: 'press.api.site.retry_add_domain', onSuccess() { this.$emit('domainAdded'); // this.$resources.domains.fetch(); - } - } + }, + }, }, computed: { dnsVerified() { @@ -177,7 +177,7 @@ export default { }, dnsResult() { return this.$resources.checkDNS.data; - } - } + }, + }, }; diff --git a/dashboard/src2/components/AddTagDialog.vue b/dashboard/src/components/AddTagDialog.vue similarity index 85% rename from dashboard/src2/components/AddTagDialog.vue rename to dashboard/src/components/AddTagDialog.vue index c9257f1f5b6..d003a58f78f 100644 --- a/dashboard/src2/components/AddTagDialog.vue +++ b/dashboard/src/components/AddTagDialog.vue @@ -8,10 +8,10 @@ variant: 'solid', onClick: () => addNewTag( - selectedTag?.value === '__new__' ? newTag : selectedTag.value - ) - } - ] + selectedTag?.value === '__new__' ? newTag : selectedTag.value, + ), + }, + ], }" v-model="show" > @@ -28,7 +28,7 @@ v-model="newTag" label="Enter new tag and press enter" placeholder="production, staging, testing" - @keydown.enter="e => addNewTag(e.target.value)" + @keydown.enter="(e) => addNewTag(e.target.value)" /> @@ -38,7 +38,7 @@ import { Autocomplete, Dialog, FormControl, - getCachedDocumentResource + getCachedDocumentResource, } from 'frappe-ui'; export default { @@ -50,7 +50,7 @@ export default { return { selectedTag: null, newTag: '', - show: true + show: true, }; }, resources: { @@ -61,9 +61,9 @@ export default { filters: { doctype_name: this.doctype }, fields: ['tag'], pageLength: 1000, - auto: true + auto: true, }; - } + }, }, methods: { addNewTag(value) { @@ -74,18 +74,18 @@ export default { this.$emit('added', value); this.show = false; }); - } + }, }, computed: { tagOptions() { return [ { label: 'Create new tag', value: '__new__' }, - ...(this.$resources.existingTags.data || []).map(d => ({ + ...(this.$resources.existingTags.data || []).map((d) => ({ label: d.tag, - value: d.tag - })) + value: d.tag, + })), ]; - } - } + }, + }, }; diff --git a/dashboard/src2/components/AddressForm.vue b/dashboard/src/components/AddressForm.vue similarity index 83% rename from dashboard/src2/components/AddressForm.vue rename to dashboard/src/components/AddressForm.vue index fbd05815fd0..e291cb4ed64 100644 --- a/dashboard/src2/components/AddressForm.vue +++ b/dashboard/src/components/AddressForm.vue @@ -34,11 +34,11 @@ export default { props: ['address'], emits: ['update:address'], components: { - Form + Form, }, data() { return { - gstApplicable: false + gstApplicable: false, }; }, mounted() { @@ -56,12 +56,12 @@ export default { if (gstApplicable) { this.update( 'gstin', - this.address.gstin === 'Not Applicable' ? '' : this.address.gstin + this.address.gstin === 'Not Applicable' ? '' : this.address.gstin, ); } else { this.update('gstin', 'Not Applicable'); } - } + }, }, resources: { countryList: { @@ -70,35 +70,35 @@ export default { onSuccess() { let userCountry = this.$team?.doc.country; if (userCountry) { - let country = this.countryList.find(d => d.label === userCountry); + let country = this.countryList.find((d) => d.label === userCountry); if (country) { this.update('country', country.value); } } - } + }, }, validateGST() { return { url: 'press.api.billing.validate_gst', makeParams() { return { - address: this.address + address: this.address, }; - } + }, }; - } + }, }, methods: { update(key, value) { this.$emit('update:address', { ...this.address, - [key]: value + [key]: value, }); }, async validateGST() { this.update( 'gstin', - this.gstApplicable ? this.address.gstin : 'Not Applicable' + this.gstApplicable ? this.address.gstin : 'Not Applicable', ); await this.$resources.validateGST.submit(); }, @@ -107,8 +107,8 @@ export default { let is_india = country == 'India'; let values = this.fields .flat() - .filter(df => df.fieldname != 'gstin' || is_india) - .map(df => this.address[df.fieldname]); + .filter((df) => df.fieldname != 'gstin' || is_india) + .map((df) => this.address[df.fieldname]); if (!values.every(Boolean)) { throw new DashboardError('Please fill required values'); @@ -119,19 +119,19 @@ export default { } catch (error) { throw new DashboardError(error.messages?.join('\n')); } - } + }, }, computed: { countryList() { - return (this.$resources.countryList.data || []).map(d => ({ + return (this.$resources.countryList.data || []).map((d) => ({ label: d.name, - value: d.name + value: d.name, })); }, indianStates() { - return indianStates.map(d => ({ + return indianStates.map((d) => ({ label: d, - value: d + value: d, })); }, fields() { @@ -141,35 +141,35 @@ export default { label: 'Country', fieldname: 'country', options: this.countryList, - required: 1 + required: 1, }, { fieldtype: 'Data', label: 'Address', fieldname: 'address', - required: 1 + required: 1, }, { fieldtype: 'Data', label: 'City', fieldname: 'city', - required: 1 + required: 1, }, { fieldtype: this.address.country === 'India' ? 'Select' : 'Data', label: 'State / Province / Region', fieldname: 'state', required: 1, - options: this.address.country === 'India' ? this.indianStates : null + options: this.address.country === 'India' ? this.indianStates : null, }, { fieldtype: 'Data', label: 'Postal Code', fieldname: 'postal_code', - required: 1 - } + required: 1, + }, ]; - } - } + }, + }, }; diff --git a/dashboard/src2/components/AddressableErrorDialog.vue b/dashboard/src/components/AddressableErrorDialog.vue similarity index 95% rename from dashboard/src2/components/AddressableErrorDialog.vue rename to dashboard/src/components/AddressableErrorDialog.vue index ef538b6a859..69ab9cb7c84 100644 --- a/dashboard/src2/components/AddressableErrorDialog.vue +++ b/dashboard/src/components/AddressableErrorDialog.vue @@ -57,12 +57,12 @@ import { Button, Dialog, FeatherIcon, ErrorMessage } from 'frappe-ui'; export default { props: { - name: String + name: String, }, components: { Dialog, Button, - FeatherIcon + FeatherIcon, }, emits: ['done'], data() { @@ -70,7 +70,7 @@ export default { helpViewed: false, show: true, copied: false, - error: '' + error: '', }; }, resources: { @@ -80,15 +80,15 @@ export default { doctype: 'Press Notification', name: this.name, whitelistedMethods: { - markAsAddressed: 'mark_as_addressed' - } + markAsAddressed: 'mark_as_addressed', + }, }; - } + }, }, computed: { doc() { return this.$resources.notification.doc ?? null; - } + }, }, methods: { async copyTraceback() { @@ -111,7 +111,7 @@ export default { this.error = ''; this.helpViewed = true; window.open(this.doc.assistance_url, '_blank'); - } - } + }, + }, }; diff --git a/dashboard/src2/components/AlertAddPaymentMode.vue b/dashboard/src/components/AlertAddPaymentMode.vue similarity index 100% rename from dashboard/src2/components/AlertAddPaymentMode.vue rename to dashboard/src/components/AlertAddPaymentMode.vue diff --git a/dashboard/src2/components/AlertAddressDetails.vue b/dashboard/src/components/AlertAddressDetails.vue similarity index 94% rename from dashboard/src2/components/AlertAddressDetails.vue rename to dashboard/src/components/AlertAddressDetails.vue index 14bb9f53262..ff5e2b73278 100644 --- a/dashboard/src2/components/AlertAddressDetails.vue +++ b/dashboard/src/components/AlertAddressDetails.vue @@ -27,8 +27,8 @@ export default { components: { AlertBanner, UpdateBillingDetails }, data() { return { - showBillingDetailsDialog: false + showBillingDetailsDialog: false, }; - } + }, }; diff --git a/dashboard/src2/components/AlertAddressableError.vue b/dashboard/src/components/AlertAddressableError.vue similarity index 95% rename from dashboard/src2/components/AlertAddressableError.vue rename to dashboard/src/components/AlertAddressableError.vue index f3e78f09db8..d809110182e 100644 --- a/dashboard/src2/components/AlertAddressableError.vue +++ b/dashboard/src/components/AlertAddressableError.vue @@ -13,12 +13,12 @@ export default { emits: ['done'], props: { name: String, - title: String + title: String, }, methods: { show() { addressableErrorDialog(this.name, () => this.$emit('done')); - } - } + }, + }, }; diff --git a/dashboard/src2/components/AlertBanner.vue b/dashboard/src/components/AlertBanner.vue similarity index 87% rename from dashboard/src2/components/AlertBanner.vue rename to dashboard/src/components/AlertBanner.vue index f4708dfdcc2..c43f0515421 100644 --- a/dashboard/src2/components/AlertBanner.vue +++ b/dashboard/src/components/AlertBanner.vue @@ -2,7 +2,7 @@
- @@ -21,7 +21,7 @@ const colors = { info: 'blue', success: 'green', error: 'red', - warning: 'amber' + warning: 'amber', }; export default { @@ -30,17 +30,17 @@ export default { title: String, type: { type: String, - default: 'info' + default: 'info', }, showIcon: { type: Boolean, - default: true - } + default: true, + }, }, computed: { color() { return colors[this.type] ?? 'gray'; - } - } + }, + }, }; diff --git a/dashboard/src/components/AlertBenchUpdate.vue b/dashboard/src/components/AlertBenchUpdate.vue deleted file mode 100644 index bab3415f809..00000000000 --- a/dashboard/src/components/AlertBenchUpdate.vue +++ /dev/null @@ -1,159 +0,0 @@ - - diff --git a/dashboard/src/components/AlertBillingInformation.vue b/dashboard/src/components/AlertBillingInformation.vue deleted file mode 100644 index e7c086c2d3c..00000000000 --- a/dashboard/src/components/AlertBillingInformation.vue +++ /dev/null @@ -1,65 +0,0 @@ - - diff --git a/dashboard/src2/components/AlertCardExpired.vue b/dashboard/src/components/AlertCardExpired.vue similarity index 91% rename from dashboard/src2/components/AlertCardExpired.vue rename to dashboard/src/components/AlertCardExpired.vue index 534e6c6a1ce..44aa25d3292 100644 --- a/dashboard/src2/components/AlertCardExpired.vue +++ b/dashboard/src/components/AlertCardExpired.vue @@ -13,6 +13,6 @@ import AlertBanner from './AlertBanner.vue'; export default { name: 'AlertCardExpired', - components: { AlertBanner } + components: { AlertBanner }, }; diff --git a/dashboard/src2/components/AlertMandateInfo.vue b/dashboard/src/components/AlertMandateInfo.vue similarity index 96% rename from dashboard/src2/components/AlertMandateInfo.vue rename to dashboard/src/components/AlertMandateInfo.vue index 0b2920987e1..59a6b41c0a1 100644 --- a/dashboard/src2/components/AlertMandateInfo.vue +++ b/dashboard/src/components/AlertMandateInfo.vue @@ -27,8 +27,8 @@ export default { components: { AlertBanner, StripeCardDialog }, data() { return { - showAddCardDialog: false + showAddCardDialog: false, }; - } + }, }; diff --git a/dashboard/src/components/AlertSiteActivation.vue b/dashboard/src/components/AlertSiteActivation.vue deleted file mode 100644 index 3fead84a42e..00000000000 --- a/dashboard/src/components/AlertSiteActivation.vue +++ /dev/null @@ -1,32 +0,0 @@ - - diff --git a/dashboard/src/components/AlertSiteUpdate.vue b/dashboard/src/components/AlertSiteUpdate.vue deleted file mode 100644 index ae82d5af3f0..00000000000 --- a/dashboard/src/components/AlertSiteUpdate.vue +++ /dev/null @@ -1,165 +0,0 @@ - - diff --git a/dashboard/src2/components/AlertUnpaidInvoices.vue b/dashboard/src/components/AlertUnpaidInvoices.vue similarity index 89% rename from dashboard/src2/components/AlertUnpaidInvoices.vue rename to dashboard/src/components/AlertUnpaidInvoices.vue index fcd6bff4122..a51268b23d7 100644 --- a/dashboard/src2/components/AlertUnpaidInvoices.vue +++ b/dashboard/src/components/AlertUnpaidInvoices.vue @@ -14,18 +14,18 @@ export default { props: { amount: { type: Number, - required: true + required: true, }, currency: { - type: String - } + type: String, + }, }, computed: { outstandingBalanceMessage() { return `Your account currently has an outstanding balance of ${this.$format.userCurrency( - this.amount + this.amount, )}. Please settle the balance to avoid any site suspension.`; - } - } + }, + }, }; diff --git a/dashboard/src/components/AlertUpdate.vue b/dashboard/src/components/AlertUpdate.vue deleted file mode 100644 index 081587bcec4..00000000000 --- a/dashboard/src/components/AlertUpdate.vue +++ /dev/null @@ -1,172 +0,0 @@ - - diff --git a/dashboard/src/components/AppPlanCard.vue b/dashboard/src/components/AppPlanCard.vue deleted file mode 100644 index ecdabaf359d..00000000000 --- a/dashboard/src/components/AppPlanCard.vue +++ /dev/null @@ -1,98 +0,0 @@ - - - diff --git a/dashboard/src2/components/AppSidebar.vue b/dashboard/src/components/AppSidebar.vue similarity index 89% rename from dashboard/src2/components/AppSidebar.vue rename to dashboard/src/components/AppSidebar.vue index 72665c3c0a6..620f9ea7d2e 100644 --- a/dashboard/src2/components/AppSidebar.vue +++ b/dashboard/src/components/AppSidebar.vue @@ -10,23 +10,23 @@ icon: 'command', condition: () => $team?.doc?.valid_teams?.length > 1 || $team?.doc?.is_desk_user, - onClick: () => (showTeamSwitcher = true) + onClick: () => (showTeamSwitcher = true), }, { label: 'Support & Docs', icon: 'help-circle', - onClick: support + onClick: support, }, { label: 'Share Feedback', icon: 'file-text', - onClick: feedback + onClick: feedback, }, { label: 'Logout', icon: 'log-out', - onClick: $session.logout.submit - } + onClick: $session.logout.submit, + }, ]" >