From fbbd2c43ff68b6ec88077ebd85c4a2ab54c14b9d Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Tue, 22 Feb 2022 18:14:21 -0800 Subject: [PATCH] Fix marging on view --- .../com/wisemapping/rest/AdminController.java | 60 ------------------- .../src/main/resources/messages_en.properties | 10 ++-- wise-webapp/src/main/webapp/css/viewonly.css | 4 ++ 3 files changed, 9 insertions(+), 65 deletions(-) diff --git a/wise-webapp/src/main/java/com/wisemapping/rest/AdminController.java b/wise-webapp/src/main/java/com/wisemapping/rest/AdminController.java index 73e8d4a5..e1b3c1d5 100644 --- a/wise-webapp/src/main/java/com/wisemapping/rest/AdminController.java +++ b/wise-webapp/src/main/java/com/wisemapping/rest/AdminController.java @@ -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 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(); diff --git a/wise-webapp/src/main/resources/messages_en.properties b/wise-webapp/src/main/resources/messages_en.properties index a5d746c3..84a86240 100644 --- a/wise-webapp/src/main/resources/messages_en.properties +++ b/wise-webapp/src/main/resources/messages_en.properties @@ -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. diff --git a/wise-webapp/src/main/webapp/css/viewonly.css b/wise-webapp/src/main/webapp/css/viewonly.css index cc39be01..bf5f9dd5 100644 --- a/wise-webapp/src/main/webapp/css/viewonly.css +++ b/wise-webapp/src/main/webapp/css/viewonly.css @@ -2,6 +2,10 @@ /* Header & Toolbar Styles */ /********************************************************************************/ @import "../bootstrap/css/bootstrap.min.css"; +body { + margin: 0; + font-family:Arial; +} div#mindplot { position: relative;