-
Notifications
You must be signed in to change notification settings - Fork 206
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #347 from alonkeyval/TASK-142-display-source-manag…
…e-list Task 142 display source manage list
- Loading branch information
Showing
10 changed files
with
55 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
export { SOURCES_LOGOS } from "./sources.card/sources.card"; | ||
export { LANGUAGES_LOGOS } from "./sources.card/sources.card"; |
14 changes: 8 additions & 6 deletions
14
frontend/webapp/assets/images/sources.card/sources.card.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
export const SOURCES_LOGOS = { | ||
java: "https://odigos-sources.s3.amazonaws.com/java.svg", | ||
go: "https://odigos-sources.s3.amazonaws.com/go.svg", | ||
javascript: "https://odigos-sources.s3.amazonaws.com/nodejs.svg", | ||
python: "https://odigos-sources.s3.amazonaws.com/python.svg", | ||
dotnet: "https://odigos-sources.s3.amazonaws.com/dotnet.svg", | ||
const BASE_URL = "https://d1n7d4xz7fr8b4.cloudfront.net/"; | ||
|
||
export const LANGUAGES_LOGOS = { | ||
java: `${BASE_URL}java.svg`, | ||
go: `${BASE_URL}go.svg`, | ||
javascript: `${BASE_URL}nodejs.svg`, | ||
python: `${BASE_URL}python.svg`, | ||
dotnet: `${BASE_URL}dotnet.svg`, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 27 additions & 16 deletions
43
frontend/webapp/components/overview/sources/sources.manage.list/sources.manage.list.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,35 @@ | ||
import React from "react"; | ||
import { ManagedListWrapper, EmptyListWrapper } from "./sources.manage.styled"; | ||
import { | ||
ManagedListWrapper, | ||
EmptyListWrapper, | ||
ManagedContainer, | ||
} from "./sources.manage.styled"; | ||
import Empty from "@/assets/images/empty-list.svg"; | ||
import SourceManagedCard from "./sources.manage.card"; | ||
import { ManagedSource } from "@/types/sources"; | ||
import { KeyvalText } from "@/design.system"; | ||
import { OVERVIEW } from "@/utils/constants"; | ||
|
||
export function SourcesManagedList({ data = [1, 1, 1, 1] }) { | ||
function renderDestinations() { | ||
return data.map((source: any) => <SourceManagedCard />); | ||
interface SourcesManagedListProps { | ||
data: ManagedSource[]; | ||
} | ||
|
||
export function SourcesManagedList({ data = [] }: SourcesManagedListProps) { | ||
function renderSources() { | ||
return data.map((source: ManagedSource) => ( | ||
<SourceManagedCard item={source} /> | ||
)); | ||
} | ||
|
||
return ( | ||
<> | ||
<ManagedListWrapper> | ||
{data?.length === 0 ? ( | ||
<EmptyListWrapper> | ||
<Empty /> | ||
</EmptyListWrapper> | ||
) : ( | ||
renderDestinations() | ||
)} | ||
</ManagedListWrapper> | ||
</> | ||
return data.length === 0 ? ( | ||
<EmptyListWrapper> | ||
<Empty /> | ||
</EmptyListWrapper> | ||
) : ( | ||
<ManagedContainer> | ||
<KeyvalText>{`${data.length} ${OVERVIEW.MENU.SOURCES}`}</KeyvalText> | ||
<br /> | ||
<ManagedListWrapper>{renderSources()}</ManagedListWrapper> | ||
</ManagedContainer> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
export const KIND_COLORS = { | ||
deployment: "#203548", | ||
daemonSet: "#033869", | ||
daemonset: "#033869", | ||
statefulset: "#0F2C3F", | ||
}; |