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

Internal Report Viewer: host and use the the report viewer locally #1176

Merged
merged 55 commits into from
Feb 20, 2024

Conversation

dfuchss
Copy link
Member

@dfuchss dfuchss commented Jul 5, 2023

This PR re-integrates a ReportViewer into JPlag. It allows users to launch the web-based report viewer locally by self-hosting it automatically. This feature is currently not mandatory, meaning users can choose to use it via the CLI parameter --mode. This parameter supports only running, running + viewing, as well as only viewing. In the future, this local model will become the default.

This PR thus also contributes to #1190.

@dfuchss dfuchss changed the title Featur: Internal Report Viewer Feature: Internal Report Viewer Jul 5, 2023
@dfuchss dfuchss changed the base branch from main to develop July 5, 2023 21:51
@dfuchss

This comment was marked as outdated.

@Kr0nox Kr0nox added this to the v5.0.0 milestone Sep 28, 2023
report-viewer/package.json Outdated Show resolved Hide resolved
cli/pom.xml Outdated Show resolved Hide resolved
@TwoOfTwelve
Copy link
Contributor

Should be ready to merge after #1370

Copy link
Member Author

@dfuchss dfuchss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some comments . Probably, Docs are missing

cli/pom.xml Outdated Show resolved Hide resolved
cli/src/main/java/de/jplag/cli/JPlagMode.java Show resolved Hide resolved
cli/pom.xml Outdated Show resolved Hide resolved
@TwoOfTwelve
Copy link
Contributor

@Kr0nox Could you please merge the develop branch into this branch? There are some conflicts in .vue files. Or should I just always accept the version from develop?

…eb-viewer

# Conflicts:
#	.github/workflows/maven.yml
#	.github/workflows/publish.yml
#	.github/workflows/sonarcloud-branch.yml
#	.github/workflows/sonarcloud-pr.yml
#	.github/workflows/spotless.yml
#	pom.xml
#	report-viewer/src/components/ComparisonsTable.vue
#	report-viewer/src/viewWrapper/ComparisonViewWrapper.vue
#	report-viewer/src/views/FileUploadView.vue
@Kr0nox
Copy link
Member

Kr0nox commented Nov 30, 2023

@TwoOfTwelve it is merged

@Kr0nox Kr0nox requested a review from a team February 13, 2024 15:18
@dfuchss dfuchss requested a review from tsaglam February 13, 2024 19:00
Copy link
Member

@sebinside sebinside left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Besides my two small comments (please see above), I'm fine with this PR, works great! We should merge this as soon as possible to have more than 0 days of integration testing before the 5.0 release.

@sebinside sebinside requested a review from a team February 14, 2024 09:37
@Kr0nox
Copy link
Member

Kr0nox commented Feb 16, 2024

When the initial and the next port are not available it prints the initial port twice
grafik
In the second message it should say 1997 is not available

@TwoOfTwelve
Copy link
Contributor

Sorry, I missed the sonarcloud issues. The remaining issues cannot be fixed as far as I can see.

Copy link
Member

@tsaglam tsaglam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some minor issues below. The bigger issue is: When I package the jar and either use VIEW or RUN_AND_VIEW I end up with:

2024-02-20-12:05:59_748 [INFO] CLI - ReportViewer started on port http://localhost:1996
2024-02-20 12:05:59.899 java[52709:33325826] WARNING: Secure coding is automatically enabled for restorable state! However, not on all supported macOS versions of this application. Opt-in to secure coding explicitly by implementing NSApplicationDelegate.applicationSupportsSecureRestorableState:.
Press Enter key to exit...

In the browser, I cannot load the page ("The connection to the server was reset while the page was loading".).

cli/src/main/java/de/jplag/cli/CliOptions.java Outdated Show resolved Hide resolved
cli/src/main/java/de/jplag/cli/JPlagMode.java Outdated Show resolved Hide resolved
Copy link

sonarcloud bot commented Feb 20, 2024

Quality Gate Passed Quality Gate passed for 'JPlag Report Viewer'

Issues
0 New issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud

Copy link

sonarcloud bot commented Feb 20, 2024

Quality Gate Passed Quality Gate passed for 'JPlag Plagiarism Detector'

Issues
1 New issue

Measures
0 Security Hotspots
54.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud

@TwoOfTwelve
Copy link
Contributor

Did you make sure you compiled JPlag with -P with-report-viewer? Otherwise the report-viewer will not be bundled and exactly this error will occur. Also I think sometimes maven does not build the report-viewer for some reason, so you could try to build it manually beforehand.

@tsaglam
Copy link
Member

tsaglam commented Feb 20, 2024

Did you make sure you compiled JPlag with -P with-report-viewer? Otherwise the report-viewer will not be bundled and exactly this error will occur. Also I think sometimes maven does not build the report-viewer for some reason, so you could try to build it manually beforehand.

Thanks, now it works! 👍

Copy link
Member

@tsaglam tsaglam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Local mode works when built as a jar. Both view only as well as run and view. What is currently not adapted is the readme (especially regarding build commands), but I will do this separately.

@tsaglam tsaglam changed the title Feature: Internal Report Viewer Internal Report Viewer: host and use the the report viewer locally Feb 20, 2024
@tsaglam tsaglam merged commit a780a0d into develop Feb 20, 2024
21 checks passed
@tsaglam tsaglam deleted the feature/internal-web-viewer branch February 20, 2024 13:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Issue/PR that involves features, improvements and other changes major Major issue/feature/contribution/change report-viewer PR / Issue deals (partly) with the report viewer and thus involves web-dev technologies
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants