Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-26292

Nutanix template, validating input params

XMLWordPrintable

    • 1

      Throughout the template, there is a code snippet used to validate input parameters for "Script" item:

      var Nutanix = {
                      params: {},
                  
                      setParams: function (requiredParams, allParams) {
                          requiredParams.forEach(function (field) {
                              if (typeof allParams !== 'object' || typeof allParams[field] === 'undefined' || allParams[field] === '') {
                                  throw 'Required param is not set: ' + field + '.';
                              }
                          });
                  
                          Nutanix.params = params;
                      },

      It's unclear how the function "setParams" can report "params" back.

      The line seems incorrect:

      Nutanix.params = params;

      Because "params" seems to be an empty object.

            akotsegubov Aleksandr Kotsegubov
            aigars.kadikis Aigars Kadikis
            Team INT
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: