Skip to content

Commit

Permalink
refac: Replace move_tables with movetables
Browse files Browse the repository at this point in the history
Signed-off-by: Noble Mittal <noblemittal@outlook.com>
  • Loading branch information
beingnoble03 committed Sep 19, 2024
1 parent 843bb32 commit 7911f66
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion go/vt/vtadmin/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ func (api *API) Handler() http.Handler {
router.HandleFunc("/workflow/{cluster_id}/{keyspace}/{name}/status", httpAPI.Adapt(vtadminhttp.GetWorkflowStatus)).Name("API.GetWorkflowStatus")
router.HandleFunc("/workflow/{cluster_id}/{keyspace}/{name}/start", httpAPI.Adapt(vtadminhttp.StartWorkflow)).Name("API.StartWorkflow")
router.HandleFunc("/workflow/{cluster_id}/{keyspace}/{name}/stop", httpAPI.Adapt(vtadminhttp.StopWorkflow)).Name("API.StopWorkflow")
router.HandleFunc("/workflow/{cluster_id}/move_tables", httpAPI.Adapt(vtadminhttp.MoveTablesCreate)).Name("API.MoveTablesCreate").Methods("POST")
router.HandleFunc("/workflow/{cluster_id}/movetables", httpAPI.Adapt(vtadminhttp.MoveTablesCreate)).Name("API.MoveTablesCreate").Methods("POST")

experimentalRouter := router.PathPrefix("/experimental").Subrouter()
experimentalRouter.HandleFunc("/tablet/{tablet}/debug/vars", httpAPI.Adapt(experimental.TabletDebugVarsPassthrough)).Name("API.TabletDebugVarsPassthrough")
Expand Down
2 changes: 1 addition & 1 deletion go/vt/vtadmin/http/workflows.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ func StopWorkflow(ctx context.Context, r Request, api *API) *JSONResponse {
// MoveTablesCreate implements the http wrapper for the VTAdminServer.MoveTablesCreate
// method.
//
// Its route is /workflow/{cluster_id}/move_tables
// Its route is /workflow/{cluster_id}/movetables
func MoveTablesCreate(ctx context.Context, r Request, api *API) *JSONResponse {
vars := r.Vars()
decoder := json.NewDecoder(r.Body)
Expand Down
2 changes: 1 addition & 1 deletion web/vtadmin/src/api/http.ts
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ export interface CreateMoveTablesParams {
}

export const createMoveTables = async ({ clusterID, request }: CreateMoveTablesParams) => {
const { result } = await vtfetch(`/api/workflow/${clusterID}/move_tables`, {
const { result } = await vtfetch(`/api/workflow/${clusterID}/movetables`, {
body: JSON.stringify(request),
method: 'post',
});
Expand Down
2 changes: 1 addition & 1 deletion web/vtadmin/src/components/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export const App = () => {
</Route>

{!isReadOnlyMode() && (
<Route exact path="/workflows/move_tables/create">
<Route exact path="/workflows/movetables/create">
<CreateMoveTables />
</Route>
)}
Expand Down
2 changes: 1 addition & 1 deletion web/vtadmin/src/components/routes/Workflows.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ export const Workflows = () => {
title="Create Workflow"
className="!text-[32px] w-16 h-16"
>
<Link to="/workflows/move_tables/create">
<Link to="/workflows/movetables/create">
<MenuItem>MoveTables</MenuItem>
</Link>
<MenuItem disabled>Reshard</MenuItem>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ export const CreateMoveTables = () => {
/>
<Label label="All Tables" />
</div>
If enabled, the move will copy all the tables from source keyspace.
If enabled, the workflow will copy all the tables from source keyspace.
</div>

<h3 className="mt-8 mb-2">Advanced</h3>
Expand Down Expand Up @@ -291,7 +291,7 @@ export const CreateMoveTables = () => {
/>
<Label label="Auto Start" />
</div>
If enabled, the move will be started automatically.
If enabled, the workflow will be started automatically.
</div>

{clustersQuery.isError && (
Expand Down

0 comments on commit 7911f66

Please sign in to comment.