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>)"

    Details

    • Type: New Feature Request
    • Status: Open
    • Priority: Trivial
    • Resolution: Unresolved
    • Affects Version/s: 3.4.8rc1
    • Fix Version/s: None
    • Component/s: None
    • Labels:

      Description

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

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              gelonsoft Oleg Banin
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: