-
Notifications
You must be signed in to change notification settings - Fork 134
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Blitz - Add cf events page to cf, org and space levels (#4066)
* Basic events view * Improve events view * Tidying up a tad * Add events pages to org and space levels * Create copy-to-clipboard component, use for `copy guid` of actee * Wrap filters & list in component, inject filters into list * First pass of todos * Fix bug where new q overwrite previous q * Fix more todos * Improvements, apply new event list to org/space levels * Fix unit tests, code climate * Fix some api component test warnings * Fix new failing unit test * Fix failing e2e tests * Handle large details sections which borked the list performance * Tweaks following review * Show link instead of copy button, fix multiple api requests after single change * Fix unit test * Add clear button to the Actee GUID filter Co-authored-by: Neil MacDougall <nwmac@users.noreply.github.com>
- Loading branch information
1 parent
7c94858
commit 33770f2
Showing
98 changed files
with
1,565 additions
and
438 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
src/frontend/packages/cloud-foundry/src/actions/cf-event.actions.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
import { HttpParams, HttpRequest } from '@angular/common/http'; | ||
|
||
import { endpointSchemaKey } from '../../../store/src/helpers/entity-factory'; | ||
import { PaginatedAction } from '../../../store/src/types/pagination.types'; | ||
import { cfEntityFactory } from '../cf-entity-factory'; | ||
import { cfEventEntityType } from '../cf-entity-types'; | ||
import { createEntityRelationPaginationKey } from '../entity-relations/entity-relations.types'; | ||
import { CFStartAction } from './cf-action.types'; | ||
|
||
export const CfGetAllEvents = { | ||
GET_ALL: '[Cf Event] Get all', | ||
GET_ALL_SUCCESS: '[Cf Event] Get all success', | ||
GET_ALL_FAILED: '[Cf Event] Get all failed', | ||
}; | ||
|
||
export class GetAllCfEvents extends CFStartAction implements PaginatedAction { | ||
private static sortField = 'timestamp'; // This is the field that 'order-direction' is applied to. Cannot be changed | ||
|
||
constructor(public paginationKey: string, public endpointGuid) { | ||
super(); | ||
this.paginationKey = this.paginationKey || createEntityRelationPaginationKey(endpointSchemaKey, endpointGuid); | ||
this.options = new HttpRequest( | ||
'GET', | ||
'events', | ||
{ | ||
params: new HttpParams({ | ||
fromObject: { | ||
'': '' | ||
} | ||
}) | ||
} | ||
); | ||
} | ||
actions = [ | ||
CfGetAllEvents.GET_ALL, | ||
CfGetAllEvents.GET_ALL_SUCCESS, | ||
CfGetAllEvents.GET_ALL_FAILED | ||
]; | ||
|
||
entity = [cfEntityFactory(cfEventEntityType)]; | ||
entityType = cfEventEntityType; | ||
options: HttpRequest<any>; | ||
initialParams = { | ||
'order-direction': 'desc', | ||
'order-direction-field': GetAllCfEvents.sortField, | ||
q: [] | ||
// q: [ | ||
// new QParam('actee', this.appGuid, QParamJoiners.colon).toString(), | ||
// ] | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 0 additions & 18 deletions
18
...nd/packages/cloud-foundry/src/entity-action-builders/application-event.action-builders.ts
This file was deleted.
Oops, something went wrong.
16 changes: 16 additions & 0 deletions
16
src/frontend/packages/cloud-foundry/src/entity-action-builders/cf-event.action-builders.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { OrchestratedActionBuilders } from '../../../core/src/core/entity-catalogue/action-orchestrator/action-orchestrator'; | ||
import { GetAllCfEvents } from '../actions/cf-event.actions'; | ||
|
||
export interface CfEventActionBuilders extends OrchestratedActionBuilders { | ||
getMultiple: ( | ||
endpointGuid: string, | ||
paginationKey: string, | ||
) => GetAllCfEvents; | ||
} | ||
|
||
export const cfEventActionBuilders: CfEventActionBuilders = { | ||
getMultiple: ( | ||
endpointGuid: string, | ||
paginationKey: string, | ||
) => new GetAllCfEvents(paginationKey, endpointGuid) | ||
}; |
4 changes: 1 addition & 3 deletions
4
.../applications/application/application-tabs-base/tabs/events-tab/events-tab.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1 @@ | ||
<div class="events-tab"> | ||
<app-list></app-list> | ||
</div> | ||
<app-cloud-foundry-events-list [typeMustContain]="'audit.app'"></app-cloud-foundry-events-list> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.