Skip to content

Commit

Permalink
Fix Log button status when hiding Install dialog
Browse files Browse the repository at this point in the history
Signed-off-by: Claudio Mezzasalma <claudio.mezzasalma@eurotech.com>
  • Loading branch information
Claudio Mezzasalma authored and Coduz committed Aug 26, 2020
1 parent 5eca745 commit 3450f1c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -284,19 +284,17 @@ private void openInstallDialog() {
@Override
public void handleEvent(BaseEvent be) {
toolBar.enable();

logButton.setEnabled(historyPackageTab.getGrid().getSelectionModel().getSelectedItem() != null);
Boolean exitStatus = packageInstallDialog.getExitStatus();
if (exitStatus == null) { // Operation Aborted
if (installedPackageTab.getTreeGrid() != null) {
installedPackageTab.getTreeGrid().getSelectionModel().fireEvent(Events.SelectionChange,
new SelectionChangedEvent<ModelData>(installedPackageTab.getTreeGrid().getSelectionModel(),
installedPackageTab.getTreeGrid().getSelectionModel().getSelectedItems()));
}
return;
} else {

String exitMessage = packageInstallDialog.getExitMessage();
ConsoleInfo.display(exitStatus == true ? CMSGS.information() : CMSGS.error(), exitMessage);
ConsoleInfo.display(exitStatus ? CMSGS.information() : CMSGS.error(), exitMessage);

uninstallButton.disable();
deviceTabs.setSelectedEntity(selectedEntity);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,12 @@ public class DeviceTabPackagesHistory extends KapuaTabItem<GwtDevice> {
private boolean initialized;

private Grid<GwtDeviceManagementOperation> grid;

private KapuaPagingToolBar pagingToolBar;
private BasePagingLoader<PagingLoadResult<GwtDeviceManagementOperation>> loader;
private DeviceTabPackages deviceTabPackages;
private boolean contentDirty = true;
private boolean loadingInProgress;

protected boolean refreshProcess;

public DeviceTabPackagesHistory(GwtSession currentSession, DeviceTabPackages deviceTabPackages) {
Expand Down Expand Up @@ -282,6 +282,10 @@ public void selectionChanged(SelectionChangedEvent<GwtDeviceManagementOperation>
initialized = true;
}

public Grid<GwtDeviceManagementOperation> getGrid() {
return grid;
}

// --------------------------------------------------------------------------------------
//
// Device Operation List Management
Expand Down

0 comments on commit 3450f1c

Please sign in to comment.