Exemplo n.º 1
0
 private void updateDistributionInTable(final DistributionSet editedDs) {
   final Item item =
       getContainerDataSource()
           .getItem(
               new DistributionSetIdName(
                   editedDs.getId(), editedDs.getName(), editedDs.getVersion()));
   updateEntity(editedDs, item);
 }
Exemplo n.º 2
0
 @Override
 protected void publishEntityAfterValueChange(final DistributionSet selectedLastEntity) {
   eventBus.publish(
       this, new DistributionTableEvent(BaseEntityEventType.SELECTED_ENTITY, selectedLastEntity));
   if (selectedLastEntity != null) {
     managementUIState.setLastSelectedDistribution(
         new DistributionSetIdName(
             selectedLastEntity.getId(),
             selectedLastEntity.getName(),
             selectedLastEntity.getVersion()));
   }
 }
Exemplo n.º 3
0
  private void styleDistributionTableOnPinning() {
    if (!managementUIState.getDistributionTableFilters().getPinnedTargetId().isPresent()) {
      return;
    }

    final Target targetObj =
        targetService.findTargetByControllerIDWithDetails(
            managementUIState.getDistributionTableFilters().getPinnedTargetId().get());

    if (targetObj != null) {
      final DistributionSet assignedDistribution = targetObj.getAssignedDistributionSet();
      final DistributionSet installedDistribution =
          targetObj.getTargetInfo().getInstalledDistributionSet();
      Long installedDistId = null;
      Long assignedDistId = null;
      if (null != installedDistribution) {
        installedDistId = installedDistribution.getId();
      }
      if (null != assignedDistribution) {
        assignedDistId = assignedDistribution.getId();
      }
      styleDistributionSetTable(installedDistId, assignedDistId);
    }
  }