Skip to content

Commit

Permalink
chore(deps): upgrade argo-ui, including one breaking change
Browse files Browse the repository at this point in the history
- upgrade to https://github.com/argoproj/argo-ui/tree/a7b01f9f009aa9161da21f450b5aab2f0732eb74

- `moment` is no longer used internally by `argo-ui`, so change `Ticker` usage to account for this
  - CD should also remove the deprecated `moment` library for the same reasons as downstream and Workflows

Signed-off-by: Anton Gilgur <agilgur5@gmail.com>
  • Loading branch information
Anton Gilgur committed Aug 22, 2024
1 parent a0a5a18 commit 8f44ca8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export const ApplicationOperationState: React.StatelessComponent<Props> = ({appl
title: 'DURATION',
value: (
<Ticker>
{time => <Duration durationMs={((operationState.finishedAt && moment(operationState.finishedAt)) || time).diff(moment(operationState.startedAt)) / 1000} />}
{time => <Duration durationMs={((operationState.finishedAt && moment(operationState.finishedAt)) || moment(time)).diff(moment(operationState.startedAt)) / 1000} />}
</Ticker>
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ export const ClusterDetails = (props: RouteComponentProps<{server: string}>) =>
if (!cluster.info.connectionState.attemptedAt) {
return <span>Never (next refresh in few seconds)</span>;
}
const secondsBeforeRefresh = Math.round(Math.max(10 - now.diff(moment(cluster.info.connectionState.attemptedAt)) / 1000, 1));
const secondsBeforeRefresh = Math.round(Math.max(10 - moment(now).diff(moment(cluster.info.connectionState.attemptedAt)) / 1000, 1));
return (
<React.Fragment>
<Timestamp date={cluster.info.connectionState.attemptedAt} /> (next refresh in {secondsBeforeRefresh} seconds)
Expand Down
3 changes: 1 addition & 2 deletions ui/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2893,7 +2893,7 @@ arg@^4.1.0:

"argo-ui@git+https://github.com/argoproj/argo-ui.git":
version "1.0.0"
resolved "git+https://github.com/argoproj/argo-ui.git#4836620cfc729d7c732b9b562fc4c03051e9598a"
resolved "git+https://github.com/argoproj/argo-ui.git#a7b01f9f009aa9161da21f450b5aab2f0732eb74"
dependencies:
"@fortawesome/fontawesome-free" "^6.2.1"
"@tippy.js/react" "^3.1.1"
Expand All @@ -2902,7 +2902,6 @@ arg@^4.1.0:
core-js "^3.32.1"
foundation-sites "^6.4.3"
history "^4.10.1"
moment "^2.29.4"
prop-types "^15.8.1"
react-autocomplete "1.8.1"
react-form "^2.16.0"
Expand Down

0 comments on commit 8f44ca8

Please sign in to comment.