public static EmbeddedDashboardServer newDashboard(ServerResolver registrationServerResolver,
ServerResolver discoveryServerResolver,
int discoveryPort,
boolean withExt,
boolean withAdminUI,
boolean ephemeralPorts,
CodecType codec) {
int dashboardPort = ephemeralPorts ? 0 : DASHBOARD_SERVER_PORTS_FROM;
int webAdminPort = ephemeralPorts ? 0 : DASHBOARD_SERVER_PORTS_FROM + 1;
EurekaDashboardConfig config = EurekaDashboardConfig.newBuilder()
.withAppName(DASHBOARD_SERVER_NAME)
.withVipAddress(DASHBOARD_SERVER_NAME)
.withDataCenterType(DataCenterType.Basic)
.withCodec(codec)
.withShutDownPort(-1)
.withWebAdminPort(webAdminPort)
.withDashboardPort(dashboardPort)
.build();
return new EmbeddedDashboardServer(config, discoveryPort, registrationServerResolver, discoveryServerResolver, withExt, withAdminUI);
}