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

Fields for Provision Watcher Tab don't match the Provision Watcher DTO #642

Open
lenny-goodell opened this issue Oct 24, 2023 · 4 comments · Fixed by #657
Open

Fields for Provision Watcher Tab don't match the Provision Watcher DTO #642

lenny-goodell opened this issue Oct 24, 2023 · 4 comments · Fixed by #657
Labels
bug Something isn't working help wanted Extra attention is needed
Milestone

Comments

@lenny-goodell
Copy link
Member

lenny-goodell commented Oct 24, 2023

🐞 Bug Report

Affected Services [REQUIRED]

The issue is located in: UI Provision Watcher Tab

Is this a regression?

No, this is new capability

Description and Minimal Reproduction [REQUIRED]

Fields for the provision watcher tab should match those in the DTO here:

type ProvisionWatcher struct {
	DBTimestamp         `json:",inline"`
	Id                  string              `json:"id,omitempty" yaml:"id,omitempty" validate:"omitempty,uuid"`
	Name                string              `json:"name" yaml:"name" validate:"required,edgex-dto-none-empty-string"`
	ServiceName         string              `json:"serviceName" yaml:"serviceName" validate:"required,edgex-dto-none-empty-string"`
	Labels              []string            `json:"labels,omitempty" yaml:"labels,omitempty"`
	Identifiers         map[string]string   `json:"identifiers" yaml:"identifiers" validate:"gt=0,dive,keys,required,endkeys,required"`
	BlockingIdentifiers map[string][]string `json:"blockingIdentifiers,omitempty" yaml:"blockingIdentifiers,omitempty"`
	AdminState          string              `json:"adminState" yaml:"adminState" validate:"oneof='LOCKED' 'UNLOCKED'"`
	DiscoveredDevice    DiscoveredDevice    `json:"discoveredDevice" yaml:"discoveredDevice"`
}

What we see are
image

Also, Blocking Identifiers is not getting populated when set in the DTO.

from compose builder run make run no-secty ds-onvif-camera ds-llrp and verify the Provision Watchers in the UI match the Provision Watchers here:

🌍 Your Environment

Deployment Environment:

EdgeX Version [REQUIRED]:

Anything else relevant?

@lenny-goodell lenny-goodell added the bug Something isn't working label Oct 24, 2023
@github-project-automation github-project-automation bot moved this to New Issues in Technical WG Oct 24, 2023
@lenny-goodell lenny-goodell added this to the Napa milestone Oct 24, 2023
@jumpingliu jumpingliu moved this from New Issues to Release Backlog in Technical WG Oct 25, 2023
@jumpingliu
Copy link
Contributor

assign this issue to @jiekechoo

jiekechoo added a commit to yiqisoft/edgex-ui-go that referenced this issue Nov 6, 2023
@jiekechoo
Copy link
Contributor

I have fixed this issue yiqisoft/edgex-ui-go/ , but I can't submit a new pr. Anyone can help me?
image

@cloudxxx8
Copy link
Member

@jiekechoo you should create a new branch called issue-642 to fix this issue, and open a PR against it.
https://wiki.edgexfoundry.org/display/FA/Committing+Code+Guidelines#CommittingCodeGuidelines-BranchingConventions
you can't create a new PR because there is an existing PR against your main branch #654

jiekechoo added a commit to yiqisoft/edgex-ui-go that referenced this issue Nov 6, 2023
@github-project-automation github-project-automation bot moved this from Release Backlog to Napa Done in Technical WG Nov 6, 2023
@lenny-goodell
Copy link
Member Author

lenny-goodell commented Nov 7, 2023

@jiekechoo , I have merged you PRs for the Provision Watcher fix for this issue, but not seeing what is expect from the latest built image.

Here is how I tested:

From compose builder

  • make pull (to make sure all the images I have are the latest
  • make run ds-onvif-camera ds-usb-camera ds-llrp ui-dev
  • make get-token

From UI

  • Enter token when prompted
  • Navigate to Provision Watcher tab (this is what I see)
    image
  • Edit the first one and this is what I see:
    image

Here is the Provision Watcher that should be displayed.
https://github.com/edgexfoundry/device-usb-camera/blob/main/cmd/res/provisionwatchers/generic.provision.watcher.yaml

I feel like you changes are not being reflected in the latest build, but even in the images on your PR #657, the field names are incorrect.

IdenifiersAddress => Identifiers
IdentifiersPort should be removed.

Note that:

  • Identifiers is a collection of key/value pairs (ie. map[string]string)
  • BlockingIdentifiers is a collection of key/value pairs where the values are a list of strings (i.e. map[string][]string)

Also not that if I select the 2nd empty item in the initial list I get this which has the Device Service and Device profiles properly listed and selected.
image

@lenny-goodell lenny-goodell reopened this Nov 7, 2023
@github-project-automation github-project-automation bot moved this from Napa Done to New Issues in Technical WG Nov 7, 2023
@jumpingliu jumpingliu moved this from New Issues to Icebox in Technical WG Nov 15, 2023
@jumpingliu jumpingliu moved this from Icebox to Release Backlog in Technical WG Dec 13, 2023
@cloudxxx8 cloudxxx8 added the help wanted Extra attention is needed label Oct 1, 2024
@cloudxxx8 cloudxxx8 moved this from Release Backlog to Icebox in Technical WG Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
Status: Icebox
Development

Successfully merging a pull request may close this issue.

4 participants