Uploaded image for project: 'ZABBIX FEATURE REQUESTS'
  1. ZABBIX FEATURE REQUESTS
  2. ZBXNEXT-3741

Refactor substitute_simple_macros() function to make macro resolving more transparent and efficient

XMLWordPrintable

      This function is ~1350 lines of code long and does multiple tasks:

      • some missing validation of tokens found by zbx_token_find() (previously substitute_simple_macros() used to search macros all by itself!);
      • gathers and caches data necessary to get macro values;
      • handles all possible macro contexts and all supported macros;
      • substitutes macros with values.

      We should:

      • cut down the size to 200-300 lines of code;
      • move all necessary context + token type + macro validation to zbx_token_find() or other helper functions;
      • store information about supported macros in easily manageable data structures instead of code logic;
      • ...

            Unassigned Unassigned
            glebs.ivanovskis Glebs Ivanovskis (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: