Skip to content

Commit

Permalink
[Backport 2.x] [BUG-Fixed] #1466 - create observability dashboard aft…
Browse files Browse the repository at this point in the history
…er invalid name (#1928)

### Fix for [BUG] Cannot create observability dashboard after creating with invalid name #1466 - #1466

### Description
Cannot create Observability Dashboards after creating with an Invalid Name

### Issues Resolved
Dialog asking user to input Dashboard Name even if invalid Dashboard name is entered

### Check List
- [x] New functionality includes testing.
  - [x] All tests pass, including unit test, integration test and doctest
- [ ] New functionality has been documented.
  - [ ] New functionality has javadoc added
  - [ ] New functionality has user manual doc added
- [x] Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check [here](https://github.com/opensearch-project/OpenSearch/blob/main/CONTRIBUTING.md#developer-certificate-of-origin).


(cherry picked from commit b328720)

Signed-off-by: Mahima Arora <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Shenoy Pratik <[email protected]>
Co-authored-by: Jialiang Liang <[email protected]>
  • Loading branch information
4 people authored Nov 6, 2024
1 parent d74b24f commit c610b81
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions public/components/custom_panels/custom_panel_table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,8 @@ export const CustomPanelTable = ({

const onCreate = async (newCustomPanelName: string) => {
if (!isNameValid(newCustomPanelName)) {
setToast('Invalid Dashboard name', 'danger');
setToast('Invalid Dashboard Name', 'danger');
history.goBack();
} else {
const newPanel = newPanelTemplate(newCustomPanelName);
dispatch(createPanel(newPanel));
Expand All @@ -130,7 +131,7 @@ export const CustomPanelTable = ({

const onRename = async (newCustomPanelName: string) => {
if (!isNameValid(newCustomPanelName)) {
setToast('Invalid Dashboard name', 'danger');
setToast('Invalid Dashboard Name', 'danger');
} else {
dispatch(renameCustomPanel(newCustomPanelName, selectedCustomPanels[0].id));
}
Expand All @@ -139,7 +140,7 @@ export const CustomPanelTable = ({

const onClone = async (newName: string) => {
if (!isNameValid(newName)) {
setToast('Invalid Operational Panel name', 'danger');
setToast('Invalid Operational Panel Name', 'danger');
} else {
let sourcePanel = selectedCustomPanels[0];
try {
Expand Down

0 comments on commit c610b81

Please sign in to comment.