Remove unused notification methods in ParticleController and adjust size slider minimum value in particle component.

This commit is contained in:
akastijn 2026-02-07 23:39:41 +01:00
parent 44d4cc1f05
commit 0e4ce21c58
2 changed files with 3 additions and 33 deletions

View File

@ -95,9 +95,7 @@ public class ParticleController implements ParticlesApi {
log.error("Particles file path {} is not a directory, not saving particles file", particlesFilePath); log.error("Particles file path {} is not a directory, not saving particles file", particlesFilePath);
return ResponseEntity.status(404).build(); return ResponseEntity.status(404).build();
} }
ResponseEntity<Void> voidResponseEntity = writeContentToFile(file, filename, content); return writeContentToFile(file, filename, content);
// notifyServerOfFileUpload(filename);
return voidResponseEntity;
} }
@Override @Override
@ -115,37 +113,9 @@ public class ParticleController implements ParticlesApi {
} }
} }
ResponseEntity<Void> voidResponseEntity = writeContentToFile(file, filename, content); return writeContentToFile(file, filename, content);
// notifyServerOfFileUpload(uuid, filename);
return voidResponseEntity;
} }
// private void notifyServerOfFileUpload(String filename) {
// String notificationUrl = String.format("http://%s/notify/%s.json", notificationServerUrl, filename);
// sendNotification(notificationUrl, String.format("file upload: %s", filename));
// }
//
// private void notifyServerOfFileUpload(String uuid, String filename) {
// String notificationUrl = String.format("%s/notify/%s/%s.json", notificationServerUrl, uuid, filename);
// sendNotification(notificationUrl, String.format("file upload for user %s: %s", uuid, filename));
// }
//
// private void sendNotification(String notificationUrl, String logDescription) {
// try {
// RestTemplate restTemplate = new RestTemplate();
// ResponseEntity<String> response = restTemplate.getForEntity(notificationUrl, String.class);
//
// if (response.getStatusCode().is2xxSuccessful()) {
// log.info("Successfully notified server of {}", logDescription);
// } else {
// log.warn("Failed to notify server of {}, status: {}",
// logDescription, response.getStatusCode());
// }
// } catch (Exception e) {
// log.error("Error notifying server of {}", logDescription, e);
// }
// }
private ResponseEntity<Void> writeContentToFile(File dir, String filename, MultipartFile content) { private ResponseEntity<Void> writeContentToFile(File dir, String filename, MultipartFile content) {
filename += ".json"; filename += ".json";

View File

@ -28,7 +28,7 @@
</div> </div>
<div class="size-slider"> <div class="size-slider">
<mat-slider min="0.1" max="4" step="0.1" class="full-width"> <mat-slider min="0.5" max="4" step="0.1" class="full-width">
<input matSliderThumb [(ngModel)]="selectedSize"> <input matSliderThumb [(ngModel)]="selectedSize">
</mat-slider> </mat-slider>
<span>Size: {{ selectedSize }}</span> <span>Size: {{ selectedSize }}</span>