Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(server): Allow field selection for workflow-event endpoint (fixes #3163) #3165

Merged
merged 35 commits into from Jun 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
8b20eda
Add labels column to workflows list
rbreeze Jun 1, 2020
736cd00
feat(ui): add ability to filter workflows by label by clicking on a l…
rbreeze Jun 1, 2020
6af5d5d
Refactor labels column into its own component. Add show / hide button…
rbreeze Jun 1, 2020
0b4cf34
fix(ui): linting issue with FontAwesome tags not being self closing
rbreeze Jun 1, 2020
5001871
Fix no new line at EOF issue
rbreeze Jun 1, 2020
e88cd10
Linted
rbreeze Jun 2, 2020
b61ca97
Remove text-decoration from SHOW / HIDE buttons and remove async / aw…
rbreeze Jun 2, 2020
58e61f4
Merge branch 'master' of github.com:argoproj/argo into label-filtering
rbreeze Jun 2, 2020
9a7b5dc
Resize workflows list columns for better visibility.
rbreeze Jun 2, 2020
a7a7c02
Change variable name of workflow to match convention
rbreeze Jun 2, 2020
376d96f
Linted
rbreeze Jun 2, 2020
7186409
Refactor workflows list by separating out rows into an independent co…
rbreeze Jun 2, 2020
27db356
Merge branch 'master' of github.com:argoproj/argo into label-filtering
rbreeze Jun 2, 2020
85e115a
Style labels to emphasize which row they belong to
rbreeze Jun 2, 2020
c0b630f
Fix colors of label drawer for better contrast
rbreeze Jun 2, 2020
1a5031f
feat(ui): Add more details to workflow labels drawer: message, resour…
rbreeze Jun 3, 2020
d85d192
Linted
rbreeze Jun 3, 2020
45eab5d
Resolve merge conflicts
rbreeze Jun 3, 2020
b24ee90
Fix format of labels
rbreeze Jun 3, 2020
251f89f
Linted
rbreeze Jun 3, 2020
7ec9961
Add lazy loading for workflows list drawer
rbreeze Jun 3, 2020
59c21b0
Merge branch 'master' of github.com:argoproj/argo into info-drawer
rbreeze Jun 3, 2020
ae73519
fix(server): Allow for field selection for workflow-event endpoint. F…
rbreeze Jun 3, 2020
e57426f
Merge branch 'master' of github.com:argoproj/argo into workflow-watch…
rbreeze Jun 4, 2020
76227ff
Merge branch 'master' of github.com:argoproj/argo
rbreeze Jun 4, 2020
6f4b500
Merge branch 'master' of github.com:argoproj/argo
rbreeze Jun 4, 2020
3c2ba5b
Fix merge confict. Fix bug where workflow detail view did not receiev…
rbreeze Jun 4, 2020
162f495
Apply codegen changes
rbreeze Jun 4, 2020
1e850fc
Revert go.mod and go.sum
rbreeze Jun 5, 2020
2be295a
Merge branch 'master' of github.com:argoproj/argo
rbreeze Jun 5, 2020
a1cc740
Merge branch 'master' into workflow-watch-fields
rbreeze Jun 5, 2020
0900405
Remove 'fields' from workflow protobuf
rbreeze Jun 5, 2020
761c246
Apply codegen patch
rbreeze Jun 5, 2020
eb6b434
Add fields back to protobuf for list
rbreeze Jun 6, 2020
4882ea8
Apply codegen changes
rbreeze Jun 6, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 10 additions & 0 deletions ui/src/app/shared/services/workflows-service.ts
Expand Up @@ -37,6 +37,16 @@ export class WorkflowsService {
return requests.loadEventSource(url, true).map(data => JSON.parse(data).result as models.kubernetes.WatchEvent<Workflow>);
}

public watchFields(filter: {namespace?: string; name?: string; phases?: Array<string>; labels?: Array<string>}): Observable<models.kubernetes.WatchEvent<Workflow>> {
const params = this.queryParams(filter);
params.push(
`fields=result.object.metadata.name,result.object.metadata.namespace,result.object.status.finishedAt,result.object.status.startedAt,result.object.status.phase`
);
const url = `api/v1/workflow-events/${filter.namespace || ''}?${params.join('&')}`;

return requests.loadEventSource(url, true).map(data => JSON.parse(data).result as models.kubernetes.WatchEvent<Workflow>);
}

public retry(name: string, namespace: string) {
return requests.put(`api/v1/workflows/${namespace}/${name}/retry`).then(res => res.body as Workflow);
}
Expand Down
Expand Up @@ -170,7 +170,7 @@ export class WorkflowsList extends BasePage<RouteComponentProps<any>, State> {
})
.then(() => {
this.subscription = services.workflows
.watch({namespace: newNamespace, phases: selectedPhases, labels: selectedLabels})
.watchFields({namespace: newNamespace, phases: selectedPhases, labels: selectedLabels})
.map(workflowChange => {
const workflows = this.state.workflows;
if (!workflowChange) {
Expand Down