in src/main/java/org/apache/openwhisk/intellij/explorer/editor/ActivationViewEditor.java [56:98]
public ActivationViewEditor(Project project,
List<WhiskEndpoint> endpoints,
Optional<WhiskAuth> whiskAuth,
Optional<WhiskActionMetaData> action,
Optional<WhiskTriggerMetaData> trigger) {
activationViewEditorForm = new ActivationViewEditorForm(project, endpoints);
activationViewEditorForm.cacheWhiskAuth(whiskAuth);
/**
* Initialize ComboBox values
*/
List<WhiskNamespace> namespaces = endpoints.stream().flatMap(ep -> ep.getNamespaces().stream()).collect(Collectors.toList());
activationViewEditorForm.initializeNamespaceJComboBox(namespaces);
whiskAuth.ifPresent(auth ->
getEntity(action, trigger).ifPresent(entity -> {
/**
* Load Activations
*
* Note: Activations of binding package action cannot be loaded.
* TODO load activations of binding action after the follow upstream pr is merged: https://github.com/apache/openwhisk/pull/4919
*/
try {
List<WhiskActivationMetaData> activations =
whiskActivationService.getWhiskActivations(auth, entity.toEntityName(), 100, 0); // TODO pagination
activationViewEditorForm.initializeActivationTable(activations);
} catch (IOException e) {
LOG.error(e);
}
/**
* Set value to namespace combobox
*/
WhiskUtils.findWhiskNamespace(endpoints, auth.getAuth())
.ifPresent(namespace -> activationViewEditorForm.setNamespaceJComboBox(namespace));
/**
* Set value to action or trigger combobox
*/
activationViewEditorForm.setActionOrTriggerJComboBox(entity);
}));
}