This commit adds support for the port to be specified when using the
radius monitor type. A check has been implemented to ensure that a null
value is not passed to the radius check function as could occur with
monitors that were created before this change was introduced. The
default port of 1812 is displayed when the user selects the radius
monitor in much the same way as the DNS port is handled. The port was
not included in the hostname in the form hostname:port in order to avoid
issues with IPv6 addresses and monitors that had been created before
this change was implemented.
Signed-off-by: Matthew Nickson <mnickson@sidingsmedia.com>
Signed-off-by: Matthew Nickson <mnickson@sidingsmedia.com>
The filling of the URL field was incorrect previously. It has been
updated to handle new monitor types.
Signed-off-by: Matthew Nickson <mnickson@sidingsmedia.com>
The legacy octopush API includes an error code with all responses. A
code other than 000 is an error.
Signed-off-by: Matthew Nickson <mnickson@sidingsmedia.com>
The octopush legacy API does not return a HTTP error code and instead
always returns a HTTP 200. This means that no error it thrown even if
something like the parameters are incorrect.
Instead the error code is given in the json response data.
Therefore we must look at the response data and check for the presence
of the "error_code" key in the response data.
Signed-off-by: Matthew Nickson <mnickson@sidingsmedia.com>
The version number was passed as a string from the frontend but was
checked against a number in the backend provider. This caused the if else
if to fall through into an error. The literal it is now being compared
has been changed to a string and the unknown version error is no longer
encountered.
Signed-off-by: Matthew Nickson <mnickson@sidingsmedia.com>