fix: add unsaved changes banners to edit mode forms
Adds amber edit-mode banners to AppConfigDetailPage and both DefaultResourcesSection/JarRetentionSection in EnvironmentsPage, matching the existing ConfigSubTab pattern. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -6,6 +6,7 @@ import {
|
||||
Button,
|
||||
ConfirmDialog,
|
||||
DataTable,
|
||||
EmptyState,
|
||||
Input,
|
||||
MonoText,
|
||||
SectionHeader,
|
||||
@@ -714,7 +715,7 @@ function OverviewSubTab({ app, deployments, versions, environments, envMap, sele
|
||||
<span className={tableStyles.tableTitle}>Deployments</span>
|
||||
</div>
|
||||
{deploymentRows.length === 0
|
||||
? <p className={styles.emptyNote} style={{ padding: '12px 16px', margin: 0 }}>No deployments yet.</p>
|
||||
? <EmptyState title="No deployments" description="Deploy this application to see deployment history." />
|
||||
: <DataTable<DeploymentRow> columns={deploymentColumns} data={deploymentRows} flush />
|
||||
}
|
||||
</div>
|
||||
@@ -726,7 +727,7 @@ function OverviewSubTab({ app, deployments, versions, environments, envMap, sele
|
||||
))}
|
||||
|
||||
<SectionHeader>Versions ({versions.length})</SectionHeader>
|
||||
{versions.length === 0 && <p className={styles.emptyNote}>No versions uploaded yet.</p>}
|
||||
{versions.length === 0 && <EmptyState title="No versions" description="Upload a JAR to create the first version." />}
|
||||
{versions.map((v) => (
|
||||
<VersionRow key={v.id} version={v} environments={environments} onDeploy={(envId) => onDeploy(v.id, envId)} />
|
||||
))}
|
||||
@@ -1005,7 +1006,7 @@ function ConfigSubTab({ app, environment }: { app: App; environment?: Environmen
|
||||
{editing && (
|
||||
<Button size="sm" variant="secondary" onClick={() => setEnvVars([...envVars, { key: '', value: '' }])}>+ Add Variable</Button>
|
||||
)}
|
||||
{envVars.length === 0 && !editing && <p className={styles.emptyNote}>No environment variables configured.</p>}
|
||||
{envVars.length === 0 && !editing && <EmptyState title="No variables" description="No environment variables configured." />}
|
||||
</div>
|
||||
)}
|
||||
|
||||
@@ -1075,7 +1076,7 @@ function ConfigSubTab({ app, environment }: { app: App; environment?: Environmen
|
||||
<span className={styles.sectionSummary}>{tracedCount} traced · {tapCount} taps</span>
|
||||
{tracedTapRows.length > 0
|
||||
? <DataTable<TracedTapRow> columns={tracedTapColumns} data={tracedTapRows} pageSize={20} flush />
|
||||
: <p className={styles.emptyNote}>No processor traces or taps configured.</p>}
|
||||
: <EmptyState title="No traces or taps" description="No processor traces or taps configured." />}
|
||||
</div>
|
||||
)}
|
||||
|
||||
@@ -1085,7 +1086,7 @@ function ConfigSubTab({ app, environment }: { app: App; environment?: Environmen
|
||||
<span className={styles.sectionSummary}>{recordingCount} of {routeRecordingRows.length} routes recording</span>
|
||||
{routeRecordingRows.length > 0
|
||||
? <DataTable<RouteRecordingRow> columns={routeRecordingColumns} data={routeRecordingRows} pageSize={20} flush />
|
||||
: <p className={styles.emptyNote}>No routes found for this application.</p>}
|
||||
: <EmptyState title="No routes" description="No routes found for this application. Routes appear once agents report data." />}
|
||||
</div>
|
||||
)}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user