Do you mind providing a screenshot?
Unfortunately, I don’t have 9.7 around.
If I were to do this on 9.21, I would call a Nanoflow and execute just the ping call itself in javascript. Then based on that result you could mutate the object within the Nanoflow which would trigger the appropriate update within the UI.
Edit: If you have to do this server-side, just write some Java Actions using the appropriate library. Server-Side functionality is not limited to what is provided by the platform and/or Marketplace Modules.
I know I always get gunned down for this, but why not use a java action to do this?
google for java code to ping url… one of the results:
import com.mendix.systemwideinterfaces.core.IContext;
import com.mendix.webui.CustomJavaAction;
import java.net.HttpURLConnection;
import java.net.URL;
import java.io.IOException;
public class CheckUrl extends CustomJavaAction<java.lang.Boolean>
{
private java.lang.String Url;
private java.lang.Long Timeout;
public CheckUrl(IContext context, java.lang.String Url, java.lang.Long Timeout)
{
super(context);
this.Url = Url;
this.Timeout = Timeout;
}
@java.lang.Override
public java.lang.Boolean executeAction() throws Exception
{
// BEGIN USER CODE
Url = Url.replaceFirst("^https", "http"); // Otherwise an exception may be thrown on invalid SSL certificates.
try {
HttpURLConnection connection = (HttpURLConnection) new URL(Url).openConnection();
connection.setConnectTimeout(Timeout.intValue());
connection.setReadTimeout(Timeout.intValue());
connection.setRequestMethod("HEAD");
int responseCode = connection.getResponseCode();
return (200 <= responseCode && responseCode <= 399);
} catch (IOException exception) {
return false;
}
// END USER CODE
}
/**
* Returns a string representation of this action
*/
@java.lang.Override
public java.lang.String toString()
{
return "CheckUrl";
}
// BEGIN EXTRA CODE
// END EXTRA CODE
}
Note: Timeout is in ms
And the result of the java action: