From f690347315878f3bba6af93f7d7d416856c51701 Mon Sep 17 00:00:00 2001 From: tanlang Date: Thu, 30 Nov 2023 00:10:05 +0800 Subject: [PATCH 1/3] feat: get all deal from droplet --- dashboard/src/component/deal-list.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dashboard/src/component/deal-list.js b/dashboard/src/component/deal-list.js index 22c78d9..cdd6631 100644 --- a/dashboard/src/component/deal-list.js +++ b/dashboard/src/component/deal-list.js @@ -3,13 +3,13 @@ import { InfoCircleOutlined, FormOutlined } from '@ant-design/icons'; import { useState } from "react" import { getDefaultFilters, InShort } from "./util"; import Card from "./card"; -import { useDeals, useMiners } from "../fetcher"; +import { useAllDeals, useDeals, useMiners } from "../fetcher"; import { dealState } from "../util"; export default function DealList(props) { const [selectedRowKeys, setSelectedRowKeys] = useState([]); const { data: miners } = useMiners() - const { data: deals } = useDeals({ miner: miners[0] }) + const { data: deals } = useAllDeals(miners) const ret = function (content) { return ( From bb51fcbdadbbcae99dcab9b505545caac72a454c Mon Sep 17 00:00:00 2001 From: tanlang Date: Thu, 30 Nov 2023 00:10:24 +0800 Subject: [PATCH 2/3] feat: allow put cross ori --- route/route.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/route/route.go b/route/route.go index 5f0b1d9..ded7969 100644 --- a/route/route.go +++ b/route/route.go @@ -37,7 +37,7 @@ func registerRoute(s *service.ServiceImpl, boardPath string) http.Handler { func corsMiddleWare() gin.HandlerFunc { return func(c *gin.Context) { c.Header("Access-Control-Allow-Origin", "*") - c.Header("Access-Control-Allow-Methods", "GET, POST, DELETE, OPTIONS") + c.Header("Access-Control-Allow-Methods", "GET,PUT, POST, DELETE, OPTIONS") c.Header("Access-Control-Allow-Headers", "DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,"+ "If-Modified-Since,Cache-Control,Content-Type,Authorization,X-Forwarded-For,Origin,"+ From 4a58a498b8b83896b624cf513e1a3aa1295be203 Mon Sep 17 00:00:00 2001 From: tanlang Date: Thu, 30 Nov 2023 09:00:48 +0800 Subject: [PATCH 3/3] fix: correct thread state --- dashboard/src/component/sealing-thread-list.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dashboard/src/component/sealing-thread-list.js b/dashboard/src/component/sealing-thread-list.js index 585b800..ba9d8f8 100644 --- a/dashboard/src/component/sealing-thread-list.js +++ b/dashboard/src/component/sealing-thread-list.js @@ -253,8 +253,8 @@ function preprocess(data) { Location: thread.location, Plan: thread.plan, JobID: thread.job_id, - Paused: thread.paused, - PausedElapsed: thread.paused_elapsed, + Paused: thread.thread_state.state == "Paused", + PausedElapsed: thread.thread_state.elapsed, State: thread.job_state, LastErr: thread.last_error, WorkerName: thread.WorkerInfo.Name,