Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

style(portal): turn account strip into masthead

rcourtman7cd81afb3e9b
diff --git a/internal/cloudcp/portal/dist/build_manifest.json b/internal/cloudcp/portal/dist/build_manifest.json
index e22d72057e..5cb375e923 100644
--- a/internal/cloudcp/portal/dist/build_manifest.json
+++ b/internal/cloudcp/portal/dist/build_manifest.json
@@ -1,5 +1,5 @@
{
- "source_hash": "feb5de02547ef564c065366222a3551f4d56198f98db27747b883bd79f938116",
+ "source_hash": "0ae8ddc4c52bec8ceca96d924bc8c0d3fc8150ac7de342348a1d430a0a984afe",
"build_inputs": [
"package.json",
"tsconfig.json",
diff --git a/internal/cloudcp/portal/dist/portal_app.css b/internal/cloudcp/portal/dist/portal_app.css
index 710a9c37c2..a2cf3c46de 100644
--- a/internal/cloudcp/portal/dist/portal_app.css
+++ b/internal/cloudcp/portal/dist/portal_app.css
@@ -390,7 +390,11 @@ header .logout-btn:hover,
display: none !important;
}
.portal-account-context {
- padding: 8px 14px 7px;
+ display: grid;
+ grid-template-columns: minmax(0, 1fr) auto;
+ gap: 16px;
+ align-items: start;
+ padding: 12px 14px 12px;
border-bottom: 1px solid var(--line);
background: #fff;
}
@@ -398,6 +402,7 @@ header .logout-btn:hover,
display: flex;
flex-direction: column;
gap: 6px;
+ min-width: 0;
}
.portal-account-context-meta {
display: flex;
@@ -424,7 +429,12 @@ header .logout-btn:hover,
letter-spacing: -0.05em;
}
.portal-account-context-copy p {
- display: none;
+ display: block;
+ margin: 0;
+ max-width: 720px;
+ font-size: 12px;
+ line-height: 1.45;
+ color: var(--ink-soft);
}
.portal-account-context-chips {
display: flex;
@@ -432,6 +442,33 @@ header .logout-btn:hover,
gap: 8px;
flex-wrap: wrap;
}
+.portal-account-context-summary {
+ display: grid;
+ grid-template-columns: repeat(3, minmax(108px, auto));
+ gap: 8px;
+}
+.portal-account-context-stat {
+ display: flex;
+ flex-direction: column;
+ gap: 5px;
+ min-width: 0;
+ padding: 10px 12px;
+ border: 1px solid var(--line);
+ border-radius: 10px;
+ background: #fbfcfd;
+}
+.portal-account-context-stat span {
+ font-size: 10px;
+ font-weight: 800;
+ letter-spacing: 0.1em;
+ text-transform: uppercase;
+ color: var(--ink-muted);
+}
+.portal-account-context-stat strong {
+ font-size: 13px;
+ line-height: 1.2;
+ color: var(--ink);
+}
.portal-shell[data-shell-section=overview] .portal-content-panel-overview,
.portal-shell[data-shell-section=services] .portal-content-panel-services,
.portal-shell[data-shell-section=support] .portal-content-panel-support,
@@ -2176,6 +2213,12 @@ header .logout-btn:hover,
.portal-shell-head-row {
grid-template-columns: 1fr;
}
+ .portal-account-context {
+ grid-template-columns: 1fr;
+ }
+ .portal-account-context-summary {
+ grid-template-columns: 1fr;
+ }
.portal-account-context-row,
.account-stage-header-row {
align-items: start;
diff --git a/internal/cloudcp/portal/dist/portal_app.js b/internal/cloudcp/portal/dist/portal_app.js
index 3341b4fcd3..1fab5f5818 100644
--- a/internal/cloudcp/portal/dist/portal_app.js
+++ b/internal/cloudcp/portal/dist/portal_app.js
@@ -1819,7 +1819,8 @@
}
function renderAccountContextStrip(account) {
var workspaceLabel = workspaceCountLabel((account.workspaces || []).length);
- return '<section class="portal-account-context"><div class="portal-account-context-copy"><div class="portal-account-context-meta"><span class="account-eyebrow">' + escapeHTML(accountKindLabel(account)) + '</span><span class="portal-account-context-separator">/</span><span class="portal-account-context-access">' + escapeHTML(titleCase(account.role)) + ' access</span></div><div class="portal-account-context-row"><h2>' + escapeHTML(account.name) + '</h2><div class="portal-account-context-chips"><span class="account-context-chip">' + escapeHTML(account.kind_label) + '</span><span class="account-context-chip">' + escapeHTML(titleCase(account.role)) + '</span><span class="account-context-chip">' + escapeHTML(workspaceLabel) + "</span></div></div><p>" + escapeHTML(account.kind === "msp" ? "Operator workspace account" : "Hosted account operations") + "</p></div></section>";
+ var billingLabel = account.has_billing ? "Billing enabled" : "Billing offline";
+ return '<section class="portal-account-context"><div class="portal-account-context-copy"><div class="portal-account-context-meta"><span class="account-eyebrow">' + escapeHTML(accountKindLabel(account)) + '</span><span class="portal-account-context-separator">/</span><span class="portal-account-context-access">' + escapeHTML(titleCase(account.role)) + ' access</span></div><div class="portal-account-context-row"><h2>' + escapeHTML(account.name) + '</h2><div class="portal-account-context-chips"><span class="account-context-chip">' + escapeHTML(account.kind_label) + '</span><span class="account-context-chip">' + escapeHTML(titleCase(account.role)) + '</span><span class="account-context-chip">' + escapeHTML(workspaceLabel) + "</span></div></div><p>" + escapeHTML(account.kind === "msp" ? "Operator workspace account for hosted fleet, team control, and account billing." : "Hosted account operations for workspace access, team control, and billing.") + '</p></div><div class="portal-account-context-summary"><div class="portal-account-context-stat"><span>Role</span><strong>' + escapeHTML(titleCase(account.role)) + '</strong></div><div class="portal-account-context-stat"><span>Hosted fleet</span><strong>' + escapeHTML(workspaceLabel) + '</strong></div><div class="portal-account-context-stat"><span>Commercial</span><strong>' + escapeHTML(billingLabel) + "</strong></div></div></section>";
}
function shellSectionButton(section, activeSection, title, copy, badge) {
var badgeHTML = badge ? '<span class="portal-shell-nav-badge">' + escapeHTML(badge) + "</span>" : "";
diff --git a/internal/cloudcp/portal/frontend/src/shell_view.test.ts b/internal/cloudcp/portal/frontend/src/shell_view.test.ts
index 95214da2bf..fc44c0084d 100644
--- a/internal/cloudcp/portal/frontend/src/shell_view.test.ts
+++ b/internal/cloudcp/portal/frontend/src/shell_view.test.ts
@@ -138,6 +138,8 @@ describe('shell view', function() {
expect(html).toContain('Self-hosted licenses and billing');
expect(html).toContain('portal-account-context');
expect(html).toContain('Owner access');
+ expect(html).toContain('portal-account-context-summary');
+ expect(html).toContain('Billing enabled');
expect(html).toContain('id="accounts-root"');
expect(html).toContain('MSP account');
expect(html).toContain('Acme MSP');
diff --git a/internal/cloudcp/portal/frontend/src/shell_view.ts b/internal/cloudcp/portal/frontend/src/shell_view.ts
index 6e9d60ceeb..e7290afd7a 100644
--- a/internal/cloudcp/portal/frontend/src/shell_view.ts
+++ b/internal/cloudcp/portal/frontend/src/shell_view.ts
@@ -242,6 +242,7 @@ function renderAttentionPanel(workspaces: PortalWorkspaceSummary[]): string {
function renderAccountContextStrip(account: PortalAccountSummary): string {
var workspaceLabel = workspaceCountLabel((account.workspaces || []).length);
+ var billingLabel = account.has_billing ? 'Billing enabled' : 'Billing offline';
return (
'<section class="portal-account-context">' +
@@ -259,7 +260,21 @@ function renderAccountContextStrip(account: PortalAccountSummary): string {
'<span class="account-context-chip">' + escapeHTML(workspaceLabel) + '</span>' +
'</div>' +
'</div>' +
- '<p>' + escapeHTML(account.kind === 'msp' ? 'Operator workspace account' : 'Hosted account operations') + '</p>' +
+ '<p>' + escapeHTML(account.kind === 'msp' ? 'Operator workspace account for hosted fleet, team control, and account billing.' : 'Hosted account operations for workspace access, team control, and billing.') + '</p>' +
+ '</div>' +
+ '<div class="portal-account-context-summary">' +
+ '<div class="portal-account-context-stat">' +
+ '<span>Role</span>' +
+ '<strong>' + escapeHTML(titleCase(account.role)) + '</strong>' +
+ '</div>' +
+ '<div class="portal-account-context-stat">' +
+ '<span>Hosted fleet</span>' +
+ '<strong>' + escapeHTML(workspaceLabel) + '</strong>' +
+ '</div>' +
+ '<div class="portal-account-context-stat">' +
+ '<span>Commercial</span>' +
+ '<strong>' + escapeHTML(billingLabel) + '</strong>' +
+ '</div>' +
'</div>' +
'</section>'
);
diff --git a/internal/cloudcp/portal/frontend/src/styles.css b/internal/cloudcp/portal/frontend/src/styles.css
index a6922aeb1a..ca1b3f6b45 100644
--- a/internal/cloudcp/portal/frontend/src/styles.css
+++ b/internal/cloudcp/portal/frontend/src/styles.css
@@ -428,7 +428,11 @@ header .logout-btn:hover,
}
.portal-account-context {
- padding: 8px 14px 7px;
+ display: grid;
+ grid-template-columns: minmax(0, 1fr) auto;
+ gap: 16px;
+ align-items: start;
+ padding: 12px 14px 12px;
border-bottom: 1px solid var(--line);
background: #fff;
}
@@ -437,6 +441,7 @@ header .logout-btn:hover,
display: flex;
flex-direction: column;
gap: 6px;
+ min-width: 0;
}
.portal-account-context-meta {
@@ -468,7 +473,12 @@ header .logout-btn:hover,
}
.portal-account-context-copy p {
- display: none;
+ display: block;
+ margin: 0;
+ max-width: 720px;
+ font-size: 12px;
+ line-height: 1.45;
+ color: var(--ink-soft);
}
.portal-account-context-chips {
@@ -478,6 +488,37 @@ header .logout-btn:hover,
flex-wrap: wrap;
}
+.portal-account-context-summary {
+ display: grid;
+ grid-template-columns: repeat(3, minmax(108px, auto));
+ gap: 8px;
+}
+
+.portal-account-context-stat {
+ display: flex;
+ flex-direction: column;
+ gap: 5px;
+ min-width: 0;
+ padding: 10px 12px;
+ border: 1px solid var(--line);
+ border-radius: 10px;
+ background: #fbfcfd;
+}
+
+.portal-account-context-stat span {
+ font-size: 10px;
+ font-weight: 800;
+ letter-spacing: 0.1em;
+ text-transform: uppercase;
+ color: var(--ink-muted);
+}
+
+.portal-account-context-stat strong {
+ font-size: 13px;
+ line-height: 1.2;
+ color: var(--ink);
+}
+
.portal-shell[data-shell-section="overview"] .portal-content-panel-overview,
.portal-shell[data-shell-section="services"] .portal-content-panel-services,
.portal-shell[data-shell-section="support"] .portal-content-panel-support,
@@ -2484,6 +2525,14 @@ header .logout-btn:hover,
grid-template-columns: 1fr;
}
+ .portal-account-context {
+ grid-template-columns: 1fr;
+ }
+
+ .portal-account-context-summary {
+ grid-template-columns: 1fr;
+ }
+
.portal-account-context-row,
.account-stage-header-row {
align-items: start;