use of com.hack23.cia.model.internal.application.data.impl.DataAgentTarget in project cia by Hack23.
the class StartAgentClickListener method buttonClick.
@Override
public void buttonClick(final ClickEvent event) {
final DataAgentWorkOrder dataAgentWorkOrder = new DataAgentWorkOrder();
dataAgentWorkOrder.setTarget(dataAgentTarget);
dataAgentWorkOrder.setOperation(dataAgentOperation);
LOGGER.info(LOG_MSG_EXECUTE_WORKORDER, dataAgentWorkOrder);
ApplicationMangerAccess.getApplicationManager().getAgentContainer().execute(dataAgentWorkOrder);
}
use of com.hack23.cia.model.internal.application.data.impl.DataAgentTarget in project cia by Hack23.
the class AgentOperationsOverviewPageModContentFactoryImpl method createContent.
@Secured({ "ROLE_ADMIN" })
@Override
public Layout createContent(final String parameters, final MenuBar menuBar, final Panel panel) {
final VerticalLayout content = createPanelContent();
getMenuItemFactory().createMainPageMenuBar(menuBar);
LabelFactory.createHeader2Label(content, ADMIN_AGENT_OPERATION);
final VerticalLayout overviewLayout = new VerticalLayout();
overviewLayout.setSizeFull();
content.addComponent(overviewLayout);
content.setExpandRatio(overviewLayout, ContentRatio.LARGE);
final ResponsiveRow grid = createGridLayout(overviewLayout);
for (final DataAgentTarget dataAgentTarget : DataAgentTarget.values()) {
final Button importDataButton = new Button(MessageFormat.format(BUTTON_PATTERN, DataAgentOperation.IMPORT, dataAgentTarget), VaadinIcons.BULLSEYE);
importDataButton.addClickListener(new StartAgentClickListener(dataAgentTarget, DataAgentOperation.IMPORT));
importDataButton.setId(MessageFormat.format(BUTTON_ID_PATTERN, ViewAction.START_AGENT_BUTTON, DataAgentOperation.IMPORT, dataAgentTarget));
createRowItem(grid, importDataButton, WILL_FETCH_DATA_FROM_SOURCE);
}
final String pageId = getPageId(parameters);
getPageActionEventHelper().createPageEvent(ViewAction.VISIT_ADMIN_AGENT_OPERATION_VIEW, ApplicationEventGroup.ADMIN, NAME, null, pageId);
return content;
}
Aggregations