code cleanup
This commit is contained in:
parent
fb8df62f59
commit
9ad13ffe3f
2 changed files with 6 additions and 6 deletions
|
@ -202,7 +202,7 @@ public class MonitoringProctoringService {
|
||||||
final EntityKey entityKey = pageContext.getEntityKey();
|
final EntityKey entityKey = pageContext.getEntityKey();
|
||||||
final I18nSupport i18nSupport = this.pageService.getI18nSupport();
|
final I18nSupport i18nSupport = this.pageService.getI18nSupport();
|
||||||
|
|
||||||
final TreeItem screeProctoringGroupAction = proctoringGUIService.getScreeProcotringGroupAction(group);
|
final TreeItem screeProctoringGroupAction = proctoringGUIService.getScreeProctoringGroupAction(group);
|
||||||
if (screeProctoringGroupAction != null) {
|
if (screeProctoringGroupAction != null) {
|
||||||
// update action
|
// update action
|
||||||
screeProctoringGroupAction.setText(i18nSupport.getText(new LocTextKey(
|
screeProctoringGroupAction.setText(i18nSupport.getText(new LocTextKey(
|
||||||
|
@ -224,7 +224,7 @@ public class MonitoringProctoringService {
|
||||||
group.size)
|
group.size)
|
||||||
.noEventPropagation()
|
.noEventPropagation()
|
||||||
.create(),
|
.create(),
|
||||||
_treeItem -> proctoringGUIService.registerScreeProcotringGroupAction(group, _treeItem));
|
_treeItem -> proctoringGUIService.registerScreeProctoringGroupAction(group, _treeItem));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -355,7 +355,7 @@ public class MonitoringProctoringService {
|
||||||
|
|
||||||
// Open SPS Gui redirect URL with login token (jwt token) in new browser tab
|
// Open SPS Gui redirect URL with login token (jwt token) in new browser tab
|
||||||
final String redirectLocation = redirect.getBody() + "/jwt?token=" + tokenRequest.getBody();
|
final String redirectLocation = redirect.getBody() + "/jwt?token=" + tokenRequest.getBody();
|
||||||
final String script = "window.open("+ redirectLocation + ", 'seb_screen_proctoring')";
|
// final String script = "var win = window.open('', 'seb_screen_proctoring'); win.location.href = '"+ redirectLocation + "';";
|
||||||
final UrlLauncher launcher = RWT.getClient().getService(UrlLauncher.class);
|
final UrlLauncher launcher = RWT.getClient().getService(UrlLauncher.class);
|
||||||
launcher.openURL(redirectLocation);
|
launcher.openURL(redirectLocation);
|
||||||
// RWT.getClient()
|
// RWT.getClient()
|
||||||
|
|
|
@ -57,14 +57,14 @@ public class ProctoringGUIService {
|
||||||
this.screenProctoringGroupState = new HashMap<>();
|
this.screenProctoringGroupState = new HashMap<>();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void registerScreeProcotringGroupAction(
|
public void registerScreeProctoringGroupAction(
|
||||||
final ScreenProctoringGroup screenProctoringGroup,
|
final ScreenProctoringGroup screenProctoringGroup,
|
||||||
final TreeItem actionItem) {
|
final TreeItem actionItem) {
|
||||||
|
|
||||||
this.screenProctoringGroupState.put(screenProctoringGroup.uuid, actionItem);
|
this.screenProctoringGroupState.put(screenProctoringGroup.uuid, actionItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
public TreeItem getScreeProcotringGroupAction(final ScreenProctoringGroup screenProctoringGroup) {
|
public TreeItem getScreeProctoringGroupAction(final ScreenProctoringGroup screenProctoringGroup) {
|
||||||
return this.screenProctoringGroupState.get(screenProctoringGroup.uuid);
|
return this.screenProctoringGroupState.get(screenProctoringGroup.uuid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -119,7 +119,7 @@ public class ProctoringGUIService {
|
||||||
final Pair<RemoteProctoringRoom, TreeItem> pair = this.collectingRoomsActionState.get(roomName);
|
final Pair<RemoteProctoringRoom, TreeItem> pair = this.collectingRoomsActionState.get(roomName);
|
||||||
return pair.a.roomSize > 0 /* && !pair.a.isOpen SEBSERV-236 */;
|
return pair.a.roomSize > 0 /* && !pair.a.isOpen SEBSERV-236 */;
|
||||||
} catch (final Exception e) {
|
} catch (final Exception e) {
|
||||||
log.error("Failed to get actual collecting room size for room: {} cause: ", roomName, e.getMessage());
|
log.error("Failed to get actual collecting room size for room: {} cause: {}", roomName, e.getMessage());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue