Skip to content
This repository has been archived by the owner on Apr 4, 2024. It is now read-only.

[9.5.0 + 1.0] Refresh agent status button doesn't work anymore #3018

Closed
J-C-P opened this issue Aug 18, 2020 · 6 comments
Closed

[9.5.0 + 1.0] Refresh agent status button doesn't work anymore #3018

J-C-P opened this issue Aug 18, 2020 · 6 comments

Comments

@J-C-P
Copy link

J-C-P commented Aug 18, 2020

The computer DNS name generation function (agent.class.php, line 1045), based on the domain ID the computer is linked to, is broken.
The Refresh status never ends.

By commenting the lines

$ditem = new DomainItem();
if ($ditem->getFromDBByCrit(['itemtype' => 'Computer', 'items_id' => $computer->fields['id']])) {
   $domain = new Domain();
   $domain->getFromDB($ditem->fields['domains_id']);
   array_push($url_addresses, "http://".
   $computer->fields["name"].'.'.
   $domain->fields["name"].
   ":".$port);
}

it works.

@pocheoleg
Copy link

try it
a5c663e

@J-C-P
Copy link
Author

J-C-P commented Aug 18, 2020

Works for me :-)
Thanks !

@brunnersm
Copy link

Try $ditem = new DomainItem(); alter to $ditem = new Domain_Item();

@mcharan
Copy link

mcharan commented Sep 4, 2020

Works perfectly! Thanks!

@aagz
Copy link

aagz commented Oct 7, 2020

Try $ditem = new DomainItem(); alter to $ditem = new Domain_Item();

Thanks!

@trasher
Copy link
Contributor

trasher commented Oct 7, 2020

See #2996

@trasher trasher closed this as completed Oct 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants