-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
More UI tweaks and Drop Mirror UI (#599)
- Drop mirror button in mirrors page - Better text for unsupported source peer page - Better tables in mirrors page and peer page <img width="1176" alt="Screenshot 2023-10-31 at 1 00 37 PM" src="https://github.com/PeerDB-io/peerdb/assets/65964360/b93cd886-3143-4b34-94e0-bebc739bf6c3"> (Says 'Drop' when not loading) <img width="1459" alt="Screenshot 2023-10-31 at 1 55 46 PM" src="https://github.com/PeerDB-io/peerdb/assets/65964360/4f75c353-d800-4af0-9df9-24345d995a52">
- Loading branch information
1 parent
243ff7b
commit 79693fb
Showing
16 changed files
with
535 additions
and
257 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { UDropMirrorResponse } from '@/app/dto/MirrorsDTO'; | ||
import { ShutdownRequest, ShutdownResponse } from '@/grpc_generated/route'; | ||
import { GetFlowHttpAddressFromEnv } from '@/rpc/http'; | ||
|
||
export async function POST(request: Request) { | ||
const body = await request.json(); | ||
const { workflowId, flowJobName, sourcePeer, destinationPeer } = body; | ||
const flowServiceAddr = GetFlowHttpAddressFromEnv(); | ||
const req: ShutdownRequest = { | ||
workflowId, | ||
flowJobName, | ||
sourcePeer, | ||
destinationPeer, | ||
}; | ||
console.log('/drop/mirror: req:', req); | ||
const dropStatus: ShutdownResponse = await fetch( | ||
`${flowServiceAddr}/v1/mirrors/drop`, | ||
{ | ||
method: 'POST', | ||
body: JSON.stringify(req), | ||
} | ||
).then((res) => { | ||
return res.json(); | ||
}); | ||
let response: UDropMirrorResponse = { | ||
dropped: dropStatus.ok, | ||
}; | ||
|
||
return new Response(JSON.stringify(response)); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.