SEBSERV-163 finished administration back and front-end
This commit is contained in:
		
							parent
							
								
									3670fee6c3
								
							
						
					
					
						commit
						cea166f065
					
				
					 13 changed files with 47 additions and 34 deletions
				
			
		|  | @ -63,7 +63,9 @@ public class APIMessage implements Serializable { | |||
|         EXAM_IMPORT_ERROR_AUTO_SETUP("1600", HttpStatus.PARTIAL_CONTENT, | ||||
|                 "Exam successfully imported but some additional initialization failed"), | ||||
|         EXAM_IMPORT_ERROR_AUTO_INDICATOR("1601", HttpStatus.PARTIAL_CONTENT, | ||||
|                 "Failed to automatically create pre-defined indicators for the exam"), | ||||
|                 "Failed to automatically create pre-defined indicator(s) for the exam"), | ||||
|         EXAM_IMPORT_ERROR_AUTO_CLIENT_GROUPS("1604", HttpStatus.PARTIAL_CONTENT, | ||||
|                 "Failed to automatically create pre-defined client group(s) for the exam"), | ||||
|         EXAM_IMPORT_ERROR_AUTO_ATTRIBUTES("1602", HttpStatus.PARTIAL_CONTENT, | ||||
|                 "Failed to automatically create pre-defined attributes for the exam"), | ||||
|         EXAM_IMPORT_ERROR_AUTO_RESTRICTION("1603", HttpStatus.PARTIAL_CONTENT, | ||||
|  |  | |||
|  | @ -116,8 +116,6 @@ public class WebserviceInit implements ApplicationListener<ApplicationReadyEvent | |||
|         if (this.webserviceInfo.isDistributed()) { | ||||
|             SEBServerInit.INIT_LOGGER.info("----> "); | ||||
|             SEBServerInit.INIT_LOGGER.info("----> Distributed Setup: {}", this.webserviceInfo.getWebserviceUUID()); | ||||
|             SEBServerInit.INIT_LOGGER.info("----> Ping update time: {}", | ||||
|                     this.environment.getProperty("sebserver.webservice.distributed.pingUpdate")); | ||||
|             SEBServerInit.INIT_LOGGER.info("----> Connection update time: {}", | ||||
|                     this.environment.getProperty("sebserver.webservice.distributed.connectionUpdate", "2000")); | ||||
|         } | ||||
|  |  | |||
|  | @ -15,8 +15,6 @@ import java.util.Set; | |||
| import java.util.function.Function; | ||||
| import java.util.stream.Collectors; | ||||
| 
 | ||||
| import org.springframework.transaction.annotation.Transactional; | ||||
| 
 | ||||
| import ch.ethz.seb.sebserver.gbl.api.EntityType; | ||||
| import ch.ethz.seb.sebserver.gbl.model.Entity; | ||||
| import ch.ethz.seb.sebserver.gbl.model.EntityDependency; | ||||
|  | @ -52,7 +50,6 @@ public interface BulkActionSupportDAO<T extends Entity> { | |||
|      * | ||||
|      * @param bulkAction the BulkAction containing the source entity and all dependencies | ||||
|      * @return a Collection of EntityKey results of each Entity that has been processed. */ | ||||
|     @Transactional | ||||
|     default Collection<Result<EntityKey>> processBulkAction(final BulkAction bulkAction) { | ||||
|         final Set<EntityKey> all = bulkAction.extractKeys(entityType()); | ||||
| 
 | ||||
|  |  | |||
|  | @ -96,7 +96,6 @@ public class BulkActionServiceImpl implements BulkActionService { | |||
|     } | ||||
| 
 | ||||
|     @Override | ||||
| 
 | ||||
|     public Result<BulkAction> doBulkAction(final BulkAction action) { | ||||
|         return Result.tryCatch(() -> { | ||||
| 
 | ||||
|  |  | |||
|  | @ -322,7 +322,7 @@ public class UserActivityLogDAOImpl implements UserActivityLogDAO { | |||
|                 activityType.name(), | ||||
|                 entityType.name(), | ||||
|                 entityId, | ||||
|                 message)); | ||||
|                 Utils.truncateText(message, 4000))); | ||||
|     } | ||||
| 
 | ||||
|     @Override | ||||
|  |  | |||
|  | @ -384,7 +384,7 @@ public class ExamTemplateServiceImpl implements ExamTemplateService { | |||
|             } | ||||
| 
 | ||||
|             if (log.isDebugEnabled()) { | ||||
|                 log.debug("Init default indicator for exam: {}", exam.externalId); | ||||
|                 log.debug("Initialized default indicator for exam: {}", exam.externalId); | ||||
|             } | ||||
| 
 | ||||
|             final Collection<Indicator.Threshold> thresholds = this.jsonMapper.readValue( | ||||
|  |  | |||
|  | @ -115,7 +115,10 @@ public class MockCourseAccessAPI implements CourseAccessAPI { | |||
| 
 | ||||
|     @Override | ||||
|     public LmsSetupTestResult testCourseAccessAPI() { | ||||
|         log.info("Test Lms Binding for Mockup and LmsSetup: {}", this.apiTemplateDataSupplier.getLmsSetup()); | ||||
| 
 | ||||
|         if (log.isDebugEnabled()) { | ||||
|             log.debug("Test Lms Binding for Mockup and LmsSetup: {}", this.apiTemplateDataSupplier.getLmsSetup()); | ||||
|         } | ||||
| 
 | ||||
|         final List<APIMessage> missingAttrs = checkAttributes(); | ||||
| 
 | ||||
|  |  | |||
|  | @ -139,9 +139,10 @@ public class ExamSessionCacheService { | |||
|             key = "#connectionToken", | ||||
|             unless = "#result == null") | ||||
|     public ClientConnectionDataInternal getClientConnection(final String connectionToken) { | ||||
| 
 | ||||
|         try { | ||||
|             if (log.isTraceEnabled()) { | ||||
|             log.trace("Verify ClientConnection for running exam for caching by connectionToken: {}", connectionToken); | ||||
|                 log.trace("Verify ClientConnection for running exam for caching by connectionToken: {}", | ||||
|                         connectionToken); | ||||
|             } | ||||
| 
 | ||||
|             final ClientConnection clientConnection = getClientConnectionByToken(connectionToken); | ||||
|  | @ -150,6 +151,10 @@ public class ExamSessionCacheService { | |||
|             } else { | ||||
|                 return this.internalClientConnectionDataFactory.createClientConnectionData(clientConnection); | ||||
|             } | ||||
|         } catch (final Exception e) { | ||||
|             log.error("Failed to get client connection: ", e); | ||||
|             return null; | ||||
|         } | ||||
|     } | ||||
| 
 | ||||
|     @CacheEvict( | ||||
|  |  | |||
|  | @ -38,8 +38,8 @@ import ch.ethz.seb.sebserver.gbl.model.exam.Exam; | |||
| import ch.ethz.seb.sebserver.gbl.model.exam.Exam.ExamStatus; | ||||
| import ch.ethz.seb.sebserver.gbl.model.session.ClientConnection; | ||||
| import ch.ethz.seb.sebserver.gbl.model.session.ClientConnection.ConnectionStatus; | ||||
| import ch.ethz.seb.sebserver.gbl.monitoring.MonitoringSEBConnectionData; | ||||
| import ch.ethz.seb.sebserver.gbl.model.session.ClientConnectionData; | ||||
| import ch.ethz.seb.sebserver.gbl.monitoring.MonitoringSEBConnectionData; | ||||
| import ch.ethz.seb.sebserver.gbl.profile.WebServiceProfile; | ||||
| import ch.ethz.seb.sebserver.gbl.util.Result; | ||||
| import ch.ethz.seb.sebserver.webservice.servicelayer.dao.ClientConnectionDAO; | ||||
|  | @ -408,11 +408,12 @@ public class ExamSessionServiceImpl implements ExamSessionService { | |||
| 
 | ||||
|             updateClientConnections(examId); | ||||
| 
 | ||||
|             synchronized (this.examSessionCacheService) { | ||||
|                 final List<ClientConnectionData> filteredConnections = this.clientConnectionDAO | ||||
|                         .getConnectionTokens(examId) | ||||
|                         .getOrThrow() | ||||
|                         .stream() | ||||
|                     .map(token -> getConnectionData(token).getOr(null)) | ||||
|                         .map(token -> this.examSessionCacheService.getClientConnection(token)) | ||||
|                         .filter(Objects::nonNull) | ||||
|                         .map(c -> { | ||||
|                             statusMapping[c.clientConnection.status.code]++; | ||||
|  | @ -422,6 +423,7 @@ public class ExamSessionServiceImpl implements ExamSessionService { | |||
|                         .collect(Collectors.toList()); | ||||
| 
 | ||||
|                 return new MonitoringSEBConnectionData(examId, filteredConnections, statusMapping); | ||||
|             } | ||||
|         }); | ||||
|     } | ||||
| 
 | ||||
|  |  | |||
|  | @ -109,6 +109,8 @@ public class DistributedIndicatorValueService implements DisposableBean { | |||
| 
 | ||||
|             SEBServerInit.INIT_LOGGER.info("------> with distributedUpdateInterval: {}", | ||||
|                     this.distributedUpdateInterval); | ||||
|             SEBServerInit.INIT_LOGGER.info("------> with update tolerance: {}", | ||||
|                     this.updateTolerance); | ||||
|             SEBServerInit.INIT_LOGGER.info("------> with taskScheduler: {}", taskScheduler); | ||||
| 
 | ||||
|             try { | ||||
|  |  | |||
|  | @ -393,6 +393,11 @@ public class ExamAdministrationController extends EntityController<Exam, Exam> { | |||
|                     errors.add(ErrorMessage.EXAM_IMPORT_ERROR_AUTO_INDICATOR.of(error)); | ||||
|                     return entity; | ||||
|                 }) | ||||
|                 .flatMap(this.examTemplateService::addDefinedClientGroups) | ||||
|                 .onErrorDo(error -> { | ||||
|                     errors.add(ErrorMessage.EXAM_IMPORT_ERROR_AUTO_CLIENT_GROUPS.of(error)); | ||||
|                     return entity; | ||||
|                 }) | ||||
|                 .flatMap(this.examTemplateService::initAdditionalAttributes) | ||||
|                 .onErrorDo(error -> { | ||||
|                     errors.add(ErrorMessage.EXAM_IMPORT_ERROR_AUTO_ATTRIBUTES.of(error)); | ||||
|  |  | |||
|  | @ -675,8 +675,8 @@ sebserver.exam.indicator.type.description.WLAN_STATUS=This indicator shows the p | |||
| sebserver.exam.clientgroup.type.IP_V4_RANGE=IP v4 Range | ||||
| sebserver.exam.clientgroup.type.CLIENT_OS=SEB Client OS | ||||
| sebserver.exam.clientgroup.type.description.NONE=No Client Group type is selected.<br/>Please select one. | ||||
| sebserver.exam.clientgroup.type.description.IP_V4_RANGE=IP v4 Range TODO | ||||
| sebserver.exam.clientgroup.type.description.CLIENT_OS=SEB Client OS TODO | ||||
| sebserver.exam.clientgroup.type.description.IP_V4_RANGE=With IP v4 range groups you can group the SEB client connections within a IP ranges.<br/>Every SEB client that is connected with a given client IP address that is within the<br/>defined range (including start and end address) belongs to this group.<br/>This is mostly useful if you have dedicated managed devices where you know<br/>the IP ranges for e.g. your computer rooms. | ||||
| sebserver.exam.clientgroup.type.description.CLIENT_OS=With SEB Client groups you can group the SEB client connections within the<br/>operating system they are running on.<br/>For this grouping type there is a defined SEB OS type for each<br/>supported OS; Windows, MacOS and iOS.<br/>This is mostly useful if you want to monitor and manage<br/>the SEB clients by different operating system types to give respective support. | ||||
| 
 | ||||
| sebserver.exam.indicator.info.pleaseSelect=At first please select an indicator from the list | ||||
| 
 | ||||
|  |  | |||
										
											Binary file not shown.
										
									
								
							| Before Width: | Height: | Size: 224 B After Width: | Height: | Size: 177 B | 
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 anhefti
						anhefti