use of alluxio.wire.MasterWebUIInit in project alluxio by Alluxio.
the class AlluxioMasterRestServiceHandler method getWebUIInit.
/**
* Gets Web UI initialization data.
*
* @return the response object
*/
@GET
@Path(WEBUI_INIT)
public Response getWebUIInit() {
return RestUtils.call(() -> {
MasterWebUIInit response = new MasterWebUIInit();
String proxyHostname = NetworkAddressUtils.getConnectHost(NetworkAddressUtils.ServiceType.PROXY_WEB, ServerConfiguration.global());
int proxyPort = ServerConfiguration.getInt(PropertyKey.PROXY_WEB_PORT);
Map<String, String> proxyDowloadFileApiUrl = new HashMap<>();
proxyDowloadFileApiUrl.put("prefix", "http://" + proxyHostname + ":" + proxyPort + "/api/v1/paths/");
proxyDowloadFileApiUrl.put("suffix", "/download-file/");
response.setDebug(ServerConfiguration.getBoolean(PropertyKey.DEBUG)).setNewerVersionAvailable(mMetaMaster.getNewerVersionAvailable()).setWebFileInfoEnabled(ServerConfiguration.getBoolean(PropertyKey.WEB_FILE_INFO_ENABLED)).setSecurityAuthorizationPermissionEnabled(ServerConfiguration.getBoolean(PropertyKey.SECURITY_AUTHORIZATION_PERMISSION_ENABLED)).setWorkerPort(ServerConfiguration.getInt(PropertyKey.WORKER_WEB_PORT)).setRefreshInterval((int) ServerConfiguration.getMs(PropertyKey.WEB_REFRESH_INTERVAL)).setProxyDownloadFileApiUrl(proxyDowloadFileApiUrl);
return response;
}, ServerConfiguration.global());
}
Aggregations