Skip to content

Commit

Permalink
mark 'eol' tag to be colored red same as 'deprecated' tag
Browse files Browse the repository at this point in the history
  • Loading branch information
kzailac committed Mar 30, 2022
1 parent 9aabb5b commit 93aecc8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions poem/Poem/frontend/react/Metrics.js
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ export const ListOfMetrics = (props) => {
<Badge color='dark'>none</Badge>
:
row.value.map((tag, i) =>
<Badge className={'me-1'} key={i} color={tag === 'internal' ? 'success' : tag === 'deprecated' ? 'danger' : 'secondary'}>
<Badge className={'me-1'} key={i} color={tag === 'internal' ? 'success' : tag === 'deprecated' | tag === 'eol' ? 'danger' : 'secondary'}>
{tag}
</Badge>
)
Expand Down Expand Up @@ -758,7 +758,7 @@ export const ListOfMetrics = (props) => {

const styles = {
multiValue: (base, state) => {
return (state.data.value === 'internal') ? { ...base, backgroundColor: '#d4edda' } : (state.data.value === 'deprecated') ? { ...base, backgroundColor: '#f8d7da' } : base;
return (state.data.value === 'internal') ? { ...base, backgroundColor: '#d4edda' } : (state.data.value === 'deprecated' | state.data.value === 'eol') ? { ...base, backgroundColor: '#f8d7da' } : base;
},
};

Expand Down Expand Up @@ -988,13 +988,13 @@ export const MetricForm =
:
(obj_label === 'metrictemplate' && !isHistory) ?
props.values.tags.map((tag, i) =>
<Badge className={'me-1'} key={i} color={tag.value === 'internal' ? 'success' : tag.value === 'deprecated' ? 'danger' : 'secondary'}>
<Badge className={'me-1'} key={i} color={tag.value === 'internal' ? 'success' : tag.value === 'deprecated' | tag.value === 'eol' ? 'danger' : 'secondary'}>
{tag.value}
</Badge>
)
:
props.values.tags.map((tag, i) =>
<Badge className={'me-1'} key={i} color={tag === 'internal' ? 'success' : tag === 'deprecated' ? 'danger' : 'secondary'}>
<Badge className={'me-1'} key={i} color={tag === 'internal' ? 'success' : tag === 'deprecated' | tag === 'eol' ? 'danger' : 'secondary'}>
{tag}
</Badge>
)
Expand Down

0 comments on commit 93aecc8

Please sign in to comment.