openreplay/frontend/app/components/Session/Player/SharedComponents/BackendLogs/StatusMessages.tsx
Delirium c144add4bd
Backend logs UI (#2635)
* backend integrations ui start

* some more ui things

* moving around some integration code

* add dynatrace

* add datadog, useform hook and other things to update backend logging integration forms

* change api queries

* backend logging modals

* tracker: fix some types

* remove deprecated integrations, update types

* some ui fixes and improvements

* update notifications on success/error

* ui: debugging log output, autoclose fix

* ui: some stuff for logs base64str

* ui: improve log formatting,  change datadog data format

* some improvs for logging irm

* ui: fixup for sentry
2024-10-29 15:15:28 +01:00

48 lines
1.2 KiB
TypeScript

import React from 'react';
import { client as settingsPath, CLIENT_TABS } from 'App/routes';
import { Icon } from 'UI';
import { LoadingOutlined } from '@ant-design/icons';
import { useHistory } from 'react-router-dom';
import { Button } from 'antd';
export function LoadingFetch({ provider }: { provider: string }) {
return (
<div
className={
'w-full h-full flex items-center justify-center flex-col gap-2'
}
>
<LoadingOutlined style={{ fontSize: 32 }} />
<div>Fetching logs from {provider}...</div>
</div>
);
}
export function FailedFetch({
provider,
onRetry,
}: {
provider: string;
onRetry: () => void;
}) {
const history = useHistory();
const intPath = settingsPath(CLIENT_TABS.INTEGRATIONS);
return (
<div
className={
'w-full h-full flex flex-col items-center justify-center gap-2'
}
>
<Icon name={'exclamation-circle'} size={32} />
<div className={'flex items-center gap-1'}>
<span>Failed to fetch logs from {provider}. </span>
<div className={'link'} onClick={onRetry}>
Retry
</div>
</div>
<div className={'link'} onClick={() => history.push(intPath)}>
Check Configuration
</div>
</div>
);
}