From a8dbc1eaa05d652d90aacf3bcba29f0ea6c8c835 Mon Sep 17 00:00:00 2001
From: "Grot (@grafanabot)" <43478413+grafanabot@users.noreply.github.com>
Date: Tue, 31 May 2022 08:38:22 -0400
Subject: [PATCH] UI/Card: Remove deprecated props (#49885) (#49900)
(cherry picked from commit d590012a18e1a0c804acb189914c1fb6b110aca9)
Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
---
.../grafana-ui/src/components/Card/Card.tsx | 17 +----------------
.../components/rule-editor/QueryRows.tsx | 11 +++++------
2 files changed, 6 insertions(+), 22 deletions(-)
diff --git a/packages/grafana-ui/src/components/Card/Card.tsx b/packages/grafana-ui/src/components/Card/Card.tsx
index f5056e9b232..91ce47f71d7 100644
--- a/packages/grafana-ui/src/components/Card/Card.tsx
+++ b/packages/grafana-ui/src/components/Card/Card.tsx
@@ -47,17 +47,7 @@ const CardContext = React.createContext<{
*
* @public
*/
-export const Card: CardInterface = ({
- disabled,
- href,
- onClick,
- children,
- heading: deprecatedHeading,
- description: deprecatedDescription,
- isSelected,
- className,
- ...htmlProps
-}) => {
+export const Card: CardInterface = ({ disabled, href, onClick, children, isSelected, className, ...htmlProps }) => {
const hasHeadingComponent = useMemo(
() =>
React.Children.toArray(children).some(
@@ -81,8 +71,6 @@ export const Card: CardInterface = ({
>
{!hasHeadingComponent && }
- {deprecatedHeading && {deprecatedHeading}}
- {deprecatedDescription && {deprecatedDescription}}
{children}
@@ -93,9 +81,6 @@ interface ChildProps {
className?: string;
disabled?: boolean;
children?: React.ReactNode;
-
- /** @deprecated Use `className` to add new styles */
- styles?: ReturnType;
}
/** Main heading for the card */
diff --git a/public/app/features/alerting/unified/components/rule-editor/QueryRows.tsx b/public/app/features/alerting/unified/components/rule-editor/QueryRows.tsx
index 17a7140bc80..a6e28db3a5e 100644
--- a/public/app/features/alerting/unified/components/rule-editor/QueryRows.tsx
+++ b/public/app/features/alerting/unified/components/rule-editor/QueryRows.tsx
@@ -313,12 +313,11 @@ const DatasourceNotFound = ({ index, onUpdateDatasource, onRemoveQuery, model }:
return (
-
+
+ This datasource has been removed
+
+ The datasource for this query was not found, it was either removed or is not installed correctly.
+