Skip to content

Commit

Permalink
fix: Support resource actions for apps in different Namespace (#12115)
Browse files Browse the repository at this point in the history
Signed-off-by: Mike Bryant <mike.bryant@mettle.co.uk>

Signed-off-by: Mike Bryant <mike.bryant@mettle.co.uk>
  • Loading branch information
mikebryant authored and jannfis committed Jan 24, 2023
1 parent a94ff15 commit 37c0833
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ui/src/app/shared/services/applications-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -288,10 +288,11 @@ export class ApplicationsService {
.then(res => JSON.parse(res.manifest) as models.State);
}

public getResourceActions(name: string, appNamspace: string, resource: models.ResourceNode): Promise<models.ResourceAction[]> {
public getResourceActions(name: string, appNamespace: string, resource: models.ResourceNode): Promise<models.ResourceAction[]> {
return requests
.get(`/applications/${name}/resource/actions`)
.query({
appNamespace,
namespace: resource.namespace,
resourceName: resource.name,
version: resource.version,
Expand All @@ -301,10 +302,11 @@ export class ApplicationsService {
.then(res => (res.body.actions as models.ResourceAction[]) || []);
}

public runResourceAction(name: string, appNamspace: string, resource: models.ResourceNode, action: string): Promise<models.ResourceAction[]> {
public runResourceAction(name: string, appNamespace: string, resource: models.ResourceNode, action: string): Promise<models.ResourceAction[]> {
return requests
.post(`/applications/${name}/resource/actions`)
.query({
appNamespace,
namespace: resource.namespace,
resourceName: resource.name,
version: resource.version,
Expand Down

0 comments on commit 37c0833

Please sign in to comment.