Skip to content

Commit

Permalink
[BUG-Fixed] opensearch-project#1466 - create observability dashboard …
Browse files Browse the repository at this point in the history
…after creating with Invalid name (opensearch-project#1730)

### Fix for [BUG] Cannot create observability dashboard after creating with invalid name opensearch-project#1466 - opensearch-project#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).

Signed-off-by: Mahima Arora <[email protected]>
  • Loading branch information
Mahima081 authored Jun 28, 2024
1 parent 47e8578 commit b328720
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 @@ -122,7 +122,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 @@ -132,7 +133,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 @@ -141,7 +142,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 b328720

Please sign in to comment.