Skip to content

Commit 74a1dce

Browse files
Remove logging
1 parent 62476ef commit 74a1dce

File tree

1 file changed

+15
-18
lines changed
  • ui/dashboard/src/components/dashboards/Card

1 file changed

+15
-18
lines changed

ui/dashboard/src/components/dashboards/Card/index.tsx

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ const useCardState = ({
8282
status,
8383
diff_panel,
8484
properties,
85-
display_type
86-
)
85+
display_type,
86+
),
8787
);
8888

8989
useDeepCompareEffect(() => {
@@ -93,11 +93,11 @@ const useCardState = ({
9393
diff_panel,
9494
display_type,
9595
properties,
96-
status
96+
status,
9797
);
9898
setCalculatedProperties(newState);
9999
setCalculatedProperties(
100-
diff.buildCardState(data, diff_panel, display_type, properties, status)
100+
diff.buildCardState(data, diff_panel, display_type, properties, status),
101101
);
102102
}, [
103103
data,
@@ -164,7 +164,7 @@ const CardDiffDisplay: React.FC<{
164164
className={classNames(
165165
"inline-flex rounded-lg px-2 font-medium md:mt-2 space-x-1 text-lg",
166166
diff.status === "ok" ? "text-ok" : null,
167-
diff.status === "alert" ? "text-alert" : null
167+
diff.status === "alert" ? "text-alert" : null,
168168
// diff.status === "alert" ? "text-severity" : null
169169
)}
170170
>
@@ -194,15 +194,12 @@ const CardDiffDisplay: React.FC<{
194194
};
195195

196196
const ValueWithDiff = ({ loading, value, diff }) => (
197-
console.log("ValueWithDiff:", { loading, value, diff }),
198-
(
199-
<div className="flex items-center space-x-2">
200-
{" "}
201-
{/* Adjusts flex to align elements inline */}
202-
<Value loading={loading} value={value} />
203-
{diff && <CardDiffDisplay diff={diff} value={value} />}
204-
</div>
205-
)
197+
<div className="flex items-center space-x-2">
198+
{" "}
199+
{/* Adjusts flex to align elements inline */}
200+
<Value loading={loading} value={value} />
201+
{diff && <CardDiffDisplay diff={diff} value={value} />}
202+
</div>
206203
);
207204

208205
const Card = (props: CardProps) => {
@@ -211,7 +208,7 @@ const Card = (props: CardProps) => {
211208
const { searchPathPrefix } = useDashboard();
212209
const [renderError, setRenderError] = useState<string | null>(null);
213210
const [renderedHref, setRenderedHref] = useState<string | null>(
214-
state.href || null
211+
state.href || null,
215212
);
216213
const { ready: templateRenderReady, renderTemplates } = useTemplateRender();
217214

@@ -240,7 +237,7 @@ const Card = (props: CardProps) => {
240237
const doRender = async () => {
241238
const renderedResults = await renderTemplates(
242239
{ card: state.href as string },
243-
[renderData]
240+
[renderData],
244241
);
245242
if (
246243
!renderedResults ||
@@ -252,7 +249,7 @@ const Card = (props: CardProps) => {
252249
} else if (renderedResults[0].card.result) {
253250
const withSearchPathPrefix = injectSearchPathPrefix(
254251
renderedResults[0].card.result,
255-
searchPathPrefix
252+
searchPathPrefix,
256253
);
257254
setRenderedHref(withSearchPathPrefix);
258255
setRenderError(null);
@@ -269,7 +266,7 @@ const Card = (props: CardProps) => {
269266
className={classNames(
270267
"overflow-hidden bg-dashboard-panel text-foreground print:bg-white print:text-black shadow-sm p-3 pr-5",
271268
getWrapperClasses(state.type),
272-
!state.icon ? "pl-4" : undefined
269+
!state.icon ? "pl-4" : undefined,
273270
)}
274271
>
275272
<div className="flex space-x-3">

0 commit comments

Comments
 (0)