Opened 7 years ago

Last modified 22 months ago

#2090 new bug

json api get_hosts returns status Offline for all hosts

Reported by: Cas Owned by: damoxc
Priority: trivial Milestone: 2.x
Component: Web UI Version: 1.3.5
Keywords: Cc:

Description

When using just the method get_hosts all hosts are listed as offline.

There is a hard-coded 'Offline' string in line 776 of get_hosts which I wonder is intentional to show a default status before calling get_host_status.

return [(tuple(host[HOSTS_ID:HOSTS_PORT+1]) + (_("Offline"),)) for host in self.host_list["hosts"]]

Change History (3)

comment:1 Changed 6 years ago by Cas

  • Milestone changed from 1.3.6 to 1.3.x

comment:2 Changed 6 years ago by Cas

  • Milestone changed from 1.3.x to 1.4.0

I think changing it to 'Unknown' would be more informative.

Also I don't think that any of the status texts in api should be translated as this might cause issues when passing non-ascii characters.

comment:3 Changed 22 months ago by Cas

  • Milestone changed from 2.0.x to 2.x

Milestone renamed

Note: See TracTickets for help on using tickets.