This repository has been archived by the owner on Dec 13, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 240
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
enh(UI): Add a “Parent alias“ column on the monitoring resources stat…
…us page (#11190) * Add column ParentAlias * Add new label ParentAlias * Add column ParentAlias and new column component * Add new card to display Parent Alias * Remove tile in Details Panel, enhancement not expected * FIx eslint issue * Fix naming on label parent alias * Add translation * Add line at the end of files * Add line at the end of file * fix issues
- Loading branch information
1 parent
1afb472
commit bc04335
Showing
8 changed files
with
63 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15127,3 +15127,8 @@ msgstr "" | |
|
||
# msgid "License expired" | ||
# msgstr "" | ||
|
||
# msgid "Parent alias | ||
# msgstr "" | ||
|
||
|
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 |
---|---|---|
|
@@ -15578,3 +15578,8 @@ msgstr "" | |
|
||
# msgid "License expired" | ||
# msgstr "" | ||
|
||
# msgid "Parent alias | ||
# msgstr "" | ||
|
||
|
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 |
---|---|---|
|
@@ -15566,3 +15566,8 @@ msgstr "" | |
|
||
# msgid "License expired" | ||
# msgstr "" | ||
|
||
# msgid "Parent alias | ||
# msgstr "" | ||
|
||
|
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
25 changes: 25 additions & 0 deletions
25
www/front_src/src/Resources/Listing/columns/ParentAlias.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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { Typography } from '@mui/material'; | ||
|
||
import { ComponentColumnProps } from '@centreon/ui'; | ||
|
||
import { useColumnStyles } from '.'; | ||
|
||
const ParentAliasColumn = ({ | ||
row, | ||
}: ComponentColumnProps): JSX.Element | null => { | ||
const classes = useColumnStyles(); | ||
|
||
if (!row.parent) { | ||
return null; | ||
} | ||
|
||
return ( | ||
<div className={classes.resourceDetailsCell}> | ||
<div className={classes.resourceNameItem}> | ||
<Typography variant="body2">{row.parent.alias}</Typography> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default ParentAliasColumn; |
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