Skip to content

Commit a3fa993

Browse files
committed
Merge branch 'main' into dev
# Conflicts: # eslint.config.js # package.json # pnpm-lock.yaml # public/favicon.svg # src/Components/Event/Enums.ts # src/Services/Status.tsx
2 parents 7db353b + feef5a8 commit a3fa993

File tree

6 files changed

+135
-12
lines changed

6 files changed

+135
-12
lines changed

.github/workflows/check.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: check
2+
on: push
3+
jobs:
4+
check:
5+
runs-on: ubuntu-latest
6+
7+
steps:
8+
- uses: actions/checkout@v4
9+
10+
- name: Install pnpm
11+
uses: pnpm/action-setup@v4
12+
with:
13+
run_install: false
14+
15+
- name: Set up Node.js
16+
uses: actions/setup-node@v4
17+
with:
18+
node-version: "latest"
19+
cache: "pnpm"
20+
21+
- name: Install dependencies
22+
run: pnpm install
23+
24+
- name: Run ESLint
25+
run: pnpm lint
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
name: Docker Image Build
2+
3+
on:
4+
workflow_dispatch:
5+
6+
env:
7+
ORG: stackmon
8+
PROJECT: status-dashboard-v3-front
9+
10+
jobs:
11+
build:
12+
if: github.event.pull_request.merged == false
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- name: Docker meta
19+
id: meta
20+
uses: docker/metadata-action@v5
21+
with:
22+
images: |
23+
"${{ secrets.REGISTRY }}/${{ env.ORG }}/${{ env.PROJECT }}"
24+
tags: |
25+
type=schedule
26+
type=ref,event=branch
27+
type=ref,event=pr
28+
type=semver,pattern={{version}}
29+
type=semver,pattern={{major}}.{{minor}}
30+
type=semver,pattern={{major}}
31+
type=sha
32+
33+
- name: Set up Docker Buildx
34+
uses: docker/setup-buildx-action@v3
35+
36+
- name: Build and push
37+
uses: docker/build-push-action@v6
38+
with:
39+
context: .
40+
tags: ${{ steps.meta.outputs.tags }}
41+
labels: ${{ steps.meta.outputs.labels }}
42+
push: false
43+
secrets: |
44+
SD_BACKEND_URL=${{ secrets.SD_BACKEND_URL }}
45+
SD_CLIENT_ID=${{ secrets.SD_CLIENT_ID }}
46+
SD_AUTHORITY_URL=${{ secrets.SD_AUTHORITY_URL }}
47+
48+
push_manual:
49+
runs-on: ubuntu-latest
50+
51+
steps:
52+
- uses: actions/checkout@v4
53+
54+
- name: Docker meta
55+
id: meta
56+
uses: docker/metadata-action@v5
57+
with:
58+
images: |
59+
"${{ secrets.REGISTRY }}/${{ env.ORG }}/${{ env.PROJECT }}"
60+
tags: |
61+
type=schedule
62+
type=ref,event=branch
63+
type=ref,event=pr
64+
type=semver,pattern={{version}}
65+
type=semver,pattern={{major}}.{{minor}}
66+
type=semver,pattern={{major}}
67+
type=sha
68+
69+
- name: Set up Docker Buildx
70+
uses: docker/setup-buildx-action@v3
71+
72+
- name: Login to Container Registry
73+
uses: docker/login-action@v3
74+
with:
75+
registry: ${{ secrets.REGISTRY }}
76+
username: ${{ secrets.REGISTRY_USER }}
77+
password: ${{ secrets.REGISTRY_PASSWORD }}
78+
79+
- name: Build and push
80+
uses: docker/build-push-action@v6
81+
with:
82+
context: .
83+
tags: ${{ steps.meta.outputs.tags }}
84+
labels: ${{ steps.meta.outputs.labels }}
85+
push: true
86+
secrets: |
87+
SD_BACKEND_URL=${{ secrets.SD_BACKEND_URL }}
88+
SD_CLIENT_ID=${{ secrets.SD_CLIENT_ID }}
89+
SD_AUTHORITY_URL=${{ secrets.SD_AUTHORITY_URL }}

.github/workflows/docker-build-push-on-tag-or-release.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ on:
88
types: [published]
99

1010
env:
11-
ORG: opentelekomcloud
12-
PROJECT: status-dashboard-v3-api
11+
ORG: stackmon
12+
PROJECT: status-dashboard-v3-front
1313

1414
jobs:
1515
push_if_tag:
@@ -51,6 +51,6 @@ jobs:
5151
labels: ${{ steps.meta.outputs.labels }}
5252
push: true
5353
secrets: |
54-
SD_BACKEND_URL=${{ secrets.SD_BACKEND_URL }}
54+
SD_BACKEND_URL=${{ secrets.SD_BACKEND_URL_PROD }}
5555
SD_CLIENT_ID=${{ secrets.SD_CLIENT_ID }}
5656
SD_AUTHORITY_URL=${{ secrets.SD_AUTHORITY_URL }}

.github/workflows/docker-build.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ on:
55
types:
66
- opened
77
- closed
8-
- edited
98
- reopened
109
- synchronize
1110

src/Components/Event/Enums.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ export enum EventStatus {
6767
Cancelled = "Cancelled",
6868

6969
Reopened = "Reopened",
70+
Changed = "Changed",
7071
}
7172

7273
/**
@@ -101,6 +102,8 @@ export function GetStatusString(status: EventStatus): string {
101102
return StatusEnum.Completed;
102103
case EventStatus.Reopened:
103104
return StatusEnum.Reopened;
105+
case EventStatus.Changed:
106+
return StatusEnum.Changed;
104107
case EventStatus.Planned:
105108
return StatusEnum.Planned;
106109
case EventStatus.Cancelled:

src/Components/New/useNewForm.ts

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,9 @@ export function useNewForm() {
3030
}
3131

3232
_setTitle(value);
33-
!err && setValTitle(undefined);
34-
33+
if (!err) {
34+
setValTitle(undefined);
35+
}
3536
return !err;
3637
}
3738

@@ -69,8 +70,9 @@ export function useNewForm() {
6970
}
7071

7172
_setDescription(value);
72-
!err && setValDescription(undefined);
73-
73+
if (!err) {
74+
setValDescription(undefined);
75+
}
7476
return !err;
7577
}
7678

@@ -89,7 +91,9 @@ export function useNewForm() {
8991
err = true;
9092
}
9193

92-
!err && setValStart(undefined);
94+
if (!err) {
95+
setValStart(undefined);
96+
}
9397
_setStart(value);
9498

9599
return !err;
@@ -105,7 +109,9 @@ export function useNewForm() {
105109
err = true;
106110
}
107111

108-
!err && setValEnd(undefined);
112+
if (!err) {
113+
setValEnd(undefined);
114+
}
109115
_setEnd(value);
110116

111117
return !err;
@@ -128,8 +134,9 @@ export function useNewForm() {
128134
}
129135

130136
_setServices(updated);
131-
!err && setValServices(undefined);
132-
137+
if (!err) {
138+
setValServices(undefined);
139+
}
133140
return !err;
134141
}
135142

0 commit comments

Comments
 (0)