-
Notifications
You must be signed in to change notification settings - Fork 17
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
Check form redesign #847
Merged
Merged
Check form redesign #847
Changes from 66 commits
Commits
Show all changes
72 commits
Select commit
Hold shift + click to select a range
7a4a9c8
feat: zod validation set-up
ckbedwell 42fd13e
feat: zod validation set-up
ckbedwell 81c5a33
Merged in latest
ckbedwell 21032d8
Merge branch 'main' into feat/zod-validation
ckbedwell 2db0c27
feat: add multihttp zod schema
ckbedwell 3eccf2e
feat: add ping schema
ckbedwell 03a830a
feat: add dns schema
ckbedwell 5505ef5
feat: tcp check and target validation update
ckbedwell ce5c5ba
fix: update tests
ckbedwell ee70cc0
feat: added traceroute schema
ckbedwell 0b679d4
feat: added scripted check schema
ckbedwell 320f336
feat: add grpc schema and fix regex validation
ckbedwell 514dd14
fix: update schemas and sanitization to pass tests
ckbedwell 8eab716
feat: move form wizard sidebar validation to zod without triggering r…
ckbedwell 59bf6f7
chore: merged in main
ckbedwell b19aa5d
fix: self-review
ckbedwell 1df392a
chore: merged in main
ckbedwell efc733a
feat: convert probe form to use zod schema
ckbedwell edced20
fix: update probeeditor error text to find
ckbedwell 3e6a2a5
chore: clean up inline validation and add to schemas
ckbedwell 9d9333b
fix: expand on assertion type with union for multihttp checks
ckbedwell 89031d4
chore: update assertion types
ckbedwell 4794c36
feat: rejigging layout
ckbedwell 9a89f09
feat: checkform2 POC
ckbedwell f01f247
fix: pr rename to interpolateErrorMessage and tighten zod schemas
ckbedwell bbf9c5e
Update src/components/CheckEditor/FormComponents/HttpCheckRegExValida…
ckbedwell 1b58c35
Update src/components/CheckEditor/FormComponents/HttpCheckRegExValida…
ckbedwell d8e584e
Update src/schemas/general/Header.ts
ckbedwell 25e639f
fix: update error var names
ckbedwell d66d9ae
Merge branch 'feat/zod-validation' of github.com:grafana/synthetic-mo…
ckbedwell 626a074
feat: add script size validation to schema
ckbedwell cb00990
chore: merged in main
ckbedwell 88e708d
chore: merge in upstream change
ckbedwell de8563f
chore: merge in upstream changes
ckbedwell 6fb7abf
chore: merged in main
ckbedwell 66b7986
feat: wip
ckbedwell 9bd5979
feat: multihttp rework
ckbedwell 256b75f
feat: add request method to multihttp display
ckbedwell fed84d7
chore: merged in main
ckbedwell d4e7df0
feat: http request and multi http design updates
ckbedwell 347b8d1
feat: clean up request fields design
ckbedwell d9c279b
feat: update requuest input layout
ckbedwell 4dd6e2c
feat: supporting content
ckbedwell 2b9ca7d
feat: request logs sidebar
ckbedwell c7004fc
chore: merged in main
ckbedwell 976c97e
chore: merged in main
ckbedwell e246e6f
feat: add protocols to group type cards
ckbedwell ae0057f
feat: update check group card design
ckbedwell 728d81c
fix: hook check form submit back up and abstract formlayout not to be…
ckbedwell 956be48
fix: update formsidebar to drop coupling with checkformvalues
ckbedwell a89d00e
feat: added comprehensive checktype testing
ckbedwell 1fcb406
fix: making editing checks work again
ckbedwell 498ec3e
feat: added comprehensive testing coverage to the checkform
ckbedwell 4accc32
fix: skip feature flag test that has randomly broken
ckbedwell e2a2689
Merge branch 'main' into feat/single-page-check-creation
ckbedwell 77a967c
fix: hook adhoc test button back up
ckbedwell 6928802
chore: lint fixes
ckbedwell d29e5f4
feat: add messaging about unable to edit request type after creation
ckbedwell 839e56b
fix: fix all remaining broken tests
ckbedwell 4591eaa
fix: lint errors
ckbedwell 4fabba4
feat: universal disabled for checkform and additional tests
ckbedwell 1619072
chore: self-review
ckbedwell 761a2da
chore: separate http tests to different files
ckbedwell 11b3de4
Merge branch 'main' into feat/single-page-check-creation
ckbedwell db5c5f0
fix: update messaging on error modal for unfound check
ckbedwell 0e35f7e
fix: transform grpc tlsconfig
ckbedwell 8c8ffeb
fix: remove unnecessary disabled from fields and alphabetize props on…
ckbedwell 646982f
fix: ignore non-formlayout section components when calculating next/p…
ckbedwell f6c9e00
fix: updated checkeditor types and added comment for disabling reques…
ckbedwell ee07565
feat: added useDOMId hook
ckbedwell 9c93c43
fix: rename VariablesFields to MultiHttpVariables
ckbedwell f0bbb4d
feat: make timeout a dumber component with less responsibilities
ckbedwell File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
import { FormEvent } from 'react'; | ||
import { FieldPath } from 'react-hook-form'; | ||
|
||
import { CheckFormValues, CheckFormValuesPing, CheckFormValuesScripted } from 'types'; | ||
|
||
export type FieldProps<T extends CheckFormValues = CheckFormValues> = { | ||
name: FieldPath<T>; | ||
onChange?: (e: FormEvent) => void; | ||
'aria-label'?: string; | ||
}; | ||
|
||
export type TLSConfigFields = { | ||
tlsServerName?: FieldProps; | ||
tlsInsecureSkipVerify?: FieldProps; | ||
tlsCaSCert?: FieldProps; | ||
tlsClientCert?: FieldProps; | ||
tlsClientKey?: FieldProps; | ||
}; | ||
|
||
export type HttpRequestFields = TLSConfigFields & { | ||
method: FieldProps; | ||
target: FieldProps; | ||
requestHeaders: FieldProps; | ||
requestBody: FieldProps; | ||
followRedirects?: FieldProps; | ||
ipVersion?: FieldProps; | ||
requestContentType?: FieldProps; | ||
requestContentEncoding?: FieldProps; | ||
basicAuth?: FieldProps; | ||
bearerToken?: FieldProps; | ||
proxyUrl?: FieldProps; | ||
proxyHeaders?: FieldProps; | ||
queryParams?: FieldProps; | ||
}; | ||
|
||
export type DNSRequestFields = { | ||
target: FieldProps; | ||
ipVersion: FieldProps; | ||
recordType: FieldProps; | ||
server: FieldProps; | ||
protocol: FieldProps; | ||
port: FieldProps; | ||
ckbedwell marked this conversation as resolved.
Show resolved
Hide resolved
|
||
}; | ||
|
||
export type GRPCRequestFields = TLSConfigFields & { | ||
ipVersion: FieldProps; | ||
target: FieldProps; | ||
service: FieldProps; | ||
useTLS: FieldProps; | ||
}; | ||
|
||
export type TCPRequestFields = TLSConfigFields & { | ||
target: FieldProps; | ||
ipVersion: FieldProps; | ||
useTLS: FieldProps; | ||
}; | ||
|
||
export type PingRequestFields = { | ||
target: FieldProps<CheckFormValuesPing>; | ||
ipVersion: FieldProps<CheckFormValuesPing>; | ||
dontFragment: FieldProps<CheckFormValuesPing>; | ||
}; | ||
|
||
export type TracerouteRequestFields = { | ||
target: FieldProps; | ||
maxHops: FieldProps; | ||
maxUnknownHops: FieldProps; | ||
ptrLookup: FieldProps; | ||
}; | ||
|
||
export type ScriptedRequestFields = { | ||
target: FieldProps<CheckFormValuesScripted>; | ||
script: FieldProps<CheckFormValuesScripted>; | ||
}; |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably not related to this PR and not suggesting to change it here, but I wonder why we have two separate folders for form related files,
CheckEditor
andCheckForm
. Don't they refer to the same thing?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, good point! I was thinking as Thomas is out, we should maybe bump up this ticket and tackle it ASAP to cause the least disruption: #848. That way we can address this problem at the same time.
I'll put it in our 1:1 notes and we can discuss it on Wednesday 😃