Skip to content

Commit

Permalink
Merge pull request #10857 from openshift-cherrypick-robot/cherry-pick…
Browse files Browse the repository at this point in the history
…-10851-to-release-4.9

[release-4.9] Bug 2041434: Monitoring: show a error message if wrong dashboard name is passed to the URL
  • Loading branch information
openshift-merge-robot committed Feb 8, 2022
2 parents 974f11e + 2c94ed8 commit af7a11e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
10 changes: 9 additions & 1 deletion frontend/public/components/monitoring/dashboards/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,15 @@ const FilterSelect: React.FC<FilterSelectProps> = ({
onSelect={onSelect}
onToggle={onToggle}
onTypeaheadInputChanged={(v) => setFilterText(v.toLowerCase())}
placeholderText={items[selectedKey]}
placeholderText={
Object.keys(items).includes(selectedKey) ? (
items[selectedKey]
) : (
<>
<RedExclamationCircleIcon /> {t('public~Select a dashboard from the dropdown')}
</>
)
}
>
{_.map(filteredItems, (v, k) => (
<OptionComponent key={k} itemKey={k} value={v} />
Expand Down
1 change: 1 addition & 0 deletions frontend/public/locales/en/public.json
Original file line number Diff line number Diff line change
Expand Up @@ -908,6 +908,7 @@
"Custom time range": "Custom time range",
"To": "To",
"Filter options": "Filter options",
"Select a dashboard from the dropdown": "Select a dashboard from the dropdown",
"Error loading options": "Error loading options",
"Dashboard": "Dashboard",
"Refresh interval": "Refresh interval",
Expand Down

0 comments on commit af7a11e

Please sign in to comment.