Skip to content

Commit

Permalink
fix(jobs): running status
Browse files Browse the repository at this point in the history
  • Loading branch information
RemiBonnet committed Dec 22, 2022
1 parent 74eb8c6 commit f7e2771
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 6 deletions.
Expand Up @@ -5,6 +5,7 @@ export interface WebsocketRunningStatusInterface {
applications?: ServiceRunningStatus[]
containers?: ServiceRunningStatus[]
databases?: ServiceRunningStatus[]
jobs?: ServiceRunningStatus[]
id: string
project_id: string
state: RunningStatus
Expand Down
Expand Up @@ -17,8 +17,8 @@ export function StatusChip(props: StatusChipProps) {
function showRunningIcon(): boolean {
switch (status) {
case StateEnum.DEPLOYED:
return true
case StateEnum.RUNNING:
case StateEnum.COMPLETED:
return true
default:
return false
Expand Down Expand Up @@ -61,6 +61,7 @@ export function StatusChip(props: StatusChipProps) {
case StateEnum.STOP_ERROR:
case StateEnum.DELETE_ERROR:
case RunningStatus.ERROR:
case RunningStatus.WARNING:
return true
default:
return false
Expand Down
Expand Up @@ -49,12 +49,17 @@ export function ClusterWebSocket(props: ClusterWebSocketProps) {
(message: { environments: WebsocketRunningStatusInterface[] }, listEnvironmentIdFromCluster: string[]): void => {
let runningApplication: ServiceRunningStatus[] = []
message.environments.forEach((env) => {
console.log(env)

if (env.applications && env.applications.length) {
runningApplication = [...runningApplication, ...env.applications]
}
if (env.containers && env.containers.length) {
runningApplication = [...runningApplication, ...env.containers]
}
if (env.jobs && env.jobs.length) {
runningApplication = [...runningApplication, ...env.jobs]
}
})

dispatch(
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -54,7 +54,7 @@
"msw": "^0.42.1",
"postcss": "8.4.16",
"posthog-js": "^1.24.0",
"qovery-typescript-axios": "^1.1.54",
"qovery-typescript-axios": "^1.1.57",
"react": "18.2.0",
"react-beautiful-dnd": "^13.1.0",
"react-dom": "18.2.0",
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Expand Up @@ -16673,10 +16673,10 @@ q@^1.5.1:
resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7"
integrity sha512-kV/CThkXo6xyFEZUugw/+pIOywXcDbFYgSct5cT3gqlbkBE1SJdwy6UQoZvodiWF/ckQLZyDE/Bu1M6gVu5lVw==

qovery-typescript-axios@^1.1.54:
version "1.1.54"
resolved "https://registry.yarnpkg.com/qovery-typescript-axios/-/qovery-typescript-axios-1.1.54.tgz#f3a82274af0f936fda420df45693e474069d8abf"
integrity sha512-HeH6CCLRJUX9avEw7natPoRbpTZKDqtG/e2AJ1i4BnvIc0GBJUSYhO1z5LZbgg7ur306tiwXaIJhURvE4FyAjQ==
qovery-typescript-axios@^1.1.57:
version "1.1.57"
resolved "https://registry.yarnpkg.com/qovery-typescript-axios/-/qovery-typescript-axios-1.1.57.tgz#1a652f27c2f2b0872b7166374f9a8b44126b6f76"
integrity sha512-rqA2v/O7K+oQuBM3gDU9ie4f7hxG4KndpuJom9aZp6Y3vFSQ05YMbtBImyk//yMk5IG+PakP1hjjibonzOO9kA==
dependencies:
axios "^0.21.4"

Expand Down

0 comments on commit f7e2771

Please sign in to comment.