Skip to content

Commit

Permalink
VTAdmin: Add advanced workflow switchtraffic options (#17658)
Browse files Browse the repository at this point in the history
Signed-off-by: Noble Mittal <noblemittal@outlook.com>
  • Loading branch information
beingnoble03 authored Feb 25, 2025
1 parent 82d21e5 commit afdb26b
Show file tree
Hide file tree
Showing 7 changed files with 667 additions and 46 deletions.
10 changes: 0 additions & 10 deletions go/vt/vtadmin/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -2878,16 +2878,6 @@ func (api *API) WorkflowSwitchTraffic(ctx context.Context, req *vtadminpb.Workfl
return nil, err
}

// Set the default options which are not supported in VTAdmin Web.
req.Request.TabletTypes = []topodatapb.TabletType{
topodatapb.TabletType_PRIMARY,
topodatapb.TabletType_REPLICA,
topodatapb.TabletType_RDONLY,
}
req.Request.Timeout = protoutil.DurationToProto(workflow.DefaultTimeout)
req.Request.MaxReplicationLagAllowed = protoutil.DurationToProto(vreplcommon.MaxReplicationLagDefault)
req.Request.EnableReverseReplication = true

return c.Vtctld.WorkflowSwitchTraffic(ctx, req.Request)
}

Expand Down
1 change: 1 addition & 0 deletions web/vtadmin/src/components/dialog/Dialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ const Dialog: React.FC<DialogProps> = ({
disabled={loading}
type="button"
className="btn"
data-testid="confirm-btn"
onClick={() => {
onConfirm?.();
}}
Expand Down
1 change: 1 addition & 0 deletions web/vtadmin/src/components/dropdown/Dropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export const DropdownButton: React.FC<{ icon: Icons; title?: string; className?:
className
)}
id="menu-button"
data-testid="dropdown-btn"
aria-haspopup="true"
aria-label={title || 'change'}
title={title || 'change'}
Expand Down
Loading

0 comments on commit afdb26b

Please sign in to comment.