Ad Widget

Collapse

Suggestion: Show option Check Now item in Widget Problems, in Dashboard

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • cesarsj
    Senior Member
    • Dec 2018
    • 154

    #1

    Suggestion: Show option Check Now item in Widget Problems, in Dashboard

    So, once the problem was solved on a server, it was possible to re-check the item on the panel. It would be cool and very practical.
  • Hamardaban
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • May 2019
    • 2713

    #2
    Good idea!
    I know a place where to insert the code drawing link and taking itemid (frontend ver4.2.1)
    Code:
    /include/classes/screens/CScreenProblem.php
    line 1225
    +                (new CSubmitButton( _('Check now'),'check_now',$itemid))
    +                    ->addClass(ZBX_STYLE_BTN_LINK),
    I know how to call the required API function:

    Code:
        $result = (bool) API::Task()->create([
            'type' => ZBX_TM_TASK_CHECK_NOW,
            'itemids' => getRequest('itemid')
        ]);
    But to tie it all together - my knowledge of php+js is not enough.

    P.S.

    if add in /include/classes/screens/CScreenProblem.php at line 1225 (in function getLatestValues \ after $hint_table->addRow([ )

    new CLink($item['name_expanded'], (new CUrl('items.php'))
    ->setArgument('itemid', $itemid)
    ->setArgument('form', 'update')
    ->setArgument('filter_set', '1')
    ->getUrl()
    ),

    and comment // new CCol($item['name_expanded']),

    you get a link to the item page where you can click "check now" !
    Last edited by Hamardaban; 14-08-2019, 09:11.

    Comment

    Working...