diff --git a/ui/package.json b/ui/package.json index 266abef9230c..225383debbce 100644 --- a/ui/package.json +++ b/ui/package.json @@ -6,9 +6,9 @@ "src" ], "scripts": { - "build": "rm -Rf dist && NODE_ENV=production webpack --mode production --config ./src/app/webpack.config.js", - "start": "webpack-dev-server --config ./src/app/webpack.config.js", - "lint": "eslint --fix ./src/app && tsc --noEmit", + "build": "rm -Rf dist && NODE_ENV=production webpack --mode production", + "start": "webpack-dev-server", + "lint": "eslint --fix ./src && tsc --noEmit", "test": "jest", "deduplicate": "yarn-deduplicate -s fewer yarn.lock" }, diff --git a/ui/src/app/api-docs/api-docs.tsx b/ui/src/api-docs/api-docs.tsx similarity index 100% rename from ui/src/app/api-docs/api-docs.tsx rename to ui/src/api-docs/api-docs.tsx diff --git a/ui/src/app/api-docs/index.ts b/ui/src/api-docs/index.ts similarity index 100% rename from ui/src/app/api-docs/index.ts rename to ui/src/api-docs/index.ts diff --git a/ui/src/app/app-router.tsx b/ui/src/app-router.tsx similarity index 99% rename from ui/src/app/app-router.tsx rename to ui/src/app-router.tsx index 1c775d6809f0..3ec9445df5c6 100644 --- a/ui/src/app/app-router.tsx +++ b/ui/src/app-router.tsx @@ -8,7 +8,6 @@ import * as React from 'react'; import {useEffect, useState} from 'react'; import {Redirect, Route, Router, Switch} from 'react-router'; -import {Version} from '../models'; import apiDocs from './api-docs'; import clusterWorkflowTemplates from './cluster-workflow-templates'; import cronWorkflows from './cron-workflows'; @@ -23,6 +22,7 @@ import sensors from './sensors'; import {uiUrl} from './shared/base'; import {ChatButton} from './shared/components/chat-button'; import ErrorBoundary from './shared/components/error-boundary'; +import {Version} from './shared/models'; import * as nsUtils from './shared/namespaces'; import {services} from './shared/services'; import userinfo from './userinfo'; diff --git a/ui/src/app/app.tsx b/ui/src/app.tsx similarity index 100% rename from ui/src/app/app.tsx rename to ui/src/app.tsx diff --git a/ui/src/app/tsconfig.json b/ui/src/app/tsconfig.json deleted file mode 100644 index 75fca481f203..000000000000 --- a/ui/src/app/tsconfig.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "compilerOptions": { - "outDir": "./../../dist/app", - "sourceMap": true, - "noImplicitAny": true, - "isolatedModules": true, // for compatibility with esbuild - "module": "ES2020", // must be ES2020+ for dynamic imports: https://github.com/Microsoft/TypeScript/issues/16675, https://github.com/webpack/webpack/issues/5703#issuecomment-357512412 - "moduleResolution": "node", - "esModuleInterop": true, - "target": "es5", - "jsx": "react", - "experimentalDecorators": true, - "noUnusedLocals": true, - "declaration": false, - "downlevelIteration": true, - "lib": [ - "es2017", - "dom" - ] - }, - "include": [ - "./**/*" - ] -} diff --git a/ui/src/app/assets/fonts/Heebo-Regular.ttf b/ui/src/assets/fonts/Heebo-Regular.ttf similarity index 100% rename from ui/src/app/assets/fonts/Heebo-Regular.ttf rename to ui/src/assets/fonts/Heebo-Regular.ttf diff --git a/ui/src/app/cluster-workflow-templates/cluster-workflow-template-container.tsx b/ui/src/cluster-workflow-templates/cluster-workflow-template-container.tsx similarity index 100% rename from ui/src/app/cluster-workflow-templates/cluster-workflow-template-container.tsx rename to ui/src/cluster-workflow-templates/cluster-workflow-template-container.tsx diff --git a/ui/src/app/cluster-workflow-templates/cluster-workflow-template-creator.tsx b/ui/src/cluster-workflow-templates/cluster-workflow-template-creator.tsx similarity index 96% rename from ui/src/app/cluster-workflow-templates/cluster-workflow-template-creator.tsx rename to ui/src/cluster-workflow-templates/cluster-workflow-template-creator.tsx index de44ef82d164..1bd88a07f137 100644 --- a/ui/src/app/cluster-workflow-templates/cluster-workflow-template-creator.tsx +++ b/ui/src/cluster-workflow-templates/cluster-workflow-template-creator.tsx @@ -1,12 +1,12 @@ import * as React from 'react'; import {useState} from 'react'; -import {ClusterWorkflowTemplate} from '../../models'; import {Button} from '../shared/components/button'; import {ErrorNotice} from '../shared/components/error-notice'; import {ExampleManifests} from '../shared/components/example-manifests'; import {UploadButton} from '../shared/components/upload-button'; import {exampleClusterWorkflowTemplate} from '../shared/examples'; +import {ClusterWorkflowTemplate} from '../shared/models'; import {services} from '../shared/services'; import {ClusterWorkflowTemplateEditor} from './cluster-workflow-template-editor'; diff --git a/ui/src/app/cluster-workflow-templates/cluster-workflow-template-details.tsx b/ui/src/cluster-workflow-templates/cluster-workflow-template-details.tsx similarity index 98% rename from ui/src/app/cluster-workflow-templates/cluster-workflow-template-details.tsx rename to ui/src/cluster-workflow-templates/cluster-workflow-template-details.tsx index 3511d249a13d..9a3b6a96904f 100644 --- a/ui/src/app/cluster-workflow-templates/cluster-workflow-template-details.tsx +++ b/ui/src/cluster-workflow-templates/cluster-workflow-template-details.tsx @@ -5,14 +5,14 @@ import * as React from 'react'; import {useContext, useEffect, useState} from 'react'; import {RouteComponentProps} from 'react-router'; -import * as models from '../../models'; -import {ClusterWorkflowTemplate, Workflow} from '../../models'; import {uiUrl} from '../shared/base'; import {ErrorNotice} from '../shared/components/error-notice'; import {Loading} from '../shared/components/loading'; import {ZeroState} from '../shared/components/zero-state'; import {Context} from '../shared/context'; import {historyUrl} from '../shared/history'; +import * as models from '../shared/models'; +import {ClusterWorkflowTemplate, Workflow} from '../shared/models'; import * as nsUtils from '../shared/namespaces'; import {services} from '../shared/services'; import {useCollectEvent} from '../shared/use-collect-event'; diff --git a/ui/src/app/cluster-workflow-templates/cluster-workflow-template-editor.tsx b/ui/src/cluster-workflow-templates/cluster-workflow-template-editor.tsx similarity index 97% rename from ui/src/app/cluster-workflow-templates/cluster-workflow-template-editor.tsx rename to ui/src/cluster-workflow-templates/cluster-workflow-template-editor.tsx index 6a6bfd2010b6..a0241ffea71e 100644 --- a/ui/src/app/cluster-workflow-templates/cluster-workflow-template-editor.tsx +++ b/ui/src/cluster-workflow-templates/cluster-workflow-template-editor.tsx @@ -1,11 +1,11 @@ import {Tabs} from 'argo-ui/src/components/tabs/tabs'; import * as React from 'react'; -import {WorkflowTemplate} from '../../models'; import {LabelsAndAnnotationsEditor} from '../shared/components/editors/labels-and-annotations-editor'; import {MetadataEditor} from '../shared/components/editors/metadata-editor'; import {WorkflowParametersEditor} from '../shared/components/editors/workflow-parameters-editor'; import {ObjectEditor} from '../shared/components/object-editor'; +import {WorkflowTemplate} from '../shared/models'; export function ClusterWorkflowTemplateEditor({ onChange, diff --git a/ui/src/app/cluster-workflow-templates/cluster-workflow-template-link.tsx b/ui/src/cluster-workflow-templates/cluster-workflow-template-link.tsx similarity index 100% rename from ui/src/app/cluster-workflow-templates/cluster-workflow-template-link.tsx rename to ui/src/cluster-workflow-templates/cluster-workflow-template-link.tsx diff --git a/ui/src/app/cluster-workflow-templates/cluster-workflow-template-list.scss b/ui/src/cluster-workflow-templates/cluster-workflow-template-list.scss similarity index 100% rename from ui/src/app/cluster-workflow-templates/cluster-workflow-template-list.scss rename to ui/src/cluster-workflow-templates/cluster-workflow-template-list.scss diff --git a/ui/src/app/cluster-workflow-templates/cluster-workflow-template-list.tsx b/ui/src/cluster-workflow-templates/cluster-workflow-template-list.tsx similarity index 99% rename from ui/src/app/cluster-workflow-templates/cluster-workflow-template-list.tsx rename to ui/src/cluster-workflow-templates/cluster-workflow-template-list.tsx index ffbc976d2393..4b03930bad5a 100644 --- a/ui/src/app/cluster-workflow-templates/cluster-workflow-template-list.tsx +++ b/ui/src/cluster-workflow-templates/cluster-workflow-template-list.tsx @@ -4,7 +4,6 @@ import * as React from 'react'; import {useContext, useEffect, useState} from 'react'; import {Link, RouteComponentProps} from 'react-router-dom'; -import * as models from '../../models'; import {uiUrl} from '../shared/base'; import {ErrorNotice} from '../shared/components/error-notice'; import {ExampleManifests} from '../shared/components/example-manifests'; @@ -14,6 +13,7 @@ import {Timestamp, TimestampSwitch} from '../shared/components/timestamp'; import {ZeroState} from '../shared/components/zero-state'; import {Context} from '../shared/context'; import {Footnote} from '../shared/footnote'; +import * as models from '../shared/models'; import {services} from '../shared/services'; import {useCollectEvent} from '../shared/use-collect-event'; import {useQueryParams} from '../shared/use-query-params'; diff --git a/ui/src/app/cluster-workflow-templates/index.ts b/ui/src/cluster-workflow-templates/index.ts similarity index 100% rename from ui/src/app/cluster-workflow-templates/index.ts rename to ui/src/cluster-workflow-templates/index.ts diff --git a/ui/src/app/cron-workflows/cron-workflow-container.tsx b/ui/src/cron-workflows/cron-workflow-container.tsx similarity index 100% rename from ui/src/app/cron-workflows/cron-workflow-container.tsx rename to ui/src/cron-workflows/cron-workflow-container.tsx diff --git a/ui/src/app/cron-workflows/cron-workflow-creator.tsx b/ui/src/cron-workflows/cron-workflow-creator.tsx similarity index 97% rename from ui/src/app/cron-workflows/cron-workflow-creator.tsx rename to ui/src/cron-workflows/cron-workflow-creator.tsx index 4494218fc270..095eda7ddeca 100644 --- a/ui/src/app/cron-workflows/cron-workflow-creator.tsx +++ b/ui/src/cron-workflows/cron-workflow-creator.tsx @@ -1,12 +1,12 @@ import * as React from 'react'; import {useState} from 'react'; -import {CronWorkflow} from '../../models'; import {Button} from '../shared/components/button'; import {ErrorNotice} from '../shared/components/error-notice'; import {ExampleManifests} from '../shared/components/example-manifests'; import {UploadButton} from '../shared/components/upload-button'; import {exampleCronWorkflow} from '../shared/examples'; +import {CronWorkflow} from '../shared/models'; import * as nsUtils from '../shared/namespaces'; import {services} from '../shared/services'; import {CronWorkflowEditor} from './cron-workflow-editor'; diff --git a/ui/src/app/cron-workflows/cron-workflow-details.tsx b/ui/src/cron-workflows/cron-workflow-details.tsx similarity index 98% rename from ui/src/app/cron-workflows/cron-workflow-details.tsx rename to ui/src/cron-workflows/cron-workflow-details.tsx index 69d4f5a5ab40..ca7eaf1f2ef2 100644 --- a/ui/src/app/cron-workflows/cron-workflow-details.tsx +++ b/ui/src/cron-workflows/cron-workflow-details.tsx @@ -5,8 +5,6 @@ import * as React from 'react'; import {useContext, useEffect, useState} from 'react'; import {RouteComponentProps} from 'react-router'; -import * as models from '../../models'; -import {CronWorkflow, Link, Workflow} from '../../models'; import {uiUrl} from '../shared/base'; import {ErrorNotice} from '../shared/components/error-notice'; import {openLinkWithKey} from '../shared/components/links'; @@ -14,6 +12,8 @@ import {Loading} from '../shared/components/loading'; import {ZeroState} from '../shared/components/zero-state'; import {Context} from '../shared/context'; import {historyUrl} from '../shared/history'; +import * as models from '../shared/models'; +import {CronWorkflow, Link, Workflow} from '../shared/models'; import {services} from '../shared/services'; import {useCollectEvent} from '../shared/use-collect-event'; import {useEditableObject} from '../shared/use-editable-object'; diff --git a/ui/src/app/cron-workflows/cron-workflow-editor.tsx b/ui/src/cron-workflows/cron-workflow-editor.tsx similarity index 98% rename from ui/src/app/cron-workflows/cron-workflow-editor.tsx rename to ui/src/cron-workflows/cron-workflow-editor.tsx index a0cf0f38b716..e453157e34e0 100644 --- a/ui/src/app/cron-workflows/cron-workflow-editor.tsx +++ b/ui/src/cron-workflows/cron-workflow-editor.tsx @@ -1,11 +1,11 @@ import {Tabs} from 'argo-ui/src/components/tabs/tabs'; import * as React from 'react'; -import {CronWorkflow} from '../../models'; import {LabelsAndAnnotationsEditor} from '../shared/components/editors/labels-and-annotations-editor'; import {MetadataEditor} from '../shared/components/editors/metadata-editor'; import {WorkflowParametersEditor} from '../shared/components/editors/workflow-parameters-editor'; import {ObjectEditor} from '../shared/components/object-editor'; +import {CronWorkflow} from '../shared/models'; import {CronWorkflowSpecEditor} from './cron-workflow-spec-editior'; import {CronWorkflowStatusViewer} from './cron-workflow-status-viewer'; diff --git a/ui/src/app/cron-workflows/cron-workflow-filters.scss b/ui/src/cron-workflows/cron-workflow-filters.scss similarity index 100% rename from ui/src/app/cron-workflows/cron-workflow-filters.scss rename to ui/src/cron-workflows/cron-workflow-filters.scss diff --git a/ui/src/app/cron-workflows/cron-workflow-filters.tsx b/ui/src/cron-workflows/cron-workflow-filters.tsx similarity index 98% rename from ui/src/app/cron-workflows/cron-workflow-filters.tsx rename to ui/src/cron-workflows/cron-workflow-filters.tsx index bb5a401e806f..33bf88cca7b2 100644 --- a/ui/src/app/cron-workflows/cron-workflow-filters.tsx +++ b/ui/src/cron-workflows/cron-workflow-filters.tsx @@ -1,10 +1,10 @@ import * as React from 'react'; import {useEffect, useState} from 'react'; -import * as models from '../../models'; import {CheckboxFilter} from '../shared/components/checkbox-filter/checkbox-filter'; import {NamespaceFilter} from '../shared/components/namespace-filter'; import {TagsInput} from '../shared/components/tags-input/tags-input'; +import * as models from '../shared/models'; import './cron-workflow-filters.scss'; diff --git a/ui/src/app/cron-workflows/cron-workflow-link.tsx b/ui/src/cron-workflows/cron-workflow-link.tsx similarity index 100% rename from ui/src/app/cron-workflows/cron-workflow-link.tsx rename to ui/src/cron-workflows/cron-workflow-link.tsx diff --git a/ui/src/app/cron-workflows/cron-workflow-list.scss b/ui/src/cron-workflows/cron-workflow-list.scss similarity index 100% rename from ui/src/app/cron-workflows/cron-workflow-list.scss rename to ui/src/cron-workflows/cron-workflow-list.scss diff --git a/ui/src/app/cron-workflows/cron-workflow-list.tsx b/ui/src/cron-workflows/cron-workflow-list.tsx similarity index 99% rename from ui/src/app/cron-workflows/cron-workflow-list.tsx rename to ui/src/cron-workflows/cron-workflow-list.tsx index 8bcfefd4f28e..4ff8ed3ff647 100644 --- a/ui/src/app/cron-workflows/cron-workflow-list.tsx +++ b/ui/src/cron-workflows/cron-workflow-list.tsx @@ -5,7 +5,6 @@ import * as React from 'react'; import {useContext, useEffect, useState} from 'react'; import {Link, RouteComponentProps} from 'react-router-dom'; -import {CronWorkflow, CronWorkflowSpec} from '../../models'; import {ANNOTATION_DESCRIPTION, ANNOTATION_TITLE} from '../shared/annotations'; import {uiUrl} from '../shared/base'; import {ErrorNotice} from '../shared/components/error-notice'; @@ -18,6 +17,7 @@ import {Context} from '../shared/context'; import {getNextScheduledTime} from '../shared/cron'; import {Footnote} from '../shared/footnote'; import {historyUrl} from '../shared/history'; +import {CronWorkflow, CronWorkflowSpec} from '../shared/models'; import * as nsUtils from '../shared/namespaces'; import {services} from '../shared/services'; import {useCollectEvent} from '../shared/use-collect-event'; diff --git a/ui/src/app/cron-workflows/cron-workflow-spec-editior.tsx b/ui/src/cron-workflows/cron-workflow-spec-editior.tsx similarity index 98% rename from ui/src/app/cron-workflows/cron-workflow-spec-editior.tsx rename to ui/src/cron-workflows/cron-workflow-spec-editior.tsx index f06fde3538c0..3168285e5d1c 100644 --- a/ui/src/app/cron-workflows/cron-workflow-spec-editior.tsx +++ b/ui/src/cron-workflows/cron-workflow-spec-editior.tsx @@ -2,9 +2,9 @@ import {Checkbox} from 'argo-ui/src/components/checkbox'; import {Select} from 'argo-ui/src/components/select/select'; import * as React from 'react'; -import {ConcurrencyPolicy, CronWorkflowSpec} from '../../models'; import {NumberInput} from '../shared/components/number-input'; import {TextInput} from '../shared/components/text-input'; +import {ConcurrencyPolicy, CronWorkflowSpec} from '../shared/models'; import {ScheduleValidator} from './schedule-validator'; export function CronWorkflowSpecEditor({onChange, spec}: {spec: CronWorkflowSpec; onChange: (spec: CronWorkflowSpec) => void}) { diff --git a/ui/src/app/cron-workflows/cron-workflow-status-viewer.tsx b/ui/src/cron-workflows/cron-workflow-status-viewer.tsx similarity index 97% rename from ui/src/app/cron-workflows/cron-workflow-status-viewer.tsx rename to ui/src/cron-workflows/cron-workflow-status-viewer.tsx index 66d04fd0e2b4..d3cc9a36194a 100644 --- a/ui/src/app/cron-workflows/cron-workflow-status-viewer.tsx +++ b/ui/src/cron-workflows/cron-workflow-status-viewer.tsx @@ -1,9 +1,9 @@ import * as kubernetes from 'argo-ui/src/models/kubernetes'; import * as React from 'react'; -import {CronWorkflowSpec, CronWorkflowStatus} from '../../models'; import {Timestamp} from '../shared/components/timestamp'; import {ConditionsPanel} from '../shared/conditions-panel'; +import {CronWorkflowSpec, CronWorkflowStatus} from '../shared/models'; import {TIMESTAMP_KEYS} from '../shared/use-timestamp'; import {WorkflowLink} from '../workflows/components/workflow-link'; import {PrettySchedule} from './pretty-schedule'; diff --git a/ui/src/app/cron-workflows/index.ts b/ui/src/cron-workflows/index.ts similarity index 100% rename from ui/src/app/cron-workflows/index.ts rename to ui/src/cron-workflows/index.ts diff --git a/ui/src/app/cron-workflows/pretty-schedule.tsx b/ui/src/cron-workflows/pretty-schedule.tsx similarity index 100% rename from ui/src/app/cron-workflows/pretty-schedule.tsx rename to ui/src/cron-workflows/pretty-schedule.tsx diff --git a/ui/src/app/cron-workflows/schedule-validator.tsx b/ui/src/cron-workflows/schedule-validator.tsx similarity index 100% rename from ui/src/app/cron-workflows/schedule-validator.tsx rename to ui/src/cron-workflows/schedule-validator.tsx diff --git a/ui/src/app/event-flow/build-graph.test.ts b/ui/src/event-flow/build-graph.test.ts similarity index 100% rename from ui/src/app/event-flow/build-graph.test.ts rename to ui/src/event-flow/build-graph.test.ts diff --git a/ui/src/app/event-flow/build-graph.ts b/ui/src/event-flow/build-graph.ts similarity index 96% rename from ui/src/app/event-flow/build-graph.ts rename to ui/src/event-flow/build-graph.ts index 805f839116b8..e4666d9148e7 100644 --- a/ui/src/app/event-flow/build-graph.ts +++ b/ui/src/event-flow/build-graph.ts @@ -1,7 +1,7 @@ -import {Condition, Workflow} from '../../models'; -import {EventSource, EventSourceType} from '../../models/event-source'; -import {Sensor, TriggerType} from '../../models/sensor'; import {Graph, Node} from '../shared/components/graph/types'; +import {Condition, Workflow} from '../shared/models'; +import {EventSource, EventSourceType} from '../shared/models/event-source'; +import {Sensor, TriggerType} from '../shared/models/sensor'; import {icons as phaseIcons} from '../workflows/components/workflow-dag/icons'; import {icons} from './icons'; import {ID} from './id'; diff --git a/ui/src/app/event-flow/event-flow-container.tsx b/ui/src/event-flow/event-flow-container.tsx similarity index 100% rename from ui/src/app/event-flow/event-flow-container.tsx rename to ui/src/event-flow/event-flow-container.tsx diff --git a/ui/src/app/event-flow/event-flow-page.scss b/ui/src/event-flow/event-flow-page.scss similarity index 100% rename from ui/src/app/event-flow/event-flow-page.scss rename to ui/src/event-flow/event-flow-page.scss diff --git a/ui/src/app/event-flow/event-flow-page.tsx b/ui/src/event-flow/event-flow-page.tsx similarity index 99% rename from ui/src/app/event-flow/event-flow-page.tsx rename to ui/src/event-flow/event-flow-page.tsx index a3be3689e59e..95c74fe8a191 100644 --- a/ui/src/app/event-flow/event-flow-page.tsx +++ b/ui/src/event-flow/event-flow-page.tsx @@ -7,9 +7,6 @@ import {RouteComponentProps} from 'react-router-dom'; import {Observable} from 'rxjs'; import {filter, map} from 'rxjs/operators'; -import {kubernetes, Workflow} from '../../models'; -import {EventSource} from '../../models/event-source'; -import {Sensor} from '../../models/sensor'; import {uiUrl} from '../shared/base'; import {Button} from '../shared/components/button'; import {ErrorNotice} from '../shared/components/error-notice'; @@ -24,6 +21,9 @@ import {Context} from '../shared/context'; import {Footnote} from '../shared/footnote'; import {historyUrl} from '../shared/history'; import {ListWatch} from '../shared/list-watch'; +import {kubernetes, Workflow} from '../shared/models'; +import {EventSource} from '../shared/models/event-source'; +import {Sensor} from '../shared/models/sensor'; import * as nsUtils from '../shared/namespaces'; import {RetryObservable} from '../shared/retry-observable'; import {services} from '../shared/services'; diff --git a/ui/src/app/event-flow/genres.ts b/ui/src/event-flow/genres.ts similarity index 68% rename from ui/src/app/event-flow/genres.ts rename to ui/src/event-flow/genres.ts index 16ecf134f690..2f71222bb2ba 100644 --- a/ui/src/app/event-flow/genres.ts +++ b/ui/src/event-flow/genres.ts @@ -1,5 +1,5 @@ -import {EventSourceTypes} from '../../models/event-source'; -import {TriggerTypes} from '../../models/sensor'; +import {EventSourceTypes} from '../shared/models/event-source'; +import {TriggerTypes} from '../shared/models/sensor'; export const genres = (() => { const v: {[label: string]: boolean} = {sensor: true, conditions: true, workflow: true, collapsed: true}; diff --git a/ui/src/app/event-flow/icons.ts b/ui/src/event-flow/icons.ts similarity index 100% rename from ui/src/app/event-flow/icons.ts rename to ui/src/event-flow/icons.ts diff --git a/ui/src/app/event-flow/id.ts b/ui/src/event-flow/id.ts similarity index 100% rename from ui/src/app/event-flow/id.ts rename to ui/src/event-flow/id.ts diff --git a/ui/src/app/event-flow/index.ts b/ui/src/event-flow/index.ts similarity index 100% rename from ui/src/app/event-flow/index.ts rename to ui/src/event-flow/index.ts diff --git a/ui/src/app/event-sources/event-source-container.tsx b/ui/src/event-sources/event-source-container.tsx similarity index 100% rename from ui/src/app/event-sources/event-source-container.tsx rename to ui/src/event-sources/event-source-container.tsx diff --git a/ui/src/app/event-sources/event-source-creator.tsx b/ui/src/event-sources/event-source-creator.tsx similarity index 97% rename from ui/src/app/event-sources/event-source-creator.tsx rename to ui/src/event-sources/event-source-creator.tsx index 51610fc3acba..aff598faf78a 100644 --- a/ui/src/app/event-sources/event-source-creator.tsx +++ b/ui/src/event-sources/event-source-creator.tsx @@ -1,11 +1,11 @@ import * as React from 'react'; import {useState} from 'react'; -import {EventSource} from '../../models'; import {Button} from '../shared/components/button'; import {ErrorNotice} from '../shared/components/error-notice'; import {UploadButton} from '../shared/components/upload-button'; import {exampleEventSource} from '../shared/examples'; +import {EventSource} from '../shared/models'; import * as nsUtils from '../shared/namespaces'; import {services} from '../shared/services'; import {EventSourceEditor} from './event-source-editor'; diff --git a/ui/src/app/event-sources/event-source-details.tsx b/ui/src/event-sources/event-source-details.tsx similarity index 99% rename from ui/src/app/event-sources/event-source-details.tsx rename to ui/src/event-sources/event-source-details.tsx index 255e464aba50..a31d5ba66451 100644 --- a/ui/src/app/event-sources/event-source-details.tsx +++ b/ui/src/event-sources/event-source-details.tsx @@ -6,13 +6,13 @@ import * as React from 'react'; import {useContext, useEffect, useState} from 'react'; import {RouteComponentProps} from 'react-router'; -import {EventSource} from '../../models'; import {ID} from '../event-flow/id'; import {uiUrl} from '../shared/base'; import {ErrorNotice} from '../shared/components/error-notice'; import {Loading} from '../shared/components/loading'; import {Context} from '../shared/context'; import {historyUrl} from '../shared/history'; +import {EventSource} from '../shared/models'; import {services} from '../shared/services'; import {useCollectEvent} from '../shared/use-collect-event'; import {useEditableObject} from '../shared/use-editable-object'; diff --git a/ui/src/app/event-sources/event-source-editor.tsx b/ui/src/event-sources/event-source-editor.tsx similarity index 96% rename from ui/src/app/event-sources/event-source-editor.tsx rename to ui/src/event-sources/event-source-editor.tsx index a02b87a64891..a5310d3d2bb5 100644 --- a/ui/src/app/event-sources/event-source-editor.tsx +++ b/ui/src/event-sources/event-source-editor.tsx @@ -1,9 +1,9 @@ import {Tabs} from 'argo-ui/src/components/tabs/tabs'; import * as React from 'react'; -import {EventSource} from '../../models'; import {MetadataEditor} from '../shared/components/editors/metadata-editor'; import {ObjectEditor} from '../shared/components/object-editor'; +import {EventSource} from '../shared/models'; export function EventSourceEditor({ onChange, diff --git a/ui/src/app/event-sources/event-source-list.scss b/ui/src/event-sources/event-source-list.scss similarity index 100% rename from ui/src/app/event-sources/event-source-list.scss rename to ui/src/event-sources/event-source-list.scss diff --git a/ui/src/app/event-sources/event-source-list.tsx b/ui/src/event-sources/event-source-list.tsx similarity index 99% rename from ui/src/app/event-sources/event-source-list.tsx rename to ui/src/event-sources/event-source-list.tsx index b7007ef661bc..3548d25e68ec 100644 --- a/ui/src/app/event-sources/event-source-list.tsx +++ b/ui/src/event-sources/event-source-list.tsx @@ -6,7 +6,6 @@ import * as React from 'react'; import {useContext, useEffect, useState} from 'react'; import {Link, RouteComponentProps} from 'react-router-dom'; -import {EventSource, kubernetes} from '../../models'; import {ID} from '../event-flow/id'; import {statusIconClasses} from '../sensors/utils'; import {uiUrl} from '../shared/base'; @@ -19,6 +18,7 @@ import {ZeroState} from '../shared/components/zero-state'; import {Context} from '../shared/context'; import {Footnote} from '../shared/footnote'; import {historyUrl} from '../shared/history'; +import {EventSource, kubernetes} from '../shared/models'; import * as nsUtils from '../shared/namespaces'; import {services} from '../shared/services'; import {useCollectEvent} from '../shared/use-collect-event'; diff --git a/ui/src/app/event-sources/event-source-log-viewer.tsx b/ui/src/event-sources/event-source-log-viewer.tsx similarity index 99% rename from ui/src/app/event-sources/event-source-log-viewer.tsx rename to ui/src/event-sources/event-source-log-viewer.tsx index 7bfe4b3431eb..2c7b9e1ad2dc 100644 --- a/ui/src/app/event-sources/event-source-log-viewer.tsx +++ b/ui/src/event-sources/event-source-log-viewer.tsx @@ -3,9 +3,9 @@ import {useEffect, useState} from 'react'; import {Observable} from 'rxjs'; import {filter, map} from 'rxjs/operators'; -import {EventSource} from '../../models'; import {ErrorNotice} from '../shared/components/error-notice'; import {Links} from '../shared/components/links'; +import {EventSource} from '../shared/models'; import {services} from '../shared/services'; import {FullHeightLogsViewer} from '../workflows/components/workflow-logs-viewer/full-height-logs-viewer'; diff --git a/ui/src/app/event-sources/index.ts b/ui/src/event-sources/index.ts similarity index 100% rename from ui/src/app/event-sources/index.ts rename to ui/src/event-sources/index.ts diff --git a/ui/src/app/help/help.scss b/ui/src/help/help.scss similarity index 100% rename from ui/src/app/help/help.scss rename to ui/src/help/help.scss diff --git a/ui/src/app/help/help.tsx b/ui/src/help/help.tsx similarity index 100% rename from ui/src/app/help/help.tsx rename to ui/src/help/help.tsx diff --git a/ui/src/app/help/index.ts b/ui/src/help/index.ts similarity index 100% rename from ui/src/app/help/index.ts rename to ui/src/help/index.ts diff --git a/ui/src/app/index.html b/ui/src/index.html similarity index 100% rename from ui/src/app/index.html rename to ui/src/index.html diff --git a/ui/src/app/index.tsx b/ui/src/index.tsx similarity index 100% rename from ui/src/app/index.tsx rename to ui/src/index.tsx diff --git a/ui/src/app/login/index.ts b/ui/src/login/index.ts similarity index 100% rename from ui/src/app/login/index.ts rename to ui/src/login/index.ts diff --git a/ui/src/app/login/login.scss b/ui/src/login/login.scss similarity index 100% rename from ui/src/app/login/login.scss rename to ui/src/login/login.scss diff --git a/ui/src/app/login/login.tsx b/ui/src/login/login.tsx similarity index 100% rename from ui/src/app/login/login.tsx rename to ui/src/login/login.tsx diff --git a/ui/src/app/modals/feedback-modal.tsx b/ui/src/modals/feedback-modal.tsx similarity index 100% rename from ui/src/app/modals/feedback-modal.tsx rename to ui/src/modals/feedback-modal.tsx diff --git a/ui/src/app/modals/first-time-user-modal.tsx b/ui/src/modals/first-time-user-modal.tsx similarity index 100% rename from ui/src/app/modals/first-time-user-modal.tsx rename to ui/src/modals/first-time-user-modal.tsx diff --git a/ui/src/app/modals/modal-switch.tsx b/ui/src/modals/modal-switch.tsx similarity index 100% rename from ui/src/app/modals/modal-switch.tsx rename to ui/src/modals/modal-switch.tsx diff --git a/ui/src/app/modals/new-version-modal.scss b/ui/src/modals/new-version-modal.scss similarity index 100% rename from ui/src/app/modals/new-version-modal.scss rename to ui/src/modals/new-version-modal.scss diff --git a/ui/src/app/modals/new-version-modal.tsx b/ui/src/modals/new-version-modal.tsx similarity index 100% rename from ui/src/app/modals/new-version-modal.tsx rename to ui/src/modals/new-version-modal.tsx diff --git a/ui/src/app/modals/version.test.ts b/ui/src/modals/version.test.ts similarity index 100% rename from ui/src/app/modals/version.test.ts rename to ui/src/modals/version.test.ts diff --git a/ui/src/app/modals/version.ts b/ui/src/modals/version.ts similarity index 100% rename from ui/src/app/modals/version.ts rename to ui/src/modals/version.ts diff --git a/ui/src/models/event-source.ts b/ui/src/models/event-source.ts deleted file mode 100644 index e41fe0a3b5c5..000000000000 --- a/ui/src/models/event-source.ts +++ /dev/null @@ -1,81 +0,0 @@ -import * as kubernetes from 'argo-ui/src/models/kubernetes'; -import {Condition} from './workflows'; - -export interface EventSource { - metadata: kubernetes.ObjectMeta; - spec: { - amqp?: {[key: string]: {}}; - azureEventsHub?: {[key: string]: {}}; - bitbucketserver?: {[key: string]: {}}; - calendar?: {[key: string]: {}}; - emitter?: {[key: string]: {}}; - file?: {[key: string]: {}}; - generic?: {[key: string]: {}}; - github?: {[key: string]: {}}; - gitlab?: {[key: string]: {}}; - hdfs?: {[key: string]: {}}; - kafka?: {[key: string]: {}}; - minio?: {[key: string]: {}}; - mqtt?: {[key: string]: {}}; - nats?: {[key: string]: {}}; - nsq?: {[key: string]: {}}; - pubSub?: {[key: string]: {}}; - pulsar?: {[key: string]: {}}; - redis?: {[key: string]: {}}; - resource?: {[key: string]: {}}; - slack?: {[key: string]: {}}; - sns?: {[key: string]: {}}; - sqs?: {[key: string]: {}}; - storageGrid?: {[key: string]: {}}; - stripe?: {[key: string]: {}}; - webhook?: {[key: string]: {}}; - }; - status?: {conditions?: Condition[]}; -} - -export interface EventSourceList { - metadata: kubernetes.ListMeta; - items: EventSource[]; -} - -export interface LogEntry { - namespace: string; - eventSourceName: string; - eventSourceType?: string; - eventName?: string; - level: string; - time: kubernetes.Time; - msg: string; -} - -export type EventSourceWatchEvent = kubernetes.WatchEvent; - -export const EventSourceTypes = [ - 'amqp', - 'azureEventsHub', - 'bitbucketserver', - 'calendar', - 'emitter', - 'file', - 'generic', - 'github', - 'gitlab', - 'hdfs', - 'kafka', - 'minio', - 'mqtt', - 'nats', - 'nsq', - 'pubSub', - 'pulsar', - 'redis', - 'resource', - 'slack', - 'sns', - 'sqs', - 'storageGrid', - 'stripe', - 'webhook' -] as const; - -export type EventSourceType = typeof EventSourceTypes[number]; diff --git a/ui/src/app/plugins/index.ts b/ui/src/plugins/index.ts similarity index 100% rename from ui/src/app/plugins/index.ts rename to ui/src/plugins/index.ts diff --git a/ui/src/app/plugins/plugin-list.tsx b/ui/src/plugins/plugin-list.tsx similarity index 100% rename from ui/src/app/plugins/plugin-list.tsx rename to ui/src/plugins/plugin-list.tsx diff --git a/ui/src/app/plugins/plugins-container.tsx b/ui/src/plugins/plugins-container.tsx similarity index 100% rename from ui/src/app/plugins/plugins-container.tsx rename to ui/src/plugins/plugins-container.tsx diff --git a/ui/src/app/reports/index.ts b/ui/src/reports/index.ts similarity index 100% rename from ui/src/app/reports/index.ts rename to ui/src/reports/index.ts diff --git a/ui/src/app/reports/report-container.tsx b/ui/src/reports/report-container.tsx similarity index 100% rename from ui/src/app/reports/report-container.tsx rename to ui/src/reports/report-container.tsx diff --git a/ui/src/app/reports/reports-filters.scss b/ui/src/reports/reports-filters.scss similarity index 100% rename from ui/src/app/reports/reports-filters.scss rename to ui/src/reports/reports-filters.scss diff --git a/ui/src/app/reports/reports-filters.tsx b/ui/src/reports/reports-filters.tsx similarity index 98% rename from ui/src/app/reports/reports-filters.tsx rename to ui/src/reports/reports-filters.tsx index f5035f1705a4..f2f901576584 100644 --- a/ui/src/app/reports/reports-filters.tsx +++ b/ui/src/reports/reports-filters.tsx @@ -1,9 +1,9 @@ import * as React from 'react'; -import {NODE_PHASE} from '../../models'; import {DataLoaderDropdown} from '../shared/components/data-loader-dropdown'; import {NamespaceFilter} from '../shared/components/namespace-filter'; import {TagsInput} from '../shared/components/tags-input/tags-input'; +import {NODE_PHASE} from '../shared/models'; import {services} from '../shared/services'; import './reports-filters.scss'; diff --git a/ui/src/app/reports/reports.tsx b/ui/src/reports/reports.tsx similarity index 100% rename from ui/src/app/reports/reports.tsx rename to ui/src/reports/reports.tsx diff --git a/ui/src/app/reports/workflows-to-chart-data.ts b/ui/src/reports/workflows-to-chart-data.ts similarity index 98% rename from ui/src/app/reports/workflows-to-chart-data.ts rename to ui/src/reports/workflows-to-chart-data.ts index 2cf6b67f17ce..f65d00d51e07 100644 --- a/ui/src/app/reports/workflows-to-chart-data.ts +++ b/ui/src/reports/workflows-to-chart-data.ts @@ -1,5 +1,5 @@ -import {getColorForNodePhase, Workflow} from '../../models'; import {denominator} from '../shared/duration'; +import {getColorForNodePhase, Workflow} from '../shared/models'; export function workflowsToChartData(workflows: Workflow[], limit: number) { const filteredWorkflows = workflows diff --git a/ui/src/app/sensors/index.ts b/ui/src/sensors/index.ts similarity index 100% rename from ui/src/app/sensors/index.ts rename to ui/src/sensors/index.ts diff --git a/ui/src/app/sensors/sensor-creator.tsx b/ui/src/sensors/sensor-creator.tsx similarity index 97% rename from ui/src/app/sensors/sensor-creator.tsx rename to ui/src/sensors/sensor-creator.tsx index 0236752b7ce8..25d2a0950e7b 100644 --- a/ui/src/app/sensors/sensor-creator.tsx +++ b/ui/src/sensors/sensor-creator.tsx @@ -1,11 +1,11 @@ import * as React from 'react'; import {useState} from 'react'; -import {Sensor} from '../../models'; import {Button} from '../shared/components/button'; import {ErrorNotice} from '../shared/components/error-notice'; import {UploadButton} from '../shared/components/upload-button'; import {exampleSensor} from '../shared/examples'; +import {Sensor} from '../shared/models'; import * as nsUtils from '../shared/namespaces'; import {services} from '../shared/services'; import {SensorEditor} from './sensor-editor'; diff --git a/ui/src/app/sensors/sensor-details.tsx b/ui/src/sensors/sensor-details.tsx similarity index 99% rename from ui/src/app/sensors/sensor-details.tsx rename to ui/src/sensors/sensor-details.tsx index 5d116f164161..e4388bb760a9 100644 --- a/ui/src/app/sensors/sensor-details.tsx +++ b/ui/src/sensors/sensor-details.tsx @@ -4,7 +4,6 @@ import * as React from 'react'; import {useContext, useEffect, useState} from 'react'; import {RouteComponentProps} from 'react-router'; -import {Sensor} from '../../models'; import {ID} from '../event-flow/id'; import {uiUrl} from '../shared/base'; import {ErrorNotice} from '../shared/components/error-notice'; @@ -12,6 +11,7 @@ import {Node} from '../shared/components/graph/types'; import {Loading} from '../shared/components/loading'; import {Context} from '../shared/context'; import {historyUrl} from '../shared/history'; +import {Sensor} from '../shared/models'; import {services} from '../shared/services'; import {useCollectEvent} from '../shared/use-collect-event'; import {useEditableObject} from '../shared/use-editable-object'; diff --git a/ui/src/app/sensors/sensor-editor.tsx b/ui/src/sensors/sensor-editor.tsx similarity index 96% rename from ui/src/app/sensors/sensor-editor.tsx rename to ui/src/sensors/sensor-editor.tsx index 83c6180f1679..21c583810593 100644 --- a/ui/src/app/sensors/sensor-editor.tsx +++ b/ui/src/sensors/sensor-editor.tsx @@ -1,9 +1,9 @@ import {Tabs} from 'argo-ui/src/components/tabs/tabs'; import * as React from 'react'; -import {Sensor} from '../../models'; import {MetadataEditor} from '../shared/components/editors/metadata-editor'; import {ObjectEditor} from '../shared/components/object-editor'; +import {Sensor} from '../shared/models'; export function SensorEditor({ onChange, diff --git a/ui/src/app/sensors/sensor-list.tsx b/ui/src/sensors/sensor-list.tsx similarity index 99% rename from ui/src/app/sensors/sensor-list.tsx rename to ui/src/sensors/sensor-list.tsx index f249294ea68d..98ff6531550f 100644 --- a/ui/src/app/sensors/sensor-list.tsx +++ b/ui/src/sensors/sensor-list.tsx @@ -5,7 +5,6 @@ import * as React from 'react'; import {useContext, useEffect, useState} from 'react'; import {Link, RouteComponentProps} from 'react-router-dom'; -import {kubernetes, Sensor} from '../../models'; import {ID} from '../event-flow/id'; import {uiUrl} from '../shared/base'; import {ErrorNotice} from '../shared/components/error-notice'; @@ -17,6 +16,7 @@ import {ZeroState} from '../shared/components/zero-state'; import {Context} from '../shared/context'; import {Footnote} from '../shared/footnote'; import {historyUrl} from '../shared/history'; +import {kubernetes, Sensor} from '../shared/models'; import * as nsUtils from '../shared/namespaces'; import {services} from '../shared/services'; import {useCollectEvent} from '../shared/use-collect-event'; diff --git a/ui/src/app/sensors/sensor-logs-viewer.tsx b/ui/src/sensors/sensor-logs-viewer.tsx similarity index 99% rename from ui/src/app/sensors/sensor-logs-viewer.tsx rename to ui/src/sensors/sensor-logs-viewer.tsx index 039fe4560d6b..321359a1fa75 100644 --- a/ui/src/app/sensors/sensor-logs-viewer.tsx +++ b/ui/src/sensors/sensor-logs-viewer.tsx @@ -3,9 +3,9 @@ import {useEffect, useState} from 'react'; import {Observable} from 'rxjs'; import {filter, map, publishReplay, refCount} from 'rxjs/operators'; -import {Sensor} from '../../models'; import {ErrorNotice} from '../shared/components/error-notice'; import {Links} from '../shared/components/links'; +import {Sensor} from '../shared/models'; import {services} from '../shared/services'; import {FullHeightLogsViewer} from '../workflows/components/workflow-logs-viewer/full-height-logs-viewer'; diff --git a/ui/src/app/sensors/sensor-side-panel.tsx b/ui/src/sensors/sensor-side-panel.tsx similarity index 98% rename from ui/src/app/sensors/sensor-side-panel.tsx rename to ui/src/sensors/sensor-side-panel.tsx index b7bffd024c3c..ffc6e764430a 100644 --- a/ui/src/app/sensors/sensor-side-panel.tsx +++ b/ui/src/sensors/sensor-side-panel.tsx @@ -3,8 +3,8 @@ import {Tabs} from 'argo-ui/src/components/tabs/tabs'; import * as React from 'react'; import {useState} from 'react'; -import {Sensor} from '../../models'; import {Node} from '../shared/components/graph/types'; +import {Sensor} from '../shared/models'; import {EventsPanel} from '../workflows/components/events-panel'; import {SensorLogsViewer} from './sensor-logs-viewer'; diff --git a/ui/src/app/sensors/sensors-container.tsx b/ui/src/sensors/sensors-container.tsx similarity index 100% rename from ui/src/app/sensors/sensors-container.tsx rename to ui/src/sensors/sensors-container.tsx diff --git a/ui/src/app/sensors/utils.ts b/ui/src/sensors/utils.ts similarity index 93% rename from ui/src/app/sensors/utils.ts rename to ui/src/sensors/utils.ts index 9d7b3d81789a..5d641e50d6d2 100644 --- a/ui/src/app/sensors/utils.ts +++ b/ui/src/sensors/utils.ts @@ -1,4 +1,4 @@ -import {Condition} from '../../models'; +import {Condition} from '../shared/models'; export function statusIconClasses(conditions: Condition[], icon: string): string { let classes = [icon]; diff --git a/ui/src/app/shared/annotations.ts b/ui/src/shared/annotations.ts similarity index 100% rename from ui/src/app/shared/annotations.ts rename to ui/src/shared/annotations.ts diff --git a/ui/src/app/shared/artifacts.ts b/ui/src/shared/artifacts.ts similarity index 99% rename from ui/src/app/shared/artifacts.ts rename to ui/src/shared/artifacts.ts index e07e6c2f0051..957d40e85bc0 100644 --- a/ui/src/app/shared/artifacts.ts +++ b/ui/src/shared/artifacts.ts @@ -1,4 +1,4 @@ -import {Artifact, ArtifactRepository, NodeStatus, WorkflowStatus} from '../../models'; +import {Artifact, ArtifactRepository, NodeStatus, WorkflowStatus} from './models'; export const nodeArtifacts = (node: NodeStatus, ar: ArtifactRepository) => (node.inputs?.artifacts || []) diff --git a/ui/src/app/shared/base.ts b/ui/src/shared/base.ts similarity index 100% rename from ui/src/app/shared/base.ts rename to ui/src/shared/base.ts diff --git a/ui/src/app/shared/components/big-button.tsx b/ui/src/shared/components/big-button.tsx similarity index 100% rename from ui/src/app/shared/components/big-button.tsx rename to ui/src/shared/components/big-button.tsx diff --git a/ui/src/app/shared/components/button.tsx b/ui/src/shared/components/button.tsx similarity index 100% rename from ui/src/app/shared/components/button.tsx rename to ui/src/shared/components/button.tsx diff --git a/ui/src/app/shared/components/chat-button.tsx b/ui/src/shared/components/chat-button.tsx similarity index 95% rename from ui/src/app/shared/components/chat-button.tsx rename to ui/src/shared/components/chat-button.tsx index 216eb4401638..e552a76c19cf 100644 --- a/ui/src/app/shared/components/chat-button.tsx +++ b/ui/src/shared/components/chat-button.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import {useEffect, useState} from 'react'; -import {Link} from '../../../models'; +import {Link} from '../models'; import {services} from '../services'; export function ChatButton() { diff --git a/ui/src/app/shared/components/checkbox-filter/checkbox-filter.scss b/ui/src/shared/components/checkbox-filter/checkbox-filter.scss similarity index 100% rename from ui/src/app/shared/components/checkbox-filter/checkbox-filter.scss rename to ui/src/shared/components/checkbox-filter/checkbox-filter.scss diff --git a/ui/src/app/shared/components/checkbox-filter/checkbox-filter.tsx b/ui/src/shared/components/checkbox-filter/checkbox-filter.tsx similarity index 100% rename from ui/src/app/shared/components/checkbox-filter/checkbox-filter.tsx rename to ui/src/shared/components/checkbox-filter/checkbox-filter.tsx diff --git a/ui/src/app/shared/components/checkbox-list.tsx b/ui/src/shared/components/checkbox-list.tsx similarity index 100% rename from ui/src/app/shared/components/checkbox-list.tsx rename to ui/src/shared/components/checkbox-list.tsx diff --git a/ui/src/app/shared/components/clipboard-text.tsx b/ui/src/shared/components/clipboard-text.tsx similarity index 100% rename from ui/src/app/shared/components/clipboard-text.tsx rename to ui/src/shared/components/clipboard-text.tsx diff --git a/ui/src/app/shared/components/cost-optimisation-nudge.tsx b/ui/src/shared/components/cost-optimisation-nudge.tsx similarity index 100% rename from ui/src/app/shared/components/cost-optimisation-nudge.tsx rename to ui/src/shared/components/cost-optimisation-nudge.tsx diff --git a/ui/src/app/shared/components/data-loader-dropdown.tsx b/ui/src/shared/components/data-loader-dropdown.tsx similarity index 100% rename from ui/src/app/shared/components/data-loader-dropdown.tsx rename to ui/src/shared/components/data-loader-dropdown.tsx diff --git a/ui/src/app/shared/components/drop-down-button.scss b/ui/src/shared/components/drop-down-button.scss similarity index 100% rename from ui/src/app/shared/components/drop-down-button.scss rename to ui/src/shared/components/drop-down-button.scss diff --git a/ui/src/app/shared/components/drop-down-button.tsx b/ui/src/shared/components/drop-down-button.tsx similarity index 100% rename from ui/src/app/shared/components/drop-down-button.tsx rename to ui/src/shared/components/drop-down-button.tsx diff --git a/ui/src/app/shared/components/dropdown/dropdown.scss b/ui/src/shared/components/dropdown/dropdown.scss similarity index 100% rename from ui/src/app/shared/components/dropdown/dropdown.scss rename to ui/src/shared/components/dropdown/dropdown.scss diff --git a/ui/src/app/shared/components/dropdown/dropdown.tsx b/ui/src/shared/components/dropdown/dropdown.tsx similarity index 100% rename from ui/src/app/shared/components/dropdown/dropdown.tsx rename to ui/src/shared/components/dropdown/dropdown.tsx diff --git a/ui/src/app/shared/components/duration-panel.tsx b/ui/src/shared/components/duration-panel.tsx similarity index 93% rename from ui/src/app/shared/components/duration-panel.tsx rename to ui/src/shared/components/duration-panel.tsx index 54b2f0679d7f..636504e02a68 100644 --- a/ui/src/app/shared/components/duration-panel.tsx +++ b/ui/src/shared/components/duration-panel.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; -import {NODE_PHASE, NodePhase} from '../../../models'; import {formatDuration} from '../duration'; +import {NODE_PHASE, NodePhase} from '../models'; import {ProgressLine} from './progress-line'; // duration panel in seconds diff --git a/ui/src/app/shared/components/editors/key-value-editor.tsx b/ui/src/shared/components/editors/key-value-editor.tsx similarity index 100% rename from ui/src/app/shared/components/editors/key-value-editor.tsx rename to ui/src/shared/components/editors/key-value-editor.tsx diff --git a/ui/src/app/shared/components/editors/labels-and-annotations-editor.tsx b/ui/src/shared/components/editors/labels-and-annotations-editor.tsx similarity index 94% rename from ui/src/app/shared/components/editors/labels-and-annotations-editor.tsx rename to ui/src/shared/components/editors/labels-and-annotations-editor.tsx index 4f1977af21b6..b8312c1fefe4 100644 --- a/ui/src/app/shared/components/editors/labels-and-annotations-editor.tsx +++ b/ui/src/shared/components/editors/labels-and-annotations-editor.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; -import {kubernetes} from '../../../../models'; +import {kubernetes} from '../../models'; import {KeyValueEditor} from './key-value-editor'; export function LabelsAndAnnotationsEditor({value, onChange}: {value: kubernetes.ObjectMeta; onChange: (value: kubernetes.ObjectMeta) => void}) { diff --git a/ui/src/app/shared/components/editors/metadata-editor.tsx b/ui/src/shared/components/editors/metadata-editor.tsx similarity index 97% rename from ui/src/app/shared/components/editors/metadata-editor.tsx rename to ui/src/shared/components/editors/metadata-editor.tsx index 8559ead12393..84579ea7e3af 100644 --- a/ui/src/app/shared/components/editors/metadata-editor.tsx +++ b/ui/src/shared/components/editors/metadata-editor.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; -import {kubernetes} from '../../../../models'; +import {kubernetes} from '../../models'; import {TextInput} from '../text-input'; import {LabelsAndAnnotationsEditor} from './labels-and-annotations-editor'; diff --git a/ui/src/app/shared/components/editors/workflow-parameters-editor.tsx b/ui/src/shared/components/editors/workflow-parameters-editor.tsx similarity index 95% rename from ui/src/app/shared/components/editors/workflow-parameters-editor.tsx rename to ui/src/shared/components/editors/workflow-parameters-editor.tsx index 6049cf1add6b..6f0f310bc890 100644 --- a/ui/src/app/shared/components/editors/workflow-parameters-editor.tsx +++ b/ui/src/shared/components/editors/workflow-parameters-editor.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; -import {Arguments, Parameter, WorkflowSpec} from '../../../../models'; +import {Arguments, Parameter, WorkflowSpec} from '../../models'; import {KeyValueEditor} from './key-value-editor'; export function WorkflowParametersEditor(props: {value: T; onChange: (value: T) => void; onError: (error: Error) => void}) { diff --git a/ui/src/app/shared/components/error-boundary.tsx b/ui/src/shared/components/error-boundary.tsx similarity index 100% rename from ui/src/app/shared/components/error-boundary.tsx rename to ui/src/shared/components/error-boundary.tsx diff --git a/ui/src/app/shared/components/error-notice.tsx b/ui/src/shared/components/error-notice.tsx similarity index 100% rename from ui/src/app/shared/components/error-notice.tsx rename to ui/src/shared/components/error-notice.tsx diff --git a/ui/src/app/shared/components/error-panel.tsx b/ui/src/shared/components/error-panel.tsx similarity index 100% rename from ui/src/app/shared/components/error-panel.tsx rename to ui/src/shared/components/error-panel.tsx diff --git a/ui/src/app/shared/components/example-manifests.tsx b/ui/src/shared/components/example-manifests.tsx similarity index 100% rename from ui/src/app/shared/components/example-manifests.tsx rename to ui/src/shared/components/example-manifests.tsx diff --git a/ui/src/app/shared/components/fa-icons.tsx b/ui/src/shared/components/fa-icons.tsx similarity index 100% rename from ui/src/app/shared/components/fa-icons.tsx rename to ui/src/shared/components/fa-icons.tsx diff --git a/ui/src/app/shared/components/filter-drop-down.tsx b/ui/src/shared/components/filter-drop-down.tsx similarity index 100% rename from ui/src/app/shared/components/filter-drop-down.tsx rename to ui/src/shared/components/filter-drop-down.tsx diff --git a/ui/src/app/shared/components/first-time-user-panel.tsx b/ui/src/shared/components/first-time-user-panel.tsx similarity index 100% rename from ui/src/app/shared/components/first-time-user-panel.tsx rename to ui/src/shared/components/first-time-user-panel.tsx diff --git a/ui/src/app/shared/components/give-feedback-link.tsx b/ui/src/shared/components/give-feedback-link.tsx similarity index 100% rename from ui/src/app/shared/components/give-feedback-link.tsx rename to ui/src/shared/components/give-feedback-link.tsx diff --git a/ui/src/app/shared/components/graph/coffman-graham-sorter.ts b/ui/src/shared/components/graph/coffman-graham-sorter.ts similarity index 100% rename from ui/src/app/shared/components/graph/coffman-graham-sorter.ts rename to ui/src/shared/components/graph/coffman-graham-sorter.ts diff --git a/ui/src/app/shared/components/graph/dfs-sorter.ts b/ui/src/shared/components/graph/dfs-sorter.ts similarity index 100% rename from ui/src/app/shared/components/graph/dfs-sorter.ts rename to ui/src/shared/components/graph/dfs-sorter.ts diff --git a/ui/src/app/shared/components/graph/fast-layout.ts b/ui/src/shared/components/graph/fast-layout.ts similarity index 100% rename from ui/src/app/shared/components/graph/fast-layout.ts rename to ui/src/shared/components/graph/fast-layout.ts diff --git a/ui/src/app/shared/components/graph/graph-panel.scss b/ui/src/shared/components/graph/graph-panel.scss similarity index 100% rename from ui/src/app/shared/components/graph/graph-panel.scss rename to ui/src/shared/components/graph/graph-panel.scss diff --git a/ui/src/app/shared/components/graph/graph-panel.tsx b/ui/src/shared/components/graph/graph-panel.tsx similarity index 99% rename from ui/src/app/shared/components/graph/graph-panel.tsx rename to ui/src/shared/components/graph/graph-panel.tsx index d22781244d84..ac5acf963c85 100644 --- a/ui/src/app/shared/components/graph/graph-panel.tsx +++ b/ui/src/shared/components/graph/graph-panel.tsx @@ -1,10 +1,10 @@ import * as React from 'react'; import {useEffect, useState} from 'react'; -import {TextInput} from '../../../shared/components/text-input'; import {ScopedLocalStorage} from '../../scoped-local-storage'; import {FilterDropDown} from '../filter-drop-down'; import {Icon} from '../icon'; +import {TextInput} from '../text-input'; import {GraphIcon} from './icon'; import {formatLabel} from './label'; import {layout} from './layout'; diff --git a/ui/src/app/shared/components/graph/icon.tsx b/ui/src/shared/components/graph/icon.tsx similarity index 100% rename from ui/src/app/shared/components/graph/icon.tsx rename to ui/src/shared/components/graph/icon.tsx diff --git a/ui/src/app/shared/components/graph/label.test.ts b/ui/src/shared/components/graph/label.test.ts similarity index 100% rename from ui/src/app/shared/components/graph/label.test.ts rename to ui/src/shared/components/graph/label.test.ts diff --git a/ui/src/app/shared/components/graph/label.tsx b/ui/src/shared/components/graph/label.tsx similarity index 100% rename from ui/src/app/shared/components/graph/label.tsx rename to ui/src/shared/components/graph/label.tsx diff --git a/ui/src/app/shared/components/graph/layout.ts b/ui/src/shared/components/graph/layout.ts similarity index 100% rename from ui/src/app/shared/components/graph/layout.ts rename to ui/src/shared/components/graph/layout.ts diff --git a/ui/src/app/shared/components/graph/pretty-layout.ts b/ui/src/shared/components/graph/pretty-layout.ts similarity index 100% rename from ui/src/app/shared/components/graph/pretty-layout.ts rename to ui/src/shared/components/graph/pretty-layout.ts diff --git a/ui/src/app/shared/components/graph/types.ts b/ui/src/shared/components/graph/types.ts similarity index 100% rename from ui/src/app/shared/components/graph/types.ts rename to ui/src/shared/components/graph/types.ts diff --git a/ui/src/app/shared/components/icon.ts b/ui/src/shared/components/icon.ts similarity index 100% rename from ui/src/app/shared/components/icon.ts rename to ui/src/shared/components/icon.ts diff --git a/ui/src/app/shared/components/icons.ts b/ui/src/shared/components/icons.ts similarity index 100% rename from ui/src/app/shared/components/icons.ts rename to ui/src/shared/components/icons.ts diff --git a/ui/src/app/shared/components/inline-table/inline-table.scss b/ui/src/shared/components/inline-table/inline-table.scss similarity index 100% rename from ui/src/app/shared/components/inline-table/inline-table.scss rename to ui/src/shared/components/inline-table/inline-table.scss diff --git a/ui/src/app/shared/components/inline-table/inline-table.tsx b/ui/src/shared/components/inline-table/inline-table.tsx similarity index 100% rename from ui/src/app/shared/components/inline-table/inline-table.tsx rename to ui/src/shared/components/inline-table/inline-table.tsx diff --git a/ui/src/app/shared/components/input-filter.scss b/ui/src/shared/components/input-filter.scss similarity index 100% rename from ui/src/app/shared/components/input-filter.scss rename to ui/src/shared/components/input-filter.scss diff --git a/ui/src/app/shared/components/input-filter.tsx b/ui/src/shared/components/input-filter.tsx similarity index 100% rename from ui/src/app/shared/components/input-filter.tsx rename to ui/src/shared/components/input-filter.tsx diff --git a/ui/src/app/shared/components/link-button.tsx b/ui/src/shared/components/link-button.tsx similarity index 100% rename from ui/src/app/shared/components/link-button.tsx rename to ui/src/shared/components/link-button.tsx diff --git a/ui/src/app/shared/components/linkified-text.tsx b/ui/src/shared/components/linkified-text.tsx similarity index 100% rename from ui/src/app/shared/components/linkified-text.tsx rename to ui/src/shared/components/linkified-text.tsx diff --git a/ui/src/app/shared/components/links.test.ts b/ui/src/shared/components/links.test.ts similarity index 100% rename from ui/src/app/shared/components/links.test.ts rename to ui/src/shared/components/links.test.ts diff --git a/ui/src/app/shared/components/links.tsx b/ui/src/shared/components/links.tsx similarity index 98% rename from ui/src/app/shared/components/links.tsx rename to ui/src/shared/components/links.tsx index cb672b387efb..bbbf6a780739 100644 --- a/ui/src/app/shared/components/links.tsx +++ b/ui/src/shared/components/links.tsx @@ -2,7 +2,7 @@ import {ObjectMeta} from 'argo-ui/src/models/kubernetes'; import {useEffect, useState} from 'react'; import * as React from 'react'; -import {Link, Workflow} from '../../../models'; +import {Link, Workflow} from '../models'; import {services} from '../services'; import {Button} from './button'; diff --git a/ui/src/app/shared/components/loading.tsx b/ui/src/shared/components/loading.tsx similarity index 100% rename from ui/src/app/shared/components/loading.tsx rename to ui/src/shared/components/loading.tsx diff --git a/ui/src/app/shared/components/modal/modal.scss b/ui/src/shared/components/modal/modal.scss similarity index 100% rename from ui/src/app/shared/components/modal/modal.scss rename to ui/src/shared/components/modal/modal.scss diff --git a/ui/src/app/shared/components/modal/modal.tsx b/ui/src/shared/components/modal/modal.tsx similarity index 100% rename from ui/src/app/shared/components/modal/modal.tsx rename to ui/src/shared/components/modal/modal.tsx diff --git a/ui/src/app/shared/components/namespace-filter.tsx b/ui/src/shared/components/namespace-filter.tsx similarity index 100% rename from ui/src/app/shared/components/namespace-filter.tsx rename to ui/src/shared/components/namespace-filter.tsx diff --git a/ui/src/app/shared/components/notice.tsx b/ui/src/shared/components/notice.tsx similarity index 100% rename from ui/src/app/shared/components/notice.tsx rename to ui/src/shared/components/notice.tsx diff --git a/ui/src/app/shared/components/nudge.tsx b/ui/src/shared/components/nudge.tsx similarity index 100% rename from ui/src/app/shared/components/nudge.tsx rename to ui/src/shared/components/nudge.tsx diff --git a/ui/src/app/shared/components/number-input.tsx b/ui/src/shared/components/number-input.tsx similarity index 100% rename from ui/src/app/shared/components/number-input.tsx rename to ui/src/shared/components/number-input.tsx diff --git a/ui/src/app/shared/components/object-editor.tsx b/ui/src/shared/components/object-editor.tsx similarity index 100% rename from ui/src/app/shared/components/object-editor.tsx rename to ui/src/shared/components/object-editor.tsx diff --git a/ui/src/app/shared/components/object-parser.test.ts b/ui/src/shared/components/object-parser.test.ts similarity index 100% rename from ui/src/app/shared/components/object-parser.test.ts rename to ui/src/shared/components/object-parser.test.ts diff --git a/ui/src/app/shared/components/object-parser.ts b/ui/src/shared/components/object-parser.ts similarity index 100% rename from ui/src/app/shared/components/object-parser.ts rename to ui/src/shared/components/object-parser.ts diff --git a/ui/src/app/shared/components/pagination-panel.tsx b/ui/src/shared/components/pagination-panel.tsx similarity index 100% rename from ui/src/app/shared/components/pagination-panel.tsx rename to ui/src/shared/components/pagination-panel.tsx diff --git a/ui/src/app/shared/components/parameters-input.tsx b/ui/src/shared/components/parameters-input.tsx similarity index 98% rename from ui/src/app/shared/components/parameters-input.tsx rename to ui/src/shared/components/parameters-input.tsx index 678bddbdf622..8acc86eea7b5 100644 --- a/ui/src/app/shared/components/parameters-input.tsx +++ b/ui/src/shared/components/parameters-input.tsx @@ -2,7 +2,7 @@ import {Select} from 'argo-ui/src/components/select/select'; import {Tooltip} from 'argo-ui/src/components/tooltip/tooltip'; import React from 'react'; -import {Parameter} from '../../../models'; +import {Parameter} from '../models'; export function getValueFromParameter(p: Parameter) { if (p.value === undefined) { diff --git a/ui/src/app/shared/components/phase-icon.tsx b/ui/src/shared/components/phase-icon.tsx similarity index 95% rename from ui/src/app/shared/components/phase-icon.tsx rename to ui/src/shared/components/phase-icon.tsx index 26aec8d965f1..bf1f5325ce4c 100644 --- a/ui/src/app/shared/components/phase-icon.tsx +++ b/ui/src/shared/components/phase-icon.tsx @@ -1,7 +1,7 @@ import classNames from 'classnames'; import * as React from 'react'; -import {NODE_PHASE} from '../../../models'; +import {NODE_PHASE} from '../models'; export function statusIconClasses(status: string): string { let classes = []; diff --git a/ui/src/app/shared/components/phase.tsx b/ui/src/shared/components/phase.tsx similarity index 100% rename from ui/src/app/shared/components/phase.tsx rename to ui/src/shared/components/phase.tsx diff --git a/ui/src/app/shared/components/progress-line.tsx b/ui/src/shared/components/progress-line.tsx similarity index 100% rename from ui/src/app/shared/components/progress-line.tsx rename to ui/src/shared/components/progress-line.tsx diff --git a/ui/src/app/shared/components/resource-editor/resource-editor.tsx b/ui/src/shared/components/resource-editor/resource-editor.tsx similarity index 100% rename from ui/src/app/shared/components/resource-editor/resource-editor.tsx rename to ui/src/shared/components/resource-editor/resource-editor.tsx diff --git a/ui/src/app/shared/components/resource-editor/resource.scss b/ui/src/shared/components/resource-editor/resource.scss similarity index 100% rename from ui/src/app/shared/components/resource-editor/resource.scss rename to ui/src/shared/components/resource-editor/resource.scss diff --git a/ui/src/app/shared/components/security-nudge.tsx b/ui/src/shared/components/security-nudge.tsx similarity index 100% rename from ui/src/app/shared/components/security-nudge.tsx rename to ui/src/shared/components/security-nudge.tsx diff --git a/ui/src/app/shared/components/survey-button.tsx b/ui/src/shared/components/survey-button.tsx similarity index 100% rename from ui/src/app/shared/components/survey-button.tsx rename to ui/src/shared/components/survey-button.tsx diff --git a/ui/src/app/shared/components/suspense-monaco-editor.tsx b/ui/src/shared/components/suspense-monaco-editor.tsx similarity index 100% rename from ui/src/app/shared/components/suspense-monaco-editor.tsx rename to ui/src/shared/components/suspense-monaco-editor.tsx diff --git a/ui/src/app/shared/components/tags-input/tags-input.scss b/ui/src/shared/components/tags-input/tags-input.scss similarity index 100% rename from ui/src/app/shared/components/tags-input/tags-input.scss rename to ui/src/shared/components/tags-input/tags-input.scss diff --git a/ui/src/app/shared/components/tags-input/tags-input.tsx b/ui/src/shared/components/tags-input/tags-input.tsx similarity index 100% rename from ui/src/app/shared/components/tags-input/tags-input.tsx rename to ui/src/shared/components/tags-input/tags-input.tsx diff --git a/ui/src/app/shared/components/text-input.tsx b/ui/src/shared/components/text-input.tsx similarity index 100% rename from ui/src/app/shared/components/text-input.tsx rename to ui/src/shared/components/text-input.tsx diff --git a/ui/src/app/shared/components/tick-meter.tsx b/ui/src/shared/components/tick-meter.tsx similarity index 100% rename from ui/src/app/shared/components/tick-meter.tsx rename to ui/src/shared/components/tick-meter.tsx diff --git a/ui/src/app/shared/components/timestamp.tsx b/ui/src/shared/components/timestamp.tsx similarity index 100% rename from ui/src/app/shared/components/timestamp.tsx rename to ui/src/shared/components/timestamp.tsx diff --git a/ui/src/app/shared/components/toggle-button.tsx b/ui/src/shared/components/toggle-button.tsx similarity index 100% rename from ui/src/app/shared/components/toggle-button.tsx rename to ui/src/shared/components/toggle-button.tsx diff --git a/ui/src/app/shared/components/upload-button.tsx b/ui/src/shared/components/upload-button.tsx similarity index 100% rename from ui/src/app/shared/components/upload-button.tsx rename to ui/src/shared/components/upload-button.tsx diff --git a/ui/src/app/shared/components/zero-state.tsx b/ui/src/shared/components/zero-state.tsx similarity index 100% rename from ui/src/app/shared/components/zero-state.tsx rename to ui/src/shared/components/zero-state.tsx diff --git a/ui/src/app/shared/conditions-panel.tsx b/ui/src/shared/conditions-panel.tsx similarity index 97% rename from ui/src/app/shared/conditions-panel.tsx rename to ui/src/shared/conditions-panel.tsx index 65a356cd6e27..723a83450a33 100644 --- a/ui/src/app/shared/conditions-panel.tsx +++ b/ui/src/shared/conditions-panel.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; -import {Condition, ConditionType} from '../../models'; import {ErrorIcon, WarningIcon} from './components/fa-icons'; +import {Condition, ConditionType} from './models'; interface Props { conditions: Condition[]; diff --git a/ui/src/app/shared/context.ts b/ui/src/shared/context.ts similarity index 100% rename from ui/src/app/shared/context.ts rename to ui/src/shared/context.ts diff --git a/ui/src/app/shared/cookie.ts b/ui/src/shared/cookie.ts similarity index 100% rename from ui/src/app/shared/cookie.ts rename to ui/src/shared/cookie.ts diff --git a/ui/src/app/shared/cron.tsx b/ui/src/shared/cron.tsx similarity index 100% rename from ui/src/app/shared/cron.tsx rename to ui/src/shared/cron.tsx diff --git a/ui/src/app/shared/debounce.ts b/ui/src/shared/debounce.ts similarity index 100% rename from ui/src/app/shared/debounce.ts rename to ui/src/shared/debounce.ts diff --git a/ui/src/app/shared/duration.ts b/ui/src/shared/duration.ts similarity index 98% rename from ui/src/app/shared/duration.ts rename to ui/src/shared/duration.ts index af74ff8a46fd..da9be25d08da 100644 --- a/ui/src/app/shared/duration.ts +++ b/ui/src/shared/duration.ts @@ -1,4 +1,4 @@ -import * as models from '../../models'; +import * as models from './models'; /** * Format the given number number of seconds in the form _d_h_m_s. diff --git a/ui/src/app/shared/examples.ts b/ui/src/shared/examples.ts similarity index 98% rename from ui/src/app/shared/examples.ts rename to ui/src/shared/examples.ts index 63694d7f0cac..bc16d140e634 100644 --- a/ui/src/app/shared/examples.ts +++ b/ui/src/shared/examples.ts @@ -1,4 +1,4 @@ -import {ClusterWorkflowTemplate, CronWorkflow, EventSource, Sensor, Template, Workflow, WorkflowTemplate} from '../../models'; +import {ClusterWorkflowTemplate, CronWorkflow, EventSource, Sensor, Template, Workflow, WorkflowTemplate} from './models'; const randomSillyName = () => { const adjectives = ['wonderful', 'fantastic', 'awesome', 'delightful', 'lovely', 'sparkly', 'omniscient']; diff --git a/ui/src/app/shared/footnote.tsx b/ui/src/shared/footnote.tsx similarity index 100% rename from ui/src/app/shared/footnote.tsx rename to ui/src/shared/footnote.tsx diff --git a/ui/src/app/shared/history.test.ts b/ui/src/shared/history.test.ts similarity index 100% rename from ui/src/app/shared/history.test.ts rename to ui/src/shared/history.test.ts diff --git a/ui/src/app/shared/history.ts b/ui/src/shared/history.ts similarity index 100% rename from ui/src/app/shared/history.ts rename to ui/src/shared/history.ts diff --git a/ui/src/app/shared/list-watch.ts b/ui/src/shared/list-watch.ts similarity index 100% rename from ui/src/app/shared/list-watch.ts rename to ui/src/shared/list-watch.ts diff --git a/ui/src/models/cluster-workflow-templates.ts b/ui/src/shared/models/cluster-workflow-templates.ts similarity index 99% rename from ui/src/models/cluster-workflow-templates.ts rename to ui/src/shared/models/cluster-workflow-templates.ts index 07ac2eca6e66..c1db9b3f663f 100644 --- a/ui/src/models/cluster-workflow-templates.ts +++ b/ui/src/shared/models/cluster-workflow-templates.ts @@ -1,4 +1,5 @@ import * as kubernetes from 'argo-ui/src/models/kubernetes'; + import {WorkflowTemplateSpec} from './workflow-templates'; export interface ClusterWorkflowTemplate { diff --git a/ui/src/models/cron-workflows.ts b/ui/src/shared/models/cron-workflows.ts similarity index 99% rename from ui/src/models/cron-workflows.ts rename to ui/src/shared/models/cron-workflows.ts index 80e66d1c571b..8e940fb88fc8 100644 --- a/ui/src/models/cron-workflows.ts +++ b/ui/src/shared/models/cron-workflows.ts @@ -1,4 +1,5 @@ import * as kubernetes from 'argo-ui/src/models/kubernetes'; + import {Condition, WorkflowSpec} from './workflows'; export interface CronWorkflow { diff --git a/ui/src/shared/models/event-source.ts b/ui/src/shared/models/event-source.ts new file mode 100644 index 000000000000..f8c064ff93b3 --- /dev/null +++ b/ui/src/shared/models/event-source.ts @@ -0,0 +1,82 @@ +import * as kubernetes from 'argo-ui/src/models/kubernetes'; + +import {Condition} from './workflows'; + +export interface EventSource { + metadata: kubernetes.ObjectMeta; + spec: { + amqp?: {[key: string]: any}; + azureEventsHub?: {[key: string]: any}; + bitbucketserver?: {[key: string]: any}; + calendar?: {[key: string]: any}; + emitter?: {[key: string]: any}; + file?: {[key: string]: any}; + generic?: {[key: string]: any}; + github?: {[key: string]: any}; + gitlab?: {[key: string]: any}; + hdfs?: {[key: string]: any}; + kafka?: {[key: string]: any}; + minio?: {[key: string]: any}; + mqtt?: {[key: string]: any}; + nats?: {[key: string]: any}; + nsq?: {[key: string]: any}; + pubSub?: {[key: string]: any}; + pulsar?: {[key: string]: any}; + redis?: {[key: string]: any}; + resource?: {[key: string]: any}; + slack?: {[key: string]: any}; + sns?: {[key: string]: any}; + sqs?: {[key: string]: any}; + storageGrid?: {[key: string]: any}; + stripe?: {[key: string]: any}; + webhook?: {[key: string]: any}; + }; + status?: {conditions?: Condition[]}; +} + +export interface EventSourceList { + metadata: kubernetes.ListMeta; + items: EventSource[]; +} + +export interface LogEntry { + namespace: string; + eventSourceName: string; + eventSourceType?: string; + eventName?: string; + level: string; + time: kubernetes.Time; + msg: string; +} + +export type EventSourceWatchEvent = kubernetes.WatchEvent; + +export const EventSourceTypes = [ + 'amqp', + 'azureEventsHub', + 'bitbucketserver', + 'calendar', + 'emitter', + 'file', + 'generic', + 'github', + 'gitlab', + 'hdfs', + 'kafka', + 'minio', + 'mqtt', + 'nats', + 'nsq', + 'pubSub', + 'pulsar', + 'redis', + 'resource', + 'slack', + 'sns', + 'sqs', + 'storageGrid', + 'stripe', + 'webhook' +] as const; + +export type EventSourceType = (typeof EventSourceTypes)[number]; diff --git a/ui/src/models/events.ts b/ui/src/shared/models/events.ts similarity index 100% rename from ui/src/models/events.ts rename to ui/src/shared/models/events.ts diff --git a/ui/src/models/index.ts b/ui/src/shared/models/index.ts similarity index 100% rename from ui/src/models/index.ts rename to ui/src/shared/models/index.ts diff --git a/ui/src/models/info.ts b/ui/src/shared/models/info.ts similarity index 100% rename from ui/src/models/info.ts rename to ui/src/shared/models/info.ts diff --git a/ui/src/models/labels.ts b/ui/src/shared/models/labels.ts similarity index 100% rename from ui/src/models/labels.ts rename to ui/src/shared/models/labels.ts diff --git a/ui/src/models/sensor.ts b/ui/src/shared/models/sensor.ts similarity index 72% rename from ui/src/models/sensor.ts rename to ui/src/shared/models/sensor.ts index 2f2addfb27f6..d7875d090911 100644 --- a/ui/src/models/sensor.ts +++ b/ui/src/shared/models/sensor.ts @@ -1,4 +1,5 @@ import * as kubernetes from 'argo-ui/src/models/kubernetes'; + import {Condition} from './workflows'; export interface Sensor { @@ -13,16 +14,16 @@ export interface Sensor { template?: { name: string; conditions?: string; - argoWorkflow?: {}; - awsLambda?: {}; - custom?: {}; - http?: {}; - k8s?: {}; - log?: {}; - kafka?: {}; - nats?: {}; - openWhisk?: {}; - slack?: {}; + argoWorkflow?: any; + awsLambda?: any; + custom?: any; + http?: any; + k8s?: any; + log?: any; + kafka?: any; + nats?: any; + openWhisk?: any; + slack?: any; }; }[]; }; @@ -46,4 +47,4 @@ export interface LogEntry { export type SensorWatchEvent = kubernetes.WatchEvent; export const TriggerTypes = ['argoWorkflow', 'awsLambda', 'custom', 'http', 'k8s', 'kafka', 'log', 'nats', 'openWhisk', 'slack'] as const; -export type TriggerType = typeof TriggerTypes[number]; +export type TriggerType = (typeof TriggerTypes)[number]; diff --git a/ui/src/models/submit-opts.ts b/ui/src/shared/models/submit-opts.ts similarity index 100% rename from ui/src/models/submit-opts.ts rename to ui/src/shared/models/submit-opts.ts diff --git a/ui/src/models/workflow-templates.ts b/ui/src/shared/models/workflow-templates.ts similarity index 99% rename from ui/src/models/workflow-templates.ts rename to ui/src/shared/models/workflow-templates.ts index 46c178f4ec04..f6249f5cfada 100644 --- a/ui/src/models/workflow-templates.ts +++ b/ui/src/shared/models/workflow-templates.ts @@ -1,4 +1,5 @@ import * as kubernetes from 'argo-ui/src/models/kubernetes'; + import {WorkflowSpec} from './workflows'; export interface WorkflowTemplate { diff --git a/ui/src/models/workflows.ts b/ui/src/shared/models/workflows.ts similarity index 99% rename from ui/src/models/workflows.ts rename to ui/src/shared/models/workflows.ts index b4b6215e66fc..b44876bc8405 100644 --- a/ui/src/models/workflows.ts +++ b/ui/src/shared/models/workflows.ts @@ -139,7 +139,7 @@ export interface Artifact { s3?: S3Artifact; azure?: AzureArtifact; archive?: { - none?: {}; + none?: any; }; artifactGC?: { strategy?: 'OnWorkflowCompletion' | 'OnWorkflowDeletion'; @@ -483,7 +483,7 @@ export interface Template { /** * Suspend template */ - suspend?: {}; + suspend?: any; /** * Template is the name of the template which is used as the base of this template. diff --git a/ui/src/app/shared/namespaces.ts b/ui/src/shared/namespaces.ts similarity index 100% rename from ui/src/app/shared/namespaces.ts rename to ui/src/shared/namespaces.ts diff --git a/ui/src/app/shared/pagination.ts b/ui/src/shared/pagination.ts similarity index 100% rename from ui/src/app/shared/pagination.ts rename to ui/src/shared/pagination.ts diff --git a/ui/src/app/shared/pod-name.test.ts b/ui/src/shared/pod-name.test.ts similarity index 98% rename from ui/src/app/shared/pod-name.test.ts rename to ui/src/shared/pod-name.test.ts index 233249605466..d71a25862a4b 100644 --- a/ui/src/app/shared/pod-name.test.ts +++ b/ui/src/shared/pod-name.test.ts @@ -1,5 +1,5 @@ -import {NodeStatus, Workflow} from '../../models'; import {ANNOTATION_KEY_POD_NAME_VERSION} from './annotations'; +import {NodeStatus, Workflow} from './models'; import {createFNVHash, ensurePodNamePrefixLength, getPodName, getTemplateNameFromNode, k8sNamingHashLength, maxK8sResourceNameLength, POD_NAME_V1, POD_NAME_V2} from './pod-name'; describe('pod names', () => { diff --git a/ui/src/app/shared/pod-name.ts b/ui/src/shared/pod-name.ts similarity index 97% rename from ui/src/app/shared/pod-name.ts rename to ui/src/shared/pod-name.ts index fa689351b92e..7a30d5047deb 100644 --- a/ui/src/app/shared/pod-name.ts +++ b/ui/src/shared/pod-name.ts @@ -1,5 +1,5 @@ -import {NodeStatus, Workflow} from '../../models'; import {ANNOTATION_KEY_POD_NAME_VERSION} from './annotations'; +import {NodeStatus, Workflow} from './models'; export const POD_NAME_V1 = 'v1'; export const POD_NAME_V2 = 'v2'; diff --git a/ui/src/app/shared/resource-quantity.test.ts b/ui/src/shared/resource-quantity.test.ts similarity index 100% rename from ui/src/app/shared/resource-quantity.test.ts rename to ui/src/shared/resource-quantity.test.ts diff --git a/ui/src/app/shared/resource-quantity.ts b/ui/src/shared/resource-quantity.ts similarity index 100% rename from ui/src/app/shared/resource-quantity.ts rename to ui/src/shared/resource-quantity.ts diff --git a/ui/src/app/shared/resources-duration.tsx b/ui/src/shared/resources-duration.tsx similarity index 100% rename from ui/src/app/shared/resources-duration.tsx rename to ui/src/shared/resources-duration.tsx diff --git a/ui/src/app/shared/retry-observable.ts b/ui/src/shared/retry-observable.ts similarity index 100% rename from ui/src/app/shared/retry-observable.ts rename to ui/src/shared/retry-observable.ts diff --git a/ui/src/app/shared/retry-watch.ts b/ui/src/shared/retry-watch.ts similarity index 100% rename from ui/src/app/shared/retry-watch.ts rename to ui/src/shared/retry-watch.ts diff --git a/ui/src/app/shared/scoped-local-storage.ts b/ui/src/shared/scoped-local-storage.ts similarity index 100% rename from ui/src/app/shared/scoped-local-storage.ts rename to ui/src/shared/scoped-local-storage.ts diff --git a/ui/src/app/shared/services/cluster-workflow-template-service.ts b/ui/src/shared/services/cluster-workflow-template-service.ts similarity index 96% rename from ui/src/app/shared/services/cluster-workflow-template-service.ts rename to ui/src/shared/services/cluster-workflow-template-service.ts index 8c679eb49b50..48775ac58d93 100644 --- a/ui/src/app/shared/services/cluster-workflow-template-service.ts +++ b/ui/src/shared/services/cluster-workflow-template-service.ts @@ -1,4 +1,4 @@ -import * as models from '../../../models'; +import * as models from '../models'; import requests from './requests'; export const ClusterWorkflowTemplateService = { diff --git a/ui/src/app/shared/services/cron-workflow-service.ts b/ui/src/shared/services/cron-workflow-service.ts similarity index 95% rename from ui/src/app/shared/services/cron-workflow-service.ts rename to ui/src/shared/services/cron-workflow-service.ts index f2a959d95196..dc82880c7995 100644 --- a/ui/src/app/shared/services/cron-workflow-service.ts +++ b/ui/src/shared/services/cron-workflow-service.ts @@ -1,4 +1,4 @@ -import {CronWorkflow, CronWorkflowList} from '../../../models'; +import {CronWorkflow, CronWorkflowList} from '../models'; import requests from './requests'; import {queryParams} from './utils'; diff --git a/ui/src/app/shared/services/event-service.ts b/ui/src/shared/services/event-service.ts similarity index 81% rename from ui/src/app/shared/services/event-service.ts rename to ui/src/shared/services/event-service.ts index db4ebd5b0c52..3f4a21b95142 100644 --- a/ui/src/app/shared/services/event-service.ts +++ b/ui/src/shared/services/event-service.ts @@ -1,4 +1,4 @@ -import {WorkflowEventBindingList} from '../../../models'; +import {WorkflowEventBindingList} from '../models'; import requests from './requests'; export const EventService = { diff --git a/ui/src/app/shared/services/event-source-service.ts b/ui/src/shared/services/event-source-service.ts similarity index 97% rename from ui/src/app/shared/services/event-source-service.ts rename to ui/src/shared/services/event-source-service.ts index 76613008dec3..61ac5d36370f 100644 --- a/ui/src/app/shared/services/event-source-service.ts +++ b/ui/src/shared/services/event-source-service.ts @@ -1,6 +1,6 @@ import {map} from 'rxjs/operators'; -import {EventSource, EventSourceList, EventSourceWatchEvent, LogEntry} from '../../../models/event-source'; +import {EventSource, EventSourceList, EventSourceWatchEvent, LogEntry} from '../models/event-source'; import requests from './requests'; export const EventSourceService = { diff --git a/ui/src/app/shared/services/index.ts b/ui/src/shared/services/index.ts similarity index 100% rename from ui/src/app/shared/services/index.ts rename to ui/src/shared/services/index.ts diff --git a/ui/src/app/shared/services/info-service.ts b/ui/src/shared/services/info-service.ts similarity index 91% rename from ui/src/app/shared/services/info-service.ts rename to ui/src/shared/services/info-service.ts index 86fc7897c83b..f8e4ca98802d 100644 --- a/ui/src/app/shared/services/info-service.ts +++ b/ui/src/shared/services/info-service.ts @@ -1,4 +1,4 @@ -import {GetUserInfoResponse, Info, Version} from '../../../models'; +import {GetUserInfoResponse, Info, Version} from '../models'; import requests from './requests'; let info: Promise; // we cache this globally rather than in localStorage so it is request once per page refresh diff --git a/ui/src/app/shared/services/requests.ts b/ui/src/shared/services/requests.ts similarity index 100% rename from ui/src/app/shared/services/requests.ts rename to ui/src/shared/services/requests.ts diff --git a/ui/src/app/shared/services/responses.ts b/ui/src/shared/services/responses.ts similarity index 100% rename from ui/src/app/shared/services/responses.ts rename to ui/src/shared/services/responses.ts diff --git a/ui/src/app/shared/services/sensor-service.ts b/ui/src/shared/services/sensor-service.ts similarity index 98% rename from ui/src/app/shared/services/sensor-service.ts rename to ui/src/shared/services/sensor-service.ts index 0803a544ea6c..61a1a7ce92e5 100644 --- a/ui/src/app/shared/services/sensor-service.ts +++ b/ui/src/shared/services/sensor-service.ts @@ -1,6 +1,6 @@ import {map} from 'rxjs/operators'; -import {LogEntry, Sensor, SensorList, SensorWatchEvent} from '../../../models/sensor'; +import {LogEntry, Sensor, SensorList, SensorWatchEvent} from '../models/sensor'; import requests from './requests'; export const SensorService = { diff --git a/ui/src/app/shared/services/utils.ts b/ui/src/shared/services/utils.ts similarity index 100% rename from ui/src/app/shared/services/utils.ts rename to ui/src/shared/services/utils.ts diff --git a/ui/src/app/shared/services/workflow-service.test.ts b/ui/src/shared/services/workflow-service.test.ts similarity index 97% rename from ui/src/app/shared/services/workflow-service.test.ts rename to ui/src/shared/services/workflow-service.test.ts index 59730746bc93..f0349062d06e 100644 --- a/ui/src/app/shared/services/workflow-service.test.ts +++ b/ui/src/shared/services/workflow-service.test.ts @@ -1,7 +1,7 @@ /** * @jest-environment jsdom */ -import {Workflow} from '../../../models'; +import {Workflow} from '../models'; import {WorkflowsService} from './workflows-service'; const workflow = (name: string, namespace: string, uid: string): Workflow => { diff --git a/ui/src/app/shared/services/workflow-template-service.ts b/ui/src/shared/services/workflow-template-service.ts similarity index 96% rename from ui/src/app/shared/services/workflow-template-service.ts rename to ui/src/shared/services/workflow-template-service.ts index df4c1612fcd3..e1d8595a9bd5 100644 --- a/ui/src/app/shared/services/workflow-template-service.ts +++ b/ui/src/shared/services/workflow-template-service.ts @@ -1,4 +1,4 @@ -import * as models from '../../../models'; +import * as models from '../models'; import {Pagination} from '../pagination'; import requests from './requests'; import {queryParams} from './utils'; diff --git a/ui/src/app/shared/services/workflows-service.ts b/ui/src/shared/services/workflows-service.ts similarity index 98% rename from ui/src/app/shared/services/workflows-service.ts rename to ui/src/shared/services/workflows-service.ts index bd35074c497d..e78df30f2f72 100644 --- a/ui/src/app/shared/services/workflows-service.ts +++ b/ui/src/shared/services/workflows-service.ts @@ -1,12 +1,12 @@ import {EMPTY, from, Observable, of} from 'rxjs'; import {catchError, filter, map, mergeMap, switchMap} from 'rxjs/operators'; -import * as models from '../../../models'; -import {Event, LogEntry, NodeStatus, Workflow, WorkflowList, WorkflowPhase} from '../../../models'; -import {ResubmitOpts, RetryOpts} from '../../../models'; -import {SubmitOpts} from '../../../models/submit-opts'; import {NameFilterKeys} from '../../workflows/components/workflow-filters/workflow-filters'; import {uiUrl} from '../base'; +import * as models from '../models'; +import {Event, LogEntry, NodeStatus, Workflow, WorkflowList, WorkflowPhase} from '../models'; +import {ResubmitOpts, RetryOpts} from '../models'; +import {SubmitOpts} from '../models/submit-opts'; import {Pagination} from '../pagination'; import requests from './requests'; import {WorkflowDeleteResponse} from './responses'; diff --git a/ui/src/app/shared/template-resolution.ts b/ui/src/shared/template-resolution.ts similarity index 97% rename from ui/src/app/shared/template-resolution.ts rename to ui/src/shared/template-resolution.ts index 48d6fba26b50..afb960df0b16 100644 --- a/ui/src/app/shared/template-resolution.ts +++ b/ui/src/shared/template-resolution.ts @@ -1,5 +1,5 @@ -import * as models from '../../models'; -import {execSpec, ResourceScope, WorkflowStep} from '../../models'; +import * as models from './models'; +import {execSpec, ResourceScope, WorkflowStep} from './models'; export function getResolvedTemplates(workflow: models.Workflow, node: models.NodeStatus): models.Template { let tmpTemplate = { diff --git a/ui/src/app/shared/use-collect-event.ts b/ui/src/shared/use-collect-event.ts similarity index 100% rename from ui/src/app/shared/use-collect-event.ts rename to ui/src/shared/use-collect-event.ts diff --git a/ui/src/app/shared/use-editable-object.ts b/ui/src/shared/use-editable-object.ts similarity index 100% rename from ui/src/app/shared/use-editable-object.ts rename to ui/src/shared/use-editable-object.ts diff --git a/ui/src/app/shared/use-local-storage.ts b/ui/src/shared/use-local-storage.ts similarity index 100% rename from ui/src/app/shared/use-local-storage.ts rename to ui/src/shared/use-local-storage.ts diff --git a/ui/src/app/shared/use-query-params.ts b/ui/src/shared/use-query-params.ts similarity index 100% rename from ui/src/app/shared/use-query-params.ts rename to ui/src/shared/use-query-params.ts diff --git a/ui/src/app/shared/use-resizable-width.ts b/ui/src/shared/use-resizable-width.ts similarity index 100% rename from ui/src/app/shared/use-resizable-width.ts rename to ui/src/shared/use-resizable-width.ts diff --git a/ui/src/app/shared/use-timestamp.ts b/ui/src/shared/use-timestamp.ts similarity index 100% rename from ui/src/app/shared/use-timestamp.ts rename to ui/src/shared/use-timestamp.ts diff --git a/ui/src/app/shared/use-transition.ts b/ui/src/shared/use-transition.ts similarity index 100% rename from ui/src/app/shared/use-transition.ts rename to ui/src/shared/use-transition.ts diff --git a/ui/src/app/shared/workflow-operations-map.tsx b/ui/src/shared/workflow-operations-map.ts similarity index 98% rename from ui/src/app/shared/workflow-operations-map.tsx rename to ui/src/shared/workflow-operations-map.ts index 92583934bf9f..0707a8f76bd1 100644 --- a/ui/src/app/shared/workflow-operations-map.tsx +++ b/ui/src/shared/workflow-operations-map.ts @@ -1,4 +1,4 @@ -import type {NodePhase, Workflow} from '../../models'; +import type {NodePhase, Workflow} from './models'; import {services} from './services'; import {WorkflowDeleteResponse} from './services/responses'; diff --git a/ui/src/app/typings.d.ts b/ui/src/typings.d.ts similarity index 100% rename from ui/src/app/typings.d.ts rename to ui/src/typings.d.ts diff --git a/ui/src/app/userinfo/cli-help.tsx b/ui/src/userinfo/cli-help.tsx similarity index 100% rename from ui/src/app/userinfo/cli-help.tsx rename to ui/src/userinfo/cli-help.tsx diff --git a/ui/src/app/userinfo/index.tsx b/ui/src/userinfo/index.tsx similarity index 100% rename from ui/src/app/userinfo/index.tsx rename to ui/src/userinfo/index.tsx diff --git a/ui/src/app/userinfo/user-info.tsx b/ui/src/userinfo/user-info.tsx similarity index 98% rename from ui/src/app/userinfo/user-info.tsx rename to ui/src/userinfo/user-info.tsx index e908057695df..dab024abc553 100644 --- a/ui/src/app/userinfo/user-info.tsx +++ b/ui/src/userinfo/user-info.tsx @@ -2,10 +2,10 @@ import {Page} from 'argo-ui/src/components/page/page'; import * as React from 'react'; import {useEffect, useState} from 'react'; -import {GetUserInfoResponse} from '../../models'; import {uiUrl} from '../shared/base'; import {ErrorNotice} from '../shared/components/error-notice'; import {Notice} from '../shared/components/notice'; +import {GetUserInfoResponse} from '../shared/models'; import {services} from '../shared/services'; import {CliHelp} from './cli-help'; diff --git a/ui/src/app/widgets/widget-gallery.tsx b/ui/src/widgets/widget-gallery.tsx similarity index 100% rename from ui/src/app/widgets/widget-gallery.tsx rename to ui/src/widgets/widget-gallery.tsx diff --git a/ui/src/app/widgets/widgets.tsx b/ui/src/widgets/widgets.tsx similarity index 100% rename from ui/src/app/widgets/widgets.tsx rename to ui/src/widgets/widgets.tsx diff --git a/ui/src/app/widgets/workflow-graph.tsx b/ui/src/widgets/workflow-graph.tsx similarity index 97% rename from ui/src/app/widgets/workflow-graph.tsx rename to ui/src/widgets/workflow-graph.tsx index d6efb71f7768..c38b6546d94f 100644 --- a/ui/src/app/widgets/workflow-graph.tsx +++ b/ui/src/widgets/workflow-graph.tsx @@ -2,10 +2,10 @@ import * as React from 'react'; import {useEffect, useState} from 'react'; import {RouteComponentProps} from 'react-router'; -import {ArtifactRepositoryRefStatus, NodeStatus} from '../../models'; import {uiUrl} from '../shared/base'; import {ErrorNotice} from '../shared/components/error-notice'; import {historyUrl} from '../shared/history'; +import {ArtifactRepositoryRefStatus, NodeStatus} from '../shared/models'; import {RetryWatch} from '../shared/retry-watch'; import {services} from '../shared/services'; import {WorkflowDag} from '../workflows/components/workflow-dag/workflow-dag'; diff --git a/ui/src/app/widgets/workflow-status-badge.scss b/ui/src/widgets/workflow-status-badge.scss similarity index 100% rename from ui/src/app/widgets/workflow-status-badge.scss rename to ui/src/widgets/workflow-status-badge.scss diff --git a/ui/src/app/widgets/workflow-status-badge.tsx b/ui/src/widgets/workflow-status-badge.tsx similarity index 97% rename from ui/src/app/widgets/workflow-status-badge.tsx rename to ui/src/widgets/workflow-status-badge.tsx index 9026091a2581..50da09b80a51 100644 --- a/ui/src/app/widgets/workflow-status-badge.tsx +++ b/ui/src/widgets/workflow-status-badge.tsx @@ -2,9 +2,9 @@ import * as React from 'react'; import {useEffect, useState} from 'react'; import {RouteComponentProps} from 'react-router'; -import type {NodePhase} from '../../models'; import {uiUrl} from '../shared/base'; import {historyUrl} from '../shared/history'; +import type {NodePhase} from '../shared/models'; import {RetryWatch} from '../shared/retry-watch'; import {services} from '../shared/services'; diff --git a/ui/src/app/workflow-event-bindings/id.ts b/ui/src/workflow-event-bindings/id.ts similarity index 100% rename from ui/src/app/workflow-event-bindings/id.ts rename to ui/src/workflow-event-bindings/id.ts diff --git a/ui/src/app/workflow-event-bindings/index.ts b/ui/src/workflow-event-bindings/index.ts similarity index 100% rename from ui/src/app/workflow-event-bindings/index.ts rename to ui/src/workflow-event-bindings/index.ts diff --git a/ui/src/app/workflow-event-bindings/workflow-event-bindings-container.tsx b/ui/src/workflow-event-bindings/workflow-event-bindings-container.tsx similarity index 100% rename from ui/src/app/workflow-event-bindings/workflow-event-bindings-container.tsx rename to ui/src/workflow-event-bindings/workflow-event-bindings-container.tsx diff --git a/ui/src/app/workflow-event-bindings/workflow-event-bindings.tsx b/ui/src/workflow-event-bindings/workflow-event-bindings.tsx similarity index 99% rename from ui/src/app/workflow-event-bindings/workflow-event-bindings.tsx rename to ui/src/workflow-event-bindings/workflow-event-bindings.tsx index 0444f5714a10..95e1cd34afce 100644 --- a/ui/src/app/workflow-event-bindings/workflow-event-bindings.tsx +++ b/ui/src/workflow-event-bindings/workflow-event-bindings.tsx @@ -4,7 +4,6 @@ import * as React from 'react'; import {useContext, useEffect, useState} from 'react'; import {RouteComponentProps} from 'react-router-dom'; -import {WorkflowEventBinding} from '../../models'; import {absoluteUrl, uiUrl} from '../shared/base'; import {ErrorNotice} from '../shared/components/error-notice'; import {InfoIcon} from '../shared/components/fa-icons'; @@ -17,6 +16,7 @@ import {ZeroState} from '../shared/components/zero-state'; import {Context} from '../shared/context'; import {Footnote} from '../shared/footnote'; import {historyUrl} from '../shared/history'; +import {WorkflowEventBinding} from '../shared/models'; import * as nsUtils from '../shared/namespaces'; import {services} from '../shared/services'; import {useCollectEvent} from '../shared/use-collect-event'; diff --git a/ui/src/app/workflow-templates/index.ts b/ui/src/workflow-templates/index.ts similarity index 100% rename from ui/src/app/workflow-templates/index.ts rename to ui/src/workflow-templates/index.ts diff --git a/ui/src/app/workflow-templates/workflow-template-container.tsx b/ui/src/workflow-templates/workflow-template-container.tsx similarity index 100% rename from ui/src/app/workflow-templates/workflow-template-container.tsx rename to ui/src/workflow-templates/workflow-template-container.tsx diff --git a/ui/src/app/workflow-templates/workflow-template-creator.tsx b/ui/src/workflow-templates/workflow-template-creator.tsx similarity index 97% rename from ui/src/app/workflow-templates/workflow-template-creator.tsx rename to ui/src/workflow-templates/workflow-template-creator.tsx index e96f57f8e364..0e8c33001999 100644 --- a/ui/src/app/workflow-templates/workflow-template-creator.tsx +++ b/ui/src/workflow-templates/workflow-template-creator.tsx @@ -1,12 +1,12 @@ import * as React from 'react'; import {useState} from 'react'; -import {WorkflowTemplate} from '../../models'; import {Button} from '../shared/components/button'; import {ErrorNotice} from '../shared/components/error-notice'; import {ExampleManifests} from '../shared/components/example-manifests'; import {UploadButton} from '../shared/components/upload-button'; import {exampleWorkflowTemplate} from '../shared/examples'; +import {WorkflowTemplate} from '../shared/models'; import * as nsUtils from '../shared/namespaces'; import {services} from '../shared/services'; import {WorkflowTemplateEditor} from './workflow-template-editor'; diff --git a/ui/src/app/workflow-templates/workflow-template-details.tsx b/ui/src/workflow-templates/workflow-template-details.tsx similarity index 98% rename from ui/src/app/workflow-templates/workflow-template-details.tsx rename to ui/src/workflow-templates/workflow-template-details.tsx index e5fe532c3a4a..8a8d869c3050 100644 --- a/ui/src/app/workflow-templates/workflow-template-details.tsx +++ b/ui/src/workflow-templates/workflow-template-details.tsx @@ -5,14 +5,14 @@ import * as React from 'react'; import {useContext, useEffect, useState} from 'react'; import {RouteComponentProps} from 'react-router'; -import * as models from '../../models'; -import {Workflow, WorkflowTemplate} from '../../models'; import {uiUrl} from '../shared/base'; import {ErrorNotice} from '../shared/components/error-notice'; import {Loading} from '../shared/components/loading'; import {ZeroState} from '../shared/components/zero-state'; import {Context} from '../shared/context'; import {historyUrl} from '../shared/history'; +import * as models from '../shared/models'; +import {Workflow, WorkflowTemplate} from '../shared/models'; import {services} from '../shared/services'; import {useCollectEvent} from '../shared/use-collect-event'; import {useEditableObject} from '../shared/use-editable-object'; diff --git a/ui/src/app/workflow-templates/workflow-template-editor.tsx b/ui/src/workflow-templates/workflow-template-editor.tsx similarity index 97% rename from ui/src/app/workflow-templates/workflow-template-editor.tsx rename to ui/src/workflow-templates/workflow-template-editor.tsx index d7856a4cca2f..c273df8ccc18 100644 --- a/ui/src/app/workflow-templates/workflow-template-editor.tsx +++ b/ui/src/workflow-templates/workflow-template-editor.tsx @@ -1,11 +1,11 @@ import {Tabs} from 'argo-ui/src/components/tabs/tabs'; import * as React from 'react'; -import {WorkflowTemplate} from '../../models'; import {LabelsAndAnnotationsEditor} from '../shared/components/editors/labels-and-annotations-editor'; import {MetadataEditor} from '../shared/components/editors/metadata-editor'; import {WorkflowParametersEditor} from '../shared/components/editors/workflow-parameters-editor'; import {ObjectEditor} from '../shared/components/object-editor'; +import {WorkflowTemplate} from '../shared/models'; export function WorkflowTemplateEditor({ onChange, diff --git a/ui/src/app/workflow-templates/workflow-template-filters.scss b/ui/src/workflow-templates/workflow-template-filters.scss similarity index 100% rename from ui/src/app/workflow-templates/workflow-template-filters.scss rename to ui/src/workflow-templates/workflow-template-filters.scss diff --git a/ui/src/app/workflow-templates/workflow-template-filters.tsx b/ui/src/workflow-templates/workflow-template-filters.tsx similarity index 98% rename from ui/src/app/workflow-templates/workflow-template-filters.tsx rename to ui/src/workflow-templates/workflow-template-filters.tsx index 656b297053b5..1c15bfe8bd58 100644 --- a/ui/src/app/workflow-templates/workflow-template-filters.tsx +++ b/ui/src/workflow-templates/workflow-template-filters.tsx @@ -1,10 +1,10 @@ import * as React from 'react'; import {useEffect, useState} from 'react'; -import * as models from '../../models'; import {InputFilter} from '../shared/components/input-filter'; import {NamespaceFilter} from '../shared/components/namespace-filter'; import {TagsInput} from '../shared/components/tags-input/tags-input'; +import * as models from '../shared/models'; import './workflow-template-filters.scss'; diff --git a/ui/src/app/workflow-templates/workflow-template-link.tsx b/ui/src/workflow-templates/workflow-template-link.tsx similarity index 100% rename from ui/src/app/workflow-templates/workflow-template-link.tsx rename to ui/src/workflow-templates/workflow-template-link.tsx diff --git a/ui/src/app/workflow-templates/workflow-template-list.scss b/ui/src/workflow-templates/workflow-template-list.scss similarity index 100% rename from ui/src/app/workflow-templates/workflow-template-list.scss rename to ui/src/workflow-templates/workflow-template-list.scss diff --git a/ui/src/app/workflow-templates/workflow-template-list.tsx b/ui/src/workflow-templates/workflow-template-list.tsx similarity index 99% rename from ui/src/app/workflow-templates/workflow-template-list.tsx rename to ui/src/workflow-templates/workflow-template-list.tsx index 74b5e9741e73..6a9820b3572d 100644 --- a/ui/src/app/workflow-templates/workflow-template-list.tsx +++ b/ui/src/workflow-templates/workflow-template-list.tsx @@ -4,7 +4,6 @@ import * as React from 'react'; import {useContext, useEffect, useState} from 'react'; import {Link, RouteComponentProps} from 'react-router-dom'; -import {WorkflowTemplate} from '../../models'; import {ANNOTATION_DESCRIPTION, ANNOTATION_TITLE} from '../shared/annotations'; import {uiUrl} from '../shared/base'; import {ErrorNotice} from '../shared/components/error-notice'; @@ -17,6 +16,7 @@ import {ZeroState} from '../shared/components/zero-state'; import {Context} from '../shared/context'; import {Footnote} from '../shared/footnote'; import {historyUrl} from '../shared/history'; +import {WorkflowTemplate} from '../shared/models'; import * as nsUtils from '../shared/namespaces'; import {Pagination, parseLimit} from '../shared/pagination'; import {ScopedLocalStorage} from '../shared/scoped-local-storage'; diff --git a/ui/src/app/workflows/components/events-panel.tsx b/ui/src/workflows/components/events-panel.tsx similarity index 99% rename from ui/src/app/workflows/components/events-panel.tsx rename to ui/src/workflows/components/events-panel.tsx index c41fa9968096..dca3b30e2a68 100644 --- a/ui/src/app/workflows/components/events-panel.tsx +++ b/ui/src/workflows/components/events-panel.tsx @@ -2,13 +2,13 @@ import * as React from 'react'; import {useEffect, useRef, useState} from 'react'; import {map} from 'rxjs/operators'; -import {Event} from '../../../models'; import {ErrorNotice} from '../../shared/components/error-notice'; import {Notice} from '../../shared/components/notice'; import {Timestamp, TimestampSwitch} from '../../shared/components/timestamp'; import {ToggleButton} from '../../shared/components/toggle-button'; import debounce from '../../shared/debounce'; import {ListWatch} from '../../shared/list-watch'; +import {Event} from '../../shared/models'; import {services} from '../../shared/services'; import useTimestamp, {TIMESTAMP_KEYS} from '../../shared/use-timestamp'; diff --git a/ui/src/app/workflows/components/resubmit-workflow-panel.tsx b/ui/src/workflows/components/resubmit-workflow-panel.tsx similarity index 98% rename from ui/src/app/workflows/components/resubmit-workflow-panel.tsx rename to ui/src/workflows/components/resubmit-workflow-panel.tsx index 4cd0a31659dc..4eae7d5d7eae 100644 --- a/ui/src/app/workflows/components/resubmit-workflow-panel.tsx +++ b/ui/src/workflows/components/resubmit-workflow-panel.tsx @@ -1,11 +1,11 @@ import {Checkbox} from 'argo-ui/src/components/checkbox'; import React, {useContext, useState} from 'react'; -import {Parameter, ResubmitOpts, Workflow} from '../../../models'; import {uiUrl} from '../../shared/base'; import {ErrorNotice} from '../../shared/components/error-notice'; import {getValueFromParameter, ParametersInput} from '../../shared/components/parameters-input'; import {Context} from '../../shared/context'; +import {Parameter, ResubmitOpts, Workflow} from '../../shared/models'; import {services} from '../../shared/services'; interface Props { diff --git a/ui/src/app/workflows/components/retry-workflow-node-panel.tsx b/ui/src/workflows/components/retry-workflow-node-panel.tsx similarity index 98% rename from ui/src/app/workflows/components/retry-workflow-node-panel.tsx rename to ui/src/workflows/components/retry-workflow-node-panel.tsx index 9f67d42d8cd0..4526e0fa11f9 100644 --- a/ui/src/app/workflows/components/retry-workflow-node-panel.tsx +++ b/ui/src/workflows/components/retry-workflow-node-panel.tsx @@ -2,9 +2,9 @@ import {Checkbox} from 'argo-ui/src/components/checkbox'; import {Tooltip} from 'argo-ui/src/components/tooltip/tooltip'; import React, {useState} from 'react'; -import {Parameter, RetryOpts, Workflow} from '../../../models'; import {ErrorNotice} from '../../shared/components/error-notice'; import {getValueFromParameter, ParametersInput} from '../../shared/components/parameters-input'; +import {Parameter, RetryOpts, Workflow} from '../../shared/models'; import {services} from '../../shared/services'; interface Props { diff --git a/ui/src/app/workflows/components/retry-workflow-panel.tsx b/ui/src/workflows/components/retry-workflow-panel.tsx similarity index 98% rename from ui/src/app/workflows/components/retry-workflow-panel.tsx rename to ui/src/workflows/components/retry-workflow-panel.tsx index 3525debe3ccd..7679a4970a13 100644 --- a/ui/src/app/workflows/components/retry-workflow-panel.tsx +++ b/ui/src/workflows/components/retry-workflow-panel.tsx @@ -1,11 +1,11 @@ import {Checkbox} from 'argo-ui/src/components/checkbox'; import React, {useContext, useState} from 'react'; -import {Parameter, RetryOpts, Workflow} from '../../../models'; import {uiUrl} from '../../shared/base'; import {ErrorNotice} from '../../shared/components/error-notice'; import {getValueFromParameter, ParametersInput} from '../../shared/components/parameters-input'; import {Context} from '../../shared/context'; +import {Parameter, RetryOpts, Workflow} from '../../shared/models'; import {services} from '../../shared/services'; interface Props { diff --git a/ui/src/app/workflows/components/submit-workflow-panel.tsx b/ui/src/workflows/components/submit-workflow-panel.tsx similarity index 98% rename from ui/src/app/workflows/components/submit-workflow-panel.tsx rename to ui/src/workflows/components/submit-workflow-panel.tsx index fa5d4abdc089..8b93d3b53b3e 100644 --- a/ui/src/app/workflows/components/submit-workflow-panel.tsx +++ b/ui/src/workflows/components/submit-workflow-panel.tsx @@ -1,12 +1,12 @@ import {Select} from 'argo-ui/src/components/select/select'; import React, {useContext, useMemo, useState} from 'react'; -import {Parameter, Template} from '../../../models'; import {uiUrl} from '../../shared/base'; import {ErrorNotice} from '../../shared/components/error-notice'; import {getValueFromParameter, ParametersInput} from '../../shared/components/parameters-input'; import {TagsInput} from '../../shared/components/tags-input/tags-input'; import {Context} from '../../shared/context'; +import {Parameter, Template} from '../../shared/models'; import {services} from '../../shared/services'; interface Props { diff --git a/ui/src/app/workflows/components/workflow-artifacts.tsx b/ui/src/workflows/components/workflow-artifacts.tsx similarity index 98% rename from ui/src/app/workflows/components/workflow-artifacts.tsx rename to ui/src/workflows/components/workflow-artifacts.tsx index 1f9c820822c1..90b59298d55f 100644 --- a/ui/src/app/workflows/components/workflow-artifacts.tsx +++ b/ui/src/workflows/components/workflow-artifacts.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; -import * as models from '../../../models'; import {Timestamp} from '../../shared/components/timestamp'; +import * as models from '../../shared/models'; import {services} from '../../shared/services'; import {TIMESTAMP_KEYS} from '../../shared/use-timestamp'; diff --git a/ui/src/app/workflows/components/workflow-creator-info/workflow-creator-info.scss b/ui/src/workflows/components/workflow-creator-info/workflow-creator-info.scss similarity index 100% rename from ui/src/app/workflows/components/workflow-creator-info/workflow-creator-info.scss rename to ui/src/workflows/components/workflow-creator-info/workflow-creator-info.scss diff --git a/ui/src/app/workflows/components/workflow-creator-info/workflow-creator-info.tsx b/ui/src/workflows/components/workflow-creator-info/workflow-creator-info.tsx similarity index 94% rename from ui/src/app/workflows/components/workflow-creator-info/workflow-creator-info.tsx rename to ui/src/workflows/components/workflow-creator-info/workflow-creator-info.tsx index 3d9c3ac9c6c2..c3151ef8f348 100644 --- a/ui/src/app/workflows/components/workflow-creator-info/workflow-creator-info.tsx +++ b/ui/src/workflows/components/workflow-creator-info/workflow-creator-info.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; -import * as models from '../../../../models'; -import {labels} from '../../../../models'; +import * as models from '../../../shared/models'; +import {labels} from '../../../shared/models'; import './workflow-creator-info.scss'; diff --git a/ui/src/app/workflows/components/workflow-creator.tsx b/ui/src/workflows/components/workflow-creator.tsx similarity index 98% rename from ui/src/app/workflows/components/workflow-creator.tsx rename to ui/src/workflows/components/workflow-creator.tsx index e1b38259e9d0..a5e6c6e0e319 100644 --- a/ui/src/app/workflows/components/workflow-creator.tsx +++ b/ui/src/workflows/components/workflow-creator.tsx @@ -2,12 +2,12 @@ import {Select} from 'argo-ui/src/components/select/select'; import * as React from 'react'; import {useEffect, useState} from 'react'; -import {Workflow, WorkflowTemplate} from '../../../models'; import {Button} from '../../shared/components/button'; import {ErrorNotice} from '../../shared/components/error-notice'; import {ExampleManifests} from '../../shared/components/example-manifests'; import {UploadButton} from '../../shared/components/upload-button'; import {exampleWorkflow} from '../../shared/examples'; +import {Workflow, WorkflowTemplate} from '../../shared/models'; import * as nsUtils from '../../shared/namespaces'; import {services} from '../../shared/services'; import {SubmitWorkflowPanel} from './submit-workflow-panel'; diff --git a/ui/src/app/workflows/components/workflow-dag/genres.ts b/ui/src/workflows/components/workflow-dag/genres.ts similarity index 100% rename from ui/src/app/workflows/components/workflow-dag/genres.ts rename to ui/src/workflows/components/workflow-dag/genres.ts diff --git a/ui/src/app/workflows/components/workflow-dag/graph/collapsible-node.ts b/ui/src/workflows/components/workflow-dag/graph/collapsible-node.ts similarity index 93% rename from ui/src/app/workflows/components/workflow-dag/graph/collapsible-node.ts rename to ui/src/workflows/components/workflow-dag/graph/collapsible-node.ts index 6d5bc40c0900..b3feab8591c6 100644 --- a/ui/src/app/workflows/components/workflow-dag/graph/collapsible-node.ts +++ b/ui/src/workflows/components/workflow-dag/graph/collapsible-node.ts @@ -1,4 +1,4 @@ -import {NodeType} from '../../../../../models'; +import {NodeType} from '../../../../shared/models'; interface CollapsedNode { kind: string; diff --git a/ui/src/app/workflows/components/workflow-dag/icons.ts b/ui/src/workflows/components/workflow-dag/icons.ts similarity index 100% rename from ui/src/app/workflows/components/workflow-dag/icons.ts rename to ui/src/workflows/components/workflow-dag/icons.ts diff --git a/ui/src/app/workflows/components/workflow-dag/workflow-dag-render-options-panel.tsx b/ui/src/workflows/components/workflow-dag/workflow-dag-render-options-panel.tsx similarity index 100% rename from ui/src/app/workflows/components/workflow-dag/workflow-dag-render-options-panel.tsx rename to ui/src/workflows/components/workflow-dag/workflow-dag-render-options-panel.tsx diff --git a/ui/src/app/workflows/components/workflow-dag/workflow-dag.scss b/ui/src/workflows/components/workflow-dag/workflow-dag.scss similarity index 100% rename from ui/src/app/workflows/components/workflow-dag/workflow-dag.scss rename to ui/src/workflows/components/workflow-dag/workflow-dag.scss diff --git a/ui/src/app/workflows/components/workflow-dag/workflow-dag.tsx b/ui/src/workflows/components/workflow-dag/workflow-dag.tsx similarity index 99% rename from ui/src/app/workflows/components/workflow-dag/workflow-dag.tsx rename to ui/src/workflows/components/workflow-dag/workflow-dag.tsx index b5a9b1c18c54..39172427c9d7 100644 --- a/ui/src/app/workflows/components/workflow-dag/workflow-dag.tsx +++ b/ui/src/workflows/components/workflow-dag/workflow-dag.tsx @@ -1,9 +1,9 @@ import * as React from 'react'; -import {ArtifactRepositoryRefStatus, NODE_PHASE, NodeStatus} from '../../../../models'; import {nodeArtifacts} from '../../../shared/artifacts'; import {GraphPanel} from '../../../shared/components/graph/graph-panel'; import {Graph} from '../../../shared/components/graph/types'; +import {ArtifactRepositoryRefStatus, NODE_PHASE, NodeStatus} from '../../../shared/models'; import {shortNodeName} from '../../utils'; import {genres} from './genres'; import {getCollapsedNodeName, getMessage, getNodeParent, isCollapsedNode} from './graph/collapsible-node'; diff --git a/ui/src/app/workflows/components/workflow-details-list/workflow-details-list.scss b/ui/src/workflows/components/workflow-details-list/workflow-details-list.scss similarity index 100% rename from ui/src/app/workflows/components/workflow-details-list/workflow-details-list.scss rename to ui/src/workflows/components/workflow-details-list/workflow-details-list.scss diff --git a/ui/src/app/workflows/components/workflow-details-list/workflow-details-list.tsx b/ui/src/workflows/components/workflow-details-list/workflow-details-list.tsx similarity index 98% rename from ui/src/app/workflows/components/workflow-details-list/workflow-details-list.tsx rename to ui/src/workflows/components/workflow-details-list/workflow-details-list.tsx index ec6775ac958c..282cc16eee4e 100644 --- a/ui/src/app/workflows/components/workflow-details-list/workflow-details-list.tsx +++ b/ui/src/workflows/components/workflow-details-list/workflow-details-list.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; -import * as models from '../../../../models'; import {TimestampSwitch} from '../../../shared/components/timestamp'; +import * as models from '../../../shared/models'; import useTimestamp, {TIMESTAMP_KEYS} from '../../../shared/use-timestamp'; import {WorkflowsRow} from '../../../workflows/components/workflows-row/workflows-row'; diff --git a/ui/src/app/workflows/components/workflow-details/artifact-panel.tsx b/ui/src/workflows/components/workflow-details/artifact-panel.tsx similarity index 99% rename from ui/src/app/workflows/components/workflow-details/artifact-panel.tsx rename to ui/src/workflows/components/workflow-details/artifact-panel.tsx index 16f9f14b2f62..4ba039448599 100644 --- a/ui/src/app/workflows/components/workflow-details/artifact-panel.tsx +++ b/ui/src/workflows/components/workflow-details/artifact-panel.tsx @@ -1,7 +1,6 @@ import * as React from 'react'; import {useEffect, useState} from 'react'; -import {Artifact, ArtifactRepository, execSpec, Workflow} from '../../../../models'; import {artifactKey, artifactURN} from '../../../shared/artifacts'; import ErrorBoundary from '../../../shared/components/error-boundary'; import {ErrorNotice} from '../../../shared/components/error-notice'; @@ -9,6 +8,7 @@ import {FirstTimeUserPanel} from '../../../shared/components/first-time-user-pan import {GiveFeedbackLink} from '../../../shared/components/give-feedback-link'; import {LinkButton} from '../../../shared/components/link-button'; import {SuspenseMonacoEditor} from '../../../shared/components/suspense-monaco-editor'; +import {Artifact, ArtifactRepository, execSpec, Workflow} from '../../../shared/models'; import {services} from '../../../shared/services'; import requests from '../../../shared/services/requests'; import {useCollectEvent} from '../../../shared/use-collect-event'; diff --git a/ui/src/app/workflows/components/workflow-details/suspend-inputs.tsx b/ui/src/workflows/components/workflow-details/suspend-inputs.tsx similarity index 98% rename from ui/src/app/workflows/components/workflow-details/suspend-inputs.tsx rename to ui/src/workflows/components/workflow-details/suspend-inputs.tsx index ec35018b15fb..45d46e95b920 100644 --- a/ui/src/app/workflows/components/workflow-details/suspend-inputs.tsx +++ b/ui/src/workflows/components/workflow-details/suspend-inputs.tsx @@ -3,7 +3,7 @@ import {Tooltip} from 'argo-ui/src/components/tooltip/tooltip'; import * as React from 'react'; import {useState} from 'react'; -import {Parameter} from '../../../../models'; +import {Parameter} from '../../../shared/models'; interface SuspendInputProps { parameters: Parameter[]; diff --git a/ui/src/app/workflows/components/workflow-details/workflow-details.scss b/ui/src/workflows/components/workflow-details/workflow-details.scss similarity index 100% rename from ui/src/app/workflows/components/workflow-details/workflow-details.scss rename to ui/src/workflows/components/workflow-details/workflow-details.scss diff --git a/ui/src/app/workflows/components/workflow-details/workflow-details.tsx b/ui/src/workflows/components/workflow-details/workflow-details.tsx similarity index 99% rename from ui/src/app/workflows/components/workflow-details/workflow-details.tsx rename to ui/src/workflows/components/workflow-details/workflow-details.tsx index 0bf99cba9fe2..f48bbac10498 100644 --- a/ui/src/app/workflows/components/workflow-details/workflow-details.tsx +++ b/ui/src/workflows/components/workflow-details/workflow-details.tsx @@ -5,7 +5,6 @@ import * as React from 'react'; import {useContext, useEffect, useRef, useState} from 'react'; import {RouteComponentProps} from 'react-router'; -import {archivalStatus, ArtifactRepository, execSpec, isArchivedWorkflow, isWorkflowInCluster, Link, Parameter, Workflow} from '../../../../models'; import {artifactRepoHasLocation, findArtifact} from '../../../shared/artifacts'; import {uiUrl} from '../../../shared/base'; import {CostOptimisationNudge} from '../../../shared/components/cost-optimisation-nudge'; @@ -16,6 +15,7 @@ import {SecurityNudge} from '../../../shared/components/security-nudge'; import {hasArtifactGCError, hasWarningConditionBadge} from '../../../shared/conditions-panel'; import {Context} from '../../../shared/context'; import {historyUrl} from '../../../shared/history'; +import {archivalStatus, ArtifactRepository, execSpec, isArchivedWorkflow, isWorkflowInCluster, Link, Parameter, Workflow} from '../../../shared/models'; import {getPodName} from '../../../shared/pod-name'; import {RetryWatch} from '../../../shared/retry-watch'; import {services} from '../../../shared/services'; diff --git a/ui/src/app/workflows/components/workflow-details/workflow-resource-panel.tsx b/ui/src/workflows/components/workflow-details/workflow-resource-panel.tsx similarity index 86% rename from ui/src/app/workflows/components/workflow-details/workflow-resource-panel.tsx rename to ui/src/workflows/components/workflow-details/workflow-resource-panel.tsx index 63662980fed9..49193471bbe8 100644 --- a/ui/src/app/workflows/components/workflow-details/workflow-resource-panel.tsx +++ b/ui/src/workflows/components/workflow-details/workflow-resource-panel.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; -import {Workflow} from '../../../../models'; import {ObjectEditor} from '../../../shared/components/object-editor'; +import {Workflow} from '../../../shared/models'; export const WorkflowResourcePanel = (props: {workflow: Workflow}) => (
diff --git a/ui/src/app/workflows/components/workflow-drawer/workflow-drawer.scss b/ui/src/workflows/components/workflow-drawer/workflow-drawer.scss similarity index 100% rename from ui/src/app/workflows/components/workflow-drawer/workflow-drawer.scss rename to ui/src/workflows/components/workflow-drawer/workflow-drawer.scss diff --git a/ui/src/app/workflows/components/workflow-drawer/workflow-drawer.tsx b/ui/src/workflows/components/workflow-drawer/workflow-drawer.tsx similarity index 99% rename from ui/src/app/workflows/components/workflow-drawer/workflow-drawer.tsx rename to ui/src/workflows/components/workflow-drawer/workflow-drawer.tsx index d35e22cde686..b7974c8a4a1f 100644 --- a/ui/src/app/workflows/components/workflow-drawer/workflow-drawer.tsx +++ b/ui/src/workflows/components/workflow-drawer/workflow-drawer.tsx @@ -1,11 +1,11 @@ import * as React from 'react'; import {useEffect, useState} from 'react'; -import {Workflow} from '../../../../models'; import {InlineTable} from '../../../shared/components/inline-table/inline-table'; import {Loading} from '../../../shared/components/loading'; import {ConditionsPanel} from '../../../shared/conditions-panel'; import {formatDuration} from '../../../shared/duration'; +import {Workflow} from '../../../shared/models'; import {services} from '../../../shared/services'; import {WorkflowCreatorInfo} from '../workflow-creator-info/workflow-creator-info'; import {WorkflowFrom} from '../workflow-from'; diff --git a/ui/src/app/workflows/components/workflow-editor.tsx b/ui/src/workflows/components/workflow-editor.tsx similarity index 97% rename from ui/src/app/workflows/components/workflow-editor.tsx rename to ui/src/workflows/components/workflow-editor.tsx index 6dec8cbfad4b..45cab53bb3cd 100644 --- a/ui/src/app/workflows/components/workflow-editor.tsx +++ b/ui/src/workflows/components/workflow-editor.tsx @@ -1,10 +1,10 @@ import {Tabs} from 'argo-ui/src/components/tabs/tabs'; import * as React from 'react'; -import {Workflow} from '../../../models'; import {MetadataEditor} from '../../shared/components/editors/metadata-editor'; import {WorkflowParametersEditor} from '../../shared/components/editors/workflow-parameters-editor'; import {ObjectEditor} from '../../shared/components/object-editor'; +import {Workflow} from '../../shared/models'; export function WorkflowEditor({ selectedTabKey, diff --git a/ui/src/app/workflows/components/workflow-filters/workflow-filters.scss b/ui/src/workflows/components/workflow-filters/workflow-filters.scss similarity index 100% rename from ui/src/app/workflows/components/workflow-filters/workflow-filters.scss rename to ui/src/workflows/components/workflow-filters/workflow-filters.scss diff --git a/ui/src/app/workflows/components/workflow-filters/workflow-filters.tsx b/ui/src/workflows/components/workflow-filters/workflow-filters.tsx similarity index 98% rename from ui/src/app/workflows/components/workflow-filters/workflow-filters.tsx rename to ui/src/workflows/components/workflow-filters/workflow-filters.tsx index 9330ed664c13..6a1ab48ed8a6 100644 --- a/ui/src/app/workflows/components/workflow-filters/workflow-filters.tsx +++ b/ui/src/workflows/components/workflow-filters/workflow-filters.tsx @@ -5,14 +5,14 @@ import DatePicker from 'react-datepicker'; import 'react-datepicker/dist/react-datepicker.css'; -import * as models from '../../../../models'; -import {WorkflowPhase} from '../../../../models'; import {CheckboxFilter} from '../../../shared/components/checkbox-filter/checkbox-filter'; import {DataLoaderDropdown} from '../../../shared/components/data-loader-dropdown'; import {DropDown} from '../../../shared/components/dropdown/dropdown'; import {InputFilter} from '../../../shared/components/input-filter'; import {NamespaceFilter} from '../../../shared/components/namespace-filter'; import {TagsInput} from '../../../shared/components/tags-input/tags-input'; +import * as models from '../../../shared/models'; +import {WorkflowPhase} from '../../../shared/models'; import {services} from '../../../shared/services'; import './workflow-filters.scss'; diff --git a/ui/src/app/workflows/components/workflow-from.tsx b/ui/src/workflows/components/workflow-from.tsx similarity index 95% rename from ui/src/app/workflows/components/workflow-from.tsx rename to ui/src/workflows/components/workflow-from.tsx index 4339ea7046d4..6d8ff2ce3e4e 100644 --- a/ui/src/app/workflows/components/workflow-from.tsx +++ b/ui/src/workflows/components/workflow-from.tsx @@ -1,8 +1,8 @@ import * as React from 'react'; -import {labels} from '../../../models'; import {ClusterWorkflowTemplateLink} from '../../cluster-workflow-templates/cluster-workflow-template-link'; import {CronWorkflowLink} from '../../cron-workflows/cron-workflow-link'; +import {labels} from '../../shared/models'; import {WorkflowTemplateLink} from '../../workflow-templates/workflow-template-link'; export function WorkflowFrom(props: {namespace: string; labels: {[name: string]: string}}) { diff --git a/ui/src/app/workflows/components/workflow-labels/workflow-labels.scss b/ui/src/workflows/components/workflow-labels/workflow-labels.scss similarity index 100% rename from ui/src/app/workflows/components/workflow-labels/workflow-labels.scss rename to ui/src/workflows/components/workflow-labels/workflow-labels.scss diff --git a/ui/src/app/workflows/components/workflow-labels/workflow-labels.tsx b/ui/src/workflows/components/workflow-labels/workflow-labels.tsx similarity index 95% rename from ui/src/app/workflows/components/workflow-labels/workflow-labels.tsx rename to ui/src/workflows/components/workflow-labels/workflow-labels.tsx index ec17b3809e86..350b928a030a 100644 --- a/ui/src/app/workflows/components/workflow-labels/workflow-labels.tsx +++ b/ui/src/workflows/components/workflow-labels/workflow-labels.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; -import * as models from '../../../../models'; +import * as models from '../../../shared/models'; import './workflow-labels.scss'; diff --git a/ui/src/app/workflows/components/workflow-link.tsx b/ui/src/workflows/components/workflow-link.tsx similarity index 100% rename from ui/src/app/workflows/components/workflow-link.tsx rename to ui/src/workflows/components/workflow-link.tsx diff --git a/ui/src/app/workflows/components/workflow-logs-viewer/full-height-logs-viewer.tsx b/ui/src/workflows/components/workflow-logs-viewer/full-height-logs-viewer.tsx similarity index 100% rename from ui/src/app/workflows/components/workflow-logs-viewer/full-height-logs-viewer.tsx rename to ui/src/workflows/components/workflow-logs-viewer/full-height-logs-viewer.tsx diff --git a/ui/src/app/workflows/components/workflow-logs-viewer/json-logs-field-selector.tsx b/ui/src/workflows/components/workflow-logs-viewer/json-logs-field-selector.tsx similarity index 100% rename from ui/src/app/workflows/components/workflow-logs-viewer/json-logs-field-selector.tsx rename to ui/src/workflows/components/workflow-logs-viewer/json-logs-field-selector.tsx diff --git a/ui/src/app/workflows/components/workflow-logs-viewer/workflow-logs-viewer.scss b/ui/src/workflows/components/workflow-logs-viewer/workflow-logs-viewer.scss similarity index 100% rename from ui/src/app/workflows/components/workflow-logs-viewer/workflow-logs-viewer.scss rename to ui/src/workflows/components/workflow-logs-viewer/workflow-logs-viewer.scss diff --git a/ui/src/app/workflows/components/workflow-logs-viewer/workflow-logs-viewer.tsx b/ui/src/workflows/components/workflow-logs-viewer/workflow-logs-viewer.tsx similarity index 99% rename from ui/src/app/workflows/components/workflow-logs-viewer/workflow-logs-viewer.tsx rename to ui/src/workflows/components/workflow-logs-viewer/workflow-logs-viewer.tsx index bea447978433..22ab74d0a1f6 100644 --- a/ui/src/app/workflows/components/workflow-logs-viewer/workflow-logs-viewer.tsx +++ b/ui/src/workflows/components/workflow-logs-viewer/workflow-logs-viewer.tsx @@ -4,14 +4,14 @@ import {useContext, useEffect, useState} from 'react'; import {Observable} from 'rxjs'; import {map, publishReplay, refCount} from 'rxjs/operators'; -import * as models from '../../../../models'; -import {execSpec} from '../../../../models'; import {Button} from '../../../shared/components/button'; import {ErrorNotice} from '../../../shared/components/error-notice'; import {InfoIcon, WarningIcon} from '../../../shared/components/fa-icons'; import {Links} from '../../../shared/components/links'; import {Context} from '../../../shared/context'; import debounce from '../../../shared/debounce'; +import * as models from '../../../shared/models'; +import {execSpec} from '../../../shared/models'; import {getPodName, getTemplateNameFromNode} from '../../../shared/pod-name'; import {ScopedLocalStorage} from '../../../shared/scoped-local-storage'; import {services} from '../../../shared/services'; diff --git a/ui/src/app/workflows/components/workflow-node-info/workflow-node-info.scss b/ui/src/workflows/components/workflow-node-info/workflow-node-info.scss similarity index 100% rename from ui/src/app/workflows/components/workflow-node-info/workflow-node-info.scss rename to ui/src/workflows/components/workflow-node-info/workflow-node-info.scss diff --git a/ui/src/app/workflows/components/workflow-node-info/workflow-node-info.tsx b/ui/src/workflows/components/workflow-node-info/workflow-node-info.tsx similarity index 99% rename from ui/src/app/workflows/components/workflow-node-info/workflow-node-info.tsx rename to ui/src/workflows/components/workflow-node-info/workflow-node-info.tsx index be90ee6425ab..daafdc31e2ed 100644 --- a/ui/src/app/workflows/components/workflow-node-info/workflow-node-info.tsx +++ b/ui/src/workflows/components/workflow-node-info/workflow-node-info.tsx @@ -5,8 +5,6 @@ import moment from 'moment'; import * as React from 'react'; import {useState} from 'react'; -import * as models from '../../../../models'; -import {Artifact, NodeStatus, Workflow} from '../../../../models'; import {Button} from '../../../shared/components/button'; import {ClipboardText} from '../../../shared/components/clipboard-text'; import {DurationPanel} from '../../../shared/components/duration-panel'; @@ -15,6 +13,8 @@ import LinkifiedText from '../../../shared/components/linkified-text'; import {Links} from '../../../shared/components/links'; import {Phase} from '../../../shared/components/phase'; import {Timestamp} from '../../../shared/components/timestamp'; +import * as models from '../../../shared/models'; +import {Artifact, NodeStatus, Workflow} from '../../../shared/models'; import {getPodName} from '../../../shared/pod-name'; import {ResourcesDuration} from '../../../shared/resources-duration'; import {services} from '../../../shared/services'; diff --git a/ui/src/app/workflows/components/workflow-panel/workflow-panel.tsx b/ui/src/workflows/components/workflow-panel/workflow-panel.tsx similarity index 95% rename from ui/src/app/workflows/components/workflow-panel/workflow-panel.tsx rename to ui/src/workflows/components/workflow-panel/workflow-panel.tsx index 6b7f906f4f14..e4c24d617b95 100644 --- a/ui/src/app/workflows/components/workflow-panel/workflow-panel.tsx +++ b/ui/src/workflows/components/workflow-panel/workflow-panel.tsx @@ -1,9 +1,9 @@ import {ObjectMeta} from 'argo-ui/src/models/kubernetes'; import * as React from 'react'; -import {WorkflowStatus} from '../../../../models'; import {Notice} from '../../../shared/components/notice'; import {Phase} from '../../../shared/components/phase'; +import {WorkflowStatus} from '../../../shared/models'; import {WorkflowDag} from '../workflow-dag/workflow-dag'; interface Props { diff --git a/ui/src/app/workflows/components/workflow-parameters-panel.tsx b/ui/src/workflows/components/workflow-parameters-panel.tsx similarity index 91% rename from ui/src/app/workflows/components/workflow-parameters-panel.tsx rename to ui/src/workflows/components/workflow-parameters-panel.tsx index 5440ac77f2bf..216e5293e5d4 100644 --- a/ui/src/app/workflows/components/workflow-parameters-panel.tsx +++ b/ui/src/workflows/components/workflow-parameters-panel.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; -import {Parameter} from '../../../models'; +import {Parameter} from '../../shared/models'; export const WorkflowParametersPanel = (props: {parameters: Parameter[]}) => (
diff --git a/ui/src/app/workflows/components/workflow-summary-panel.tsx b/ui/src/workflows/components/workflow-summary-panel.tsx similarity index 98% rename from ui/src/app/workflows/components/workflow-summary-panel.tsx rename to ui/src/workflows/components/workflow-summary-panel.tsx index de1ce69347d8..bb6e25d9383a 100644 --- a/ui/src/app/workflows/components/workflow-summary-panel.tsx +++ b/ui/src/workflows/components/workflow-summary-panel.tsx @@ -1,7 +1,6 @@ import {Ticker} from 'argo-ui/src/components/ticker'; import * as React from 'react'; -import {labels, NODE_PHASE, Workflow} from '../../../models'; import {uiUrl} from '../../shared/base'; import {DurationPanel} from '../../shared/components/duration-panel'; import {Phase} from '../../shared/components/phase'; @@ -9,6 +8,7 @@ import {Timestamp} from '../../shared/components/timestamp'; import {ConditionsPanel} from '../../shared/conditions-panel'; import {Consumer} from '../../shared/context'; import {wfDuration} from '../../shared/duration'; +import {labels, NODE_PHASE, Workflow} from '../../shared/models'; import {ResourcesDuration} from '../../shared/resources-duration'; import {TIMESTAMP_KEYS} from '../../shared/use-timestamp'; import {WorkflowCreatorInfo} from './workflow-creator-info/workflow-creator-info'; diff --git a/ui/src/app/workflows/components/workflow-timeline/workflow-timeline.scss b/ui/src/workflows/components/workflow-timeline/workflow-timeline.scss similarity index 100% rename from ui/src/app/workflows/components/workflow-timeline/workflow-timeline.scss rename to ui/src/workflows/components/workflow-timeline/workflow-timeline.scss diff --git a/ui/src/app/workflows/components/workflow-timeline/workflow-timeline.tsx b/ui/src/workflows/components/workflow-timeline/workflow-timeline.tsx similarity index 99% rename from ui/src/app/workflows/components/workflow-timeline/workflow-timeline.tsx rename to ui/src/workflows/components/workflow-timeline/workflow-timeline.tsx index b401badd9db6..98bb93629ec8 100644 --- a/ui/src/app/workflows/components/workflow-timeline/workflow-timeline.tsx +++ b/ui/src/workflows/components/workflow-timeline/workflow-timeline.tsx @@ -3,7 +3,7 @@ import moment from 'moment'; import React, {useEffect, useRef, useState} from 'react'; import {fromEvent, interval, Subscription} from 'rxjs'; -import * as models from '../../../../models'; +import * as models from '../../../shared/models'; import {shortNodeName} from '../../utils'; import './workflow-timeline.scss'; diff --git a/ui/src/app/workflows/components/workflow-yaml-viewer/workflow-yaml-viewer.tsx b/ui/src/workflows/components/workflow-yaml-viewer/workflow-yaml-viewer.tsx similarity index 98% rename from ui/src/app/workflows/components/workflow-yaml-viewer/workflow-yaml-viewer.tsx rename to ui/src/workflows/components/workflow-yaml-viewer/workflow-yaml-viewer.tsx index af36228b7c75..dd4f0cdc5400 100644 --- a/ui/src/app/workflows/components/workflow-yaml-viewer/workflow-yaml-viewer.tsx +++ b/ui/src/workflows/components/workflow-yaml-viewer/workflow-yaml-viewer.tsx @@ -1,8 +1,8 @@ import {SlideContents} from 'argo-ui/src/components/slide-contents/slide-contents'; import * as React from 'react'; -import * as models from '../../../../models'; import {ObjectEditor} from '../../../shared/components/object-editor'; +import * as models from '../../../shared/models'; import {getResolvedTemplates} from '../../../shared/template-resolution'; interface WorkflowYamlViewerProps { diff --git a/ui/src/app/workflows/components/workflows-container.tsx b/ui/src/workflows/components/workflows-container.tsx similarity index 100% rename from ui/src/app/workflows/components/workflows-container.tsx rename to ui/src/workflows/components/workflows-container.tsx diff --git a/ui/src/app/workflows/components/workflows-list/workflows-list.scss b/ui/src/workflows/components/workflows-list/workflows-list.scss similarity index 100% rename from ui/src/app/workflows/components/workflows-list/workflows-list.scss rename to ui/src/workflows/components/workflows-list/workflows-list.scss diff --git a/ui/src/app/workflows/components/workflows-list/workflows-list.tsx b/ui/src/workflows/components/workflows-list/workflows-list.tsx similarity index 99% rename from ui/src/app/workflows/components/workflows-list/workflows-list.tsx rename to ui/src/workflows/components/workflows-list/workflows-list.tsx index 4493f1b53ccf..92876713a7ff 100644 --- a/ui/src/app/workflows/components/workflows-list/workflows-list.tsx +++ b/ui/src/workflows/components/workflows-list/workflows-list.tsx @@ -4,8 +4,6 @@ import * as React from 'react'; import {useContext, useEffect, useMemo, useState} from 'react'; import {RouteComponentProps} from 'react-router-dom'; -import * as models from '../../../../models'; -import {isArchivedWorkflow, Workflow, WorkflowPhase, WorkflowPhases} from '../../../../models'; import {uiUrl} from '../../../shared/base'; import {CostOptimisationNudge} from '../../../shared/components/cost-optimisation-nudge'; import {ErrorNotice} from '../../../shared/components/error-notice'; @@ -17,6 +15,8 @@ import {ZeroState} from '../../../shared/components/zero-state'; import {Context} from '../../../shared/context'; import {historyUrl} from '../../../shared/history'; import {ListWatch, sortByYouth} from '../../../shared/list-watch'; +import * as models from '../../../shared/models'; +import {isArchivedWorkflow, Workflow, WorkflowPhase, WorkflowPhases} from '../../../shared/models'; import * as nsUtils from '../../../shared/namespaces'; import {Pagination, parseLimit} from '../../../shared/pagination'; import {ScopedLocalStorage} from '../../../shared/scoped-local-storage'; diff --git a/ui/src/app/workflows/components/workflows-row/react-markdown-gfm.tsx b/ui/src/workflows/components/workflows-row/react-markdown-gfm.tsx similarity index 100% rename from ui/src/app/workflows/components/workflows-row/react-markdown-gfm.tsx rename to ui/src/workflows/components/workflows-row/react-markdown-gfm.tsx diff --git a/ui/src/app/workflows/components/workflows-row/workflows-row.scss b/ui/src/workflows/components/workflows-row/workflows-row.scss similarity index 100% rename from ui/src/app/workflows/components/workflows-row/workflows-row.scss rename to ui/src/workflows/components/workflows-row/workflows-row.scss diff --git a/ui/src/app/workflows/components/workflows-row/workflows-row.tsx b/ui/src/workflows/components/workflows-row/workflows-row.tsx similarity index 98% rename from ui/src/app/workflows/components/workflows-row/workflows-row.tsx rename to ui/src/workflows/components/workflows-row/workflows-row.tsx index 384ac719f91d..b22f412848ce 100644 --- a/ui/src/app/workflows/components/workflows-row/workflows-row.tsx +++ b/ui/src/workflows/components/workflows-row/workflows-row.tsx @@ -3,8 +3,6 @@ import * as React from 'react'; import {useState} from 'react'; import {Link} from 'react-router-dom'; -import * as models from '../../../../models'; -import {isArchivedWorkflow, Workflow} from '../../../../models'; import {ANNOTATION_DESCRIPTION, ANNOTATION_TITLE} from '../../../shared/annotations'; import {uiUrl} from '../../../shared/base'; import {DurationPanel} from '../../../shared/components/duration-panel'; @@ -12,6 +10,8 @@ import {Loading} from '../../../shared/components/loading'; import {PhaseIcon} from '../../../shared/components/phase-icon'; import {Timestamp} from '../../../shared/components/timestamp'; import {wfDuration} from '../../../shared/duration'; +import * as models from '../../../shared/models'; +import {isArchivedWorkflow, Workflow} from '../../../shared/models'; import {WorkflowDrawer} from '../workflow-drawer/workflow-drawer'; require('./workflows-row.scss'); diff --git a/ui/src/app/workflows/components/workflows-summary-container/workflows-summary-container.scss b/ui/src/workflows/components/workflows-summary-container/workflows-summary-container.scss similarity index 100% rename from ui/src/app/workflows/components/workflows-summary-container/workflows-summary-container.scss rename to ui/src/workflows/components/workflows-summary-container/workflows-summary-container.scss diff --git a/ui/src/app/workflows/components/workflows-summary-container/workflows-summary-container.tsx b/ui/src/workflows/components/workflows-summary-container/workflows-summary-container.tsx similarity index 98% rename from ui/src/app/workflows/components/workflows-summary-container/workflows-summary-container.tsx rename to ui/src/workflows/components/workflows-summary-container/workflows-summary-container.tsx index 1a0670970726..cf49c850119f 100644 --- a/ui/src/app/workflows/components/workflows-summary-container/workflows-summary-container.tsx +++ b/ui/src/workflows/components/workflows-summary-container/workflows-summary-container.tsx @@ -2,7 +2,7 @@ import {Tooltip} from 'argo-ui/src/components/tooltip/tooltip'; import * as React from 'react'; import {useEffect, useState} from 'react'; -import {Workflow} from '../../../../models'; +import {Workflow} from '../../../shared/models'; import './workflows-summary-container.scss'; diff --git a/ui/src/app/workflows/components/workflows-toolbar/workflows-toolbar.scss b/ui/src/workflows/components/workflows-toolbar/workflows-toolbar.scss similarity index 100% rename from ui/src/app/workflows/components/workflows-toolbar/workflows-toolbar.scss rename to ui/src/workflows/components/workflows-toolbar/workflows-toolbar.scss diff --git a/ui/src/app/workflows/components/workflows-toolbar/workflows-toolbar.tsx b/ui/src/workflows/components/workflows-toolbar/workflows-toolbar.tsx similarity index 99% rename from ui/src/app/workflows/components/workflows-toolbar/workflows-toolbar.tsx rename to ui/src/workflows/components/workflows-toolbar/workflows-toolbar.tsx index 79184c52b3a8..9f02dc2bec6c 100644 --- a/ui/src/app/workflows/components/workflows-toolbar/workflows-toolbar.tsx +++ b/ui/src/workflows/components/workflows-toolbar/workflows-toolbar.tsx @@ -2,8 +2,8 @@ import {NotificationType} from 'argo-ui/src/components/notifications/notificatio import * as React from 'react'; import {useContext, useMemo} from 'react'; -import {isArchivedWorkflow, isWorkflowInCluster, Workflow} from '../../../../models'; import {Context} from '../../../shared/context'; +import {isArchivedWorkflow, isWorkflowInCluster, Workflow} from '../../../shared/models'; import {services} from '../../../shared/services'; import * as Actions from '../../../shared/workflow-operations-map'; import {WorkflowOperation, WorkflowOperationAction, WorkflowOperationName} from '../../../shared/workflow-operations-map'; diff --git a/ui/src/app/workflows/index.ts b/ui/src/workflows/index.ts similarity index 100% rename from ui/src/app/workflows/index.ts rename to ui/src/workflows/index.ts diff --git a/ui/src/app/workflows/utils.ts b/ui/src/workflows/utils.ts similarity index 100% rename from ui/src/app/workflows/utils.ts rename to ui/src/workflows/utils.ts diff --git a/ui/tsconfig.json b/ui/tsconfig.json deleted file mode 120000 index 82e360113b14..000000000000 --- a/ui/tsconfig.json +++ /dev/null @@ -1 +0,0 @@ -src/app/tsconfig.json \ No newline at end of file diff --git a/ui/tsconfig.json b/ui/tsconfig.json new file mode 100644 index 000000000000..2d9328fc1d12 --- /dev/null +++ b/ui/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "outDir": "./../dist/app", + "sourceMap": true, + "noImplicitAny": true, + "isolatedModules": true, // for compatibility with esbuild + "module": "ES2020", // must be ES2020+ for dynamic imports: https://github.com/Microsoft/TypeScript/issues/16675, https://github.com/webpack/webpack/issues/5703#issuecomment-357512412 + "moduleResolution": "node", + "esModuleInterop": true, + "target": "es5", + "jsx": "react", + "experimentalDecorators": true, + "noUnusedLocals": true, + "declaration": false, + "downlevelIteration": true, + "lib": [ + "es2017", + "dom" + ] + }, + "include": [ + "./**/*" + ] +} diff --git a/ui/src/app/webpack.config.js b/ui/webpack.config.js similarity index 96% rename from ui/src/app/webpack.config.js rename to ui/webpack.config.js index 39ae90f9346b..74adeed815a7 100644 --- a/ui/src/app/webpack.config.js +++ b/ui/webpack.config.js @@ -18,11 +18,11 @@ console.log(`Bundling for ${isProd ? 'production' : 'development'}...`); const config = { mode: isProd ? 'production' : 'development', entry: { - main: './src/app/index.tsx' + main: './src/index.tsx' }, output: { filename: '[name].[contenthash].js', - path: __dirname + '/../../dist/app' + path: __dirname + '/dist/app' }, devtool: isProd ? 'source-map' : 'eval', @@ -70,7 +70,7 @@ const config = { version: process.env.VERSION || 'latest' }) }), - new HtmlWebpackPlugin({template: 'src/app/index.html'}), + new HtmlWebpackPlugin({template: 'src/index.html'}), new CopyWebpackPlugin({ patterns: [ {