-
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.
UI: Edit Page and Refactor Edit Mirror Route (#1156)
You get above by clicking on this button: ![Screenshot 2024-01-25 at 9 01 52 PM](https://github.com/PeerDB-io/peerdb/assets/65964360/865cdd5b-f2b4-41a1-ac10-b7c5efe6fbe8) IdleTimeoutSeconds and SyncBatchSize can be changed anytime, tables can only be added IF mirror is paused, otherwise the button will be disabled. Additional changes for this: moved CDC dynamic properties to the main signal selector and blocking on the main signal selector while paused, so we can receive mirror edits even while paused. pass TableNameSchemaMapping from state always to NormalizeFlow in case new tables were added. added a new property to the tables component to disable selecting of tables already in the mirror. There is a bug where tables added to the mirror dynamically will not reflect in the status screen, will be fixed in a follow up PR. TableMappings Needs to be stored in state as well. --------- Co-authored-by: Kevin Biju <[email protected]> Co-authored-by: Kevin Biju <[email protected]>
- Loading branch information
1 parent
21c1b3e
commit 2b84440
Showing
26 changed files
with
406 additions
and
97 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { | ||
MirrorStatusRequest, | ||
MirrorStatusResponse, | ||
} from '@/grpc_generated/route'; | ||
import { GetFlowHttpAddressFromEnv } from '@/rpc/http'; | ||
|
||
export async function POST(request: Request) { | ||
const body: MirrorStatusRequest = await request.json(); | ||
const flowServiceAddr = GetFlowHttpAddressFromEnv(); | ||
console.log('/mirrors/state: req:', body); | ||
try { | ||
const res: MirrorStatusResponse = await fetch( | ||
`${flowServiceAddr}/v1/mirrors/${body.flowJobName}`, | ||
{ cache: 'no-store' } | ||
).then((res) => { | ||
return res.json(); | ||
}); | ||
|
||
return new Response(JSON.stringify(res)); | ||
} catch (e) { | ||
console.error(e); | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.