mirror of
https://github.com/harness/drone.git
synced 2025-05-04 13:59:04 +08:00
This PR increases the default maxlength from 1024 characters to 10000, which should be good for most cases. --------- Co-authored-by: Ram Bhosale <rambhosale9@gamil.com>
This commit is contained in:
parent
3f047635a0
commit
2d96ca504b
@ -31,5 +31,8 @@ export default {
|
|||||||
PULL_REQUEST_DIFF_RENDERING_BLOCK_SIZE: 10,
|
PULL_REQUEST_DIFF_RENDERING_BLOCK_SIZE: 10,
|
||||||
|
|
||||||
/** Detection margin for on-screen / off-screen rendering optimization. In pixels. */
|
/** Detection margin for on-screen / off-screen rendering optimization. In pixels. */
|
||||||
IN_VIEWPORT_DETECTION_MARGIN: 5_000
|
IN_VIEWPORT_DETECTION_MARGIN: 5_000,
|
||||||
|
|
||||||
|
/** Limit for the secret input in bytes */
|
||||||
|
SECRET_LIMIT_IN_BYTES: 5_242_880,
|
||||||
} as const
|
} as const
|
||||||
|
@ -37,6 +37,7 @@ import { useModalHook } from 'hooks/useModalHook'
|
|||||||
import { useStrings } from 'framework/strings'
|
import { useStrings } from 'framework/strings'
|
||||||
import type { OpenapiCreateSecretRequest, TypesSecret } from 'services/code'
|
import type { OpenapiCreateSecretRequest, TypesSecret } from 'services/code'
|
||||||
import { getErrorMessage } from 'utils/Utils'
|
import { getErrorMessage } from 'utils/Utils'
|
||||||
|
import Config from 'Config'
|
||||||
import css from './NewSecretModalButton.module.scss'
|
import css from './NewSecretModalButton.module.scss'
|
||||||
|
|
||||||
export interface SecretFormData {
|
export interface SecretFormData {
|
||||||
@ -144,6 +145,7 @@ export const NewSecretModalButton: React.FC<NewSecretModalButtonProps> = ({
|
|||||||
tooltipProps={{
|
tooltipProps={{
|
||||||
dataTooltipId: 'secretDescriptionTextField'
|
dataTooltipId: 'secretDescriptionTextField'
|
||||||
}}
|
}}
|
||||||
|
maxLength={Config.SECRET_LIMIT_IN_BYTES}
|
||||||
autoComplete="off"
|
autoComplete="off"
|
||||||
className={formik.values.showValue ? css.showValue : css.hideValue}
|
className={formik.values.showValue ? css.showValue : css.hideValue}
|
||||||
/>
|
/>
|
||||||
|
@ -39,6 +39,7 @@ import { useGetSpaceParam } from 'hooks/useGetSpaceParam'
|
|||||||
import type { OpenapiUpdateSecretRequest, TypesSecret } from 'services/code'
|
import type { OpenapiUpdateSecretRequest, TypesSecret } from 'services/code'
|
||||||
import type { SecretFormData } from 'components/NewSecretModalButton/NewSecretModalButton'
|
import type { SecretFormData } from 'components/NewSecretModalButton/NewSecretModalButton'
|
||||||
import { getErrorMessage, truncateString } from 'utils/Utils'
|
import { getErrorMessage, truncateString } from 'utils/Utils'
|
||||||
|
import Config from 'Config'
|
||||||
import css from './UpdateSecretModal.module.scss'
|
import css from './UpdateSecretModal.module.scss'
|
||||||
|
|
||||||
const useUpdateSecretModal = () => {
|
const useUpdateSecretModal = () => {
|
||||||
@ -134,6 +135,7 @@ const useUpdateSecretModal = () => {
|
|||||||
tooltipProps={{
|
tooltipProps={{
|
||||||
dataTooltipId: 'secretDescriptionTextField'
|
dataTooltipId: 'secretDescriptionTextField'
|
||||||
}}
|
}}
|
||||||
|
maxLength={Config.SECRET_LIMIT_IN_BYTES}
|
||||||
autoComplete="off"
|
autoComplete="off"
|
||||||
className={formik.values.showValue ? css.showValue : css.hideValue}
|
className={formik.values.showValue ? css.showValue : css.hideValue}
|
||||||
/>
|
/>
|
||||||
|
Loading…
Reference in New Issue
Block a user