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

Edit macro variables values extracted from web page in successive POST request using function "replace(<what>,<to_what>)"

XMLWordPrintable

    • Icon: New Feature Request New Feature Request
    • Resolution: Unresolved
    • Icon: Trivial Trivial
    • None
    • 3.4.8rc1
    • None

      Edit macro variables values extracted from web page in successive POST request using function "replace(<what>,<to_what>)"
      It can be realized like already existing urlencode/urldecode ({{macro}.urlencode()}) :{{macro}.replace(<what_sub_str>,<to_what_sub_str>)}

      Example:
      =====
      POST request #1 returned the following text (JSON):
      --------

      {"var":"someurlpart\/someurlpart\/someurlpart\/someurlpart\/"}

      ---------
      We define macro variable

      {SOMEVAR} and extract using regexp the follwing value: "someurlpart\/someurlpart\/someurlpart\/someurlpart\/" (without quotes).
      In second web step we need to use value of {SOMEVAR}

      as "someurlpart/someurlpart/someurlpart/someurlpart/". Now it can't be archived, but with implementation of "replace(<>,<>)" function it could be easily done by {{SOMEVAR}.replace("
      ","")}
      =====

            Unassigned Unassigned
            gelonsoft Oleg Banin
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: