Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

[UI] Scheduled workflow catchup=false option #3131

Merged
merged 7 commits into from
Feb 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions frontend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@

## Develop

You need `npm`, install dependencies using `npm install`.
You need `npm`, install dependencies using `npm ci` (`npm ci` makes sure your
installed dependencies have the exact same version as others).

If you made any changes to protos (see backend/README), you'll need to
regenerate the Typescript client library from swagger. We use
swagger-codegen-cli@2.4.7, which you can get
[here](http://central.maven.org/maven2/io/swagger/swagger-codegen-cli/2.4.7/swagger-codegen-cli-2.4.7.jar).
[here](https://repo1.maven.org/maven2/io/swagger/swagger-codegen-cli/2.4.7/).
Make sure the jar file is somewhere on your path with the name
swagger-codegen-cli.jar, then run `npm run apis`.

Expand Down
22 changes: 14 additions & 8 deletions frontend/src/apis/job/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,12 @@ export interface ApiJob {
* @memberof ApiJob
*/
enabled?: boolean;
/**
* Optional input field. Whether the job should catch up if behind schedule. If true, the job will only schedule the latest interval if behind schedule. If false, the job will catch up on each past interval.
* @type {boolean}
* @memberof ApiJob
*/
no_catchup?: boolean;
}

/**
Expand Down Expand Up @@ -558,7 +564,7 @@ export const JobServiceApiFetchParamCreator = function(configuration?: Configura
},
/**
*
* @summary Disable a job.
* @summary Stops a job and all its associated runs. The job is not deleted.
* @param {string} id The ID of the job to be disabled
* @param {*} [options] Override http request option.
* @throws {RequiredError}
Expand Down Expand Up @@ -606,7 +612,7 @@ export const JobServiceApiFetchParamCreator = function(configuration?: Configura
},
/**
*
* @summary Enable a job.
* @summary Restarts a job that was previously stopped. All runs associated with the job will continue.
* @param {string} id The ID of the job to be enabled
* @param {*} [options] Override http request option.
* @throws {RequiredError}
Expand Down Expand Up @@ -839,7 +845,7 @@ export const JobServiceApiFp = function(configuration?: Configuration) {
},
/**
*
* @summary Disable a job.
* @summary Stops a job and all its associated runs. The job is not deleted.
* @param {string} id The ID of the job to be disabled
* @param {*} [options] Override http request option.
* @throws {RequiredError}
Expand All @@ -861,7 +867,7 @@ export const JobServiceApiFp = function(configuration?: Configuration) {
},
/**
*
* @summary Enable a job.
* @summary Restarts a job that was previously stopped. All runs associated with the job will continue.
* @param {string} id The ID of the job to be enabled
* @param {*} [options] Override http request option.
* @throws {RequiredError}
Expand Down Expand Up @@ -981,7 +987,7 @@ export const JobServiceApiFactory = function(
},
/**
*
* @summary Disable a job.
* @summary Stops a job and all its associated runs. The job is not deleted.
* @param {string} id The ID of the job to be disabled
* @param {*} [options] Override http request option.
* @throws {RequiredError}
Expand All @@ -991,7 +997,7 @@ export const JobServiceApiFactory = function(
},
/**
*
* @summary Enable a job.
* @summary Restarts a job that was previously stopped. All runs associated with the job will continue.
* @param {string} id The ID of the job to be enabled
* @param {*} [options] Override http request option.
* @throws {RequiredError}
Expand Down Expand Up @@ -1082,7 +1088,7 @@ export class JobServiceApi extends BaseAPI {

/**
*
* @summary Disable a job.
* @summary Stops a job and all its associated runs. The job is not deleted.
* @param {string} id The ID of the job to be disabled
* @param {*} [options] Override http request option.
* @throws {RequiredError}
Expand All @@ -1094,7 +1100,7 @@ export class JobServiceApi extends BaseAPI {

/**
*
* @summary Enable a job.
* @summary Restarts a job that was previously stopped. All runs associated with the job will continue.
* @param {string} id The ID of the job to be enabled
* @param {*} [options] Override http request option.
* @throws {RequiredError}
Expand Down
40 changes: 40 additions & 0 deletions frontend/src/atoms/HelpButton.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import Card from '@material-ui/core/Card';
import CardContent from '@material-ui/core/CardContent';
import IconButton from '@material-ui/core/IconButton';
import { withStyles } from '@material-ui/core/styles';
import Tooltip from '@material-ui/core/Tooltip';
import HelpIcon from '@material-ui/icons/Help';
import React, { ReactNode } from 'react';
import { color, fontsize } from '../Css';

const NostyleTooltip = withStyles({
tooltip: {
backgroundColor: 'transparent',
border: '0 none',
color: color.secondaryText,
fontSize: fontsize.base,
maxWidth: 220,
},
})(Tooltip);

interface HelpButtonProps {
helpText?: ReactNode;
}
export const HelpButton: React.FC<HelpButtonProps> = ({ helpText }) => {
return (
<NostyleTooltip
title={
<Card>
<CardContent>{helpText}</CardContent>
</Card>
}
interactive={true}
leaveDelay={400}
placement='top'
>
<IconButton>
<HelpIcon />
</IconButton>
</NostyleTooltip>
);
};
Loading