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 sta… (…
…#11542) * enh(UI): Add a “Parent alias“ column on the monitoring resources status 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 * Update lang/fr_FR.UTF-8/LC_MESSAGES/messages.po Co-authored-by: Tom Darneix <tomdar87@outlook.com> * Update lang/es_ES.UTF-8/LC_MESSAGES/messages.po Co-authored-by: Tom Darneix <tomdar87@outlook.com> * Update lang/pt_PT.UTF-8/LC_MESSAGES/messages.po Co-authored-by: Tom Darneix <tomdar87@outlook.com> * Update lang/es_ES.UTF-8/LC_MESSAGES/messages.po Co-authored-by: Jérémy Delpierre <jdelpierre@users.noreply.github.com> * Update lang/pt_BR.UTF-8/LC_MESSAGES/messages.po Co-authored-by: Jérémy Delpierre <jdelpierre@users.noreply.github.com> * Update lang/fr_FR.UTF-8/LC_MESSAGES/messages.po Co-authored-by: Bruno d'Auria <bdauria@centreon.com> * Fix issue on messages.po file Co-authored-by: Tom Darneix <tomdar87@outlook.com> Co-authored-by: Jérémy Delpierre <jdelpierre@users.noreply.github.com> Co-authored-by: Bruno d'Auria <bdauria@centreon.com>
- Loading branch information
Showing
7 changed files
with
55 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
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
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