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

Fix ComparisonView #619

Merged
merged 3 commits into from
Aug 30, 2022
Merged

Fix ComparisonView #619

merged 3 commits into from
Aug 30, 2022

Conversation

nestabentum
Copy link
Contributor

@tsaglam
Copy link
Member

tsaglam commented Aug 25, 2022

@nestabentum, sadly, both result zips mentioned here still won't work with the viewer deployed from your fork. I still get a white screen when trying to open the comparison view.
Does it work for you?

@tsaglam tsaglam added bug Issue/PR that involves a bug minor Minor issue/feature/contribution/change report-viewer PR / Issue deals (partly) with the report viewer and thus involves web-dev technologies labels Aug 25, 2022
@tsaglam tsaglam added this to the v4.0.0 milestone Aug 25, 2022
@nestabentum
Copy link
Contributor Author

@tsaglam Oh, I see. Unzipping your files shows that there is a problem with the report generation. On which system did you run execute the JPlag run that created these reports?

I suspect that DirectoryManager#createDirectory is responsible as it does not yet use File.separator.

@tsaglam
Copy link
Member

tsaglam commented Aug 25, 2022

@tsaglam Oh, I see. Unzipping your files shows that there is a problem with the report generation. On which system did you run execute the JPlag run that created these reports?

I suspect that DirectoryManager#createDirectory is responsible as it does not yet use File.separator.

Windows 10, which would fit as you are probably on macOS where you have proper UNIX file separators. One of the many issues I have with windows! 😄

@nestabentum
Copy link
Contributor Author

I fixed the generation on this branch. You can try generating and displaying the results anew and I'm looking forward to new feedback:)

@tsaglam
Copy link
Member

tsaglam commented Aug 25, 2022

I fixed the generation on this branch. You can try generating and displaying the results anew and I'm looking forward to new feedback:)

@nestabentum same problem, I click the top most submission pair, but it only shows a white screen and this URL (in both firefox and chrome):
https://nestabentum.github.io/JPlag/comparison/C/A

Log:

click to show!
GEThttps://nestabentum.github.io/JPlag/
[HTTP/2 200 OK 24ms]

GEThttps://nestabentum.github.io/JPlag/js/chunk-vendors.3c8891ea.js
[HTTP/2 200 OK 26ms]

GEThttps://nestabentum.github.io/JPlag/css/app.967dfcdd.css
[HTTP/2 200 OK 11ms]

GEThttps://nestabentum.github.io/JPlag/js/app.c8482baa.js
[HTTP/2 200 OK 9ms]

Error: Cannot find module '../files/overview.json'
    setup index.js:13
    setup index.js:13
    o runtime-core.esm-bundler.js:155
    Fn runtime-core.esm-bundler.js:7165
    Pn runtime-core.esm-bundler.js:7120
    F runtime-core.esm-bundler.js:5473
    P runtime-core.esm-bundler.js:5448
    E runtime-core.esm-bundler.js:5038
    c runtime-core.esm-bundler.js:5660
    run reactivity.esm-bundler.js:185
    update runtime-core.esm-bundler.js:5694
    o runtime-core.esm-bundler.js:155
    L runtime-core.esm-bundler.js:396
    promise callback*R runtime-core.esm-bundler.js:285
    A runtime-core.esm-bundler.js:307
    x runtime-core.esm-bundler.js:313
    X runtime-core.esm-bundler.js:1582
    b runtime-core.esm-bundler.js:1804
    w reactivity.esm-bundler.js:394
    x reactivity.esm-bundler.js:384
    ke reactivity.esm-bundler.js:1008
    effect reactivity.esm-bundler.js:1131
    w reactivity.esm-bundler.js:394
    x reactivity.esm-bundler.js:379
    ke reactivity.esm-bundler.js:1008
    effect reactivity.esm-bundler.js:1131
    w reactivity.esm-bundler.js:394
    x reactivity.esm-bundler.js:379
    ke reactivity.esm-bundler.js:1008
    set value reactivity.esm-bundler.js:1044
    W vue-router.mjs:3317
    G vue-router.mjs:3190
    promise callback*G vue-router.mjs:3157
    F vue-router.mjs:3082
    install vue-router.mjs:3513
    use runtime-core.esm-bundler.js:4327
    4508 main.ts:8
    Webpack 5
index.js:17:20
GEThttps://nestabentum.github.io/JPlag/img/logo-nobg.fe65cd9a.png
[HTTP/2 200 OK 7ms]

GEThttps://nestabentum.github.io/JPlag/favicon.ico
[HTTP/2 200 OK 7ms]

GEThttps://nestabentum.github.io/JPlag/img/logo-nobg.fe65cd9a.png
GEThttps://nestabentum.github.io/JPlag/img/keyboard_double_arrow_down_black_18dp.1dc03f43.svg
[HTTP/2 200 OK 6ms]

GEThttps://nestabentum.github.io/JPlag/img/help_outline_black_18dp.92160fb9.svg
[HTTP/2 200 OK 6ms]

GEThttps://nestabentum.github.io/JPlag/img/double_arrow_black_18dp.138ba432.svg
[HTTP/2 200 OK 9ms]

TypeError: items is undefined
    filesOfSubmission store.ts:34
    getComparison ComparisonFactory.ts:5
    setup index.js:40
    o runtime-core.esm-bundler.js:155
    Fn runtime-core.esm-bundler.js:7165
    Pn runtime-core.esm-bundler.js:7120
    F runtime-core.esm-bundler.js:5473
    P runtime-core.esm-bundler.js:5448
    E runtime-core.esm-bundler.js:5038
    c runtime-core.esm-bundler.js:5660
    run reactivity.esm-bundler.js:185
    update runtime-core.esm-bundler.js:5694
    o runtime-core.esm-bundler.js:155
    L runtime-core.esm-bundler.js:396
    promise callback*R runtime-core.esm-bundler.js:285
    A runtime-core.esm-bundler.js:307
    x runtime-core.esm-bundler.js:313
    X runtime-core.esm-bundler.js:1582
    b runtime-core.esm-bundler.js:1804
    w reactivity.esm-bundler.js:394
    x reactivity.esm-bundler.js:384
    ke reactivity.esm-bundler.js:1008
    effect reactivity.esm-bundler.js:1131
    w reactivity.esm-bundler.js:394
    x reactivity.esm-bundler.js:379
    ke reactivity.esm-bundler.js:1008
    effect reactivity.esm-bundler.js:1131
    w reactivity.esm-bundler.js:394
    x reactivity.esm-bundler.js:379
    ke reactivity.esm-bundler.js:1008
    set value reactivity.esm-bundler.js:1044
    W vue-router.mjs:3317
    G vue-router.mjs:3190
    promise callback*G vue-router.mjs:3157
    F vue-router.mjs:3082
    a index.js:30
    onClick templateLoader.js:41
    o runtime-core.esm-bundler.js:155
    s runtime-core.esm-bundler.js:164
    n runtime-dom.esm-bundler.js:369
    O runtime-dom.esm-bundler.js:319
    N runtime-dom.esm-bundler.js:337
    M runtime-dom.esm-bundler.js:401
    R runtime-core.esm-bundler.js:5152
    C runtime-core.esm-bundler.js:5115
    E runtime-core.esm-bundler.js:5035
    I runtime-core.esm-bundler.js:5234
    R runtime-core.esm-bundler.js:5143
    C runtime-core.esm-bundler.js:5115
    E runtime-core.esm-bundler.js:5035
    I runtime-core.esm-bundler.js:5234
    k runtime-core.esm-bundler.js:5407
    E runtime-core.esm-bundler.js:5031
    I runtime-core.esm-bundler.js:5234
    R runtime-core.esm-bundler.js:5143
    C runtime-core.esm-bundler.js:5115
    E runtime-core.esm-bundler.js:5035
    c runtime-core.esm-bundler.js:5587
    run reactivity.esm-bundler.js:185
    update runtime-core.esm-bundler.js:5694
    B runtime-core.esm-bundler.js:5708
    F runtime-core.esm-bundler.js:5490
    P runtime-core.esm-bundler.js:5448
    E runtime-core.esm-bundler.js:5038
    I runtime-core.esm-bundler.js:5234
    R runtime-core.esm-bundler.js:5143
    C runtime-core.esm-bundler.js:5115
    E runtime-core.esm-bundler.js:5035
    I runtime-core.esm-bundler.js:5234
    R runtime-core.esm-bundler.js:5143
runtime-core.esm-bundler.js:226:16
TypeError: e.isAnonymous is not a function
    _s templateLoader.js:50
    H runtime-core.esm-bundler.js:896
    c runtime-core.esm-bundler.js:5580
    run reactivity.esm-bundler.js:185
    update runtime-core.esm-bundler.js:5694
    B runtime-core.esm-bundler.js:5708
    F runtime-core.esm-bundler.js:5490
    P runtime-core.esm-bundler.js:5448
    E runtime-core.esm-bundler.js:5038
    c runtime-core.esm-bundler.js:5660
    run reactivity.esm-bundler.js:185
    update runtime-core.esm-bundler.js:5694
    o runtime-core.esm-bundler.js:155
    L runtime-core.esm-bundler.js:396
    promise callback*R runtime-core.esm-bundler.js:285
    A runtime-core.esm-bundler.js:307
    x runtime-core.esm-bundler.js:313
    X runtime-core.esm-bundler.js:1582
    b runtime-core.esm-bundler.js:1804
    w reactivity.esm-bundler.js:394
    x reactivity.esm-bundler.js:384
    ke reactivity.esm-bundler.js:1008
    effect reactivity.esm-bundler.js:1131
    w reactivity.esm-bundler.js:394
    x reactivity.esm-bundler.js:379
    ke reactivity.esm-bundler.js:1008
    effect reactivity.esm-bundler.js:1131
    w reactivity.esm-bundler.js:394
    x reactivity.esm-bundler.js:379
    ke reactivity.esm-bundler.js:1008
    set value reactivity.esm-bundler.js:1044
    W vue-router.mjs:3317
    G vue-router.mjs:3190
    promise callback*G vue-router.mjs:3157
    F vue-router.mjs:3082
    a index.js:30
    onClick templateLoader.js:41
    o runtime-core.esm-bundler.js:155
    s runtime-core.esm-bundler.js:164
    n runtime-dom.esm-bundler.js:369
    O runtime-dom.esm-bundler.js:319
    N runtime-dom.esm-bundler.js:337
    M runtime-dom.esm-bundler.js:401
    R runtime-core.esm-bundler.js:5152
    C runtime-core.esm-bundler.js:5115
    E runtime-core.esm-bundler.js:5035
    I runtime-core.esm-bundler.js:5234
    R runtime-core.esm-bundler.js:5143
    C runtime-core.esm-bundler.js:5115
    E runtime-core.esm-bundler.js:5035
    I runtime-core.esm-bundler.js:5234
    k runtime-core.esm-bundler.js:5407
    E runtime-core.esm-bundler.js:5031
    I runtime-core.esm-bundler.js:5234
    R runtime-core.esm-bundler.js:5143
    C runtime-core.esm-bundler.js:5115
    E runtime-core.esm-bundler.js:5035
    c runtime-core.esm-bundler.js:5587
    run reactivity.esm-bundler.js:185
    update runtime-core.esm-bundler.js:5694
    B runtime-core.esm-bundler.js:5708
    F runtime-core.esm-bundler.js:5490
    P runtime-core.esm-bundler.js:5448
    E runtime-core.esm-bundler.js:5038
    I runtime-core.esm-bundler.js:5234
    R runtime-core.esm-bundler.js:5143
    C runtime-core.esm-bundler.js:5115
    E runtime-core.esm-bundler.js:5035
    I runtime-core.esm-bundler.js:5234
    R runtime-core.esm-bundler.js:5143
runtime-core.esm-bundler.js:226:16

@nestabentum
Copy link
Contributor Author

nestabentum commented Aug 25, 2022

@tsaglam do your newly generated zips look identical to the previous ones? Or are the submission files now actually in the submissions folder?

@tsaglam
Copy link
Member

tsaglam commented Aug 25, 2022

@nestabentum at first glance, it looks fine to me:
result.zip

Also for another code example:
result2.zip

@tsaglam
Copy link
Member

tsaglam commented Aug 25, 2022

@nestabentum re-zipping helps! I can get both zips to work correctly by unzipping them with 7zip and rezipping the contents. This means the way JPlag zips the files might be an issue, right?

@nestabentum
Copy link
Contributor Author

The problem that remained was that the report viewer could only process unix like paths correctly. Windows paths are now converted to the unix style for internal use with the helpt of library slash .
The issue is now fixed and this PR is good to go @dfuchss.

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@dfuchss
Copy link
Member

dfuchss commented Aug 30, 2022

@nestabentum if it's ready to review , please click on ready for review :)

@dfuchss dfuchss requested review from a team August 30, 2022 11:20
@nestabentum nestabentum marked this pull request as ready for review August 30, 2022 11:29
Copy link
Contributor

@robinmaisch robinmaisch left a comment

Choose a reason for hiding this comment

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

Nice! Nothing in particular to critizise about these changes from my end.
Fiddling around with the UI a bit, I thought it would be nice if the UI text was not selectable (user-select: none;). Code clearly should stay selectable.
But that is a different concern than this PR. If you need to submit changes anyway, you can keep that in mind if you like the idea.

@dfuchss dfuchss merged commit e8ea0ca into jplag:master Aug 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue/PR that involves a bug minor Minor issue/feature/contribution/change report-viewer PR / Issue deals (partly) with the report viewer and thus involves web-dev technologies
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants