kopia lustrzana https://github.com/bugout-dev/moonstream
Add fixes.
rodzic
c1a5d607c9
commit
098c4de6e8
|
|
@ -156,7 +156,11 @@ async def status_handler(
|
|||
|
||||
presigned_urls_response[subscription.id][timescale] = {
|
||||
"url": stats_presigned_url,
|
||||
"headers": {"If-Modified-Since": object["LastModified"]},
|
||||
"headers": {
|
||||
"If-Modified-Since": (
|
||||
object["LastModified"] + timedelta(seconds=1)
|
||||
).strftime("%c")
|
||||
},
|
||||
}
|
||||
except Exception as err:
|
||||
logger.warning(
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ const Analytics = () => {
|
|||
|
||||
const plotMinW = "250px";
|
||||
|
||||
const referesh_charts = () => {
|
||||
const refereshCharts = () => {
|
||||
refreshDashboard.mutate({
|
||||
dashboardId: dashboardCache.data.id,
|
||||
timeRange: timeRange,
|
||||
|
|
@ -164,7 +164,7 @@ const Analytics = () => {
|
|||
colorScheme="green"
|
||||
size="sm"
|
||||
onClick={() => {
|
||||
referesh_charts();
|
||||
refereshCharts();
|
||||
}}
|
||||
/>
|
||||
</Stack>
|
||||
|
|
|
|||
|
|
@ -58,8 +58,7 @@ const SubscriptionReport = ({
|
|||
[data]
|
||||
);
|
||||
|
||||
if ((failureCount < 1 && (!data || isLoading)) || isFetching)
|
||||
return <Spinner />;
|
||||
if (failureCount < 1 && (!data || isLoading)) return <Spinner />;
|
||||
if (failureCount >= 1 && (!data || isLoading)) {
|
||||
return (
|
||||
<Container
|
||||
|
|
@ -105,9 +104,7 @@ const SubscriptionReport = ({
|
|||
direction="column"
|
||||
>
|
||||
<Text fontSize="xs" textAlign="right">{`Latest block number: ${
|
||||
data?.blocks_state?.latest_labelled_block != undefined
|
||||
? data?.blocks_state?.latest_labelled_block
|
||||
: "Not available"
|
||||
data?.blocks_state?.latest_labelled_block ?? "Not available"
|
||||
}`}</Text>
|
||||
<Flex
|
||||
bgColor="blue.50"
|
||||
|
|
|
|||
|
|
@ -122,25 +122,19 @@ const useDashboard = (dashboardId) => {
|
|||
|
||||
const refreshDashboard = useMutation(DashboardService.refreshDashboard, {
|
||||
onSuccess: (data) => {
|
||||
let newData = {};
|
||||
|
||||
let oldData = queryClient.getQueryData([
|
||||
"dashboardLinks",
|
||||
{ dashboardId: dashboardId },
|
||||
]);
|
||||
|
||||
newData = oldData;
|
||||
|
||||
Object.keys(data.data).map((subscription) => {
|
||||
Object.keys(data.data[subscription]).map((timeScale) => {
|
||||
newData.data[subscription][timeScale] =
|
||||
data.data[subscription][timeScale];
|
||||
});
|
||||
});
|
||||
|
||||
queryClient.setQueryData(
|
||||
["dashboardLinks", { dashboardId: dashboardId }],
|
||||
newData
|
||||
(oldData) => {
|
||||
let newData = { ...oldData };
|
||||
|
||||
Object.keys(data.data).forEach((subscription) => {
|
||||
Object.keys(data.data[subscription]).forEach((timeScale) => {
|
||||
newData.data[subscription][timeScale] =
|
||||
data.data[subscription][timeScale];
|
||||
});
|
||||
});
|
||||
return newData;
|
||||
}
|
||||
);
|
||||
},
|
||||
onError: (error) => {
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ const usePresignedURL = ({
|
|||
method: "GET",
|
||||
};
|
||||
|
||||
if (headers != undefined) {
|
||||
if (headers) {
|
||||
Object.keys(headers).map((key) => {
|
||||
request_parameters["headers"][key] = headers[key];
|
||||
});
|
||||
|
|
|
|||
Ładowanie…
Reference in New Issue