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
Merge development branch
  • Loading branch information
frank-ma-leonardo committed Jul 27, 2021
commit dfe1bed00110d1c9a033cef7e0d82f7305d75824
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ public interface CalendarService {
public CalendarModel createGenericCalendar(String description, boolean weekendsOff, String zoneId)
throws CalendarAlreadyExistsException;

CalendarModel getGenericCalendar();

public CalendarModel createBusinessCalendar(String description, boolean weekendsOff, String zoneId)
throws CalendarAlreadyExistsException;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,23 @@ public CalendarModel createGenericCalendar(String description, boolean weekendsO
return calendarModel;
}

@Override
public CalendarModel createBusinessCalendar(String description, boolean weekendsOff,
String zoneId) throws CalendarAlreadyExistsException {
@Override
public CalendarModel getGenericCalendar() {

OffsetTime startTime =
OffsetTime.of(LocalTime.MIN, ZoneId.of("UTC").getRules().getOffset(Instant.now()));

OffsetTime endTime =
OffsetTime.of(LocalTime.MAX, ZoneId.of("UTC").getRules().getOffset(Instant.now()));

CustomCalendar customCalendar = createGenericCalendar(startTime, endTime);

return modelMapper.getMapper().map(customCalendar, CalendarModel.class);
}

@Override
public CalendarModel createBusinessCalendar(String description, boolean weekendsOff, String zoneId)
throws CalendarAlreadyExistsException {

OffsetTime startTime =
OffsetTime.of(LocalTime.of(9, 0), ZoneId.of(zoneId).getRules().getOffset(Instant.now()));
Expand Down Expand Up @@ -134,7 +148,17 @@ private CustomCalendar createCalendar(String description, boolean weekendsOff, O

}

private List<WorkDay> getWorkDays(OffsetTime start, OffsetTime end, boolean weekendOff) {
private CustomCalendar createGenericCalendar(OffsetTime start, OffsetTime end) {

final CustomCalendar calendar = new CustomCalendar("Generic 24/7");
for (WorkDay workDay : getWorkDays(start, end, false)) {
calendar.addWorkDay(workDay);
}
return calendar;

}

private List<WorkDay> getWorkDays(OffsetTime start, OffsetTime end, boolean weekendOff) {

Predicate<DayOfWeek> isWeekendOff = CalendarUtil.getWeekendOffPRedicate(weekendOff);
List<WorkDay> workDaysList = new ArrayList<WorkDay>();
Expand All @@ -155,9 +179,9 @@ private void validateCalendarExists(CustomCalendar calendar)

}

public void updateHoliday(Long id, List<HolidayModel> holidayModels)
throws CalendarNotExistsException {
CustomCalendar calendar = getExistingCalendar(id);
@Override
public void updateHoliday(Long id, List<HolidayModel> holidayModels) throws CalendarNotExistsException {
CustomCalendar calendar = getExistingCalendar(id);

List<Holiday> holidays = new ArrayList<Holiday>();
for (HolidayModel h : holidayModels) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1777,8 +1777,9 @@ ValidationErrorHelper.validateGatewayProbabilities = function(bpmnFactory, eleme
(el.executionProbability === '' || el.executionProbability === undefined || isNaN(el.executionProbability));
});

var EPSILON = 0.01;
if (gateway.$type === 'bpmn:ExclusiveGateway' && nanProbabilityFlows.length === 0 &&
(probabilitySum > 100 || probabilitySum + parseFloat(probability) !== 100)) {
(probabilitySum - 100 > EPSILON || Math.abs(probabilitySum + parseFloat(probability) - 100) > EPSILON)) {
errorMessage = translate('probability.invalid.sum');
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -894,11 +894,6 @@ tr.z-row-disabled td.z-row-inner .z-slider-area {
display: none;
}

.z-timebox-button {
font-size: 16px !important;
line-height: 18px !important;
}

/* Make pagination index input wider */
.z-paging-input {
width: 60px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
client:onBind="Ap.calendar.syncRows()"
title="${labels.calendar_title_text}" apply="org.apromore.plugin.portal.calendar.controllers.Calendar">
<div id="actionBridge" visible="false" />
<vbox height="100%" hflex="1" spacing="0">
<vbox vflex="1" hflex="1" spacing="0">
<hbox hflex="1" vflex="1">
<vbox id="daysOfWeekWrapper" hflex="1" vflex="1" spacing="0">
<hbox sclass="ap-window-header-actions" hflex="1" align="center" pack="start" spacing="0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@

/**
* An AttributeLog is a view of ALog based on an attribute. This log extracts the traces with the chosen attribute only,
* each trace is an AttributeTrace. Since it is based on a specific attribute, the trace sequence is specific to the
* each trace is an AttributeTrace. Since it is based on a specific attribute, the trace sequence is specific to the
* chosen attribute (e.g. some original events may not contain values of the attribute), and thus the timing and duration
* also vary to the attribute. Note that AttributeTrace is created based on the aggregated activities of ATrace.
*
Expand Down Expand Up @@ -81,8 +81,6 @@ public class AttributeLog {
private BitSet originalTraceStatus;
private MutableList<AttributeTrace> activeTraces = Lists.mutable.empty();

private boolean dataStatusChanged = false; // true if this log has been changed (filtered) but not visualized

// Sequence view of the log
private AttributeLogVariantView variantView;

Expand All @@ -104,7 +102,7 @@ public AttributeLog(ALog log, IndexableAttribute attribute) {
originalTraces.add(attTrace);
originalTraceIdMap.put(trace.getTraceId(), attTrace);
variantView.addOriginalTrace(attTrace);
if (originalTraceStatus.get(i) && !attTrace.isEmpty()) {
if (originalTraceStatus.get(i) && !attTrace.isEmpty()) {
activeTraces.add(attTrace);
variantView.addActiveTrace(attTrace);
graphView.addTraceGraph(attTrace.getActiveGraph());
Expand All @@ -115,6 +113,11 @@ public AttributeLog(ALog log, IndexableAttribute attribute) {
graphView.finalUpdate();
}

public void clear() {
variantView.reset();
graphView.clear();
}

public IndexableAttribute getAttribute() {
return this.attribute;
}
Expand All @@ -140,18 +143,9 @@ public void setAttribute(IndexableAttribute newAttribute) {

variantView.finalUpdate();
graphView.finalUpdate();
dataStatusChanged = true;
}
}

public boolean isDataStatusChanged() {
return dataStatusChanged;
}

public void resetDataStatus() {
dataStatusChanged = false;
}

public BitSet getOriginalTraceStatus() {
return originalTraceStatus;
}
Expand Down Expand Up @@ -179,15 +173,13 @@ public void updateLogStatus(LogBitMap logBitMap) throws Exception {

if (!logBitMap.getTraceBitSet().equals(this.getOriginalTraceStatus())) {
originalTraceStatus = logBitMap.getTraceBitSet();
dataStatusChanged = true;
}

for (int i=0;i<getOriginalTraces().size();i++) {
AttributeTrace trace = getOriginalTraceFromIndex(i);
if (logBitMap.getEventBitSetSizeAtIndex(i) == trace.getOriginalValueTrace().size()) {
if (!logBitMap.getEventBitSetAtIndex(i).equals(trace.getOriginalEventStatus())) {
trace.updateOriginalEventStatus(logBitMap.getEventBitSetAtIndex(i));
dataStatusChanged = true;
}
if (originalTraceStatus.get(i) && !trace.isEmpty()) {
activeTraces.add(trace);
Expand All @@ -196,7 +188,7 @@ public void updateLogStatus(LogBitMap logBitMap) throws Exception {
}
}
else {
throw new InvalidAttributeLogStatusUpdateException("Invalid update of AttributeTrace at traceIndex=" + i +
throw new InvalidAttributeLogStatusUpdateException("Invalid update of AttributeTrace at traceIndex=" + i +
", traceId=" + trace.getTraceId() +
": different bitset size");
}
Expand All @@ -216,7 +208,7 @@ public void refresh() throws Exception {

public ALog getFullLog() {
return fullLog;
}
}

public long getOriginalNumberOfEvents() {
return originalTraces.sumOfLong(trace -> trace.getOriginalValueTrace().size()-2);
Expand Down Expand Up @@ -269,7 +261,7 @@ public int getStartEvent() {

public int getEndEvent() {
return attribute.getArtificialEndIndex();
}
}

public boolean isArtificialStart(int value) {
return (value == attribute.getMatrixGraph().getSource());
Expand Down Expand Up @@ -328,14 +320,14 @@ public AttributeLogSummary getOriginalLogSummary() {
}
DescriptiveStatistics traceDurationStats = new DescriptiveStatistics(caseDurations.toArray());
return new AttributeLogSummary(
fullLog.getOriginalNumberOfEvents(),
this.getOriginalAttributeValues().size()-2,
this.getOriginalTraces().size(),
fullLog.getOriginalNumberOfEvents(),
this.getOriginalAttributeValues().size()-2,
this.getOriginalTraces().size(),
variantView.getOriginalVariants().size(),
startTime, endTime,
traceDurationStats.getMin(),
traceDurationStats.getMax(),
traceDurationStats.getMean(),
startTime, endTime,
traceDurationStats.getMin(),
traceDurationStats.getMax(),
traceDurationStats.getMean(),
traceDurationStats.getPercentile(50));
}

Expand All @@ -352,14 +344,14 @@ public AttributeLogSummary getLogSummary() {
}
DescriptiveStatistics traceDurationStats = new DescriptiveStatistics(caseDurations.toArray());
return new AttributeLogSummary(
fullLog.getNumberOfEvents(),
this.getAttributeValues().size()-2,
this.getTraces().size(),
fullLog.getNumberOfEvents(),
this.getAttributeValues().size()-2,
this.getTraces().size(),
variantView.getActiveVariants().size(),
startTime, endTime,
traceDurationStats.getMin(),
traceDurationStats.getMax(),
traceDurationStats.getMean(),
startTime, endTime,
traceDurationStats.getMin(),
traceDurationStats.getMax(),
traceDurationStats.getMean(),
traceDurationStats.getPercentile(50));
}

Expand All @@ -370,8 +362,8 @@ public ListIterable<CaseInfo> getCaseInfoList() {
IntList variant = getVariantFromTraceIndex(i);
cases.add(new CaseInfo(
this.getTraceFromIndex(i).getTraceId(),
variant.size()-2,
variantView.getActiveVariants().getRankOf(variant),
variant.size()-2,
variantView.getActiveVariants().getRankOf(variant),
variantView.getActiveVariants().getVariantRelativeFrequency(variant)));
}
return cases;
Expand Down
5 changes: 5 additions & 0 deletions Apromore-Custom-Plugins/Process-Discoverer-Logic/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,11 @@
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>

<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>

<dependency>
<groupId>junit</groupId>
Expand Down
Loading
You are viewing a condensed version of this merge commit. You can view the full changes here.