Skip to content

Commit

Permalink
Rename Panels => Observability Dashboard
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Fitzgibbons <[email protected]>
  • Loading branch information
Peter Fitzgibbons committed Apr 18, 2023
1 parent 43f3ec4 commit 09e0a63
Show file tree
Hide file tree
Showing 10 changed files with 63 additions and 60 deletions.
28 changes: 15 additions & 13 deletions public/components/custom_panels/custom_panel_table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ export const CustomPanelTable = ({
};

const onDelete = async () => {
const toastMessage = `Custom Panels ${
const toastMessage = `Observability Dashboards ${
selectedCustomPanels.length > 1 ? 's' : ' ' + selectedCustomPanels[0].title
} successfully deleted!`;
const PanelList = selectedCustomPanels.map((panel) => panel.id);
Expand All @@ -153,7 +153,7 @@ export const CustomPanelTable = ({
history.goBack();
},
'Name',
'Create operational panel',
'Create Observability Dashboard',
'Cancel',
'Create',
undefined,
Expand All @@ -169,7 +169,7 @@ export const CustomPanelTable = ({
onRename,
closeModal,
'Name',
'Rename Panel',
'Rename Dashboard',
'Cancel',
'Rename',
selectedCustomPanels[0].title,
Expand All @@ -185,7 +185,7 @@ export const CustomPanelTable = ({
onClone,
closeModal,
'Name',
'Duplicate Panel',
'Duplicate Dashboard',
'Cancel',
'Duplicate',
selectedCustomPanels[0].title + ' (copy)',
Expand All @@ -196,7 +196,9 @@ export const CustomPanelTable = ({
};

const deletePanel = () => {
const customPanelString = `operational panel${selectedCustomPanels.length > 1 ? 's' : ''}`;
const customPanelString = `Observability Dashboard${
selectedCustomPanels.length > 1 ? 's' : ''
}`;
setModalLayout(
<DeleteModal
onConfirm={onDelete}
Expand Down Expand Up @@ -318,14 +320,14 @@ export const CustomPanelTable = ({
<EuiPageContentHeaderSection>
<EuiTitle size="s">
<h3>
Panels
Dashboard
<span className="panel-header-count"> ({customPanels.length})</span>
</h3>
</EuiTitle>
<EuiSpacer size="s" />
<EuiText size="s" color="subdued">
Use Operational panels to create and view different visualizations on ingested
observability data, using PPL (Piped Processing Language) queries.{' '}
Use Observability Dashboard to create and view different visualizations on
ingested observability data, using PPL (Piped Processing Language) queries.{' '}
<EuiLink external={true} href={CUSTOM_PANELS_DOCUMENTATION_URL} target="blank">
Learn more
</EuiLink>
Expand All @@ -345,7 +347,7 @@ export const CustomPanelTable = ({
</EuiFlexItem>
<EuiFlexItem>
<EuiButton fill href="#/create" data-test-subj="customPanels__createNewPanels">
Create panel
Create Dashboard
</EuiButton>
</EuiFlexItem>
</EuiFlexGroup>
Expand All @@ -357,7 +359,7 @@ export const CustomPanelTable = ({
<EuiFieldSearch
fullWidth
data-test-subj="operationalPanelSearchBar"
placeholder="Search operational panel name"
placeholder="Search Observability Dashboard name"
value={searchQuery}
onChange={(e) => setSearchQuery(e.target.value)}
/>
Expand Down Expand Up @@ -395,10 +397,10 @@ export const CustomPanelTable = ({
<>
<EuiSpacer size="xxl" />
<EuiText textAlign="center">
<h2 data-test-subj="customPanels__noPanelsHome">No Operational Panels</h2>
<h2 data-test-subj="customPanels__noPanelsHome">No Observability Dashboards</h2>
<EuiSpacer size="m" />
<EuiText color="subdued">
Use operational panels to dive deeper into observability
Use Observability Dashboards to dive deeper into observability
<br />
using PPL queries and insightful visualizations
</EuiText>
Expand All @@ -411,7 +413,7 @@ export const CustomPanelTable = ({
fullWidth={false}
href="#/create"
>
Create panel
Create Dashboard
</EuiButton>
</EuiFlexItem>
<EuiFlexItem grow={false}>
Expand Down
26 changes: 13 additions & 13 deletions public/components/custom_panels/custom_panel_view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ import { DeleteModal } from '../common/helpers/delete_modal';
import { coreRefs } from '../../framework/core_refs';

/*
* "CustomPanelsView" module used to render an Operational Panel
* "CustomPanelsView" module used to render an Observability Dashboard
*
* Props taken in as params are:
* panelId: Name of the panel opened
Expand Down Expand Up @@ -196,7 +196,7 @@ export const CustomPanelView = (props: CustomPanelViewProps) => {
setPanelVisualizations(res.operationalPanel.visualizations);
})
.catch((err) => {
console.error('Issue in fetching the operational panels', err);
console.error('Issue in fetching the Observability Dashboards', err);
});
};

Expand Down Expand Up @@ -244,7 +244,7 @@ export const CustomPanelView = (props: CustomPanelViewProps) => {
onConfirm={onDelete}
onCancel={closeModal}
title={`Delete ${openPanelName}`}
message={`Are you sure you want to delete this Operational Panel?`}
message={`Are you sure you want to delete this Observability Dashboard?`}
/>
);
showModal();
Expand All @@ -263,7 +263,7 @@ export const CustomPanelView = (props: CustomPanelViewProps) => {
onRename,
closeModal,
'Name',
'Rename Panel',
'Rename Dashboard',
'Cancel',
'Rename',
openPanelName,
Expand Down Expand Up @@ -295,7 +295,7 @@ export const CustomPanelView = (props: CustomPanelViewProps) => {
onClone,
closeModal,
'Name',
'Duplicate Panel',
'Duplicate Dashboard',
'Cancel',
'Duplicate',
openPanelName + ' (copy)',
Expand Down Expand Up @@ -401,7 +401,7 @@ export const CustomPanelView = (props: CustomPanelViewProps) => {
setOnRefresh(!onRefresh);
})
.catch((err) => {
setToast('Error is adding filters to the operational panel', 'danger');
setToast('Error is adding filters to the Observability Dashboard', 'danger');
console.error(err.body.message);
});
};
Expand All @@ -419,7 +419,7 @@ export const CustomPanelView = (props: CustomPanelViewProps) => {
setToast(`Visualization ${visualzationTitle} successfully added!`, 'success');
})
.catch((err) => {
setToast(`Error in adding ${visualzationTitle} visualization to the panel`, 'danger');
setToast(`Error in adding ${visualzationTitle} visualization to the Dashboard`, 'danger');
console.error(err);
});
};
Expand Down Expand Up @@ -472,7 +472,7 @@ export const CustomPanelView = (props: CustomPanelViewProps) => {
onClick={() => setPanelsMenuPopover(true)}
disabled={addVizDisabled}
>
Panel actions
Dashboard Actions
</EuiButton>
);

Expand Down Expand Up @@ -507,31 +507,31 @@ export const CustomPanelView = (props: CustomPanelViewProps) => {
title: 'Panel actions',
items: [
{
name: 'Reload panel',
name: 'Reload Dashboard',
'data-test-subj': 'reloadPanelContextMenuItem',
onClick: () => {
setPanelsMenuPopover(false);
fetchCustomPanel();
},
},
{
name: 'Rename panel',
name: 'Rename Dashboard',
'data-test-subj': 'renamePanelContextMenuItem',
onClick: () => {
setPanelsMenuPopover(false);
renamePanel();
},
},
{
name: 'Duplicate panel',
name: 'Duplicate Dashboard',
'data-test-subj': 'duplicatePanelContextMenuItem',
onClick: () => {
setPanelsMenuPopover(false);
clonePanel();
},
},
{
name: 'Delete panel',
name: 'Delete Dashboard',
'data-test-subj': 'deletePanelContextMenuItem',
onClick: () => {
setPanelsMenuPopover(false);
Expand All @@ -542,7 +542,7 @@ export const CustomPanelView = (props: CustomPanelViewProps) => {
},
];

// Fetch the custom panel on Initial Mount
// Fetch the Observability Dashboard on Initial Mount
useEffect(() => {
fetchCustomPanel();
}, [panelId]);
Expand Down
28 changes: 14 additions & 14 deletions public/components/custom_panels/custom_panel_view_so.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ import {
import { coreRefs } from '../../framework/core_refs';

/*
* "CustomPanelsView" module used to render an Operational Panel
* "CustomPanelsView" module used to render an Observability Dashboard
*
* Props taken in as params are:
* panelId: Name of the panel opened
Expand Down Expand Up @@ -220,15 +220,15 @@ export const CustomPanelViewSO = (props: CustomPanelViewProps) => {
onConfirm={onDelete}
onCancel={closeModal}
title={`Delete ${panel?.title}`}
message={`Are you sure you want to delete this Operational Panel?`}
message={`Are you sure you want to delete this Observability Dashboard?`}
/>
);
showModal();
};

const renameCustomPanel = (editedCustomPanelName: string) => {
if (!isNameValid(editedCustomPanelName)) {
setToast('Invalid Custom Panel name', 'danger');
setToast('Invalid Observability Dashboard name', 'danger');
return Promise.reject();
}

Expand All @@ -238,11 +238,11 @@ export const CustomPanelViewSO = (props: CustomPanelViewProps) => {
.update(CUSTOM_PANELS_SAVED_OBJECT_TYPE, panel.id, panel)
.then((res) => {
setOpenPanelName(editedCustomPanelName);
setToast(`Operational Panel successfully renamed into "${editedCustomPanelName}"`);
setToast(`Observability Dashboard successfully renamed into "${editedCustomPanelName}"`);
})
.catch((err) => {
setToast(
'Error renaming Operational Panel, please make sure you have the correct permission.',
'Error renaming Observability Dashboard, please make sure you have the correct permission.',
'danger'
);
console.error(err.body.message);
Expand All @@ -260,7 +260,7 @@ export const CustomPanelViewSO = (props: CustomPanelViewProps) => {
onRename,
closeModal,
'Name',
'Rename Panel',
'Rename Dashboard',
'Cancel',
'Rename',
panel.title,
Expand All @@ -283,7 +283,7 @@ export const CustomPanelViewSO = (props: CustomPanelViewProps) => {
onClone,
closeModal,
'Name',
'Duplicate Panel',
'Duplicate Dashboard',
'Cancel',
'Duplicate',
panel.title + ' (copy)',
Expand Down Expand Up @@ -466,7 +466,7 @@ export const CustomPanelViewSO = (props: CustomPanelViewProps) => {
onClick={() => setPanelsMenuPopover(true)}
disabled={addVizDisabled}
>
Panel actions
Dashboard Actions
</EuiButton>
);

Expand All @@ -489,7 +489,7 @@ export const CustomPanelViewSO = (props: CustomPanelViewProps) => {
try {
dispatch(updatePanel(updatedPanel));
} catch (err) {
setToast('Error adding visualization to this panel', 'danger');
setToast('Error adding visualization to this Dashboard', 'danger');
console.error(err?.body?.message || err);
}
};
Expand Down Expand Up @@ -531,31 +531,31 @@ export const CustomPanelViewSO = (props: CustomPanelViewProps) => {
title: 'Panel actions',
items: [
{
name: 'Reload panel',
name: 'Reload Dashboard',
'data-test-subj': 'reloadPanelContextMenuItem',
onClick: () => {
setPanelsMenuPopover(false);
dispatch(fetchPanel(panelId));
},
},
{
name: 'Rename panel',
name: 'Rename Dashboard',
'data-test-subj': 'renamePanelContextMenuItem',
onClick: () => {
setPanelsMenuPopover(false);
renamePanel();
},
},
{
name: 'Duplicate panel',
name: 'Duplicate Dashboard',
'data-test-subj': 'duplicatePanelContextMenuItem',
onClick: () => {
setPanelsMenuPopover(false);
clonePanel();
},
},
{
name: 'Delete panel',
name: 'Delete Dashboard',
'data-test-subj': 'deletePanelContextMenuItem',
onClick: () => {
setPanelsMenuPopover(false);
Expand All @@ -565,7 +565,7 @@ export const CustomPanelViewSO = (props: CustomPanelViewProps) => {
],
},
];
// Fetch the custom panel on Initial Mount
// Fetch the Observability Dashboard on Initial Mount
useEffect(() => {
dispatch(fetchPanel(panelId));
}, []);
Expand Down
4 changes: 2 additions & 2 deletions public/components/custom_panels/helpers/modal_containers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,14 @@ export const getCloneModal = (
return (
<EuiOverlayMask>
<EuiConfirmModal
title="Clone operational panel"
title="Clone Observability Dashboard"
onCancel={onCancel}
onConfirm={onConfirm}
cancelButtonText="Cancel"
confirmButtonText="Yes"
defaultFocusedButton="confirm"
>
<p>Do you want to clone this operational panel?</p>
<p>Do you want to clone this Observability Dashboard?</p>
</EuiConfirmModal>
</EuiOverlayMask>
);
Expand Down
Loading

0 comments on commit 09e0a63

Please sign in to comment.