From b828afea60fcdddaa821dc64f3e2e588aab967a6 Mon Sep 17 00:00:00 2001 From: Jayanta Pandit <55305804+regdocs@users.noreply.github.com> Date: Fri, 24 Apr 2026 12:19:54 +0530 Subject: [PATCH] feat(site-actions): Move compute allocation and warranty to site action --- .../ConfigureComputeAllocationDialog.vue | 97 + .../ManageProductWarrantyDialog.vue | 148 + dashboard/src/components/SiteActionCell.vue | 6 + dashboard/src/components/SiteOverview.vue | 40 +- dashboard/src/components/SitePlansCards.vue | 36 + dashboard/src/pages/NewSite.vue | 11 +- press/api/site.py | 168 +- .../press_settings/press_settings.json | 3439 +++++++++-------- .../doctype/press_settings/press_settings.py | 11 +- press/press/doctype/server/server.json | 1627 ++++---- press/press/doctype/server/server.py | 13 + press/press/doctype/site/site.py | 34 +- press/press/doctype/site/site_plan_utils.py | 107 + 13 files changed, 3192 insertions(+), 2545 deletions(-) create mode 100644 dashboard/src/components/ConfigureComputeAllocationDialog.vue create mode 100644 dashboard/src/components/ManageProductWarrantyDialog.vue create mode 100644 press/press/doctype/site/site_plan_utils.py diff --git a/dashboard/src/components/ConfigureComputeAllocationDialog.vue b/dashboard/src/components/ConfigureComputeAllocationDialog.vue new file mode 100644 index 00000000000..fc8c367df9d --- /dev/null +++ b/dashboard/src/components/ConfigureComputeAllocationDialog.vue @@ -0,0 +1,97 @@ + + + diff --git a/dashboard/src/components/ManageProductWarrantyDialog.vue b/dashboard/src/components/ManageProductWarrantyDialog.vue new file mode 100644 index 00000000000..0242236a2f0 --- /dev/null +++ b/dashboard/src/components/ManageProductWarrantyDialog.vue @@ -0,0 +1,148 @@ + + + diff --git a/dashboard/src/components/SiteActionCell.vue b/dashboard/src/components/SiteActionCell.vue index 5a4d414abda..9bf289f02c6 100644 --- a/dashboard/src/components/SiteActionCell.vue +++ b/dashboard/src/components/SiteActionCell.vue @@ -52,6 +52,12 @@ onMounted(() => { function getSiteActionHandler(action) { const actionDialogs = { + 'Manage Product Warranty': defineAsyncComponent( + () => import('./ManageProductWarrantyDialog.vue'), + ), + 'Configure compute allocation': defineAsyncComponent( + () => import('./ConfigureComputeAllocationDialog.vue'), + ), 'Restore with files': defineAsyncComponent( () => import('./SiteDatabaseRestoreDialog.vue'), ), diff --git a/dashboard/src/components/SiteOverview.vue b/dashboard/src/components/SiteOverview.vue index d7b3d292b71..942930eacf0 100644 --- a/dashboard/src/components/SiteOverview.vue +++ b/dashboard/src/components/SiteOverview.vue @@ -130,7 +130,7 @@
-
+
@@ -139,7 +139,10 @@
-