Fix marging on view

This commit is contained in:
Paulo Gustavo Veiga 2022-02-22 18:14:21 -08:00
parent c3f93fdf4a
commit fbbd2c43ff
3 changed files with 9 additions and 65 deletions

View File

@ -139,66 +139,6 @@ public class AdminController extends BaseController {
userService.removeUser(user);
}
@ResponseStatus(value = HttpStatus.NO_CONTENT)
@RequestMapping(method = RequestMethod.GET, value = "admin/database/purge")
public void purgeDB(@RequestParam(required = true) Integer minUid, @RequestParam(required = true) Integer maxUid, @RequestParam(required = true) Boolean apply) throws WiseMappingException, UnsupportedEncodingException {
for (int i = minUid; i < maxUid; i++) {
try {
System.out.println("Looking for user:" + i);
final User user = userService.getUserBy(i);
if (user != null) {
// Do not process admin accounts ...
if (user.getEmail().contains("wisemapping")) {
continue;
}
// Iterate over the list of maps ...
final List<Collaboration> collaborations = mindmapService.findCollaborations(user);
for (Collaboration collaboration : collaborations) {
final Mindmap mindmap = collaboration.getMindMap();
if (MindmapFilter.MY_MAPS.accept(mindmap, user)) {
final Calendar yearAgo = Calendar.getInstance();
yearAgo.add(Calendar.MONTH, -4);
// The use has only two maps... When they have been modified ..
System.out.println("Checking map id:" + mindmap.getId());
if (mindmap.getLastModificationTime().before(yearAgo) && !mindmap.isPublic()) {
System.out.println("Old map months map:" + mindmap.getId());
if (isWelcomeMap(mindmap) || isSimpleMap(mindmap)) {
System.out.println("Purged map id:" + mindmap.getId() + ", userId:" + user.getId());
if (apply) {
mindmapService.removeMindmap(mindmap, user);
}
}
}
// Purge history ...
mindmapService.purgeHistory(mindmap.getId());
}
}
}
} catch (UnsupportedEncodingException e) {
e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
} catch (WiseMappingException e) {
e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
} catch (RuntimeException e) {
e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
} catch (IOException e) {
e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
}
}
}
@ResponseStatus(value = HttpStatus.NO_CONTENT)
@RequestMapping(method = RequestMethod.GET, value = "admin/database/purge/history")
public void purgeHistory(@RequestParam(required = true) Integer mapId) throws WiseMappingException, IOException {
mindmapService.purgeHistory(mapId);
}
private boolean isWelcomeMap(@NotNull Mindmap mindmap) throws UnsupportedEncodingException {
// Is welcome map ?
final String xmlStr = mindmap.getXmlStr();

View File

@ -41,18 +41,18 @@ CAPTCHA_LOADING_ERROR = ReCaptcha could not be loaded. You must have access to G
ACCESS_HAS_BEEN_REVOKED = Your access permissions to this map has been revoked. Contact map owner.
MAP_CAN_NOT_BE_FOUND = The map can not be found. It must have been deleted.
LABEL_CAN_NOT_BE_FOUND = The label can not be found. It must have been deleted.
MINDMAP_TIMESTAMP_OUTDATED = It''s not possible to save your changes because your mindmap has been modified by ''{0}''. Refresh the page and try again.
MINDMAP_TIMESTAMP_OUTDATED = It's not possible to save your changes because your mindmap has been modified by ''{0}''. Refresh the page and try again.
MINDMAP_OUTDATED_BY_YOU = It's not possible to save your changes because map is out of date. Do you have multiple tabs opened ?. Refresh the page and try again.
MINDMAP_LOCKED = Map is being edited by {0} <{1}>. Map is opened in read only mode.
MINDMAP_IS_LOCKED = Mindmap is locked for edition.
MINDMAP_IS_LOCKED = Min map is locked for edition.
# Confirmed
RESET_PASSWORD_INVALID_EMAIL = The email provided is not a valid user account. Please, try again with a valid email.
TRY_WELCOME = This edition space showcases some of the mindmap editor capabilities \!.
UNEXPECTED_ERROR_DETAILS = Unexpected error processing request.
NO_ENOUGH_PERMISSIONS=This mind map can opened.
NO_ENOUGH_PERMISSIONS=This mind map can opened.
NO_ENOUGH_PERMISSIONS_DETAILS=You do not have enough right access to see this map. This map has been changed to private or deleted.
CAPTCHA_TIMEOUT_OUT_DUPLICATE=Please, refresh the page and try again.
CAPTCHA_INVALID_INPUT_RESPONSE="Invalid input response, refresh the page and try again.
MINDMAP_EMPTY_ERROR=Midnmap can not be empty.
INVALID_MINDMAP_FORMAT=Mindmap format is not valid format.
MINDMAP_EMPTY_ERROR=Mind map can not be empty.
INVALID_MINDMAP_FORMAT=Invalid mind map format.
TOO_BIG_MINDMAP=You have reached the limit of 500 topics in a mindmap.

View File

@ -2,6 +2,10 @@
/* Header & Toolbar Styles */
/********************************************************************************/
@import "../bootstrap/css/bootstrap.min.css";
body {
margin: 0;
font-family:Arial;
}
div#mindplot {
position: relative;