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

Added validation to onvif and hl7monitor asset pages #3586

Closed
wants to merge 12 commits into from

Conversation

patelaryan7751
Copy link
Contributor

Proposed Changes

Fixes #3585
Added validation to onvif and hl7monitor asset pages
image
image

@coronasafe/care-fe-code-reviewers @coronasafe/code-reviewers

Merge Checklist

  • Add specs that demonstrate bug / test a new feature.
  • Update product documentation.
  • Ensure that UI text is kept in I18n files.
  • Prep screenshot or demo video for changelog entry, and attach it to issue.
  • Request for Peer Reviews
  • Completion of QA

@netlify
Copy link

netlify bot commented Sep 14, 2022

Deploy Preview for care-egov-staging ready!

Name Link
🔨 Latest commit e1834c4
🔍 Latest deploy log https://app.netlify.com/sites/care-egov-staging/deploys/637de13b2be7b3000840acf8
😎 Deploy Preview https://deploy-preview-3586--care-egov-staging.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@patelaryan7751
Copy link
Contributor Author

@developedBySJ i have implemented useReducer hook

src/Components/Assets/AssetType/HL7Monitor.tsx Outdated Show resolved Hide resolved
src/Components/Assets/AssetType/HL7Monitor.tsx Outdated Show resolved Hide resolved
src/Components/Assets/AssetType/HL7Monitor.tsx Outdated Show resolved Hide resolved
src/Components/Assets/AssetType/HL7Monitor.tsx Outdated Show resolved Hide resolved
src/Components/Assets/AssetType/HL7Monitor.tsx Outdated Show resolved Hide resolved
src/Components/Assets/AssetType/ONVIFCamera.tsx Outdated Show resolved Hide resolved
src/Components/Assets/AssetType/ONVIFCamera.tsx Outdated Show resolved Hide resolved
@patelaryan7751
Copy link
Contributor Author

Hey @developedBySJ i have refractored the code

@nihal467
Copy link
Member

@patelaryan7751
image

when i click save link button, iam getting both the notification, so can we add a validation there , for both monitor and camera page, is it possible

@patelaryan7751
Copy link
Contributor Author

@nihal467 yeah sure it can be done.

@patelaryan7751
Copy link
Contributor Author

Hey @nihal467 i have done the changes

Camera configure page

image

MonitorConfigure page

image

@nihal467
Copy link
Member

nihal467 commented Oct 3, 2022

test approved

@khavinshankar khavinshankar added the question Further information is requested label Oct 5, 2022
@stale
Copy link

stale bot commented Oct 12, 2022

Hi, This pr/issue has been automatically marked as stale because it has not had any recent activity. It will be closed if no further activity occurs for 7 more days. Thank you for your contributions.

@stale stale bot added the stale label Oct 12, 2022
@patelaryan7751 patelaryan7751 removed question Further information is requested stale labels Oct 16, 2022
@patelaryan7751
Copy link
Contributor Author

Hey @khavinshankar i have done the changes.

Comment on lines +56 to +58
asset?.asset_class,
asset?.meta?.middleware_hostname,
asset?.meta?.local_ip_address
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
asset?.asset_class,
asset?.meta?.middleware_hostname,
asset?.meta?.local_ip_address
asset?.asset_class || "",
asset?.meta?.middleware_hostname || "",
asset?.meta?.local_ip_address || ""

Comment on lines +71 to +74
asset?.asset_class,
asset?.meta?.middleware_hostname,
asset?.meta?.local_ip_address,
asset?.meta?.camera_access_key
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
asset?.asset_class,
asset?.meta?.middleware_hostname,
asset?.meta?.local_ip_address,
asset?.meta?.camera_access_key
asset?.asset_class || "",
asset?.meta?.middleware_hostname || "",
asset?.meta?.local_ip_address || "",
asset?.meta?.camera_access_key || ""

Comment on lines +101 to +112
case "middlewareHostname":
if (!state.form[field] || state.form[field].trim() === "") {
errors[field] = "Field is required";
invalidForm = true;
}
return;
case "cameraAccessKey":
if (!state.form[field] || state.form[field].trim() === "") {
errors[field] = "Field is required";
invalidForm = true;
}
return;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
case "middlewareHostname":
if (!state.form[field] || state.form[field].trim() === "") {
errors[field] = "Field is required";
invalidForm = true;
}
return;
case "cameraAccessKey":
if (!state.form[field] || state.form[field].trim() === "") {
errors[field] = "Field is required";
invalidForm = true;
}
return;
case "middlewareHostname":
case "cameraAccessKey":
if (!state.form[field] || state.form[field].trim() === "") {
errors[field] = "Field is required";
invalidForm = true;
}
return;

@khavinshankar
Copy link
Member

@patelaryan7751 just some minor refactors here and there

@github-actions github-actions bot added the merge conflict pull requests with merge conflict label Oct 27, 2022
@github-actions
Copy link

👋 Hi, @patelaryan7751,
Conflicts have been detected against the base branch. Please rebase your branch against the base branch.


This message is automatically generated by prince-chrismc/label-merge-conflicts-action so don't hesitate to report issues/improvements there.

@github-actions
Copy link

github-actions bot commented Nov 4, 2022

Hi, This pr has been automatically marked as stale because it has not had any recent activity. It will be automatically closed if no further activity occurs for 7 more days. Thank you for your contributions.

@github-actions github-actions bot added the stale label Nov 4, 2022
@vercel
Copy link

vercel bot commented Nov 15, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
care-storybook ✅ Ready (Inspect) Visit Preview Nov 23, 2022 at 9:02AM (UTC)

@sonarcloud
Copy link

sonarcloud bot commented Nov 23, 2022

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 8 Code Smells

No Coverage information No Coverage information
34.2% 34.2% Duplication

@github-actions github-actions bot added the merge conflict pull requests with merge conflict label Nov 30, 2022
@github-actions
Copy link

👋 Hi, @patelaryan7751,
Conflicts have been detected against the base branch. Please rebase your branch against the base branch.


This message is automatically generated by prince-chrismc/label-merge-conflicts-action so don't hesitate to report issues/improvements there.

@patelaryan7751
Copy link
Contributor Author

I am openning a fresh PR for this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make mandatory validation in ONVIF camera and HL7 monitor asset page
5 participants