SigNoz is an open-source, OpenTelemetry-native observability platform for your team and their AI agents. Get logs, metrics, and traces in one tool with features like APM, distributed tracing, log management, infra monitoring, etc. Combined with SigNoz MCP and a native AI teammate (in SigNoz Cloud) it helps you build more resilient apps.
TypeScript apmapplication-monitoringdistributed-tracinggogood-first-issuejaegerloglogsmetricsmonitoringnextjsobservabilityopen-sourceopentelemetryprometheusreactreactjsself-hostedtracingtypescript
fix: update app layout height based on banners visible (#8307)
Yunus M1ee1ca795130
diff --git a/frontend/src/container/AppLayout/AppLayout.styles.scss b/frontend/src/container/AppLayout/AppLayout.styles.scssindex df1a1b741f..e164082d43 100644--- a/frontend/src/container/AppLayout/AppLayout.styles.scss+++ b/frontend/src/container/AppLayout/AppLayout.styles.scss@@ -1,8 +1,34 @@+.app-banner-container {+ position: relative;+ width: 100%;+}+.app-layout {position: relative;height: 100%;width: 100%;+ &.isWorkspaceRestricted {+ height: calc(100% - 32px);++ // same styles as its either trial expired or payment failed+ &.isTrialExpired {+ height: calc(100% - 64px);+ }++ &.isPaymentFailed {+ height: calc(100% - 64px);+ }+ }++ &.isTrialExpired {+ height: calc(100% - 32px);+ }++ &.isPaymentFailed {+ height: calc(100% - 32px);+ }+.app-content {width: calc(100% - 64px); // width of the sidebarz-index: 0;@@ -163,3 +189,9 @@text-underline-offset: 2px;}}++.workspace-restricted-banner,+.trial-expiry-banner,+.payment-failed-banner {+ height: 32px;+}diff --git a/frontend/src/container/AppLayout/index.tsx b/frontend/src/container/AppLayout/index.tsxindex 6e0b3b4348..55da9718ae 100644--- a/frontend/src/container/AppLayout/index.tsx+++ b/frontend/src/container/AppLayout/index.tsx@@ -600,53 +600,63 @@ function AppLayout(props: AppLayoutProps): JSX.Element {(preference) => preference.name === USER_PREFERENCES.SIDENAV_PINNED,)?.value as boolean;+ const SHOW_TRIAL_EXPIRY_BANNER =+ showTrialExpiryBanner && !showPaymentFailedWarning;+ const SHOW_WORKSPACE_RESTRICTED_BANNER = showWorkspaceRestricted;+ const SHOW_PAYMENT_FAILED_BANNER =+ !showTrialExpiryBanner && showPaymentFailedWarning;+return (<Layout className={cx(isDarkMode ? 'darkMode dark' : 'lightMode')}><Helmet><title>{pageTitle}</title></Helmet>- {showTrialExpiryBanner && !showPaymentFailedWarning && (- <div className="trial-expiry-banner">- You are in free trial period. Your free trial will end on{' '}- <span>{getFormattedDate(trialInfo?.trialEnd || Date.now())}.</span>- {user.role === USER_ROLES.ADMIN ? (- <span>- {' '}- Please{' '}- <a className="upgrade-link" onClick={handleUpgrade}>- upgrade- </a>- to continue using SigNoz features.- </span>- ) : (- 'Please contact your administrator for upgrading to a paid plan.'+ {isLoggedIn && (+ <div className={cx('app-banner-container')}>+ {SHOW_TRIAL_EXPIRY_BANNER && (+ <div className="trial-expiry-banner">+ You are in free trial period. Your free trial will end on{' '}+ <span>{getFormattedDate(trialInfo?.trialEnd || Date.now())}.</span>+ {user.role === USER_ROLES.ADMIN ? (+ <span>+ {' '}+ Please{' '}+ <a className="upgrade-link" onClick={handleUpgrade}>+ upgrade+ </a>+ to continue using SigNoz features.+ </span>+ ) : (+ 'Please contact your administrator for upgrading to a paid plan.'+ )}+ </div>)}- </div>- )}- {showWorkspaceRestricted && renderWorkspaceRestrictedBanner()}+ {SHOW_WORKSPACE_RESTRICTED_BANNER && renderWorkspaceRestrictedBanner()}- {!showTrialExpiryBanner && showPaymentFailedWarning && (- <div className="payment-failed-banner">- Your bill payment has failed. Your workspace will get suspended on{' '}- <span>- {getFormattedDateWithMinutes(- dayjs(activeLicense?.event_queue?.scheduled_at).unix() || Date.now(),- )}- .- </span>- {user.role === USER_ROLES.ADMIN ? (- <span>- {' '}- Please{' '}- <a className="upgrade-link" onClick={handleFailedPayment}>- pay the bill- </a>- to continue using SigNoz features.- </span>- ) : (- ' Please contact your administrator to pay the bill.'+ {SHOW_PAYMENT_FAILED_BANNER && (+ <div className="payment-failed-banner">+ Your bill payment has failed. Your workspace will get suspended on{' '}+ <span>+ {getFormattedDateWithMinutes(+ dayjs(activeLicense?.event_queue?.scheduled_at).unix() || Date.now(),+ )}+ .+ </span>+ {user.role === USER_ROLES.ADMIN ? (+ <span>+ {' '}+ Please{' '}+ <a className="upgrade-link" onClick={handleFailedPayment}>+ pay the bill+ </a>+ to continue using SigNoz features.+ </span>+ ) : (+ ' Please contact your administrator to pay the bill.'+ )}+ </div>)}</div>)}@@ -656,6 +666,9 @@ function AppLayout(props: AppLayoutProps): JSX.Element {'app-layout',isDarkMode ? 'darkMode dark' : 'lightMode',sideNavPinned ? 'side-nav-pinned' : '',+ SHOW_WORKSPACE_RESTRICTED_BANNER ? 'isWorkspaceRestricted' : '',+ SHOW_TRIAL_EXPIRY_BANNER ? 'isTrialExpired' : '',+ SHOW_PAYMENT_FAILED_BANNER ? 'isPaymentFailed' : '',)}>{isToDisplayLayout && !renderFullScreen && (