Skip to content

fix: remove "Use CIRA" option from Add Device dialog#3282

Open
madhavilosetty-intel wants to merge 1 commit into
mainfrom
remove-useCIRA
Open

fix: remove "Use CIRA" option from Add Device dialog#3282
madhavilosetty-intel wants to merge 1 commit into
mainfrom
remove-useCIRA

Conversation

@madhavilosetty-intel

@madhavilosetty-intel madhavilosetty-intel commented Apr 23, 2026

Copy link
Copy Markdown
Contributor

Partially addresses #3200

Devices now connect to the stack automatically, so the manual CIRA toggle and its associated fields (GUID, MPS username, MPS password) are no longer needed.

image

PR Checklist

  • Unit Tests have been added for new changes
  • API tests have been updated if applicable
  • All commented code has been removed
  • If you've added a dependency, you've ensured license is compatible with Apache 2.0 and clearly outlined the added dependency.

What are you changing?

Anything the reviewer should know when reviewing this PR?

If the there are associated PRs in other repositories, please link them here (i.e. device-management-toolkit/repo#365 )

@madhavilosetty-intel madhavilosetty-intel enabled auto-merge (squash) April 23, 2026 19:58
@madhavilosetty-intel madhavilosetty-intel changed the title feat(add-device): remove "Use CIRA" option from Add Device dialog feat: remove "Use CIRA" option from Add Device dialog Apr 23, 2026
@madhavilosetty-intel madhavilosetty-intel changed the title feat: remove "Use CIRA" option from Add Device dialog fix: remove "Use CIRA" option from Add Device dialog Apr 23, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Removes the legacy “Use CIRA” toggle from the Add Device (enterprise) dialog now that device connection is automatic, and cleans up the UI and translations accordingly.

Changes:

  • Removed the “Use CIRA” i18n key across supported locales.
  • Simplified AddDeviceEnterpriseComponent by dropping CIRA-specific fields/logic and switching the template to pure reactive forms (no ngModel).
  • Updated the component unit test to reflect the reduced form shape.

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/assets/i18n/ar.json Removes addDevice.useCIRA translation entry
src/assets/i18n/de.json Removes addDevice.useCIRA translation entry
src/assets/i18n/en.json Removes addDevice.useCIRA translation entry
src/assets/i18n/es.json Removes addDevice.useCIRA translation entry
src/assets/i18n/fi.json Removes addDevice.useCIRA translation entry
src/assets/i18n/fr.json Removes addDevice.useCIRA translation entry
src/assets/i18n/he.json Removes addDevice.useCIRA translation entry
src/assets/i18n/it.json Removes addDevice.useCIRA translation entry
src/assets/i18n/ja.json Removes addDevice.useCIRA translation entry
src/assets/i18n/nl.json Removes addDevice.useCIRA translation entry
src/assets/i18n/ru.json Removes addDevice.useCIRA translation entry
src/assets/i18n/sv.json Removes addDevice.useCIRA translation entry
src/app/shared/add-device-enterprise/add-device-enterprise.component.ts Removes CIRA form controls/state and simplifies submit logic
src/app/shared/add-device-enterprise/add-device-enterprise.component.html Removes CIRA toggle/fields; always shows TLS/self-signed options
src/app/shared/add-device-enterprise/add-device-enterprise.component.spec.ts Updates tests for the new (non-CIRA) form payload
Comments suppressed due to low confidence (1)

src/app/shared/add-device-enterprise/add-device-enterprise.component.ts:108

  • submitForm() has an edit path that calls DevicesService.editDevice() and re-attaches guid from the original dialog data. There is currently no unit test covering this edit branch (only the add branch is tested), so regressions here won’t be caught. Add a spec that provides MAT_DIALOG_DATA with a guid, spies on editDevice, and asserts the patched payload includes guid and tags and that the dialog closes on success.
  submitForm(): void {
    if (this.form.valid) {
      const device: Device = { ...this.form.getRawValue() }
      device.tags = this.tags
      if (this.deviceOrig?.guid != null && this.deviceOrig?.guid !== '') {
        device.guid = this.deviceOrig.guid
        this.deviceService.editDevice(device).subscribe(() => {
          this.dialog.close({ submitted: true })
        })
      } else {
        this.deviceService.addDevice(device).subscribe(() => {
          this.dialog.close({ submitted: true })
        })
      }

@madhavilosetty-intel madhavilosetty-intel force-pushed the remove-useCIRA branch 3 times, most recently from 6e5db7c to 1f024f6 Compare June 11, 2026 21:33
Devices now connect to the stack automatically, so the manual CIRA
toggle and its associated fields (GUID, MPS username, MPS password)
are no longer needed.
@sudhir-intc

Copy link
Copy Markdown
Contributor

Could you please elobrate on the removal of the manual CIRA toggle completely and not depending on APP_DISABLE_CIRA content. How was this manual CIRA toggle used earlier in earlier versions and removal of this flag how the behavior changes.

@madhavilosetty-intel

madhavilosetty-intel commented Jun 12, 2026

Copy link
Copy Markdown
Contributor Author

Could you please elobrate on the removal of the manual CIRA toggle completely and not depending on APP_DISABLE_CIRA content. How was this manual CIRA toggle used earlier in earlier versions and removal of this flag how the behavior changes.

@sudhir-intc Good Question. Like CIRA tab we can hide this option too. The question is, do we need it? For a client initiated connection , we never need to add a device from server. When it first makes an attempt to talk to server either we add the device or update if it does exists. What we had earlier is only for debug purpose.

@graikhel-intel What do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants