Skip to content

Commit

Permalink
[v17] render AWS account icon for Identity Center account app (#50284)
Browse files Browse the repository at this point in the history
* aws account icon for identity center account app

* remove svg class
  • Loading branch information
flyinghermit authored Dec 16, 2024
1 parent 150dbcb commit 73fd067
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 1 deletion.
6 changes: 6 additions & 0 deletions web/packages/design/src/ResourceIcon/assets/aws-account.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions web/packages/design/src/ResourceIcon/icons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ import auth0Light from './assets/auth0-light.svg';
import avalara from './assets/avalara.svg';
import awsDark from './assets/aws-dark.svg';
import awsLight from './assets/aws-light.svg';
import awsAccount from './assets/aws-account.svg';
import azure from './assets/azure.svg';
import bill from './assets/bill.svg';
import bonusly from './assets/bonusly.svg';
Expand Down Expand Up @@ -333,6 +334,7 @@ export {
avalara,
awsDark,
awsLight,
awsAccount,
azure,
bill,
bonusly,
Expand Down
1 change: 1 addition & 0 deletions web/packages/design/src/ResourceIcon/resourceIconSpecs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ export const resourceIconSpecs = {
auth0: { dark: i.auth0Dark, light: i.auth0Light },
avalara: forAllThemes(i.avalara),
aws: { dark: i.awsDark, light: i.awsLight },
awsaccount: forAllThemes(i.awsAccount),
azure: forAllThemes(i.azure),

bill: forAllThemes(i.bill),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,12 @@ import {
iconNames,
} from 'design/ResourceIcon';

import { AppSubKind } from 'teleport/services/apps';

import { UnifiedResourceApp } from '../types';

export function guessAppIcon(resource: UnifiedResourceApp): ResourceIconName {
const { awsConsole = false, name, friendlyName, labels } = resource;
const { awsConsole = false, name, friendlyName, labels, subKind } = resource;

// Label matching takes precedence and we can assume it can be a direct lookup
// since we expect a certain format.
Expand All @@ -41,6 +43,9 @@ export function guessAppIcon(resource: UnifiedResourceApp): ResourceIconName {
if (awsConsole) {
return 'aws';
}
if (subKind === AppSubKind.AwsIcAccount) {
return 'awsaccount';
}

const app = {
name: withoutWhiteSpaces(name)?.toLocaleLowerCase(),
Expand Down

0 comments on commit 73fd067

Please sign in to comment.