Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor3 #1121

Merged
merged 42 commits into from
Jul 27, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
53f2600
Add Spring boot support
Mar 29, 2021
ecf327c
Merging Code in Springboot
Jul 14, 2021
6c02bb7
Correction of some tests
Jul 14, 2021
27ac2f3
Delete /SecurityUtilsTest.java
Janite Jul 14, 2021
b9eeca4
add enableEtl flag in application.yml
Janite Jul 14, 2021
1aca9c5
fix: renamed the module with correct name in build file
mayankgituni Jul 14, 2021
b0a340b
null pointer issue fix
justinapromore Jul 14, 2021
d1e915c
Minor chnages in integration test
Jul 15, 2021
32c3bbf
Fix pd
Jul 16, 2021
033725c
Minor fix
Jul 16, 2021
ab372b7
Added Keycloak support
Jul 20, 2021
d493697
Added login controller
Jul 20, 2021
8a12001
AP-2529 Refactor CSV Exporter to reduce memory footprint (#1107)
franklma Jul 20, 2021
3cef495
Minor bug fix
Jul 20, 2021
c79edc7
Merge branch 'refactor3' of github.com:apromore/ApromoreCore into ref…
Jul 20, 2021
8173ca0
Minor path change in js
Jul 20, 2021
c81d877
minor chnages to log dir in application
Jul 20, 2021
16410c0
fix: the css and impala error
mayanktomar20 Jul 21, 2021
2e8a2f7
fix: session issues
mayanktomar20 Jul 21, 2021
6d9f6eb
Minor fix in css and security
Jul 22, 2021
d158cca
Merge branch 'refactor3' of github.com:apromore/ApromoreCore into ref…
Jul 22, 2021
cdda924
Appl yaml
Jul 22, 2021
3ba1b6c
Changes in spring security
Jul 22, 2021
162980c
fix: links in UserAdminController and username error message for crea…
Janite Jul 23, 2021
d994fdd
Merge pull request #1113 from apromore/bugfix/AP-4245/Fix-create-user…
nolantellis Jul 23, 2021
7ab6bb5
AP-4284 Save BPMN Model on Process Discoverer is returning error (#1111)
franklma Jul 23, 2021
c7e58ca
Bugfix/AP-4292/select all select none labels switched (#1114)
Janite Jul 23, 2021
81b1cf2
Change properties
Jul 23, 2021
6ccf8a8
Merge branch 'refactor3' of github.com:apromore/ApromoreCore into ref…
Jul 23, 2021
6f4d3f9
Added docker-compose
Jul 23, 2021
bb29354
AP-3702 ordering of bpmn file
justinapromore Jul 23, 2021
c0dd222
fix etl menu item order and add a seperator before etl in menu
Janite Jul 26, 2021
7b4459a
Merge pull request #1117 from apromore/AP-4320/fix-etl-menu-item-order
nolantellis Jul 26, 2021
3199180
Added global handling
Jul 26, 2021
2a7c2bf
Merge branch 'refactor3' of github.com:apromore/ApromoreCore into ref…
Jul 26, 2021
9583d49
AP-4247 Hide buttons in PD according to user's access type to Log
Jul 26, 2021
cbd46f6
Merge dash changes from dev branch
Jul 26, 2021
7a9ddd8
Merge branch 'AP-4247-springboot' into refactor3
Jul 27, 2021
a8b423a
Comment secure flag for http
Jul 27, 2021
b4565a8
Merge branch 'refactor3' of github.com:apromore/ApromoreCore into ref…
Jul 27, 2021
caed31a
Fix minnnor bugs
Jul 27, 2021
dfe1bed
Merge development branch
Jul 27, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix pd
  • Loading branch information
Nolan Tellis committed Jul 16, 2021
commit 32c3bbf61716a05a0d4e59d127af95216bd49223
8 changes: 4 additions & 4 deletions Apromore-Boot/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,8 @@ site:
spring:
datasource:
password: Apromore#!dev
url: jdbc:h2:mem:Manager-Repository;DATABASE_TO_UPPER=FALSE;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE
# url : jdbc:mysql://localhost:3306/apromore?createDatabaseIfNotExist=true&autoReconnect=true&allowMultiQueries=true&rewriteBatchedStatements=true&characterEncoding=utf-8&serverTimezone=GMT%2B10
# url: jdbc:h2:mem:Manager-Repository;DATABASE_TO_UPPER=FALSE;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE
url : jdbc:mysql://localhost:3306/apromore?createDatabaseIfNotExist=true&autoReconnect=true&allowMultiQueries=true&rewriteBatchedStatements=true&characterEncoding=utf-8&serverTimezone=GMT%2B10
username: apromore
jpa:
hibernate:
Expand All @@ -149,9 +149,9 @@ spring:
physical-strategy: org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
liquibase:
change-log: classpath:db/migration/changeLog.yaml
contexts: H2
contexts: MYSQL
password: Apromore#!dev
user: apromore
user: liquibase_user


storage:
Expand Down
3 changes: 3 additions & 0 deletions Apromore-Boot/src/main/resources/i18n.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
i18n.enable = false
i18n.languagetags = en|ja
i18n.datetimepatterns = dd MMM yy, HH:mm|yyyy年MM月dd日, HH:mm
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

package org.apromore.commons.config;

import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.boot.context.properties.ConfigurationProperties;
import lombok.AllArgsConstructor;
import lombok.Data;
Expand All @@ -33,6 +34,7 @@
@NoArgsConstructor
@AllArgsConstructor
@ConfigurationProperties
@Qualifier("configBean")
public class ConfigBean {
private String logsDir = "../Event-Logs-Repository";
private String numOfEvent;
Expand All @@ -48,6 +50,8 @@ public class ConfigBean {

private int maxEventCount = 1000000;

private String volumeExportDir;

@Data
public class Site {
private String editor;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,62 +21,68 @@
*/
package org.apromore.portal.common.i18n;

import org.zkoss.util.Locales;
import org.zkoss.web.Attributes;
import org.zkoss.zk.ui.Sessions;
import org.zkoss.zk.ui.util.Clients;

import java.nio.charset.StandardCharsets;
import java.util.Arrays;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.LinkedHashMap;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import lombok.Getter;

@Component("i18nConfig")
public class I18nConfig {

@Getter private Map<Locale, String> supportedLocales;
@Getter private boolean enabled;
@Getter
private Map<Locale, String> supportedLocales;
@Getter
private boolean enabled;

/**
* Constructor
*
* @param languageTagList Vertically-separated list of string languageTags
* @param dateTimePatternList Vertically-separated list of string Date Time patterns
*/
public I18nConfig(boolean enabled, String languageTagList, String dateTimePatternList) {
this.enabled = enabled;
supportedLocales = new LinkedHashMap<>();
List<String> languageTags = Arrays.asList(languageTagList.split("\\|"));
List<String> dateTimePatterns = Arrays.asList(dateTimePatternList.split("\\|"));
if (languageTags.size() == 0 || languageTags.size() != dateTimePatterns.size()) {
return;
}
for (int i = 0 ; i < languageTags.size() ; i++) {
Locale locale = Locale.forLanguageTag(languageTags.get(i));
String dateTimePattern = dateTimePatterns.get(i);
// Fix encoding issue in site.properties
dateTimePattern = new String(dateTimePattern.getBytes(StandardCharsets.ISO_8859_1), StandardCharsets.UTF_8);
supportedLocales.put(locale, dateTimePattern);
}
}
/**
* Constructor
*
* @param languageTagList Vertically-separated list of string languageTags
* @param dateTimePatternList Vertically-separated list of string Date Time patterns
*/

public boolean isSupported(Locale locale) {
return supportedLocales.containsKey(locale);
}
public I18nConfig(@Value("${i18n.enable}") boolean enabled,
@Value("${i18n.languagetags}") String languageTagList,
@Value("${i18n.datetimepatterns}") String dateTimePatternList) {

public String getDateTimePattern(Locale locale) {
return supportedLocales.get(locale);
this.enabled = enabled;
supportedLocales = new LinkedHashMap<>();
List<String> languageTags = Arrays.asList(languageTagList.split("\\|"));
List<String> dateTimePatterns = Arrays.asList(dateTimePatternList.split("\\|"));
if (languageTags.size() == 0 || languageTags.size() != dateTimePatterns.size()) {
return;
}
for (int i = 0; i < languageTags.size(); i++) {
Locale locale = Locale.forLanguageTag(languageTags.get(i));
String dateTimePattern = dateTimePatterns.get(i);
// Fix encoding issue in site.properties
dateTimePattern =
new String(dateTimePattern.getBytes(StandardCharsets.ISO_8859_1), StandardCharsets.UTF_8);
supportedLocales.put(locale, dateTimePattern);
}
}

public boolean isSupported(Locale locale) {
return supportedLocales.containsKey(locale);
}

public String getDateTimePattern(Locale locale) {
return supportedLocales.get(locale);
}

public LinkedHashMap<String, String> getSelectionSet() {
LinkedHashMap<String, String> selectionSet = new LinkedHashMap<>();
for (Map.Entry<Locale, String> entry: supportedLocales.entrySet()) {
Locale locale = entry.getKey();
selectionSet.put(locale.toLanguageTag(), locale.getDisplayName(locale) + " (" + locale.getDisplayName() + ")");
}
return selectionSet;
public LinkedHashMap<String, String> getSelectionSet() {
LinkedHashMap<String, String> selectionSet = new LinkedHashMap<>();
for (Map.Entry<Locale, String> entry : supportedLocales.entrySet()) {
Locale locale = entry.getKey();
selectionSet.put(locale.toLanguageTag(),
locale.getDisplayName(locale) + " (" + locale.getDisplayName() + ")");
}
return selectionSet;
}

}
Original file line number Diff line number Diff line change
@@ -1,30 +1,20 @@
/**
* #%L
* This file is part of "Apromore Core".
* %%
* Copyright (C) 2018 - 2021 Apromore Pty Ltd.
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
* #%L This file is part of "Apromore Core". %% Copyright (C) 2018 - 2021 Apromore Pty Ltd. %% This
* program is free software: you can redistribute it and/or modify it under the terms of the GNU
* Lesser General Public License as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
* even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-3.0.html>.
* #L%
* You should have received a copy of the GNU General Lesser Public License along with this program.
* If not, see <http://www.gnu.org/licenses/lgpl-3.0.html>. #L%
*/
package org.apromore.portal.config;

import java.util.ArrayList;
import java.util.List;

import org.apromore.plugin.Plugin;
import org.apromore.plugin.editor.EditorPlugin;
import org.apromore.plugin.portal.FileImporterPlugin;
import org.apromore.plugin.portal.PortalPlugin;
Expand All @@ -40,81 +30,83 @@
import org.springframework.context.annotation.PropertySource;
import org.springframework.security.web.firewall.HttpFirewall;
import org.springframework.security.web.firewall.StrictHttpFirewall;
import org.zkoss.spring.SpringUtil;

@Configuration
@PropertySource(value = {"classpath:git.properties"})
@PropertySource(value = "classpath:i18n.properties", encoding = "UTF-8")
public class PortalWebConfig {

@Autowired
List<PortalPlugin> portalPlugins;

@Autowired(required = false)
List<PortalProcessAttributePlugin> portalProcessAttributePlugin = new ArrayList<PortalProcessAttributePlugin>();

@Autowired(required = false)
List<FileImporterPlugin> fileImporterPlugins = new ArrayList<FileImporterPlugin>();

@Autowired(required = false)
List<EditorPlugin> editorPlugins = new ArrayList<EditorPlugin>();

@Bean
public List<EditorPlugin> editorPlugins() {
return editorPlugins;
}

@Bean
public List<EditorPlugin> bpmnEditorPlugins() {
return editorPlugins;
}

@Bean
public List<FileImporterPlugin> fileImporterPlugins() {
return fileImporterPlugins;
}

@Bean
public List<PortalProcessAttributePlugin> portalProcessAttributePlugins() {
return portalProcessAttributePlugin;
}

@Bean
public List<PortalPlugin> portalPlugins() {
return portalPlugins;
}

@Bean
public ExplicitComparator portalMenuOrder(@Value("${portal.menuorder}") String menuOrder) {
return new ExplicitComparator(menuOrder);
}

@Bean
public ExplicitComparator portalFileMenuitemOrder(@Value("${portal.menuitemorder.File}") String menuItemFile) {
return new ExplicitComparator(menuItemFile);
}

@Bean
public ServletRegistrationBean exampleServletBean() {
ServletRegistrationBean bean = new ServletRegistrationBean(new PortalPluginResourceServlet(),
"/portalPluginResource/*");
bean.setLoadOnStartup(1);
return bean;
}

@Bean
public ServletRegistrationBean dataChannel() {
ServletRegistrationBean bean = new ServletRegistrationBean(new DataChannelServlet(),
"/dataRequest/*");
bean.setLoadOnStartup(1);
return bean;
}

// This bean allows spaces which are url encoded
@Bean
public HttpFirewall allowUrlEncodedSlashHttpFirewall() {
StrictHttpFirewall firewall = new StrictHttpFirewall();
firewall.setAllowUrlEncodedPercent(true);
return firewall;
}
@Autowired
List<PortalPlugin> portalPlugins;

@Autowired(required = false)
List<PortalProcessAttributePlugin> portalProcessAttributePlugin =
new ArrayList<PortalProcessAttributePlugin>();

@Autowired(required = false)
List<FileImporterPlugin> fileImporterPlugins = new ArrayList<FileImporterPlugin>();

@Autowired(required = false)
List<EditorPlugin> editorPlugins = new ArrayList<EditorPlugin>();

@Bean
public List<EditorPlugin> editorPlugins() {
return editorPlugins;
}

@Bean
public List<EditorPlugin> bpmnEditorPlugins() {
return editorPlugins;
}

@Bean
public List<FileImporterPlugin> fileImporterPlugins() {
return fileImporterPlugins;
}

@Bean
public List<PortalProcessAttributePlugin> portalProcessAttributePlugins() {
return portalProcessAttributePlugin;
}

@Bean
public List<PortalPlugin> portalPlugins() {
return portalPlugins;
}

@Bean
public ExplicitComparator portalMenuOrder(@Value("${portal.menuorder}") String menuOrder) {
return new ExplicitComparator(menuOrder);
}

@Bean
public ExplicitComparator portalFileMenuitemOrder(
@Value("${portal.menuitemorder.File}") String menuItemFile) {
return new ExplicitComparator(menuItemFile);
}

@Bean
public ServletRegistrationBean exampleServletBean() {
ServletRegistrationBean bean =
new ServletRegistrationBean(new PortalPluginResourceServlet(), "/portalPluginResource/*");
bean.setLoadOnStartup(1);
return bean;
}

@Bean
public ServletRegistrationBean dataChannel() {
ServletRegistrationBean bean =
new ServletRegistrationBean(new DataChannelServlet(), "/dataRequest/*");
bean.setLoadOnStartup(1);
return bean;
}

// This bean allows spaces which are url encoded
@Bean
public HttpFirewall allowUrlEncodedSlashHttpFirewall() {
StrictHttpFirewall firewall = new StrictHttpFirewall();
firewall.setAllowUrlEncodedPercent(true);
return firewall;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ public void show(String message) {
};

try {
final Window win = (Window) Executions.createComponents("macros/import.zul", null, null);
final Window win = (Window) Executions.createComponents("~./macros/import.zul", null, null);
this.importWindow = (Window) win.getFellow("importWindow");
Button uploadButton = (Button) this.importWindow.getFellow("uploadButton");
uploadButton.setClientDataAttribute(MAX_UPLOAD_SIZE, Long.toString(this.maxUploadSize));
Expand Down
Loading