use of org.jboss.hal.core.finder.FinderPath in project console by hal.
the class StandaloneServerColumn method onServerResult.
@Override
public void onServerResult(ServerResultEvent event) {
// noinspection Duplicates
if (isVisible()) {
ItemMonitor.stopProgress(event.getServer().getId());
FinderPath path = refreshPath != null ? refreshPath : finder.getContext().getPath();
refreshPath = null;
finder.refresh(path);
}
}
use of org.jboss.hal.core.finder.FinderPath in project console by hal.
the class TourSetup method standaloneSteps.
private void standaloneSteps(Tour tour, PlaceRequest homepage, PlaceRequest deployments, PlaceRequest runtime) {
// place requests for standalone mode
PlaceRequest configuration = places.finderPlace(NameTokens.CONFIGURATION, new FinderPath().append(Ids.CONFIGURATION, Ids.asId(Names.SUBSYSTEMS))).build();
String serverId = Ids.hostServer(Server.STANDALONE.getHost(), environment.getName());
PlaceRequest monitor = places.finderPlace(NameTokens.RUNTIME, new FinderPath().append(Ids.STANDALONE_SERVER_COLUMN, serverId)).build();
// steps for standalone mode
tour.addStep(homepage, Ids.HOMEPAGE_DEPLOYMENTS_MODULE, Names.HOMEPAGE, resources.messages().tourStandaloneHomeDeployments(), Placement.RIGHT);
tour.addStep(homepage, Ids.HOMEPAGE_CONFIGURATION_MODULE, Names.HOMEPAGE, resources.messages().tourStandaloneHomeConfiguration(), Placement.LEFT);
tour.addStep(homepage, Ids.HOMEPAGE_RUNTIME_MODULE, Names.HOMEPAGE, resources.messages().tourStandaloneHomeRuntime(), Placement.RIGHT);
tour.addStep(deployments, Ids.DEPLOYMENT, Names.DEPLOYMENT, resources.messages().tourStandaloneDeployment(), Placement.RIGHT);
tour.addStep(deployments, Ids.DEPLOYMENT_ADD_ACTIONS, Names.DEPLOYMENT, resources.messages().tourStandaloneDeploymentAddActions(), Placement.BOTTOM);
tour.addStep(configuration, Ids.CONFIGURATION_SUBSYSTEM, Names.CONFIGURATION, resources.messages().tourStandaloneConfigurationSubsystem(), Placement.RIGHT);
tour.addStep(runtime, Ids.STANDALONE_SERVER_COLUMN, Names.RUNTIME, resources.messages().tourStandaloneRuntimeServer(), Placement.RIGHT);
tour.addStep(monitor, Ids.RUNTIME_SUBSYSTEM, Names.RUNTIME, resources.messages().tourStandaloneRuntimeSubsystem(), Placement.RIGHT);
}
use of org.jboss.hal.core.finder.FinderPath in project console by hal.
the class TourSetup method commonSteps.
private void commonSteps(Tour tour) {
// steps for access control apply to both standalone and domain mode
if (accessControl.isSuperUserOrAdministrator() && !accessControl.isSingleSignOn()) {
PlaceRequest browseBy = new PlaceRequest.Builder().nameToken(NameTokens.ACCESS_CONTROL).build();
PlaceRequest users = places.finderPlace(NameTokens.ACCESS_CONTROL, new FinderPath().append(Ids.ACCESS_CONTROL_BROWSE_BY, Ids.ACCESS_CONTROL_BROWSE_BY_USERS)).build();
PlaceRequest roles = places.finderPlace(NameTokens.ACCESS_CONTROL, new FinderPath().append(Ids.ACCESS_CONTROL_BROWSE_BY, Ids.ACCESS_CONTROL_BROWSE_BY_ROLES)).build();
tour.addStep(browseBy, Ids.ACCESS_CONTROL_BROWSE_BY, Names.ACCESS_CONTROL, resources.messages().tourAccessControl(), Placement.RIGHT);
tour.addStep(users, Ids.USER, Names.ACCESS_CONTROL, resources.messages().tourAccessControlUsers(), Placement.RIGHT);
tour.addStep(roles, Ids.ROLE, Names.ACCESS_CONTROL, resources.messages().tourAccessControlRoles(), Placement.RIGHT);
}
}
use of org.jboss.hal.core.finder.FinderPath in project console by hal.
the class TourSetup method domainSteps.
private void domainSteps(Tour tour, PlaceRequest homepage, PlaceRequest deployments, PlaceRequest runtime, String profile, String serverGroup) {
// place requests for domain mode
PlaceRequest deploymentsContentRepository = places.finderPlace(NameTokens.DEPLOYMENTS, new FinderPath().append(Ids.DEPLOYMENT_BROWSE_BY, Ids.asId(resources.constants().contentRepository()))).build();
PlaceRequest profiles = places.finderPlace(NameTokens.CONFIGURATION, new FinderPath().append(Ids.CONFIGURATION, Ids.asId(Names.PROFILES))).build();
PlaceRequest serverGroups = places.finderPlace(NameTokens.RUNTIME, new FinderPath().append(Ids.DOMAIN_BROWSE_BY, Ids.asId(Names.SERVER_GROUPS))).build();
// steps for domain mode
tour.addStep(homepage, Ids.HOMEPAGE_DEPLOYMENTS_MODULE, Names.HOMEPAGE, resources.messages().tourDomainHomeDeployments(), Placement.RIGHT);
tour.addStep(homepage, Ids.HOMEPAGE_CONFIGURATION_MODULE, Names.HOMEPAGE, resources.messages().tourDomainHomeConfiguration(), Placement.LEFT);
tour.addStep(homepage, Ids.HOMEPAGE_RUNTIME_MODULE, Names.HOMEPAGE, resources.messages().tourDomainHomeRuntime(), Placement.RIGHT);
tour.addStep(deployments, Ids.DEPLOYMENT_BROWSE_BY, Names.DEPLOYMENT, resources.messages().tourDomainDeploymentsBrowseBy(), Placement.RIGHT);
tour.addStep(deploymentsContentRepository, Ids.CONTENT_ADD_ACTIONS, Names.DEPLOYMENT, resources.messages().tourDomainDeploymentsAddActions(), Placement.BOTTOM);
tour.addStep(profiles, Ids.PROFILE, Names.CONFIGURATION, resources.messages().tourDomainConfiguration(), Placement.RIGHT);
if (profile != null) {
PlaceRequest profileSubsystems = places.finderPlace(NameTokens.CONFIGURATION, new FinderPath().append(Ids.CONFIGURATION, Ids.asId(Names.PROFILES)).append(Ids.PROFILE, profile)).build();
tour.addStep(profileSubsystems, Ids.CONFIGURATION_SUBSYSTEM, Names.CONFIGURATION, resources.messages().tourDomainConfigurationSubsystem(), Placement.RIGHT);
}
tour.addStep(runtime, Ids.DOMAIN_BROWSE_BY, Names.RUNTIME, resources.messages().tourDomainRuntimeBrowseBy(), Placement.RIGHT);
tour.addStep(serverGroups, Ids.SERVER_GROUP, Names.RUNTIME, resources.messages().tourDomainRuntimeServerGroup(), Placement.RIGHT);
tour.addStep(serverGroups, Ids.SERVER_GROUP_ADD, Names.RUNTIME, resources.messages().tourDomainRuntimeServerGroupsAdd(), Placement.BOTTOM);
if (serverGroup != null) {
PlaceRequest firstServerGroup = places.finderPlace(NameTokens.RUNTIME, new FinderPath().append(Ids.DOMAIN_BROWSE_BY, Ids.asId(Names.SERVER_GROUPS)).append(Ids.SERVER_GROUP, Ids.serverGroup(serverGroup))).build();
tour.addStep(firstServerGroup, Ids.SERVER, Names.RUNTIME, resources.messages().tourDomainRuntimeServer(), Placement.RIGHT);
tour.addStep(firstServerGroup, Ids.SERVER_ADD, Names.RUNTIME, resources.messages().tourDomainRuntimeServerAdd(), Placement.BOTTOM);
}
}
use of org.jboss.hal.core.finder.FinderPath in project console by hal.
the class InterfacePreview method update.
@Override
public void update(final NamedNode item) {
Operation operation = new Operation.Builder(new ResourceAddress().add(SOCKET_BINDING_GROUP, "*"), QUERY).param(SELECT, new ModelNode().add(NAME)).param(WHERE, new ModelNode().set(DEFAULT_INTERFACE, item.getName())).build();
dispatcher.execute(operation, result -> {
List<String> socketBindingGroups = result.asList().stream().filter(modelNode -> !modelNode.isFailure()).map(modelNode -> failSafeGet(modelNode, RESULT + "/" + NAME)).filter(ModelNode::isDefined).map(ModelNode::asString).sorted().collect(toList());
if (!socketBindingGroups.isEmpty()) {
SafeHtmlBuilder html = new SafeHtmlBuilder();
for (Iterator<String> iterator = socketBindingGroups.iterator(); iterator.hasNext(); ) {
String sbg = iterator.next();
PlaceRequest sbgPlaceRequest = places.finderPlace(NameTokens.CONFIGURATION, new FinderPath().append(Ids.CONFIGURATION, Ids.asId(Names.SOCKET_BINDINGS)).append(Ids.SOCKET_BINDING_GROUP, sbg)).build();
String token = places.historyToken(sbgPlaceRequest);
html.appendHtmlConstant("<a href=\"").appendHtmlConstant(token).appendHtmlConstant("\">").appendEscaped(sbg).appendHtmlConstant("</a>");
if (iterator.hasNext()) {
html.appendEscaped(", ");
}
}
links.innerHTML = html.toSafeHtml().asString();
} else {
links.textContent = Names.NOT_AVAILABLE;
}
});
}
Aggregations