generated from cloudoperators/repository-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(ui): commits changes from merged main
- Loading branch information
Showing
135 changed files
with
3,670 additions
and
1,759 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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@cloudoperators/juno-ui-components": minor | ||
--- | ||
|
||
Migrate NativeSelect, NativeSelectionOption and NativeSelectOptionGroup components to TypeScript |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@cloudoperators/juno-ui-components": minor | ||
--- | ||
|
||
Migrate Form, FormRow and FormSection components to TypeScript |
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
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
86 changes: 86 additions & 0 deletions
86
apps/heureka/src/components/services/ComponentInstancesList.jsx
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 |
---|---|---|
@@ -0,0 +1,86 @@ | ||
/* | ||
* SPDX-FileCopyrightText: 2024 SAP SE or an SAP affiliate company and Greenhouse contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
import React from "react" | ||
import { useQuery } from "@tanstack/react-query" | ||
import { | ||
ContentHeading, | ||
Container, | ||
DataGrid, | ||
DataGridRow, | ||
DataGridCell, | ||
DataGridHeadCell, | ||
} from "@cloudoperators/juno-ui-components" | ||
import { useGlobalsQueryClientFnReady, useGlobalsQueryOptions, useGlobalsActions } from "../StoreProvider" | ||
import LoadElement from "../shared/LoadElement" | ||
import { severityString, highestSeverity } from "../shared/Helper" | ||
import PaginationComponent from "../shared/PaginationComponent" | ||
import HintNotFound from "../shared/HintNotFound" | ||
|
||
const ComponentInstancesList = ({ serviceCcrn }) => { | ||
const queryOptions = useGlobalsQueryOptions("ComponentInstancesOfService") | ||
const { setQueryOptions } = useGlobalsActions() | ||
const queryClientFnReady = useGlobalsQueryClientFnReady() | ||
|
||
const { data, isLoading } = useQuery({ | ||
queryKey: [ | ||
"ComponentInstancesOfService", | ||
{ | ||
...queryOptions, | ||
filter: { serviceCcrn: [serviceCcrn] }, | ||
}, | ||
], | ||
enabled: !!queryClientFnReady && !!serviceCcrn, | ||
}) | ||
|
||
const items = data?.ComponentInstances?.edges || [] | ||
|
||
return ( | ||
<> | ||
<ContentHeading className="mt-8 mb-2" heading="Component Instances" /> | ||
<DataGrid columns={4}> | ||
<DataGridRow> | ||
<DataGridHeadCell>Component</DataGridHeadCell> | ||
<DataGridHeadCell>Version</DataGridHeadCell> | ||
<DataGridHeadCell>Total Number of Issues</DataGridHeadCell> | ||
<DataGridHeadCell>Highest Severity</DataGridHeadCell> | ||
</DataGridRow> | ||
{isLoading ? ( | ||
<DataGridRow> | ||
<DataGridCell colSpan={4}> | ||
<Container py> | ||
<LoadElement /> | ||
</Container> | ||
</DataGridCell> | ||
</DataGridRow> | ||
) : items.length === 0 ? ( | ||
<HintNotFound text="No component instances available." /> | ||
) : ( | ||
items.map((componentInstance, i) => ( | ||
<DataGridRow key={i}> | ||
<DataGridCell>{componentInstance?.node?.ccrn}</DataGridCell> | ||
<DataGridCell className="break-all overflow-hidden"> | ||
{componentInstance?.node?.componentVersion?.version} | ||
</DataGridCell> | ||
<DataGridCell>{componentInstance?.node?.issueMatches?.totalCount}</DataGridCell> | ||
<DataGridCell> | ||
{severityString(highestSeverity(componentInstance?.node?.issueMatches?.edges))} | ||
</DataGridCell> | ||
</DataGridRow> | ||
)) | ||
)} | ||
</DataGrid> | ||
<PaginationComponent | ||
queryKey="ComponentInstancesOfService" | ||
queryOptions={queryOptions} | ||
entityName="ComponentInstances" | ||
setQueryOptions={setQueryOptions} | ||
countData={data} | ||
/> | ||
</> | ||
) | ||
} | ||
|
||
export default ComponentInstancesList |
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
Oops, something went wrong.