Delete assets/js/dashboard/stats/imported-warning-bubble.tsx with huggingface_hub
Browse files
assets/js/dashboard/stats/imported-warning-bubble.tsx
DELETED
|
@@ -1,50 +0,0 @@
|
|
| 1 |
-
import React from 'react'
|
| 2 |
-
import { ExclamationCircleIcon } from '@heroicons/react/24/outline'
|
| 3 |
-
import { Tooltip } from '../util/tooltip'
|
| 4 |
-
import { useBodyPortalRef } from './breakdowns'
|
| 5 |
-
import { QueryApiResponse } from '../api'
|
| 6 |
-
|
| 7 |
-
export default function ImportedWarningBubble({
|
| 8 |
-
queryApiResponse,
|
| 9 |
-
message
|
| 10 |
-
}: {
|
| 11 |
-
queryApiResponse: QueryApiResponse | null
|
| 12 |
-
message?: string
|
| 13 |
-
}) {
|
| 14 |
-
const importsSkipReason = queryApiResponse?.meta?.imports_skip_reason
|
| 15 |
-
const isRealtime = queryApiResponse?.extraContext.isRealtime
|
| 16 |
-
|
| 17 |
-
const tooltipMessage =
|
| 18 |
-
importsSkipReason === 'unsupported_query' && !isRealtime
|
| 19 |
-
? (message ?? 'Imported data is excluded due to applied filters')
|
| 20 |
-
: null
|
| 21 |
-
|
| 22 |
-
return tooltipMessage ? <WarningBubble message={tooltipMessage} /> : null
|
| 23 |
-
}
|
| 24 |
-
|
| 25 |
-
/**
|
| 26 |
-
* Renders an imported warning bubble for "Funnels" and "Explore" tabs.
|
| 27 |
-
* Currently, while the funnel and exploration queries silently ignore
|
| 28 |
-
* everything related to imports, we should still let the user know that
|
| 29 |
-
* imports are not included in those reports. Therefore, we rely on the
|
| 30 |
-
* Top Stats response (i.e. the importedDataInView state) to know whether
|
| 31 |
-
* imported data is in range, and if so, we render the warning bubble.
|
| 32 |
-
*/
|
| 33 |
-
export function FunnelsApiImportedWarningBubble({
|
| 34 |
-
importedDataInView
|
| 35 |
-
}: {
|
| 36 |
-
importedDataInView?: boolean
|
| 37 |
-
}) {
|
| 38 |
-
return importedDataInView ? (
|
| 39 |
-
<WarningBubble message="Imported data is unavailable in this view" />
|
| 40 |
-
) : null
|
| 41 |
-
}
|
| 42 |
-
|
| 43 |
-
function WarningBubble({ message }: { message: string }) {
|
| 44 |
-
const portalRef = useBodyPortalRef()
|
| 45 |
-
return (
|
| 46 |
-
<Tooltip info={message} containerRef={portalRef}>
|
| 47 |
-
<ExclamationCircleIcon className="mb-1 size-4.5 text-gray-500 dark:text-gray-400" />
|
| 48 |
-
</Tooltip>
|
| 49 |
-
)
|
| 50 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|