mirror of
https://github.com/portainer/portainer.git
synced 2025-07-19 13:29:41 +02:00
refactor(app): app service form to react [EE-5415] (#8994)
This commit is contained in:
parent
2d05103fed
commit
69776b4863
26 changed files with 1224 additions and 538 deletions
|
@ -0,0 +1,18 @@
|
|||
import { FormikErrors } from 'formik';
|
||||
|
||||
export function isServicePortError<T>(
|
||||
error: string | FormikErrors<T> | undefined
|
||||
): error is FormikErrors<T> {
|
||||
return error !== undefined && typeof error !== 'string';
|
||||
}
|
||||
|
||||
export function newPort(serviceName?: string) {
|
||||
return {
|
||||
port: undefined,
|
||||
targetPort: undefined,
|
||||
name: '',
|
||||
protocol: 'TCP',
|
||||
nodePort: undefined,
|
||||
serviceName,
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue