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: Duplicate
    • Icon: Trivial Trivial
    • None
    • 3.4.8rc1
    • None
    • S24-W24/25, S24-W28/29, S24-W36/37
    • 1

      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("
      ","")}
      =====

            sboidenko Sergejs Boidenko
            gelonsoft Oleg Banin
            Team A
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: