Skip to content

Commit

Permalink
Add OSS integration status (#49485)
Browse files Browse the repository at this point in the history
- Add to oss features
- Move header null check to parent
  • Loading branch information
michellescripts committed Dec 17, 2024
1 parent a35041a commit fc6c11e
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export function AwsOidcDashboard() {

return (
<FeatureBox css={{ maxWidth: '1400px', paddingTop: '16px' }}>
<AwsOidcHeader integration={attempt.data} />
{attempt.data && <AwsOidcHeader integration={attempt.data} />}
Status for integration type aws-oidc is not supported
</FeatureBox>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,7 @@ import cfg from 'teleport/config';
import { getStatusAndLabel } from 'teleport/Integrations/helpers';
import { Integration } from 'teleport/services/integrations';

export function AwsOidcHeader({
integration,
}: {
integration: Integration | null;
}) {
export function AwsOidcHeader({ integration }: { integration: Integration }) {
const { status, labelKind } = getStatusAndLabel(integration);
return (
<Flex alignItems="center">
Expand All @@ -45,7 +41,7 @@ export function AwsOidcHeader({
</ButtonIcon>
</HoverTooltip>
<Text bold fontSize={6} mr={2}>
{integration?.name}
{integration.name}
</Text>
<Label kind={labelKind} aria-label="status" px={3}>
{status}
Expand Down
19 changes: 19 additions & 0 deletions web/packages/teleport/src/features.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ import {
import { NavigationCategory as SideNavigationCategory } from 'teleport/Navigation/SideNavigation/categories';
import { IntegrationEnroll } from '@gravitational/teleport/src/Integrations/Enroll';

import { IntegrationStatus } from 'teleport/Integrations/IntegrationStatus';

import { NavTitle } from './types';

import { AuditContainer as Audit } from './Audit';
Expand Down Expand Up @@ -632,6 +634,22 @@ class FeatureDeviceTrust implements TeleportFeature {
};
}

class FeatureIntegrationStatus implements TeleportFeature {
category = NavigationCategory.Management;

parent = FeatureIntegrations;

route = {
title: 'Integration Status',
path: cfg.routes.integrationStatus,
component: IntegrationStatus,
};

hasAccess() {
return true;
}
}

// ****************************
// Other Features
// ****************************
Expand Down Expand Up @@ -706,6 +724,7 @@ export function getOSSFeatures(): TeleportFeature[] {
new FeatureIntegrations(),
new FeatureClusters(),
new FeatureTrust(),
new FeatureIntegrationStatus(),

// - Identity
new AccessRequests(),
Expand Down

0 comments on commit fc6c11e

Please sign in to comment.