Skip to content

Commit

Permalink
refactor(ui): flatten ui/src/app dir (#13815)
Browse files Browse the repository at this point in the history
Signed-off-by: Anton Gilgur <[email protected]>
  • Loading branch information
Anton Gilgur authored Oct 28, 2024
1 parent 3dfea6d commit 9f158ae
Show file tree
Hide file tree
Showing 292 changed files with 242 additions and 238 deletions.
6 changes: 3 additions & 3 deletions ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion ui/src/app/app-router.tsx → ui/src/app-router.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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';
Expand Down
File renamed without changes.
24 changes: 0 additions & 24 deletions ui/src/app/tsconfig.json

This file was deleted.

File renamed without changes.
Original file line number Diff line number Diff line change
@@ -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';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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';
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ 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';
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';
Expand Down
Original file line number Diff line number Diff line change
@@ -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';

Expand Down
Original file line number Diff line number Diff line change
@@ -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';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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}) {
Expand Down
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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';
Expand Down
Original file line number Diff line number Diff line change
@@ -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};
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
81 changes: 0 additions & 81 deletions ui/src/models/event-source.ts

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 9f158ae

Please sign in to comment.