Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add OSS integration status #49485

Merged
merged 1 commit into from
Nov 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -47,6 +47,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 @@ -628,6 +630,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 @@ -702,6 +720,7 @@ export function getOSSFeatures(): TeleportFeature[] {
new FeatureIntegrations(),
new FeatureClusters(),
new FeatureTrust(),
new FeatureIntegrationStatus(),

// - Identity
new AccessRequests(),
Expand Down
Loading