Skip to content

Commit

Permalink
Merge pull request #83 from smartcontractkit/ggoh/OPCORE-891/rename-t…
Browse files Browse the repository at this point in the history
…o-job-distributor

[OPCORE-891] fix: Rename Feeds Manager -> Job Distributors
  • Loading branch information
graham-chainlink committed Sep 3, 2024
2 parents 094d250 + cfd4ce8 commit d70bea1
Show file tree
Hide file tree
Showing 21 changed files with 41 additions and 35 deletions.
5 changes: 5 additions & 0 deletions .changeset/modern-balloons-sneeze.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@smartcontractkit/operator-ui': minor
---

Rename Feeds Manager to Job Distributor
2 changes: 1 addition & 1 deletion src/Private.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ const Private = ({ classes }: { classes: { content: string } }) => {
<ConfigPage />
</PrivateRoute>

<PrivateRoute path="/feeds_manager">
<PrivateRoute path="/job_distributors">
<FeedsManagerPage />
</PrivateRoute>

Expand Down
4 changes: 2 additions & 2 deletions src/components/Form/FeedsManagerForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export const FeedsManagerForm: React.FC<Props> = ({
label="URI"
required
fullWidth
helperText="Provided by the Feeds Manager operator"
helperText="Provided by the Job Distributor operator"
FormHelperTextProps={{ 'data-testid': 'uri-helper-text' }}
/>
</Grid>
Expand All @@ -74,7 +74,7 @@ export const FeedsManagerForm: React.FC<Props> = ({
label="Public Key"
required
fullWidth
helperText="Provided by the Feeds Manager operator"
helperText="Provided by the Job Distributor operator"
FormHelperTextProps={{ 'data-testid': 'publicKey-helper-text' }}
/>
</Grid>
Expand Down
11 changes: 6 additions & 5 deletions src/pages/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ const Drawer = withStyles(drawerStyles)(
<ListItem
button
component={() => (
<BaseLink href={'/feeds_manager'}>
<ListItemText primary="Feeds Manager" />
<BaseLink href={'/job_distributors'}>
<ListItemText primary="Job Distributors" />
</BaseLink>
)}
className={classes.menuitem}
Expand Down Expand Up @@ -190,13 +190,14 @@ const Nav = withStyles(navStyles)(
{isFeedsManagerFeatureEnabled && (
<ListItem className={classes.horizontalNavItem}>
<BaseLink
href={'/feeds_manager'}
href={'/job_distributors'}
className={classNames(
classes.horizontalNavLink,
pathname.includes('/feeds_manager') && classes.activeNavLink,
pathname.includes('/job_distributors') &&
classes.activeNavLink,
)}
>
Feeds Manager
Job Distributors
</BaseLink>
</ListItem>
)}
Expand Down
2 changes: 1 addition & 1 deletion src/screens/Bridges/BridgesScreen.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function renderComponent(mocks: MockedResponse[]) {
</MockedProvider>
</Route>

<Route path="/feeds_manager/new">Redirect Success</Route>
<Route path="/job_distributors/new">Redirect Success</Route>
</>,
{ initialEntries: ['/bridges?per=2'] },
)
Expand Down
8 changes: 4 additions & 4 deletions src/screens/EditFeedsManager/EditFeedsManagerScreen.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ function renderComponent(mocks: MockedResponse[]) {
</MockedProvider>
</Route>

<Route exact path="/feeds_manager/new">
<Route exact path="/job_distributors/new">
New Redirect Success
</Route>
<Route exact path="/feeds_manager">
<Route exact path="/job_distributors">
Root Redirect Success
</Route>
</>,
Expand Down Expand Up @@ -61,7 +61,7 @@ describe('EditFeedsManagerScreen', () => {

await waitForElementToBeRemoved(() => queryByRole('progressbar'))

expect(await findByText('Edit Feeds Manager')).toBeInTheDocument()
expect(await findByText('Edit Job Distributor')).toBeInTheDocument()
expect(await findByTestId('feeds-manager-form')).toBeInTheDocument()
})

Expand Down Expand Up @@ -167,7 +167,7 @@ describe('EditFeedsManagerScreen', () => {

userEvent.click(getByRole('button', { name: /submit/i }))

expect(await findByText('Feeds Manager Updated')).toBeInTheDocument()
expect(await findByText('Job Distributor Updated')).toBeInTheDocument()
expect(await findByText('Root Redirect Success')).toBeInTheDocument()
})

Expand Down
6 changes: 3 additions & 3 deletions src/screens/EditFeedsManager/EditFeedsManagerScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export const EditFeedsManagerScreen: React.FC = () => {
return (
<Redirect
to={{
pathname: '/feeds_manager/new',
pathname: '/job_distributors/new',
state: { from: location },
}}
/>
Expand All @@ -96,9 +96,9 @@ export const EditFeedsManagerScreen: React.FC = () => {
const payload = result.data?.updateFeedsManager
switch (payload?.__typename) {
case 'UpdateFeedsManagerSuccess':
history.push('/feeds_manager')
history.push('/job_distributors')

dispatch(notifySuccessMsg('Feeds Manager Updated'))
dispatch(notifySuccessMsg('Job Distributor Updated'))

break
case 'NotFoundError':
Expand Down
2 changes: 1 addition & 1 deletion src/screens/EditFeedsManager/EditFeedsManagerView.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ describe('EditFeedsManagerView', () => {

render(<EditFeedsManagerView data={manager} onSubmit={handleSubmit} />)

expect(getByText('Edit Feeds Manager')).toBeInTheDocument()
expect(getByText('Edit Job Distributor')).toBeInTheDocument()
expect(getByTestId('feeds-manager-form')).toHaveFormValues({
name: 'Chainlink Feeds Manager',
uri: manager.uri,
Expand Down
2 changes: 1 addition & 1 deletion src/screens/EditFeedsManager/EditFeedsManagerView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export const EditFeedsManagerView: React.FC<Props> = ({ data, onSubmit }) => {
<Grid container>
<Grid item xs={12} md={11} lg={9}>
<Card>
<CardHeader title="Edit Feeds Manager" />
<CardHeader title="Edit Job Distributor" />
<CardContent>
<FeedsManagerForm
initialValues={initialValues}
Expand Down
2 changes: 1 addition & 1 deletion src/screens/FeedsManager/FeedsManagerCard.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function renderComponent(manager: FeedsManagerFields) {
<Route path="/">
<FeedsManagerCard manager={manager} />
</Route>
<Route path="/feeds_manager/edit">Redirect Success</Route>
<Route path="/job_distributors/edit">Redirect Success</Route>
</>,
)
}
Expand Down
2 changes: 1 addition & 1 deletion src/screens/FeedsManager/FeedsManagerCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export const FeedsManagerCard = ({ manager }: Props) => {
open={Boolean(anchorEl)}
onClose={handleClose}
>
<MenuItemLink to="/feeds_manager/edit">
<MenuItemLink to="/job_distributors/edit">
<ListItemIcon>
<EditIcon />
</ListItemIcon>
Expand Down
4 changes: 2 additions & 2 deletions src/screens/FeedsManager/FeedsManagerScreen.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function renderComponent(mocks: MockedResponse[]) {
</MockedProvider>
</Route>

<Route path="/feeds_manager/new">Redirect Success</Route>
<Route path="/job_distributors/new">Redirect Success</Route>
</>,
)
}
Expand All @@ -44,7 +44,7 @@ describe('FeedsManagerScreen', () => {

renderComponent(mocks)

expect(await findByText('Feeds Manager')).toBeInTheDocument()
expect(await findByText('Job Distributors')).toBeInTheDocument()
expect(await findByText('Job Proposals')).toBeInTheDocument()
})

Expand Down
2 changes: 1 addition & 1 deletion src/screens/FeedsManager/FeedsManagerScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export const FeedsManagerScreen: React.FC = () => {
return (
<Redirect
to={{
pathname: '/feeds_manager/new',
pathname: '/job_distributors/new',
state: { from: location },
}}
/>
Expand Down
2 changes: 1 addition & 1 deletion src/screens/FeedsManager/FeedsManagerView.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ describe('FeedsManagerView', () => {
</MockedProvider>,
)

expect(await findByText('Feeds Manager')).toBeInTheDocument()
expect(await findByText('Job Distributors')).toBeInTheDocument()
expect(await findByText('Job Proposals')).toBeInTheDocument()
})
})
2 changes: 1 addition & 1 deletion src/screens/FeedsManager/FeedsManagerView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const FeedsManagerView: React.FC<Props> = ({ manager }) => {
return (
<Grid container spacing={16}>
<Grid item xs={12}>
<Heading1>Feeds Manager</Heading1>
<Heading1>Job Distributors</Heading1>
</Grid>
<Grid item xs={12}>
<FeedsManagerCard manager={manager} />
Expand Down
2 changes: 1 addition & 1 deletion src/screens/JobProposal/JobProposalScreen.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ function renderComponent(mocks: MockedResponse[]) {
</MockedProvider>
</Route>

<Route exact path="/feeds_manager">
<Route exact path="/job_distributors">
Root Redirect Success
</Route>
</>,
Expand Down
2 changes: 1 addition & 1 deletion src/screens/JobProposal/JobProposalScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ export const JobProposalScreen: React.FC = () => {
const payload = result.data?.approveJobProposalSpec
switch (payload?.__typename) {
case 'ApproveJobProposalSpecSuccess':
history.push('/feeds_manager')
history.push('/job_distributors')

setTimeout(() => dispatch(notifySuccessMsg('Spec approved')), 200)

Expand Down
6 changes: 3 additions & 3 deletions src/screens/NewFeedsManager/NewFeedsManagerScreen.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function renderComponent(mocks: MockedResponse[]) {
</MockedProvider>
</Route>

<Route path="/feeds_manager">Redirect Success</Route>
<Route path="/job_distributors">Redirect Success</Route>
</>,
)
}
Expand All @@ -56,7 +56,7 @@ describe('NewFeedsManagerScreen', () => {

await waitForElementToBeRemoved(() => screen.queryByRole('progressbar'))

expect(await findByText('Register Feeds Manager')).toBeInTheDocument()
expect(await findByText('Register Job Distributor')).toBeInTheDocument()
expect(await findByTestId('feeds-manager-form')).toBeInTheDocument()
})

Expand Down Expand Up @@ -141,7 +141,7 @@ describe('NewFeedsManagerScreen', () => {

userEvent.click(getByRole('button', { name: /submit/i }))

expect(await findByText('Feeds Manager Created')).toBeInTheDocument()
expect(await findByText('Job Distributor Created')).toBeInTheDocument()
expect(await findByText('Redirect Success')).toBeInTheDocument()
})

Expand Down
6 changes: 3 additions & 3 deletions src/screens/NewFeedsManager/NewFeedsManagerScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@ export const NewFeedsManagerScreen: React.FC = () => {
const payload = result.data?.createFeedsManager
switch (payload?.__typename) {
case 'CreateFeedsManagerSuccess':
history.push('/feeds_manager')
history.push('/job_distributors')

dispatch(notifySuccessMsg('Feeds Manager Created'))
dispatch(notifySuccessMsg('Job Distributor Created'))

break
case 'SingleFeedsManagerError':
Expand All @@ -115,7 +115,7 @@ export const NewFeedsManagerScreen: React.FC = () => {
return (
<Redirect
to={{
pathname: '/feeds_manager',
pathname: '/job_distributors',
state: { from: location },
}}
/>
Expand Down
2 changes: 1 addition & 1 deletion src/screens/NewFeedsManager/NewFeedsManagerView.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ describe('NewFeedsManagerView', () => {

render(<NewFeedsManagerView onSubmit={handleSubmit} />)

expect(getByText('Register Feeds Manager')).toBeInTheDocument()
expect(getByText('Register Job Distributor')).toBeInTheDocument()
expect(getByTestId('feeds-manager-form')).toHaveFormValues({
name: 'Chainlink Feeds Manager',
uri: '',
Expand Down
2 changes: 1 addition & 1 deletion src/screens/NewFeedsManager/NewFeedsManagerView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const NewFeedsManagerView: React.FC<Props> = ({ onSubmit }) => {
<Grid container>
<Grid item xs={12} md={11} lg={9}>
<Card>
<CardHeader title="Register Feeds Manager" />
<CardHeader title="Register Job Distributor" />
<CardContent>
<FeedsManagerForm
initialValues={initialValues}
Expand Down

0 comments on commit d70bea1

Please sign in to comment.