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

host prototype name limit is still 64chars

XMLWordPrintable

      According to ZBX-7720, limit for host prototype name and visible name should be longer than 64 characters. Frontend doesn't allow that. Fix is easy in frontend, but i'm not sure about other things, although i tested it through lld discovery. Probably fix is needed on network discovery too.

      +++ include/classes/api/services/CHostPrototype.php	2015-04-06 02:46:05.347462890 +0300
      @@ -168,7 +168,7 @@
       		return array(
       			'validators' => array(
       				'host' => new CLldMacroStringValidator(array(
      -					'maxLength' => 64,
      +					'maxLength' => 128,
       					'regex' => '/^('.ZBX_PREG_INTERNAL_NAMES.'|\{#'.ZBX_PREG_MACRO_NAME_LLD.'\})+$/',
       					'messageEmpty' => _('Empty host.'),
       					'messageMaxLength' => _('Host name "%1$s" is too long, it must not be longer than %2$d characters.'),
      
      +++ include/views/configuration.host.prototype.edit.php	2015-04-06 02:31:14.751925319 +0300
      @@ -61,13 +61,13 @@
       }
      
       $hostTB = new CTextBox('host', $hostPrototype['host'], ZBX_TEXTBOX_STANDARD_SIZE, (bool) $hostPrototype['templateid']);
      -$hostTB->setAttribute('maxlength', 64);
      +$hostTB->setAttribute('maxlength', 128);
       $hostTB->setAttribute('autofocus', 'autofocus');
       $hostList->addRow(_('Host name'), $hostTB);
      
       $name = ($hostPrototype['name'] != $hostPrototype['host']) ? $hostPrototype['name'] : '';
       $visiblenameTB = new CTextBox('name', $name, ZBX_TEXTBOX_STANDARD_SIZE, (bool) $hostPrototype['templateid']);
      -$visiblenameTB->setAttribute('maxlength', 64);
      +$visiblenameTB->setAttribute('maxlength', 128);
       $hostList->addRow(_('Visible name'), $visiblenameTB);
      

      // display inherited parameters only for hosts prototypes on hosts

            Unassigned Unassigned
            dewil Peter Kubicsek
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: