diff --git a/USERS.md b/USERS.md index 8d785ec6ab7c..b8f4e2567a95 100644 --- a/USERS.md +++ b/USERS.md @@ -104,3 +104,4 @@ Currently, the following organizations are **officially** using Argo Workflows: 1. [UFirstGroup](https://www.ufirstgroup.com) 1. [Wavefront](https://www.wavefront.com/) 1. [Wellcome Trust](https://wellcome.ac.uk/) +1. [Woolworths Group](https://www.woolworthsgroup.com.au/) diff --git a/ui/src/app/reports/components/reports.tsx b/ui/src/app/reports/components/reports.tsx index 70ef43b99899..af431a774d91 100644 --- a/ui/src/app/reports/components/reports.tsx +++ b/ui/src/app/reports/components/reports.tsx @@ -1,4 +1,4 @@ -import {Checkbox, DataLoader, Page, Select} from 'argo-ui/src/index'; +import {Checkbox, Page} from 'argo-ui/src/index'; import {ChartOptions} from 'chart.js'; import 'chartjs-plugin-annotation'; import * as React from 'react'; @@ -7,8 +7,9 @@ import {RouteComponentProps} from 'react-router-dom'; import {getColorForNodePhase, NODE_PHASE, Workflow} from '../../../models'; import {uiUrl} from '../../shared/base'; import {BasePage} from '../../shared/components/base-page'; +import {DataLoaderDropdown} from '../../shared/components/data-loader-dropdown'; import {ErrorNotice} from '../../shared/components/error-notice'; -import {InputFilter} from '../../shared/components/input-filter'; +import {NamespaceFilter} from '../../shared/components/namespace-filter'; import {TagsInput} from '../../shared/components/tags-input/tags-input'; import {ZeroState} from '../../shared/components/zero-state'; import {Consumer, ContextApis} from '../../shared/context'; @@ -43,18 +44,10 @@ export class Reports extends BasePage, State> { this.setLabel(labelKeyPhase, value); } - private get workflowTemplate() { - return this.getLabel(labelKeyWorkflowTemplate); - } - private set workflowTemplate(value: string) { this.setLabel(labelKeyWorkflowTemplate, value); } - private get cronWorkflow() { - return this.getLabel(labelKeyCronWorkflow); - } - private set cronWorkflow(value: string) { this.setLabel(labelKeyCronWorkflow, value); } @@ -257,11 +250,11 @@ export class Reports extends BasePage, State> {

Namespace

- this.fetchReport(namespace, this.state.labels, this.state.archivedWorkflows)} + onChange={namespace => { + this.fetchReport(namespace, this.state.labels, this.state.archivedWorkflows); + }} />
@@ -274,15 +267,17 @@ export class Reports extends BasePage, State> {

Workflow Template

- services.workflowTemplate.list(this.state.namespace).then(list => list.map(x => x.metadata.name))}> - {list => (this.cronWorkflow = x.value)} />} - + list.map(x => x.metadata.name))} + onChange={value => (this.cronWorkflow = value)} + />

Phase

diff --git a/ui/src/app/shared/components/data-loader-dropdown.tsx b/ui/src/app/shared/components/data-loader-dropdown.tsx new file mode 100644 index 000000000000..fb1aa5b0e8cf --- /dev/null +++ b/ui/src/app/shared/components/data-loader-dropdown.tsx @@ -0,0 +1,21 @@ +import {DataLoader, Select, SelectOption} from 'argo-ui'; +import * as React from 'react'; + +export const DataLoaderDropdown = (props: {load: Promise<(string | SelectOption)[]>; onChange: (value: string) => void}) => { + const [selected, setSelected] = React.useState(''); + + return ( + props.load}> + {list => ( +