Host wizard - inline validation of secret macros is not working, causing console error / infinite loading of the host wizard

XMLWordPrintable

    • Sprint candidates
    • 1

      The inline validation error for required secret macros in Host Wizard is not working. It is possible to break the Host Wizard by using different scenarios, related to inline validation of the secret macro.

      Steps to reproduce:

      1. Open Host wizard for existing host (or can create new)
      2. Select template with mandatory macros (including secret macro) - for example: Azure Cost Management by HTTP
      3. Proceed to screen with Macros
      4. Add one of the mandatory macros, leave the mandatory secret macro (Azure Password) empty
      5. Click Next

      NOTE: Similar issue also can be reproduced, if there is some regex added for the secret macro in the template. If value is invalid - the console error is appearing, and any clicking buttons next / back - might cause host wizard to break.

      Result:
      Console error, infinite loading of the host wizard, not possible to close Host wizard.

      Error:

      Uncaught (in promise) NotFoundError: Failed to execute 'insertBefore' on 'Node': The node before which the new node is to be inserted is not a child of this node.
          at <anonymous>:2203:37
          at Array.forEach (<anonymous>)
          at #updateFieldMessages (<anonymous>:2192:12)
          at #updateForm (<anonymous>:1420:29)
          at #gotoStep (<anonymous>:494:19)
          at <anonymous>:354:20 

      See video:

       

      Expected:
      Inline validation error should appear for a secret macro. Next button should become disabled.

            Assignee:
            Zabbix Development Team
            Reporter:
            Nikita Gogolevs
            Team B
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - Not Specified
                Not Specified
                Logged:
                Time Spent - 1h
                1h