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

Feature/log viewer #158

Merged
merged 10 commits into from
Oct 6, 2023
Merged

Feature/log viewer #158

merged 10 commits into from
Oct 6, 2023

Conversation

0x6368
Copy link
Contributor

@0x6368 0x6368 commented Sep 30, 2023

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
Feature

What is the current behavior? (You can also link to an open issue here)
Opening the logs, downloads the whole log file (even if it it multiple megabytes in size)

What is the new behavior (if this is a feature change)? If possible add a screenshot.
Opening the logs opens a log viewer, that only loads the last lines of the logs. You can scroll through the logs by using the arrow keys or pgup/pgdown keys
image

Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)
A little bit? The option to download logs has moved to the log viewer instead of the report overview. The report overview will only link to the new log viewer

Other information:

@m-1-k-3 m-1-k-3 added enhancement New feature or request EMBArk labels Sep 30, 2023
@0x6368
Copy link
Contributor Author

0x6368 commented Sep 30, 2023

I'll fix the linter issues in the coming days

@0x6368
Copy link
Contributor Author

0x6368 commented Sep 30, 2023

I tried installing watchdog, but somehow it cannot lock the pipfile:

ubuntu@ubuntu-virtual-machine:~/embark$ pipenv install watchdog
Loading .env environment variables...
Installing watchdog...
Resolving watchdog...
Added watchdog to Pipfile's [packages] ...
✔ Installation Succeeded
Pipfile.lock (8a1083) out of date, updating to (78152a)...
Locking [packages] dependencies...
Building requirements...
Resolving dependencies...
✘ Locking Failed!
⠼ Locking...False
ERROR:pip.subprocessor:[present-rich] Getting requirements to build wheel exited with 1
[ResolutionFailure]:   File "/usr/local/lib/python3.10/dist-packages/pipenv/resolver.py", line 645, in _main
[ResolutionFailure]:       resolve_packages(
[ResolutionFailure]:   File "/usr/local/lib/python3.10/dist-packages/pipenv/resolver.py", line 612, in resolve_packages
[ResolutionFailure]:       results, resolver = resolve(
[ResolutionFailure]:   File "/usr/local/lib/python3.10/dist-packages/pipenv/resolver.py", line 592, in resolve
[ResolutionFailure]:       return resolve_deps(
[ResolutionFailure]:   File "/usr/local/lib/python3.10/dist-packages/pipenv/utils/resolver.py", line 897, in resolve_deps
[ResolutionFailure]:       results, hashes, internal_resolver = actually_resolve_deps(
[ResolutionFailure]:   File "/usr/local/lib/python3.10/dist-packages/pipenv/utils/resolver.py", line 670, in actually_resolve_deps
[ResolutionFailure]:       resolver.resolve()
[ResolutionFailure]:   File "/usr/local/lib/python3.10/dist-packages/pipenv/utils/resolver.py", line 447, in resolve
[ResolutionFailure]:       raise ResolutionFailure(message=str(e))
[pipenv.exceptions.ResolutionFailure]: Warning: Your dependencies could not be resolved. You likely have a mismatch in your sub-dependencies.
  You can use $ pipenv run pip install <requirement_name> to bypass this mechanism, then run $ pipenv graph to inspect the versions actually installed in the virtualenv.
  Hint: try $ pipenv lock --pre if it is a pre-release dependency.
ERROR: Getting requirements to build wheel exited with 1

@BenediktMKuehne
Copy link
Member

Oh that's always fun when that happens.😬

One of the packages has a dependency conflict with your new one.
Quite possibly the wsgi.
You could try forcing a newer version for the dependency

@0x6368
Copy link
Contributor Author

0x6368 commented Oct 1, 2023

Looks like this was an issue with mysqlclient. This helped my install watchdog: https://forum.codewithmosh.com/t/pipenv-install-mysql-client/20899/4

In my case, I had to change the environment variables a little:

export MYSQLCLIENT_LDFLAGS='-L/usr/mysql/lib -lmysqlclient -lssl -lcrypto -lresolv'
export MYSQLCLIENT_CFLAGS='-I/usr/include/mysql/'

@0x6368 0x6368 force-pushed the feature/log-viewer branch from 49622fd to 0ae6ed5 Compare October 1, 2023 07:13
@BenediktMKuehne
Copy link
Member

will be testing the changes now

@@ -344,6 +344,8 @@ install_embark_default(){
wget -O ./embark/static/external/scripts/bootstrap.js https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js
wget -O ./embark/static/external/scripts/datatable.js https://cdn.datatables.net/v/bs5/dt-1.11.2/datatables.min.js
wget -O ./embark/static/external/scripts/charts.js https://cdn.jsdelivr.net/npm/[email protected]/dist/chart.min.js
wget -O ./embark/static/external/scripts/base64.js https://cdn.jsdelivr.net/npm/[email protected]/+esm
Copy link
Member

Choose a reason for hiding this comment

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

Can we add these two lines to the developer install function too, please
line 424 for example

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@BenediktMKuehne
Copy link
Member

Result is looking great 👍
(sorry it took so long, I forgot to send/finalize the review)

@BenediktMKuehne
Copy link
Member

Nice work!

@BenediktMKuehne BenediktMKuehne merged commit 81ab830 into e-m-b-a:main Oct 6, 2023
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
EMBArk enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants