From a3d1cf03a98570d6318d9c291767db8f06fa7729 Mon Sep 17 00:00:00 2001 From: Diana Payton <52059945+oddlittlebird@users.noreply.github.com> Date: Thu, 1 Apr 2021 08:42:57 -0700 Subject: [PATCH] Edit dashboard UI text (#32520) * Update DashboardPermissions.tsx * Update DashboardRow.tsx * Update AutoRefreshIntervals.tsx * Update JsonEditorSettings.tsx * ui updates * Update FolderPickerCtrl.ts * Update LinkSettingsEdit.tsx * Update LinkSettingsHeader.tsx * Update LinkSettingsList.tsx * Update actions.ts * Update AngularPanelOptions.tsx * Update getFieldOverrideElements.tsx * Update OptionsPaneOptions.tsx * Update types.ts * Update usePanelLatestData.ts * Update VisualizationButton.tsx * Update RowOptionsModal.tsx * Update SaveDashboardAsForm.tsx * Update SaveDashboardForm.tsx * Update SaveProvisionedDashboardForm.tsx * Update SaveDashboardErrorProxy.tsx * text edits * Update ShareSnapshot.tsx * Update PanelTypeCard.tsx * Update TransformationsEditor.tsx * Update panel.test.ts * text edits * Update DashboardSrv.ts * Update VersionHistoryButtons.tsx * Update DiffViewer.tsx * Update VersionHistoryTable.tsx * Update DashboardGrid.tsx * Update DashboardPanel.tsx * Update PanelPluginError.tsx * Update DashboardMigrator.ts --- .../DashboardPermissions.tsx | 4 ++-- .../components/DashboardRow/DashboardRow.tsx | 2 +- .../DashboardSettings/AutoRefreshIntervals.tsx | 2 +- .../DashboardSettings/JsonEditorSettings.tsx | 6 +++--- .../DashboardSettings/LinksSettings.test.tsx | 8 ++++---- .../DashboardSettings/TimePickerSettings.tsx | 2 +- .../DeleteDashboard/DeleteDashboardModal.tsx | 10 +++++----- .../FolderPicker/FolderPickerCtrl.ts | 4 ++-- .../LinksSettings/LinkSettingsEdit.tsx | 2 +- .../LinksSettings/LinkSettingsHeader.tsx | 2 +- .../LinksSettings/LinkSettingsList.tsx | 8 ++++---- .../PanelEditor/AngularPanelOptions.tsx | 4 ++-- .../PanelEditor/OptionsPaneOptions.tsx | 4 ++-- .../PanelEditor/VisualizationButton.tsx | 2 +- .../PanelEditor/getFieldOverrideElements.tsx | 4 ++-- .../components/PanelEditor/state/actions.ts | 2 +- .../dashboard/components/PanelEditor/types.ts | 2 +- .../PanelEditor/usePanelLatestData.ts | 2 +- .../components/RowOptions/RowOptionsModal.tsx | 2 +- .../SaveDashboard/SaveDashboardErrorProxy.tsx | 11 +++++++---- .../forms/SaveDashboardAsForm.tsx | 2 +- .../SaveDashboard/forms/SaveDashboardForm.tsx | 2 +- .../forms/SaveProvisionedDashboardForm.tsx | 6 +++--- .../components/ShareModal/ShareEmbed.tsx | 6 +++--- .../components/ShareModal/ShareSnapshot.tsx | 18 +++++++++--------- .../TransformationsEditor.tsx | 13 +++++++------ .../components/VersionHistory/DiffViewer.tsx | 2 +- .../VersionHistory/VersionHistoryButtons.tsx | 2 +- .../VersionHistory/VersionHistoryTable.tsx | 2 +- .../components/VizTypePicker/PanelTypeCard.tsx | 6 +++--- .../dashboard/containers/DashboardPage.tsx | 2 +- .../dashboard/dashgrid/DashboardGrid.tsx | 2 +- .../dashboard/dashgrid/DashboardPanel.tsx | 2 +- .../dashboard/dashgrid/PanelPluginError.tsx | 2 +- .../dashboard/services/ChangeTracker.ts | 2 +- .../dashboard/services/DashboardSrv.ts | 2 +- .../dashboard/state/DashboardMigrator.ts | 4 ++-- .../app/features/dashboard/utils/panel.test.ts | 6 +++--- public/app/features/dashboard/utils/panel.ts | 8 +++++--- 39 files changed, 89 insertions(+), 83 deletions(-) diff --git a/public/app/features/dashboard/components/DashboardPermissions/DashboardPermissions.tsx b/public/app/features/dashboard/components/DashboardPermissions/DashboardPermissions.tsx index f0005e27bff..a93dcdcd0d9 100644 --- a/public/app/features/dashboard/components/DashboardPermissions/DashboardPermissions.tsx +++ b/public/app/features/dashboard/components/DashboardPermissions/DashboardPermissions.tsx @@ -91,7 +91,7 @@ export class DashboardPermissionsUnconnected extends PureComponent const { isAdding } = this.state; return hasUnsavedFolderChange ? ( -
You have changed folder, please save to view permissions.
+
You have changed a folder, please save to view permissions.
) : (
@@ -101,7 +101,7 @@ export class DashboardPermissionsUnconnected extends PureComponent
diff --git a/public/app/features/dashboard/components/DashboardRow/DashboardRow.tsx b/public/app/features/dashboard/components/DashboardRow/DashboardRow.tsx index fb4251fb012..687eedbe843 100644 --- a/public/app/features/dashboard/components/DashboardRow/DashboardRow.tsx +++ b/public/app/features/dashboard/components/DashboardRow/DashboardRow.tsx @@ -52,7 +52,7 @@ export class DashboardRow extends React.Component { onDelete = () => { appEvents.publish( new ShowConfirmModalEvent({ - title: 'Delete Row', + title: 'Delete row', text: 'Are you sure you want to remove this row and all its panels?', altActionText: 'Delete row only', icon: 'trash-alt', diff --git a/public/app/features/dashboard/components/DashboardSettings/AutoRefreshIntervals.tsx b/public/app/features/dashboard/components/DashboardSettings/AutoRefreshIntervals.tsx index 7c1b7c706de..891c5607ee9 100644 --- a/public/app/features/dashboard/components/DashboardSettings/AutoRefreshIntervals.tsx +++ b/public/app/features/dashboard/components/DashboardSettings/AutoRefreshIntervals.tsx @@ -58,7 +58,7 @@ export const AutoRefreshIntervals: FC = ({ return ( diff --git a/public/app/features/dashboard/components/DashboardSettings/JsonEditorSettings.tsx b/public/app/features/dashboard/components/DashboardSettings/JsonEditorSettings.tsx index 7937e022697..a993c86f70f 100644 --- a/public/app/features/dashboard/components/DashboardSettings/JsonEditorSettings.tsx +++ b/public/app/features/dashboard/components/DashboardSettings/JsonEditorSettings.tsx @@ -26,8 +26,8 @@ export const JsonEditorSettings: React.FC = ({ dashboard }) => { <>

JSON Model

- The JSON Model below is data structure that defines the dashboard. Including settings, panel settings & layout, - queries etc. + The JSON model below is the data structure that defines the dashboard. This includes dashboard settings, panel + settings, layout, queries, and so on.
@@ -46,7 +46,7 @@ export const JsonEditorSettings: React.FC = ({ dashboard }) => {
{dashboard.meta.canSave && ( )} diff --git a/public/app/features/dashboard/components/DashboardSettings/LinksSettings.test.tsx b/public/app/features/dashboard/components/DashboardSettings/LinksSettings.test.tsx index 178273ce105..c6ea6b4de59 100644 --- a/public/app/features/dashboard/components/DashboardSettings/LinksSettings.test.tsx +++ b/public/app/features/dashboard/components/DashboardSettings/LinksSettings.test.tsx @@ -62,9 +62,9 @@ describe('LinksSettings', () => { // @ts-ignore render(); - expect(screen.getByRole('heading', { name: 'Dashboard Links' })).toBeInTheDocument(); + expect(screen.getByRole('heading', { name: 'Dashboard links' })).toBeInTheDocument(); expect( - screen.getByLabelText(selectors.components.CallToActionCard.button('Add Dashboard Link')) + screen.getByLabelText(selectors.components.CallToActionCard.button('Add dashboard link')) ).toBeInTheDocument(); expect(screen.queryByRole('table')).not.toBeInTheDocument(); }); @@ -77,7 +77,7 @@ describe('LinksSettings', () => { expect(tableBodyRows.length).toBe(links.length); expect( - screen.queryByLabelText(selectors.components.CallToActionCard.button('Add Dashboard Link')) + screen.queryByLabelText(selectors.components.CallToActionCard.button('Add dashboard link')) ).not.toBeInTheDocument(); }); @@ -156,7 +156,7 @@ describe('LinksSettings', () => { userEvent.click(screen.getByText('Link')); - expect(screen.queryByText('Url')).toBeInTheDocument(); + expect(screen.queryByText('URL')).toBeInTheDocument(); expect(screen.queryByText('Tooltip')).toBeInTheDocument(); expect(screen.queryByText('Icon')).toBeInTheDocument(); diff --git a/public/app/features/dashboard/components/DashboardSettings/TimePickerSettings.tsx b/public/app/features/dashboard/components/DashboardSettings/TimePickerSettings.tsx index abc2754fe2b..bd8eb7aab98 100644 --- a/public/app/features/dashboard/components/DashboardSettings/TimePickerSettings.tsx +++ b/public/app/features/dashboard/components/DashboardSettings/TimePickerSettings.tsx @@ -67,7 +67,7 @@ export class TimePickerSettings extends PureComponent { /> { <>

Do you want to delete this dashboard?

- This dashboard contains {totalAlerts} alert{totalAlerts > 1 ? 's' : ''}. Deleting this dashboard will also - delete those alerts + This dashboard contains {totalAlerts} alert{totalAlerts > 1 ? 's' : ''}. Deleting this dashboard also deletes + deletes those alerts

) : ( @@ -69,15 +69,15 @@ const ProvisionedDeleteModal = ({ hideModal, provisionedId }: { hideModal(): voi `} >

- This dashboard is managed by Grafanas provisioning and cannot be deleted. Remove the dashboard from the config - file to delete it. + This dashboard is managed by Grafana provisioning and cannot be deleted. Remove the dashboard from the config file + to delete it.

See{' '} diff --git a/public/app/features/dashboard/components/FolderPicker/FolderPickerCtrl.ts b/public/app/features/dashboard/components/FolderPicker/FolderPickerCtrl.ts index 28cf2dec6c4..9e05489693d 100644 --- a/public/app/features/dashboard/components/FolderPicker/FolderPickerCtrl.ts +++ b/public/app/features/dashboard/components/FolderPicker/FolderPickerCtrl.ts @@ -66,7 +66,7 @@ export class FolderPickerCtrl { } if (this.isEditor && this.enableCreateNew && query === '') { - result.unshift({ title: '-- New Folder --', id: -1 }); + result.unshift({ title: '-- New folder --', id: -1 }); } if (this.enableReset && query === '' && this.initialTitle !== '') { @@ -113,7 +113,7 @@ export class FolderPickerCtrl { return promiseToDigest(this.$scope)( createFolder({ title: this.newFolderName }).then((result: { title: string; id: number }) => { - appEvents.emit(AppEvents.alertSuccess, ['Folder Created', 'OK']); + appEvents.emit(AppEvents.alertSuccess, ['Folder created', 'OK']); this.closeCreateFolder(); this.folder = { text: result.title, value: result.id }; diff --git a/public/app/features/dashboard/components/LinksSettings/LinkSettingsEdit.tsx b/public/app/features/dashboard/components/LinksSettings/LinkSettingsEdit.tsx index a46ed3ad6eb..159fd3e461f 100644 --- a/public/app/features/dashboard/components/LinksSettings/LinkSettingsEdit.tsx +++ b/public/app/features/dashboard/components/LinksSettings/LinkSettingsEdit.tsx @@ -98,7 +98,7 @@ export const LinkSettingsEdit: React.FC = ({ mode, editLi )} {linkSettings.type === 'link' && ( <> - + diff --git a/public/app/features/dashboard/components/LinksSettings/LinkSettingsHeader.tsx b/public/app/features/dashboard/components/LinksSettings/LinkSettingsHeader.tsx index f115ee079f8..2089c06ed87 100644 --- a/public/app/features/dashboard/components/LinksSettings/LinkSettingsHeader.tsx +++ b/public/app/features/dashboard/components/LinksSettings/LinkSettingsHeader.tsx @@ -17,7 +17,7 @@ export const LinkSettingsHeader: React.FC = ({ onNavCli

- Dashboard Links + Dashboard links {isEditing && ( diff --git a/public/app/features/dashboard/components/LinksSettings/LinkSettingsList.tsx b/public/app/features/dashboard/components/LinksSettings/LinkSettingsList.tsx index d27587a8bf5..17687463ece 100644 --- a/public/app/features/dashboard/components/LinksSettings/LinkSettingsList.tsx +++ b/public/app/features/dashboard/components/LinksSettings/LinkSettingsList.tsx @@ -36,13 +36,13 @@ export const LinkSettingsList: React.FC = ({ dashboard, s {dashboard.links.length === 0 ? ( Dashboard Links allow you to place links to other dashboards and web sites directly below the dashboard header.

', + '

Dashboard links allow you to place links to other dashboards and web sites directly below the dashboard header.

', }} /> ) : ( diff --git a/public/app/features/dashboard/components/PanelEditor/AngularPanelOptions.tsx b/public/app/features/dashboard/components/PanelEditor/AngularPanelOptions.tsx index d1a5dd57efe..637ebb121ae 100644 --- a/public/app/features/dashboard/components/PanelEditor/AngularPanelOptions.tsx +++ b/public/app/features/dashboard/components/PanelEditor/AngularPanelOptions.tsx @@ -2,7 +2,7 @@ import React, { PureComponent } from 'react'; import { connect, MapStateToProps, MapDispatchToProps } from 'react-redux'; -// Utils & Services +// Utils and services import { AngularComponent, getAngularLoader } from '@grafana/runtime'; // Types @@ -69,7 +69,7 @@ export class AngularPanelOptionsUnconnected extends PureComponent { const scope = angularPanelComponent.getScope(); - // When full page reloading in edit mode the angular panel has on fully compiled & instantiated yet + // When full page reloading in edit mode the angular panel has on fully compiled and instantiated yet if (!scope.$$childHead) { setTimeout(() => { this.forceUpdate(); diff --git a/public/app/features/dashboard/components/PanelEditor/OptionsPaneOptions.tsx b/public/app/features/dashboard/components/PanelEditor/OptionsPaneOptions.tsx index 5a66ce48afc..01aa375adb6 100644 --- a/public/app/features/dashboard/components/PanelEditor/OptionsPaneOptions.tsx +++ b/public/app/features/dashboard/components/PanelEditor/OptionsPaneOptions.tsx @@ -41,7 +41,7 @@ export const OptionsPaneOptions: React.FC = (props) => { if (isSearching) { mainBoxElements.push(renderSearchHits(allOptions, justOverrides, searchQuery)); - // If searching for angular panel then we need to add notice that results are limited + // If searching for angular panel, then we need to add notice that results are limited if (props.plugin.angularPanelCtrl) { mainBoxElements.push(
@@ -60,7 +60,7 @@ export const OptionsPaneOptions: React.FC = (props) => { ); } - // Then add all panel & field defaults + // Then add all panel and field defaults for (const item of vizOptions) { mainBoxElements.push(item.render()); } diff --git a/public/app/features/dashboard/components/PanelEditor/VisualizationButton.tsx b/public/app/features/dashboard/components/PanelEditor/VisualizationButton.tsx index 69d293cc2b1..d5cd4c8f74f 100644 --- a/public/app/features/dashboard/components/PanelEditor/VisualizationButton.tsx +++ b/public/app/features/dashboard/components/PanelEditor/VisualizationButton.tsx @@ -51,7 +51,7 @@ export const VisualizationButtonUnconnected: FC = ({ - // Field override rules give you a fine grained control over how your data is displayed. + // Field override rules give you fine-grained control over how your data is displayed. // return categories; diff --git a/public/app/features/dashboard/components/PanelEditor/state/actions.ts b/public/app/features/dashboard/components/PanelEditor/state/actions.ts index 712cb7e1bf0..484ae3a91a5 100644 --- a/public/app/features/dashboard/components/PanelEditor/state/actions.ts +++ b/public/app/features/dashboard/components/PanelEditor/state/actions.ts @@ -131,7 +131,7 @@ export function panelEditorCleanUp(): ThunkResult { updateDuplicateLibraryPanels(panel, dashboard!, dispatch); - // restore the source panel id before we update source panel + // restore the source panel ID before we update source panel modifiedSaveModel.id = sourcePanel.id; sourcePanel.restoreModel(modifiedSaveModel); diff --git a/public/app/features/dashboard/components/PanelEditor/types.ts b/public/app/features/dashboard/components/PanelEditor/types.ts index 2ee503740e4..4bccde08024 100644 --- a/public/app/features/dashboard/components/PanelEditor/types.ts +++ b/public/app/features/dashboard/components/PanelEditor/types.ts @@ -24,7 +24,7 @@ export enum DisplayMode { export const displayModes = [ { value: DisplayMode.Fill, label: 'Fill', description: 'Use all available space' }, { value: DisplayMode.Fit, label: 'Fit', description: 'Fit in the space keeping ratio' }, - { value: DisplayMode.Exact, label: 'Exact', description: 'Same size as the dashboard' }, + { value: DisplayMode.Exact, label: 'Exact', description: 'Make same size as the dashboard' }, ]; /** @internal */ diff --git a/public/app/features/dashboard/components/PanelEditor/usePanelLatestData.ts b/public/app/features/dashboard/components/PanelEditor/usePanelLatestData.ts index c7808c5cb57..ff8513dc5d0 100644 --- a/public/app/features/dashboard/components/PanelEditor/usePanelLatestData.ts +++ b/public/app/features/dashboard/components/PanelEditor/usePanelLatestData.ts @@ -33,7 +33,7 @@ export const usePanelLatestData = (panel: PanelModel, options: GetDataOptions): }; /** * Adding separate options to dependencies array to avoid additional hook for comparing previous options with current. - * Otherwise, passing different references to the same object may cause troubles. + * Otherwise, passing different references to the same object might cause troubles. */ // eslint-disable-next-line react-hooks/exhaustive-deps }, [panel, options.withFieldConfig, options.withTransforms]); diff --git a/public/app/features/dashboard/components/RowOptions/RowOptionsModal.tsx b/public/app/features/dashboard/components/RowOptions/RowOptionsModal.tsx index a6a19bdb2be..777ba42ed6b 100644 --- a/public/app/features/dashboard/components/RowOptions/RowOptionsModal.tsx +++ b/public/app/features/dashboard/components/RowOptions/RowOptionsModal.tsx @@ -14,7 +14,7 @@ export interface RowOptionsModalProps { export const RowOptionsModal: FC = ({ repeat, title, onDismiss, onUpdate }) => { const styles = getStyles(); return ( - + ); diff --git a/public/app/features/dashboard/components/SaveDashboard/SaveDashboardErrorProxy.tsx b/public/app/features/dashboard/components/SaveDashboard/SaveDashboardErrorProxy.tsx index d8e20354400..3822f56c853 100644 --- a/public/app/features/dashboard/components/SaveDashboard/SaveDashboardErrorProxy.tsx +++ b/public/app/features/dashboard/components/SaveDashboard/SaveDashboardErrorProxy.tsx @@ -41,7 +41,7 @@ export const SaveDashboardErrorProxy: React.FC = ( Someone else has updated this dashboard
Would you still like to save this dashboard?
} - confirmText="Save & Overwrite" + confirmText="Save and overwrite" onConfirm={async () => { await onDashboardSave(dashboardSaveModel, { overwrite: true }, dashboard); onDismiss(); @@ -59,7 +59,7 @@ export const SaveDashboardErrorProxy: React.FC = ( Would you still like to save this dashboard?

} - confirmText="Save & Overwrite" + confirmText="Save and overwrite" onConfirm={async () => { await onDashboardSave(dashboardSaveModel, { overwrite: true }, dashboard); onDismiss(); @@ -80,11 +80,14 @@ const ConfirmPluginDashboardSaveModal: React.FC = ({ on const styles = getConfirmPluginDashboardSaveModalStyles(theme); return ( - +
Your changes will be lost when you update the plugin. -
Use Save As to create custom version. +
+ + Use Save As to create custom version. +
diff --git a/public/app/features/dashboard/components/SaveDashboard/forms/SaveDashboardAsForm.tsx b/public/app/features/dashboard/components/SaveDashboard/forms/SaveDashboardAsForm.tsx index 5e08032b08b..4d0f092e34c 100644 --- a/public/app/features/dashboard/components/SaveDashboard/forms/SaveDashboardAsForm.tsx +++ b/public/app/features/dashboard/components/SaveDashboard/forms/SaveDashboardAsForm.tsx @@ -51,7 +51,7 @@ export const SaveDashboardAsForm: React.FC SaveDashboardAsFormDTO) => async (dashboardName: string) => { if (dashboardName && dashboardName === getFormValues().$folder.title?.trim()) { - return 'Dashboard name cannot be the same as folder'; + return 'Dashboard name cannot be the same as folder name'; } try { await validationSrv.validateNewDashboardName(getFormValues().$folder.id, dashboardName); diff --git a/public/app/features/dashboard/components/SaveDashboard/forms/SaveDashboardForm.tsx b/public/app/features/dashboard/components/SaveDashboard/forms/SaveDashboardForm.tsx index 00375a0e2af..b2cba26fc60 100644 --- a/public/app/features/dashboard/components/SaveDashboard/forms/SaveDashboardForm.tsx +++ b/public/app/features/dashboard/components/SaveDashboard/forms/SaveDashboardForm.tsx @@ -55,7 +55,7 @@ export const SaveDashboardForm: React.FC = ({ dashboard, )} {(hasVariableChanged || hasTimeChanged) &&
} - diff --git a/public/app/features/dashboard/components/ShareModal/ShareSnapshot.tsx b/public/app/features/dashboard/components/ShareModal/ShareSnapshot.tsx index b31d59e5079..5e8eb908582 100644 --- a/public/app/features/dashboard/components/ShareModal/ShareSnapshot.tsx +++ b/public/app/features/dashboard/components/ShareModal/ShareSnapshot.tsx @@ -210,13 +210,13 @@ export class ShareSnapshot extends PureComponent { <>

- A snapshot is an instant way to share an interactive dashboard publicly. When created, we{' '} - strip sensitive data like queries (metric, template and annotation) and panel links, - leaving only the visible metric data and series names embedded into your dashboard. + A snapshot is an instant way to share an interactive dashboard publicly. When created, we strip sensitive + data like queries (metric, template, and annotation) and panel links, leaving only the visible metric data + and series names embedded in your dashboard.

- Keep in mind, your snapshot can be viewed by anyone that has the link and can reach the - URL. Share wisely. + Keep in mind, your snapshot can be viewed by anyone that has the link and can access the URL. Share + wisely.

@@ -227,7 +227,7 @@ export class ShareSnapshot extends PureComponent { @@ -270,7 +270,7 @@ export class ShareSnapshot extends PureComponent {
Did you make a mistake?{' '} - delete snapshot. + Delete snapshot.
@@ -281,8 +281,8 @@ export class ShareSnapshot extends PureComponent { return (

- The snapshot has now been deleted. If you have already accessed it once, it might take up to an hour before it - is removed from browser caches or CDN caches. + The snapshot has been deleted. If you have already accessed it once, then it might take up to an hour before + before it is removed from browser caches or CDN caches.

); diff --git a/public/app/features/dashboard/components/TransformationsEditor/TransformationsEditor.tsx b/public/app/features/dashboard/components/TransformationsEditor/TransformationsEditor.tsx index 6875a8d0e8d..3d2e07801ae 100644 --- a/public/app/features/dashboard/components/TransformationsEditor/TransformationsEditor.tsx +++ b/public/app/features/dashboard/components/TransformationsEditor/TransformationsEditor.tsx @@ -126,7 +126,7 @@ class UnThemedTransformationsEditor extends React.PureComponent t.transformation)); } - // Transformation uid are stored in a name-X form. name is NOT unique hence we need to parse the ids and increase X + // Transformation UIDs are stored in a name-X form. name is NOT unique hence we need to parse the IDs and increase X // for transformations with the same name getTransformationNextId = (name: string) => { const { transformations } = this.state; @@ -275,11 +275,12 @@ class UnThemedTransformationsEditor extends React.PureComponent

- Transformations allow you to join, calculate, re-order, hide and rename your query results before - being visualized.
- Many transforms are not suitable if you're using the Graph visualization as it currently only - supports time series.
- It can help to switch to Table visualization to understand what a transformation is doing.
+ Transformations allow you to join, calculate, re-order, hide, and rename your query results before + they are visualized.
+ Many transforms are not suitable if you're using the Graph visualization, as it currently + only only supports time series data.
+ It can help to switch to the Table visualization to understand what a transformation is doing.{' '} +

); diff --git a/public/app/features/dashboard/components/VersionHistory/DiffViewer.tsx b/public/app/features/dashboard/components/VersionHistory/DiffViewer.tsx index 6bd257c32e0..0cf5be1a9a9 100644 --- a/public/app/features/dashboard/components/VersionHistory/DiffViewer.tsx +++ b/public/app/features/dashboard/components/VersionHistory/DiffViewer.tsx @@ -9,7 +9,7 @@ export const DiffViewer: React.FC = ({ oldValue, newValue const styles = { variables: { - // the light theme supplied by ReactDiffViewer is very similar to grafana + // the light theme supplied by ReactDiffViewer is very similar to Grafana // the dark theme needs some tweaks. dark: { diffViewerBackground: theme.colors.dashboardBg, diff --git a/public/app/features/dashboard/components/VersionHistory/VersionHistoryButtons.tsx b/public/app/features/dashboard/components/VersionHistory/VersionHistoryButtons.tsx index 5923ba75b10..b720d72822b 100644 --- a/public/app/features/dashboard/components/VersionHistory/VersionHistoryButtons.tsx +++ b/public/app/features/dashboard/components/VersionHistory/VersionHistoryButtons.tsx @@ -21,7 +21,7 @@ export const VersionsHistoryButtons: React.FC = ({ Show more versions )} - + diff --git a/public/app/features/dashboard/components/VersionHistory/VersionHistoryTable.tsx b/public/app/features/dashboard/components/VersionHistory/VersionHistoryTable.tsx index f15cbb6ddd9..876e164f7d2 100644 --- a/public/app/features/dashboard/components/VersionHistory/VersionHistoryTable.tsx +++ b/public/app/features/dashboard/components/VersionHistory/VersionHistoryTable.tsx @@ -15,7 +15,7 @@ export const VersionHistoryTable: React.FC = ({ versions, on Version Date - Updated By + Updated by Notes diff --git a/public/app/features/dashboard/components/VizTypePicker/PanelTypeCard.tsx b/public/app/features/dashboard/components/VizTypePicker/PanelTypeCard.tsx index dab046483cb..fb99124228b 100644 --- a/public/app/features/dashboard/components/VizTypePicker/PanelTypeCard.tsx +++ b/public/app/features/dashboard/components/VizTypePicker/PanelTypeCard.tsx @@ -146,19 +146,19 @@ function getPanelStateBadgeDisplayModel(panel: PanelPluginMeta): BadgeProps | nu return { text: 'Deprecated', color: 'red', - tooltip: `${panel.name} panel is deprecated`, + tooltip: `${panel.name} Panel is deprecated`, }; case PluginState.alpha: return { text: 'Alpha', color: 'blue', - tooltip: `${panel.name} panel is experimental`, + tooltip: `${panel.name} Panel is experimental`, }; case PluginState.beta: return { text: 'Beta', color: 'blue', - tooltip: `${panel.name} panel is in beta`, + tooltip: `${panel.name} Panel is in beta`, }; default: return null; diff --git a/public/app/features/dashboard/containers/DashboardPage.tsx b/public/app/features/dashboard/containers/DashboardPage.tsx index 5a9552770be..ee521549b80 100644 --- a/public/app/features/dashboard/containers/DashboardPage.tsx +++ b/public/app/features/dashboard/containers/DashboardPage.tsx @@ -216,7 +216,7 @@ export class DashboardPage extends PureComponent { if (!panel) { // Panel not found - this.props.notifyApp(createErrorNotification(`Panel with id ${urlPanelId} not found`)); + this.props.notifyApp(createErrorNotification(`Panel with ID ${urlPanelId} not found`)); // Clear url state locationService.partial({ editPanel: null, viewPanel: null }); return; diff --git a/public/app/features/dashboard/dashgrid/DashboardGrid.tsx b/public/app/features/dashboard/dashgrid/DashboardGrid.tsx index 3ffa7b19957..7727cd6a3ad 100644 --- a/public/app/features/dashboard/dashgrid/DashboardGrid.tsx +++ b/public/app/features/dashboard/dashgrid/DashboardGrid.tsx @@ -153,7 +153,7 @@ export class DashboardGrid extends PureComponent { this.props.dashboard.sortPanelsByGridPos(); - // Call render() after any changes. This is called when the layour loads + // Call render() after any changes. This is called when the layout loads this.forceUpdate(); }; diff --git a/public/app/features/dashboard/dashgrid/DashboardPanel.tsx b/public/app/features/dashboard/dashgrid/DashboardPanel.tsx index 814044802cd..5a08dff540d 100644 --- a/public/app/features/dashboard/dashgrid/DashboardPanel.tsx +++ b/public/app/features/dashboard/dashgrid/DashboardPanel.tsx @@ -112,7 +112,7 @@ export class DashboardPanelUnconnected extends PureComponent { const { isViewing, plugin } = this.props; const { isLazy } = this.state; - // if we have not loaded plugin exports yet, wait + // If we have not loaded plugin exports yet, wait if (!plugin) { return null; } diff --git a/public/app/features/dashboard/dashgrid/PanelPluginError.tsx b/public/app/features/dashboard/dashgrid/PanelPluginError.tsx index ce6a9a5e67a..3418663942c 100644 --- a/public/app/features/dashboard/dashgrid/PanelPluginError.tsx +++ b/public/app/features/dashboard/dashgrid/PanelPluginError.tsx @@ -39,7 +39,7 @@ export function getPanelPluginLoadError(meta: PanelPluginMeta, err: any): PanelP const text = ( <> Check the server startup logs for more information.
- If this plugin was loaded from git, make sure it was compiled. + If this plugin was loaded from Git, then make sure it was compiled. ); return ; diff --git a/public/app/features/dashboard/services/ChangeTracker.ts b/public/app/features/dashboard/services/ChangeTracker.ts index 2ec88dbd3da..eb20557ba9b 100644 --- a/public/app/features/dashboard/services/ChangeTracker.ts +++ b/public/app/features/dashboard/services/ChangeTracker.ts @@ -86,7 +86,7 @@ export class ChangeTracker { return true; } - //Ignore changes if the user has been signed out + // Ignore changes if the user has been signed out if (!contextSrv.isSignedIn) { return true; } diff --git a/public/app/features/dashboard/services/DashboardSrv.ts b/public/app/features/dashboard/services/DashboardSrv.ts index 195c73435aa..227287069bf 100644 --- a/public/app/features/dashboard/services/DashboardSrv.ts +++ b/public/app/features/dashboard/services/DashboardSrv.ts @@ -71,7 +71,7 @@ export class DashboardSrv { coreModule.service('dashboardSrv', DashboardSrv); // -// Code below is to export the service to react components +// Code below is to export the service to React components // let singletonInstance: DashboardSrv; diff --git a/public/app/features/dashboard/state/DashboardMigrator.ts b/public/app/features/dashboard/state/DashboardMigrator.ts index e76be482224..30bc676e45e 100644 --- a/public/app/features/dashboard/state/DashboardMigrator.ts +++ b/public/app/features/dashboard/state/DashboardMigrator.ts @@ -91,7 +91,7 @@ export class DashboardMigrator { // schema version 3 changes if (oldVersion < 3) { - // ensure panel ids + // ensure panel IDs let maxId = this.dashboard.getNextPanelId(); panelUpgrades.push((panel: any) => { if (!panel.id) { @@ -116,7 +116,7 @@ export class DashboardMigrator { } if (oldVersion < 6) { - // move pulldowns to new schema + // move drop-downs to new schema const annotations: any = _.find(old.pulldowns, { type: 'annotations' }); if (annotations) { diff --git a/public/app/features/dashboard/utils/panel.test.ts b/public/app/features/dashboard/utils/panel.test.ts index 9b57ffc4957..15461a71511 100644 --- a/public/app/features/dashboard/utils/panel.test.ts +++ b/public/app/features/dashboard/utils/panel.test.ts @@ -30,7 +30,7 @@ describe('applyPanelTimeOverrides', () => { timeFrom: '2h', }; - // @ts-ignore: PanelModel type incositency + // @ts-ignore: PanelModel type inconsistency const overrides = applyPanelTimeOverrides(panelModel, dashboardTimeRange); expect(overrides.timeRange.from.toISOString()).toBe(dateTime([2019, 1, 11, 12]).toISOString()); @@ -47,7 +47,7 @@ describe('applyPanelTimeOverrides', () => { const expectedFromDate = dateTime([2019, 1, 11, 10, 0, 0]).toDate(); const expectedToDate = dateTime([2019, 1, 11, 16, 0, 0]).toDate(); - // @ts-ignore: PanelModel type incositency + // @ts-ignore: PanelModel type inconsistency const overrides = applyPanelTimeOverrides(panelModel, dashboardTimeRange); expect(overrides.timeRange.from.toISOString()).toBe(expectedFromDate.toISOString()); @@ -65,7 +65,7 @@ describe('applyPanelTimeOverrides', () => { const expectedFromDate = dateTime([2019, 1, 11, 10, 0, 0]).toDate(); const expectedToDate = dateTime([2019, 1, 11, 12, 0, 0]).toDate(); - // @ts-ignore: PanelModel type incositency + // @ts-ignore: PanelModel type inconsistency const overrides = applyPanelTimeOverrides(panelModel, dashboardTimeRange); expect(overrides.timeRange.from.toISOString()).toBe(expectedFromDate.toISOString()); diff --git a/public/app/features/dashboard/utils/panel.ts b/public/app/features/dashboard/utils/panel.ts index 226a82f3075..e33293113ca 100644 --- a/public/app/features/dashboard/utils/panel.ts +++ b/public/app/features/dashboard/utils/panel.ts @@ -23,12 +23,14 @@ import { ShowConfirmModalEvent, ShowModalReactEvent } from '../../../types/event export const removePanel = (dashboard: DashboardModel, panel: PanelModel, ask: boolean) => { // confirm deletion if (ask !== false) { - const text2 = panel.alert ? 'Panel includes an alert rule, removing panel will also remove alert rule' : undefined; + const text2 = panel.alert + ? 'Panel includes an alert rule. removing the panel will also remove the alert rule' + : undefined; const confirmText = panel.alert ? 'YES' : undefined; appEvents.publish( new ShowConfirmModalEvent({ - title: 'Remove Panel', + title: 'Remove panel', text: 'Are you sure you want to remove this panel?', text2: text2, icon: 'trash-alt', @@ -54,7 +56,7 @@ export const copyPanel = (panel: PanelModel) => { } store.set(LS_PANEL_COPY_KEY, JSON.stringify(saveModel)); - appEvents.emit(AppEvents.alertSuccess, ['Panel copied. Open Add Panel to paste']); + appEvents.emit(AppEvents.alertSuccess, ['Panel copied. Click **Add panel** icon to paste.']); }; export const sharePanel = (dashboard: DashboardModel, panel: PanelModel) => {