diff --git a/src/components/app-navbar/index.tsx b/src/components/app-navbar/index.tsx index f258c9442..d9ec6c01b 100644 --- a/src/components/app-navbar/index.tsx +++ b/src/components/app-navbar/index.tsx @@ -78,16 +78,16 @@ const NavbarLink = ({ collapsed, ...link }: NavbarLinkItem) => { }; const NavbarExpanded = ({ appName, links }: NavbarProps) => { - const [favourites, setFacourites] = useLocalStorage>( + const [favourites, setFavourites] = useLocalStorage>( 'favouriteApplications', [] ); const isFavourite = favourites.includes(appName); const toggleFavouriteApp = (app: string) => { if (isFavourite) { - setFacourites((old) => old.filter((a) => a !== app)); + setFavourites((old) => old.filter((a) => a !== app)); } else { - setFacourites((old) => uniq([...old, app])); + setFavourites((old) => uniq([...old, app])); } }; diff --git a/src/components/breadcrumb/index.tsx b/src/components/breadcrumb/index.tsx index b8a667962..fd4c48e1d 100644 --- a/src/components/breadcrumb/index.tsx +++ b/src/components/breadcrumb/index.tsx @@ -8,10 +8,14 @@ export interface BreadcrumbProps { export const Breadcrumb: FunctionComponent = ({ links }) => ( - {links.map(({ to, label }, i) => ( - - {label} - - ))} + {links.map(({ to, label }, i) => { + return ( + label !== '' && ( + + {label} + + ) + ); + })} ); diff --git a/src/components/component/scheduled-job/scheduled-batch-list.tsx b/src/components/component/scheduled-job/scheduled-batch-list.tsx index bda41e8d3..d53391482 100644 --- a/src/components/component/scheduled-job/scheduled-batch-list.tsx +++ b/src/components/component/scheduled-job/scheduled-batch-list.tsx @@ -43,6 +43,7 @@ import { RelativeToNow } from '../../time/relative-to-now'; import { BatchJobStatuses } from './batch-job-statuses'; import './style.css'; +import useLocalStorage from '../../../effects/use-local-storage'; function isBatchStoppable(status: ScheduledBatchSummary['status']): boolean { return status === 'Waiting' || status === 'Running'; @@ -53,7 +54,6 @@ type Props = { envName: string; jobComponentName: string; scheduledBatchList?: Array; - isExpanded?: boolean; fetchBatches?: () => void; }; @@ -62,7 +62,6 @@ export function ScheduledBatchList({ envName, jobComponentName, scheduledBatchList, - isExpanded, fetchBatches: refreshBatches, }: Props) { const [deleteBatch] = useDeleteBatchMutation(); @@ -84,6 +83,10 @@ export function ScheduledBatchList({ (id, visible) => setVisibleRestartScrims((x) => ({ ...x, [id]: visible })), [] ); + const [isExpanded, setIsExpanded] = useLocalStorage( + 'batchJobListExpanded', + false + ); const sortedData = useMemo(() => { return dataSorter(scheduledBatchList, [ @@ -102,7 +105,10 @@ export function ScheduledBatchList({ return ( - + setIsExpanded(expanded)} + > @@ -320,6 +326,5 @@ ScheduledBatchList.propTypes = { scheduledBatchList: PropTypes.arrayOf( PropTypes.object as PropTypes.Validator ), - isExpanded: PropTypes.bool, fetchBatches: PropTypes.func, }; diff --git a/src/components/component/scheduled-job/scheduled-job-list.tsx b/src/components/component/scheduled-job/scheduled-job-list.tsx index e47f99bb5..379ae01bd 100644 --- a/src/components/component/scheduled-job/scheduled-job-list.tsx +++ b/src/components/component/scheduled-job/scheduled-job-list.tsx @@ -36,7 +36,10 @@ import { useStopJobMutation, } from '../../../store/radix-api'; import { promiseHandler } from '../../../utils/promise-handler'; -import { getScheduledJobUrl } from '../../../utils/routing'; +import { + getScheduledBatchJobUrl, + getScheduledJobUrl, +} from '../../../utils/routing'; import { dataSorter, sortCompareDate, @@ -73,20 +76,24 @@ export const ScheduledJobList: FunctionComponent<{ appName: string; envName: string; jobComponentName: string; + batchName?: string; totalJobCount: number; scheduledJobList?: Array; - isExpanded?: boolean; isDeletable?: boolean; // set if jobs can be deleted fetchJobs?: () => void; + isExpanded?: boolean; + onExpanded?: (isExpanded: boolean) => void; }> = ({ appName, envName, jobComponentName, scheduledJobList, totalJobCount, - isExpanded, + batchName, isDeletable, fetchJobs: refreshJobs, + isExpanded, + onExpanded, }) => { const [deleteJob] = useDeleteJobMutation(); const [stopJob] = useStopJobMutation(); @@ -134,7 +141,7 @@ export const ScheduledJobList: FunctionComponent<{ return ( - + @@ -207,12 +214,22 @@ export const ScheduledJobList: FunctionComponent<{ @@ -380,7 +397,9 @@ ScheduledJobList.propTypes = { scheduledJobList: PropTypes.arrayOf( PropTypes.object as PropTypes.Validator ), - isExpanded: PropTypes.bool, + batchName: PropTypes.string, isDeletable: PropTypes.bool, fetchJobs: PropTypes.func, + isExpanded: PropTypes.bool, + onExpanded: PropTypes.func, }; diff --git a/src/components/create-job-form/pipeline-form-apply-config.tsx b/src/components/create-job-form/pipeline-form-apply-config.tsx index 46426b61f..4dcbbd45b 100644 --- a/src/components/create-job-form/pipeline-form-apply-config.tsx +++ b/src/components/create-job-form/pipeline-form-apply-config.tsx @@ -1,6 +1,11 @@ -import { Button, CircularProgress, Typography } from '@equinor/eds-core-react'; -import type { FormEvent } from 'react'; - +import { + Button, + Checkbox, + CircularProgress, + List, + Typography, +} from '@equinor/eds-core-react'; +import { type FormEvent, useState } from 'react'; import { useTriggerPipelineApplyConfigMutation } from '../../store/radix-api'; import { getFetchErrorMessage } from '../../store/utils'; import { Alert } from '../alert'; @@ -13,13 +18,16 @@ export function PipelineFormApplyConfig({ onSuccess, }: FormProp) { const [trigger, state] = useTriggerPipelineApplyConfigMutation(); + const [deployExternalDNS, setDeployExternalDNS] = useState(false); const handleSubmit = handlePromiseWithToast( async (e: FormEvent) => { e.preventDefault(); const response = await trigger({ appName, - pipelineParametersApplyConfig: {}, + pipelineParametersApplyConfig: { + deployExternalDNS: deployExternalDNS, + }, }).unwrap(); onSuccess(response.name); } @@ -39,6 +47,20 @@ export function PipelineFormApplyConfig({ > Apply Radix config + + + Apply changes in DNS alias, build secrets, environments (create + new or soft-delete existing) + + + setDeployExternalDNS(!deployExternalDNS)} + /> + +
{state.isLoading && ( diff --git a/src/components/environment-variables/index.tsx b/src/components/environment-variables/index.tsx index a21718ee4..b9f7aacb3 100644 --- a/src/components/environment-variables/index.tsx +++ b/src/components/environment-variables/index.tsx @@ -57,6 +57,8 @@ export const EnvironmentVariables: FunctionComponent<{ componentType: Component['type']; hideRadixVars?: boolean; readonly?: boolean; + isExpanded?: boolean; + onExpanded?: (isExpanded: boolean) => void; }> = ({ appName, envName, @@ -64,6 +66,8 @@ export const EnvironmentVariables: FunctionComponent<{ componentType, hideRadixVars, readonly, + isExpanded, + onExpanded, }) => { const [componentVars, setComponentVars] = useState([]); const [radixVars, setRadixVars] = useState([]); @@ -77,7 +81,7 @@ export const EnvironmentVariables: FunctionComponent<{ } = useEnvVarsQuery( { appName, envName, componentName }, { - skip: !appName || !envName || !componentName, + skip: !appName || !envName || !componentName || !isExpanded, pollingInterval: pollVarsInterval, } ); @@ -131,7 +135,7 @@ export const EnvironmentVariables: FunctionComponent<{ return ( - + @@ -158,11 +162,13 @@ export const EnvironmentVariables: FunctionComponent<{
) : ( -
- -
+ !readonly && ( +
+ +
+ ) )} @@ -240,4 +246,6 @@ EnvironmentVariables.propTypes = { >, hideRadixVars: PropTypes.bool, readonly: PropTypes.bool, + isExpanded: PropTypes.bool, + onExpanded: PropTypes.func, }; diff --git a/src/components/events-list/index.tsx b/src/components/events-list/index.tsx index bea62cb94..0038facde 100644 --- a/src/components/events-list/index.tsx +++ b/src/components/events-list/index.tsx @@ -12,14 +12,16 @@ import './style.css'; export interface EventsListProps { events: Readonly>; isExpanded: boolean; + onExpanded?: (isExpanded: boolean) => void; } export const EventsList: FunctionComponent = ({ events, isExpanded, + onExpanded, }) => ( - + Events @@ -61,4 +63,5 @@ EventsList.propTypes = { events: PropTypes.arrayOf(PropTypes.object as PropTypes.Validator) .isRequired, isExpanded: PropTypes.bool.isRequired, + onExpanded: PropTypes.func, }; diff --git a/src/components/job-overview/index.tsx b/src/components/job-overview/index.tsx index 75e94676c..dc5ec7406 100644 --- a/src/components/job-overview/index.tsx +++ b/src/components/job-overview/index.tsx @@ -1,4 +1,9 @@ -import { Button, CircularProgress, Typography } from '@equinor/eds-core-react'; +import { + Button, + Checkbox, + CircularProgress, + Typography, +} from '@equinor/eds-core-react'; import * as PropTypes from 'prop-types'; import { useState } from 'react'; import { Link } from 'react-router-dom'; @@ -240,6 +245,24 @@ export const JobOverview = ({ appName, jobName }: Props) => {
)} + {(job.pipeline === 'build-deploy' || + job.pipeline === 'build') && + job.overrideUseBuildCache !== undefined && ( + + )} + {job.pipeline === 'apply-config' && ( + + )} {job.branch && (
diff --git a/src/components/page-active-component/active-component-overview.tsx b/src/components/page-active-component/active-component-overview.tsx index 14b0da2ba..5c642eac5 100644 --- a/src/components/page-active-component/active-component-overview.tsx +++ b/src/components/page-active-component/active-component-overview.tsx @@ -24,6 +24,7 @@ import { EnvironmentVariables } from '../environment-variables'; import { routeWithParams } from '../../utils/string'; import './style.css'; +import useLocalStorage from '../../effects/use-local-storage'; import { dataSorter, sortCompareDate } from '../../utils/sort-utils'; import { EventsList } from '../events-list'; import { ActiveComponentToolbar } from './active-component-toolbar'; @@ -59,10 +60,17 @@ export const ActiveComponentOverview: FunctionComponent<{ dnsAlias.environmentName == envName ); + const [isEventListExpanded, setIsEventListExpanded] = + useLocalStorage('componentEventListExpanded', false); const { data: events } = useGetComponentEventsQuery( { appName, envName, componentName }, - { skip: !appName || !envName || !componentName, pollingInterval } + { + skip: !appName || !envName || !componentName || !isEventListExpanded, + pollingInterval, + } ); + const [isEnvVarsListExpanded, setIsEnvVarsListExpanded] = + useLocalStorage('activeComponentEnvVarsListExpanded', true); return ( <> @@ -114,14 +122,12 @@ export const ActiveComponentOverview: FunctionComponent<{ replicaList={component.replicaList} isExpanded /> - - {component.oauth2 && ( )} - - {component.externalDNS?.length > 0 && ( )} - - - {events && ( - - sortCompareDate(x, y, 'descending'), - ])} - /> - )} - + + sortCompareDate(x, y, 'descending'), + ])} + /> - {component.horizontalScalingSummary && ( ('activeJobComponentEnvVarsListExpanded', true); + const [isSingleJobListExpanded, setIsSingleJobListExpanded] = + useLocalStorage('singleJobListExpanded', false); return ( <> @@ -111,6 +116,8 @@ export const ActiveJobComponentOverview: FunctionComponent<{ totalJobCount={0} isDeletable fetchJobs={refetchJobs} + isExpanded={isSingleJobListExpanded} + onExpanded={setIsSingleJobListExpanded} /> )} @@ -151,6 +158,8 @@ export const ActiveJobComponentOverview: FunctionComponent<{ componentName={jobComponentName} componentType={component.type} hideRadixVars + isExpanded={isEnvVarsListExpanded} + onExpanded={setIsEnvVarsListExpanded} />
diff --git a/src/components/page-deployment-component/deployment-component-overview.tsx b/src/components/page-deployment-component/deployment-component-overview.tsx index bc6006797..c3f996a9d 100644 --- a/src/components/page-deployment-component/deployment-component-overview.tsx +++ b/src/components/page-deployment-component/deployment-component-overview.tsx @@ -1,6 +1,7 @@ import * as PropTypes from 'prop-types'; import type { FunctionComponent } from 'react'; +import useLocalStorage from '../../effects/use-local-storage'; import { routes } from '../../routes'; import { pollingInterval } from '../../store/defaults'; import { useGetDeploymentQuery } from '../../store/radix-api'; @@ -23,6 +24,8 @@ export const DeploymentComponentOverview: FunctionComponent<{ const component = deployment?.components?.find( ({ name }) => name === componentName ); + const [isEnvVarsListExpanded, setIsEnvVarsListExpanded] = + useLocalStorage('deploymentComponentEnvVarsListExpanded', true); return ( <> @@ -65,6 +68,8 @@ export const DeploymentComponentOverview: FunctionComponent<{ componentType={component.type} hideRadixVars readonly + isExpanded={isEnvVarsListExpanded} + onExpanded={setIsEnvVarsListExpanded} /> diff --git a/src/components/page-deployment-job-component/deployment-job-component-overview.tsx b/src/components/page-deployment-job-component/deployment-job-component-overview.tsx index 925c3547d..c6f6e6fc4 100644 --- a/src/components/page-deployment-job-component/deployment-job-component-overview.tsx +++ b/src/components/page-deployment-job-component/deployment-job-component-overview.tsx @@ -1,6 +1,7 @@ import * as PropTypes from 'prop-types'; import type { FunctionComponent } from 'react'; +import useLocalStorage from '../../effects/use-local-storage'; import { routes } from '../../routes'; import { pollingInterval } from '../../store/defaults'; import { useGetDeploymentQuery } from '../../store/radix-api'; @@ -23,6 +24,8 @@ export const DeploymentJobComponentOverview: FunctionComponent<{ const component = deployment?.components?.find( ({ name }) => name === jobComponentName ); + const [isEnvVarsListExpanded, setIsEnvVarsListExpanded] = + useLocalStorage('deploymentJobComponentEnvVarsListExpanded', true); return ( <> @@ -59,6 +62,8 @@ export const DeploymentJobComponentOverview: FunctionComponent<{ componentType={component.type} hideRadixVars readonly + isExpanded={isEnvVarsListExpanded} + onExpanded={setIsEnvVarsListExpanded} /> diff --git a/src/components/page-environment/environment-overview.tsx b/src/components/page-environment/environment-overview.tsx index cede8221f..cbb960a85 100644 --- a/src/components/page-environment/environment-overview.tsx +++ b/src/components/page-environment/environment-overview.tsx @@ -40,6 +40,7 @@ import { GitTagLinks } from '../git-tags/git-tag-links'; import { RelativeToNow } from '../time/relative-to-now'; import './style.css'; +import useLocalStorage from '../../effects/use-local-storage'; import { DefaultAppAlias } from '../component/default-app-alias'; import { DNSAliases } from '../component/dns-aliases'; import { GitCommitTags } from '../component/git-commit-tags'; @@ -60,9 +61,11 @@ export const EnvironmentOverview: FunctionComponent<{ { appName, envName }, { skip: !appName || !envName, pollingInterval } ); + const [isEventListExpanded, setIsEventListExpanded] = + useLocalStorage('environmentEventListExpanded', true); const { data: events } = useGetEnvironmentEventsQuery( { appName, envName }, - { skip: !appName || !envName, pollingInterval } + { skip: !appName || !envName || !isEventListExpanded, pollingInterval } ); const [deleteEnvTrigger, deleteEnvState] = radixApi.endpoints.deleteEnvironment.useMutation(); @@ -261,7 +264,6 @@ export const EnvironmentOverview: FunctionComponent<{ - {appAlias?.environmentName == envName && ( )} @@ -286,17 +288,14 @@ export const EnvironmentOverview: FunctionComponent<{ components={deployment.components ?? []} /> )} - - {events && ( - - sortCompareDate(x, y, 'descending'), - ])} - /> - )} - + + sortCompareDate(x, y, 'descending'), + ])} + /> {environment.deployments && (
Previous deployments diff --git a/src/components/page-replica/index.tsx b/src/components/page-replica/index.tsx index 9f60800c9..4760f843a 100644 --- a/src/components/page-replica/index.tsx +++ b/src/components/page-replica/index.tsx @@ -1,6 +1,7 @@ import { Typography } from '@equinor/eds-core-react'; import * as PropTypes from 'prop-types'; +import useLocalStorage from '../../effects/use-local-storage'; import { routes } from '../../routes'; import { pollingInterval } from '../../store/defaults'; import { @@ -44,10 +45,17 @@ function PageReplica({ appName, envName, componentName, replicaName }: Props) { ?.find((x) => x.name === componentName) ?.replicaList?.find((x) => x.name === replicaName); + const [isEventListExpanded, setIsEventListExpanded] = + useLocalStorage('replicaEventListExpanded', false); const { data: events } = useGetReplicaEventsQuery( { appName, envName, componentName, podName: replicaName }, { - skip: !appName || !envName || !componentName || !replicaName, + skip: + !appName || + !envName || + !componentName || + !replicaName || + !isEventListExpanded, pollingInterval, } ); @@ -81,7 +89,6 @@ function PageReplica({ appName, envName, componentName, replicaName }: Props) { { label: smallReplicaName(replicaName) }, ]} /> - {replica && ( )} - {events && ( - - sortCompareDate(x, y, 'descending'), - ])} - /> - )} + + sortCompareDate(x, y, 'descending'), + ])} + /> ); } diff --git a/src/components/page-scheduled-batch/index.tsx b/src/components/page-scheduled-batch/index.tsx index 0847b2dfe..92b090d3b 100644 --- a/src/components/page-scheduled-batch/index.tsx +++ b/src/components/page-scheduled-batch/index.tsx @@ -23,6 +23,7 @@ import { Duration } from '../time/duration'; import { RelativeToNow } from '../time/relative-to-now'; import './style.css'; +import { ScheduledBatchOverview } from './scheduled-batch-overview'; function ScheduleBatchDuration({ batch }: { batch: ScheduledBatchSummary }) { return ( @@ -136,11 +137,17 @@ export function PageScheduledBatch({ jobComponentName, }), }, - { label: smallScheduledBatchName(scheduledBatchName) }, + { label: `batch ${smallScheduledBatchName(scheduledBatchName)}` }, ]} /> + {batch && ( + + )} {batch && replica && (
)} diff --git a/src/components/page-scheduled-batch/scheduled-batch-overview.tsx b/src/components/page-scheduled-batch/scheduled-batch-overview.tsx new file mode 100644 index 000000000..fa5bd35c0 --- /dev/null +++ b/src/components/page-scheduled-batch/scheduled-batch-overview.tsx @@ -0,0 +1,100 @@ +import { Typography } from '@equinor/eds-core-react'; +import * as PropTypes from 'prop-types'; +import type { FunctionComponent } from 'react'; +import type { ScheduledBatchSummary } from '../../store/radix-api'; +import { smallScheduledBatchName } from '../../utils/string'; +import { BatchJobStatuses } from '../component/scheduled-job/batch-job-statuses'; +import { ProgressStatusBadge } from '../status-badges'; +import { Duration } from '../time/duration'; +import { RelativeToNow } from '../time/relative-to-now'; + +const ScheduledBatchDuration: FunctionComponent<{ + started: string; + finished: string; +}> = ({ started, finished }) => { + return ( + <> + + Started{' '} + + + + + {finished && ( + <> + + Ended{' '} + + + + + + Duration{' '} + + + + + + )} + + ); +}; + +const ScheduledBatchState: FunctionComponent< + Pick +> = ({ status }) => <>{status && }; + +export const ScheduledBatchOverview: FunctionComponent<{ + batch: ScheduledBatchSummary; + jobComponentName: string; +}> = ({ batch, jobComponentName }) => ( + <> + Overview +
+
+
+ + Batch name {smallScheduledBatchName(batch.name)} + + {batch.batchId && ( + + Batch ID {batch.batchId} + + )} + + Job component {jobComponentName} + + {batch.status && ( + + Batch status + + )} + + Jobs statuses + + +
+
+ <> + + Created{' '} + + + + + + +
+
+
+ +); + +ScheduledBatchOverview.propTypes = { + batch: PropTypes.object + .isRequired as PropTypes.Validator, + jobComponentName: PropTypes.string.isRequired, +}; diff --git a/src/components/page-scheduled-batch/style.css b/src/components/page-scheduled-batch/style.css index 2ecb6ed9e..d4f54c831 100644 --- a/src/components/page-scheduled-batch/style.css +++ b/src/components/page-scheduled-batch/style.css @@ -4,3 +4,13 @@ gap: var(--eds_spacing_medium); margin-bottom: var(--eds_spacing_medium); } + +.status-title { + display: grid; + grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); + align-items: center; +} + +.status--justify-end { + justify-self: end; +} diff --git a/src/components/page-scheduled-job/index.tsx b/src/components/page-scheduled-job/index.tsx index 4c14b7bb1..4d5bac3ba 100644 --- a/src/components/page-scheduled-job/index.tsx +++ b/src/components/page-scheduled-job/index.tsx @@ -11,7 +11,11 @@ import { import { withRouteParams } from '../../utils/router'; import { getEnvsUrl } from '../../utils/routing'; import { dataSorter, sortCompareDate } from '../../utils/sort-utils'; -import { routeWithParams, smallScheduledJobName } from '../../utils/string'; +import { + routeWithParams, + smallScheduledBatchName, + smallScheduledJobName, +} from '../../utils/string'; import AsyncResource from '../async-resource/async-resource'; import { Breadcrumb } from '../breadcrumb'; import { JobReplica } from './job-replica'; @@ -33,8 +37,15 @@ export const PageScheduledJob: FunctionComponent<{ appName: string; jobComponentName: string; envName: string; + scheduledBatchName?: string; scheduledJobName: string; -}> = ({ appName, envName, jobComponentName, scheduledJobName }) => { +}> = ({ + appName, + envName, + jobComponentName, + scheduledBatchName, + scheduledJobName, +}) => { const { data: job, ...scheduledJobState } = useGetJobQuery( { appName, envName, jobComponentName, jobName: scheduledJobName }, { @@ -78,7 +89,20 @@ export const PageScheduledJob: FunctionComponent<{ jobComponentName, }), }, - { label: smallScheduledJobName(scheduledJobName) }, + { + label: scheduledBatchName + ? `batch ${smallScheduledBatchName(scheduledBatchName)}` + : '', + to: scheduledBatchName + ? routeWithParams(routes.appScheduledBatch, { + appName, + envName, + jobComponentName, + scheduledBatchName, + }) + : '', + }, + { label: `job ${smallScheduledJobName(scheduledJobName)}` }, ]} /> @@ -165,6 +189,7 @@ PageScheduledJob.propTypes = { appName: PropTypes.string.isRequired, jobComponentName: PropTypes.string.isRequired, envName: PropTypes.string.isRequired, + scheduledBatchName: PropTypes.string, scheduledJobName: PropTypes.string.isRequired, }; diff --git a/src/components/page-scheduled-job/scheduled-job-overview.tsx b/src/components/page-scheduled-job/scheduled-job-overview.tsx index c9f18ce9e..cf2b798c3 100644 --- a/src/components/page-scheduled-job/scheduled-job-overview.tsx +++ b/src/components/page-scheduled-job/scheduled-job-overview.tsx @@ -3,7 +3,10 @@ import { isNil } from 'lodash'; import * as PropTypes from 'prop-types'; import type { FunctionComponent } from 'react'; import type { ScheduledJobSummary } from '../../store/radix-api'; -import { smallScheduledJobName } from '../../utils/string'; +import { + smallScheduledBatchName, + smallScheduledJobName, +} from '../../utils/string'; import { Code } from '../code'; import { ResourceRequirements } from '../resource-requirements'; import { Runtime } from '../runtime'; @@ -76,15 +79,21 @@ export const ScheduledJobOverview: FunctionComponent<{
- Name {smallScheduledJobName(job.name)} + Job name {smallScheduledJobName(job.name)} {job.jobId && ( Job ID {job.jobId} )} + {job.batchName && ( + + Batch name{' '} + {smallScheduledBatchName(job.batchName)} + + )} - Job {jobComponentName} + Job component {jobComponentName}
diff --git a/src/router.tsx b/src/router.tsx index 6692aa4a4..c7f3b315a 100644 --- a/src/router.tsx +++ b/src/router.tsx @@ -171,6 +171,10 @@ export const router = createBrowserRouter([ path: routes.appScheduledJob, Component: PageScheduledJob.default, }, + { + path: routes.appScheduledBatchJob, + Component: PageScheduledJob.default, + }, ], }, ], diff --git a/src/routes.ts b/src/routes.ts index 5d3231277..97070426d 100644 --- a/src/routes.ts +++ b/src/routes.ts @@ -40,6 +40,7 @@ export const routes = { appActiveJobComponent: '/applications/:appName/envs/:envName/jobcomponent/:jobComponentName', appScheduledJob: '/applications/:appName/envs/:envName/jobcomponent/:jobComponentName/scheduledjob/:scheduledJobName', appScheduledBatch: '/applications/:appName/envs/:envName/jobcomponent/:jobComponentName/scheduledbatch/:scheduledBatchName', + appScheduledBatchJob: '/applications/:appName/envs/:envName/jobcomponent/:jobComponentName/scheduledbatch/:scheduledBatchName/scheduledjob/:scheduledJobName', appJobs: '/applications/:appName/jobs', appJob: '/applications/:appName/jobs/view/:jobName', appJobStep: '/applications/:appName/jobs/view/:jobName/steps/:stepName', diff --git a/src/store/radix-api.ts b/src/store/radix-api.ts index bd333a66d..e859e35f5 100644 --- a/src/store/radix-api.ts +++ b/src/store/radix-api.ts @@ -2573,6 +2573,8 @@ export type JobSummary = { commitID?: string; /** Created timestamp */ created?: string; + /** DeployExternalDNS deploy external DNS */ + deployExternalDNS?: boolean | null; /** Ended timestamp */ ended?: string; /** Environments the job deployed to */ @@ -2586,7 +2588,7 @@ export type JobSummary = { /** OverrideUseBuildCache override default or configured build cache option */ overrideUseBuildCache?: boolean | null; /** Name of the pipeline */ - pipeline?: 'build' | 'build-deploy' | 'promote' | 'deploy'; + pipeline?: 'build' | 'build-deploy' | 'promote' | 'deploy' | 'apply-config'; /** RadixDeployment name, which is promoted */ promotedFromDeployment?: string; /** Environment name, from which the Radix deployment is promoted */ @@ -2734,7 +2736,12 @@ export type DeploymentSummary = { /** Name the unique name of the Radix application deployment */ name: string; /** Type of pipeline job */ - pipelineJobType?: 'build' | 'build-deploy' | 'promote' | 'deploy'; + pipelineJobType?: + | 'build' + | 'build-deploy' + | 'promote' + | 'deploy' + | 'apply-config'; /** Name of the environment the deployment was promoted from Applies only for pipeline jobs of type 'promote' */ promotedFromEnvironment?: string; @@ -3183,6 +3190,8 @@ export type Job = { components?: ComponentSummary[]; /** Created timestamp */ created?: string; + /** DeployExternalDNS deploy external DNS */ + deployExternalDNS?: boolean | null; /** DeployedToEnvironment the name of the environment that was deployed to */ deployedToEnvironment?: string; /** Array of deployments */ @@ -3195,8 +3204,10 @@ export type Job = { }; /** Name of the job */ name?: string; + /** OverrideUseBuildCache override default or configured build cache option */ + overrideUseBuildCache?: boolean | null; /** Name of the pipeline */ - pipeline?: 'build' | 'build-deploy' | 'promote' | 'deploy'; + pipeline?: 'build' | 'build-deploy' | 'promote' | 'deploy' | 'apply-config'; /** RadixDeployment name, which is promoted */ promotedFromDeployment?: string; /** PromotedFromEnvironment the name of the environment that was promoted from */ @@ -3399,6 +3410,8 @@ export type PipelineRunTaskStep = { statusMessage?: string; }; export type PipelineParametersApplyConfig = { + /** DeployExternalDNS deploy external DNS */ + deployExternalDNS?: boolean | null; /** TriggeredBy of the job - if empty will use user token upn (user principle name) */ triggeredBy?: string; }; @@ -3409,6 +3422,8 @@ export type PipelineParametersBuild = { /** CommitID the commit ID of the branch to build REQUIRED for "build" and "build-deploy" pipelines */ commitID?: string; + /** DeployExternalDNS deploy external DNS */ + deployExternalDNS?: boolean | null; /** ImageName of the component, without repository name and image-tag */ imageName?: string; /** ImageRepository of the component, without image name and image-tag */ diff --git a/src/utils/routing.ts b/src/utils/routing.ts index 830f095e9..b7c43effe 100644 --- a/src/utils/routing.ts +++ b/src/utils/routing.ts @@ -173,6 +173,22 @@ export function getScheduledJobUrl( }); } +export function getScheduledBatchJobUrl( + appName: string, + envName: string, + jobComponentName: string, + scheduledBatchName: string, + scheduledJobName: string +): string { + return routeWithParams(routes.appScheduledBatchJob, { + appName, + envName, + jobComponentName, + scheduledBatchName, + scheduledJobName, + }); +} + export function getScheduledBatchUrl( appName: string, envName: string,