Ad Widget

Collapse

PATCH: dynamic URL screen items

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • freak
    Member
    • Oct 2007
    • 52

    #1

    PATCH: dynamic URL screen items

    Hi,

    I want to be able to call a custom script to display additional information for a host in a screen as a URL item, so I wrote this patch that makes SCREEN_RESOURCE_URL dynamic.

    If a URL item is marked as dynamic, the URL will be extended with hostid=[selected host's hostid]. (Probably it shouldn't be "hostid" but "zbx_hostid" or something to avoid messing other stuff up, but I think if one knows how to write a custom script, they can change that themselves..)

    The URL itself may contain query strings (i.e. foo.php?bar=true&waz=false will work as well as foo.php, they will be extended with &hostid=[ID] or ?hostid=[ID] respectively).

    I'll be adding this as a feature request as well.

    This patch applies to trunk@5238 with ZBX-251 applied.

    hth
    Sebastian
    Attached Files
    Last edited by freak; 11-01-2008, 12:17. Reason: mention trunk@5238, ZBX-251
Working...