mirror of
https://github.com/Unleash/unleash.git
synced 2025-11-24 20:06:55 +01:00
chore: show hosting in connected edges (#10995)
https://linear.app/unleash/issue/2-4037/show-hosting-in-connected-edges-edge-observability Show "hosting" in Connected Edges. This can be one of: - Cloud - Self-hosted - Unknown <img width="326" height="691" alt="image" src="https://github.com/user-attachments/assets/baba1fbb-6f22-46f5-8271-4f4a0c3fcc8a" />
This commit is contained in:
parent
35680f87eb
commit
416bd27859
@ -82,6 +82,19 @@ const StyledBadge = styled(Badge)(({ theme }) => ({
|
||||
padding: theme.spacing(0, 1),
|
||||
}));
|
||||
|
||||
const getHosting = ({
|
||||
hosting,
|
||||
}: ConnectedEdge): 'Cloud' | 'Self-hosted' | 'Unknown' => {
|
||||
switch (hosting) {
|
||||
case 'hosted':
|
||||
return 'Cloud';
|
||||
case 'enterprise-self-hosted':
|
||||
return 'Self-hosted';
|
||||
default:
|
||||
return hosting ? `Unknown: ${hosting}` : 'Unknown';
|
||||
}
|
||||
};
|
||||
|
||||
const getConnectionStatus = ({
|
||||
reportedAt,
|
||||
}: ConnectedEdge): InstanceConnectionStatus => {
|
||||
@ -178,6 +191,10 @@ export const NetworkConnectedEdgeInstance = ({
|
||||
<strong>Region</strong>
|
||||
<span>{instance.region || 'Unknown'}</span>
|
||||
</StyledDetailRow>
|
||||
<StyledDetailRow>
|
||||
<strong>Hosting</strong>
|
||||
<span>{getHosting(instance)}</span>
|
||||
</StyledDetailRow>
|
||||
<StyledDetailRow>
|
||||
<strong>Version</strong>
|
||||
<span>{instance.edgeVersion}</span>
|
||||
|
||||
@ -5,6 +5,7 @@ export type ConnectedEdge = {
|
||||
edgeVersion: string;
|
||||
instanceId: string;
|
||||
region: string | null;
|
||||
hosting?: 'hosted' | 'enterprise-self-hosted';
|
||||
reportedAt: string;
|
||||
started: string;
|
||||
connectedVia?: string;
|
||||
|
||||
19
src/migrations/20251118131212-edge-observability-hosting.js
Normal file
19
src/migrations/20251118131212-edge-observability-hosting.js
Normal file
@ -0,0 +1,19 @@
|
||||
exports.up = function(db, cb) {
|
||||
db.runSql(
|
||||
`
|
||||
ALTER TABLE stat_edge_observability
|
||||
ADD COLUMN hosting TEXT;
|
||||
`,
|
||||
cb,
|
||||
);
|
||||
};
|
||||
|
||||
exports.down = function(db, cb) {
|
||||
db.runSql(
|
||||
`
|
||||
ALTER TABLE stat_edge_observability
|
||||
DROP COLUMN IF EXISTS hosting;
|
||||
`,
|
||||
cb,
|
||||
);
|
||||
};
|
||||
Loading…
Reference in New Issue
Block a user