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.
Ad Widget
Collapse
Suggestion: Show option Check Now item in Widget Problems, in Dashboard
Collapse
X
-
Good idea!
I know a place where to insert the code drawing link and taking itemid (frontend ver4.2.1)
I know how to call the required API function:Code:/include/classes/screens/CScreenProblem.php line 1225 + (new CSubmitButton( _('Check now'),'check_now',$itemid)) + ->addClass(ZBX_STYLE_BTN_LINK),
But to tie it all together - my knowledge of php+js is not enough.Code:$result = (bool) API::Task()->create([ 'type' => ZBX_TM_TASK_CHECK_NOW, 'itemids' => getRequest('itemid') ]);
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