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

Update frontend dependencies #708

Merged
merged 5 commits into from
Sep 3, 2022

Conversation

melck
Copy link
Contributor

@melck melck commented Jul 25, 2022

Upgrade frontend dependencies :

  • Move external frontend dependencies to puppetboard/static/libs
  • Move external frontend dependencies from layout.html to _offline_static.html and _online_static.html
  • Upgrade fontrend dependencies
  • Replacing jquery tablesort by datatable.net for all sortable tables
  • Replacing c3.js by billboard.js and fix charts
  • Fix loading buttons for datatables.net
  • Enabling jinja stip blocks to remove block from final HTML

Move to another PR after discussions

  • Layout :
    • Clean multiple block for loading javascript
    • Change content page on 15 column centered
    • Change menu to be fixed
  • Trying to visually improve index page

@gdubicki This draft PR is from discussion on #705 with some visual changes. What do you think of it ?

@gdubicki
Copy link
Member

Hey @melck, BIG thanks for this contribution! It will greatly improve the maintainability of this project. 😊 🥳 🤝

I would be happy to test and review this PR as soon as it's ready.

However I do suggest to separate the changes to layout and possibly features (last 2 commits?) to yet another PR 😅 - it will be much faster to merge only the dependencies upgrade and code refactoring changes.

@gdubicki
Copy link
Member

Hey @melck! Do you need any help with this PR?

@melck
Copy link
Contributor Author

melck commented Aug 18, 2022

Hey @gdubicki, sorry I've been pretty busy, I'll take care of it before the weekend.

@gdubicki
Copy link
Member

Hey @gdubicki, sorry I've been pretty busy, I'll take care of it before the weekend.

No problem, I don't want to rush you! I just don't want all your hard work on this to spoil. :)

@melck melck force-pushed the update-frontend-dependencies branch from 57e6782 to 15b5d7f Compare August 22, 2022 06:54
@codecov
Copy link

codecov bot commented Aug 22, 2022

Codecov Report

Merging #708 (7749792) into master (48a6990) will decrease coverage by 0.46%.
The diff coverage is 100.00%.

❗ Current head 7749792 differs from pull request most recent head 72e82b6. Consider uploading reports for the commit 72e82b6 to get more accurate results

@@            Coverage Diff             @@
##           master     #708      +/-   ##
==========================================
- Coverage   85.91%   85.45%   -0.47%     
==========================================
  Files          19       19              
  Lines        1051     1045       -6     
==========================================
- Hits          903      893      -10     
- Misses        148      152       +4     
Impacted Files Coverage Δ
puppetboard/utils.py 92.85% <ø> (-0.55%) ⬇️
puppetboard/core.py 86.84% <100.00%> (+0.17%) ⬆️
puppetboard/app.py 84.31% <0.00%> (-7.85%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@melck melck marked this pull request as ready for review August 22, 2022 07:37
@melck
Copy link
Contributor Author

melck commented Aug 22, 2022

Hello @gdubicki, i have updated this PR. I removed commits for changing layout and fixed unittest of offline statics.

Code coverage has reduced because of removing some unused code. I don't know why ...

Copy link
Member

@gdubicki gdubicki left a comment

Choose a reason for hiding this comment

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

Thanks a lot for completing the PR, @melck! I did test it out and I noticed one thing that I think we have to fix and 2 others that we might improve. Please check out my comments.

puppetboard/templates/nodes.html Outdated Show resolved Hide resolved
@@ -27,7 +27,7 @@
{% endfor %}
Copy link
Member

Choose a reason for hiding this comment

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

Nit: I know that it's out of the scope of the PR, but it would be nice to unify this to look and work the same way as such filter in the /nodes page.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes i will do that later. When this PR is ok / merged, i will update my other one. After that i will open a new one for UI unification and improvements.

To be honest, in the long run it would be easier to add a real frontend and only manage json returns on the backend. Remove all JS / CSS dependencies and start from scratch with, for example, the vuejs library and the element-plus framework.

Frontend update management would be simplified and optimized to handle large amounts of data

Copy link
Member

Choose a reason for hiding this comment

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

I totally agree that the frontend of the app just needs to be replaced with some modern, standard solution. I don't have the skills to do that though, but if you are willing to implement it then it's great and you are welcome to do it! I will do my best to help you test it, review the code, get it merged and released. :)

Copy link
Member

Choose a reason for hiding this comment

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

I 100% agree with @gdubicki . I do not have the skills to write the frontend, but I think its a really good idea. I am happy to review and test PRs.

Copy link
Member

Choose a reason for hiding this comment

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

Perhaps we should sync on Voxpupuli slack regarding this, @melck? If you want, please join it at https://puppetcommunity.slack.com/messages/voxpupuli/ . @bastelfreak and me are there under the same ids as here.

puppetboard/templates/report.html Show resolved Hide resolved
@melck melck force-pushed the update-frontend-dependencies branch from 7749792 to 72e82b6 Compare September 3, 2022 07:18
@bastelfreak bastelfreak merged commit 2b7500b into voxpupuli:master Sep 3, 2022
@gdubicki
Copy link
Member

gdubicki commented Sep 3, 2022

@melck : I don't want to be a nuisance, but I still see a wrong order of nodes in index. :(

The code in the master:

Screenshot 2022-09-03 at 10 55 07

v4.0.2:

Screenshot 2022-09-03 at 10 54 55

It's not just a matter of changing

data-order='[[ 2, "asc" ]]'
to desc as then the unreported nodes are on the top, instead of being on the bottom...

@gdubicki
Copy link
Member

gdubicki commented Sep 3, 2022

Also: I think you forgot to remove the striped style from the tables in nodes and report views, please see:
Screenshot 2022-09-03 at 11 14 31

@gdubicki
Copy link
Member

gdubicki commented Sep 9, 2022

@melck: sorry to bother you, but I hope that the above issues will be easier to fix for you than for me. And they are blocking the release.

@melck
Copy link
Contributor Author

melck commented Sep 9, 2022

Sorry i'll wheck that. Do i have to creater another PR ?

@gdubicki
Copy link
Member

gdubicki commented Sep 9, 2022

Yes, please create a new PR, @melck. Thank you!

melck added a commit to melck/puppetboard that referenced this pull request Sep 9, 2022
@melck melck mentioned this pull request Sep 9, 2022
gdubicki pushed a commit that referenced this pull request Sep 10, 2022
@gdubicki
Copy link
Member

Thanks again @melck. The code from this PR has been pre-released in 4.1.0rc1. Within a few days, after some testing at Egnyte (and hopefully other users) we will do a final 4.1.0 release.

gdubicki added a commit that referenced this pull request Sep 24, 2022
that has been removed in #708

Fixes #714
melck pushed a commit to melck/puppetboard that referenced this pull request Sep 26, 2022
melck pushed a commit to melck/puppetboard that referenced this pull request Sep 26, 2022
melck pushed a commit to melck/puppetboard that referenced this pull request Sep 26, 2022
gdubicki added a commit that referenced this pull request Sep 27, 2022
that has been removed in #708

Fixes #714
gdubicki added a commit that referenced this pull request Dec 10, 2022
Fixes #469 again after it got broken in v4.1.0 (#708)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants