Skip to content

Commit ec115cc

Browse files
committed
Merge remote-tracking branch 'origin/main' into APL-702
2 parents 507680f + 745271c commit ec115cc

File tree

6 files changed

+55
-19
lines changed

6 files changed

+55
-19
lines changed

CHANGELOG.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,36 @@
22

33
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
44

5+
## [4.3.0](https://github.com/redkubes/otomi-api/compare/v4.2.0...v4.3.0) (2025-04-25)
6+
7+
8+
### Features
9+
10+
* add coverage report ([#688](https://github.com/redkubes/otomi-api/issues/688)) ([e39a4ee](https://github.com/redkubes/otomi-api/commit/e39a4ee2eb78dd13997fd2a8432c21cc2c0b694f))
11+
* new build page ([#678](https://github.com/redkubes/otomi-api/issues/678)) ([a075c4f](https://github.com/redkubes/otomi-api/commit/a075c4f22e1180c1aaa2fcc77d300f41849743a9))
12+
* remove id, teamId, and name from resource spec ([#689](https://github.com/redkubes/otomi-api/issues/689)) ([0add432](https://github.com/redkubes/otomi-api/commit/0add43211b3ac9ac525c02c56eac7edbfe6de668))
13+
* service page using form components ([#697](https://github.com/redkubes/otomi-api/issues/697)) ([a94061e](https://github.com/redkubes/otomi-api/commit/a94061ece618fff5b871f845349ff74ea9bb41be))
14+
* static team settings page ([#672](https://github.com/redkubes/otomi-api/issues/672)) ([e4b1756](https://github.com/redkubes/otomi-api/commit/e4b175689487c57874d05a647fa17d1d3260a4ee))
15+
* update dashboard endpoint for inventory section ([#700](https://github.com/redkubes/otomi-api/issues/700)) ([49c04d2](https://github.com/redkubes/otomi-api/commit/49c04d297dfc5b32ae18ed85c0d1266ef158717d))
16+
* update repo to work with single policy file ([#693](https://github.com/redkubes/otomi-api/issues/693)) ([670450f](https://github.com/redkubes/otomi-api/commit/670450f11ffc223cb2ce842329d41f09ce5267df))
17+
18+
19+
### Bug Fixes
20+
21+
* cluster schema ([#694](https://github.com/redkubes/otomi-api/issues/694)) ([ce30a4c](https://github.com/redkubes/otomi-api/commit/ce30a4c5937b504a437b7848a3a98f1634d16226))
22+
* do not drop name field from platform manifests ([#705](https://github.com/redkubes/otomi-api/issues/705)) ([c6dc108](https://github.com/redkubes/otomi-api/commit/c6dc10859a67a23edc01d9810b82097dce7719bf))
23+
* get the teamId from the query in the auth middleware ([#698](https://github.com/redkubes/otomi-api/issues/698)) ([925fbcc](https://github.com/redkubes/otomi-api/commit/925fbccb0a6ea0d5e6c34e905d399cef8e049348))
24+
* keep resourceQuota in expected format ([#691](https://github.com/redkubes/otomi-api/issues/691)) ([8badf5c](https://github.com/redkubes/otomi-api/commit/8badf5c838b0136f95a3b847fd210686dad88828))
25+
* pass down createdUser down to rootstack ([#686](https://github.com/redkubes/otomi-api/issues/686)) ([bbc2821](https://github.com/redkubes/otomi-api/commit/bbc28212ce22f736fba45e2cba62a1c6d32af42e))
26+
* redux store generation ([#687](https://github.com/redkubes/otomi-api/issues/687)) ([72ad046](https://github.com/redkubes/otomi-api/commit/72ad04603f5d9083be5c37f904653de884df1c8c))
27+
* replace git passwords from errors and logs ([#683](https://github.com/redkubes/otomi-api/issues/683)) ([3676f5e](https://github.com/redkubes/otomi-api/commit/3676f5edc9be89877640bff98949975653b64aa2))
28+
* workaround for team id needed in console ([#692](https://github.com/redkubes/otomi-api/issues/692)) ([2328665](https://github.com/redkubes/otomi-api/commit/2328665434cc6f6ad85cf4d667a29104b6907bd3))
29+
30+
31+
### Others
32+
33+
* bump express-openapi from 9.3.1 to 11.1.0 ([#609](https://github.com/redkubes/otomi-api/issues/609)) ([48a3cef](https://github.com/redkubes/otomi-api/commit/48a3cef50bb9c7f9e53076d5d1dab98a1d7c974f))
34+
535
## [4.2.0](https://github.com/redkubes/otomi-api/compare/v4.0.0...v4.2.0) (2025-04-07)
636

737

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@
163163
"tag": true
164164
}
165165
},
166-
"version": "4.2.0",
166+
"version": "4.3.0",
167167
"watch": {
168168
"build:models": {
169169
"patterns": [
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ const debug = Debug('otomi:api:v1:dashboard')
66

77
export default function (): OperationHandlerArray {
88
const get: Operation = [
9-
({ otomi, params: { teamId } }: OpenApiRequestExt, res): void => {
10-
debug(`getDashboard(${teamId})`)
11-
const v = otomi.getDashboard(teamId)
9+
({ otomi, query: { teamName } }: OpenApiRequestExt, res): void => {
10+
debug(`getDashboard(${teamName})`)
11+
const v = otomi.getDashboard(teamName as string)
1212
res.json(v)
1313
},
1414
]

src/openapi/api.yaml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1001,11 +1001,15 @@ paths:
10011001
schema:
10021002
$ref: '#/components/schemas/AplBackupResponse'
10031003

1004-
'/v1/teams/{teamId}/dashboard':
1005-
parameters:
1006-
- $ref: '#/components/parameters/teamParams'
1004+
'/v1/dashboard':
10071005
get:
10081006
operationId: getDashboard
1007+
parameters:
1008+
- name: teamName
1009+
in: query
1010+
description: Name of the team
1011+
schema:
1012+
type: string
10091013
responses:
10101014
<<: *DefaultGetResponses
10111015
'200':

src/otomi-stack.ts

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1411,21 +1411,23 @@ export default class OtomiStack {
14111411
return internalRepoUrls
14121412
}
14131413

1414-
getDashboard(teamId: string): Array<any> {
1415-
const projects = this.repoService.getTeamConfigService(teamId).getProjects()
1416-
const builds = this.repoService.getTeamConfigService(teamId).getBuilds()
1417-
const workloads = this.repoService.getTeamConfigService(teamId).getWorkloads()
1418-
const services = this.repoService.getTeamConfigService(teamId).getServices()
1419-
const secrets = this.repoService.getTeamConfigService(teamId).getSealedSecrets()
1420-
const netpols = this.repoService.getTeamConfigService(teamId).getNetpols()
1414+
getDashboard(teamName: string): Array<any> {
1415+
const projects = teamName ? this.repoService.getTeamConfigService(teamName).getProjects() : this.getAllProjects()
1416+
const builds = teamName ? this.repoService.getTeamConfigService(teamName).getBuilds() : this.getAllBuilds()
1417+
const workloads = teamName ? this.repoService.getTeamConfigService(teamName).getWorkloads() : this.getAllWorkloads()
1418+
const services = teamName ? this.repoService.getTeamConfigService(teamName).getServices() : this.getAllServices()
1419+
const secrets = teamName
1420+
? this.repoService.getTeamConfigService(teamName).getSealedSecrets()
1421+
: this.getAllSealedSecrets()
1422+
const netpols = teamName ? this.repoService.getTeamConfigService(teamName).getNetpols() : this.getAllNetpols()
14211423

14221424
return [
14231425
{ name: 'projects', count: projects?.length },
1424-
{ name: 'builds', count: builds?.length },
1426+
{ name: 'container-images', count: builds?.length },
14251427
{ name: 'workloads', count: workloads?.length },
14261428
{ name: 'services', count: services?.length },
1427-
{ name: 'sealed secrets', count: secrets?.length },
1428-
{ name: 'network policies', count: netpols?.length },
1429+
{ name: 'sealed-secrets', count: secrets?.length },
1430+
{ name: 'network-policies', count: netpols?.length },
14291431
]
14301432
}
14311433

0 commit comments

Comments
 (0)