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

Data tables #375

Merged
merged 23 commits into from
Nov 14, 2022
Merged

Data tables #375

merged 23 commits into from
Nov 14, 2022

Conversation

mPokornyETM
Copy link
Contributor

@mPokornyETM mPokornyETM commented Oct 29, 2022

image

  1. When you have many resources the list is too long here.
  2. Copy button makes not really sense. I have removed it for now, because it is broken, when we use bootstrap-5 ( used by DataTable plugin)
  3. Note is an extra row, it also makes no sense here. It breaks sorting as well.
  4. As you can see in the new version are action buttons styled (colored).
  5. Labels shall use link to Jenkins labels (currently not done here, only for labels table)
  6. Use data-table colors instead of a hardcoded style. It shall also work for other modes (dark mode ...)

And this is how the page afterward:

resources
image
labels
image

close #372
close #206

Testing done

Manual tests are done in /lockable-resources/ page:

  • first usage without any resources
  • login as users with different permissions and try to do all action
  • open page with userA parallel open page with userB. Reserve resourceA with userA. Stole resourceA with userB. Unreserve resourceA with userA (it can not work because is revered by other user as well)

Automatic tests:
Added automatic tests for most of do* actions. Just simulate my previous manual tests.

Proposed changelog entries

  • Issue, Overview page looks ugly without lockable resources
  • Major enhancement, Use DataTables to improve more comfortable handling resources in big environments
  • Enhancement, Use the' label' model to handle lockable-resources-label as any other Jenkins labels

Proposed upgrade guidelines

N/A

Localizations

  • [ x ] English
  • [ x ] French
  • [ x ] Slovak
  • [ x ] Czech

Submitter checklist

  • The Jira / Github issue, if it exists, is well-described.
  • The changelog entries and upgrade guidelines are appropriate for the audience affected by the change (users or developers, depending on the change) and are in the imperative mood (see examples).
    • Fill in the Proposed upgrade guidelines section only if there are breaking changes or changes that may require extra steps from users during the upgrade.
  • There is automated testing or an explanation that explains why this change has no tests.
  • New public classes, fields, and methods are annotated with @Restricted or have @since TODO Javadocs, as appropriate.
  • New public functions for internal use only are annotated with @NoExternalUse. In case it is used by non java code the Used by {@code <panel>.jelly} Javadocs are annotated.
  • New deprecations are annotated with @Deprecated(since = "TODO") or @Deprecated(forRemoval = true, since = "TODO"), if applicable.
  • New or substantially changed JavaScript is not defined inline and does not call eval to ease the future introduction of Content Security Policy (CSP) directives (see documentation).
  • For dependency updates, there are links to external changelogs and, if possible, full differentials.
  • For new APIs and extension points, there is a link to at least one consumer.
  • Any localizations are transferred to *.properties files.

Maintainer checklist

Before the changes are marked as ready-for-merge:

  • There is at least one (1) approval for the pull request and no outstanding requests for change.
  • Conversations in the pull request are over, or it is explicit that a reviewer is not blocking the change.
  • Changelog entries in the pull request title and/or Proposed changelog entries are accurate, human-readable, and in the imperative mood.
  • Proper changelog labels are set so that the changelog can be generated automatically.
  • If the change needs additional upgrade steps from users, the upgrade-guide-needed label is set and there is a Proposed upgrade guidelines section in the pull request title (see example).
  • java code changes are tested by automated test.

@mPokornyETM mPokornyETM added enhancement work-in-progress java Pull requests that update Java code ui Features that may impact UI, pages made by the plugin or external UIs (BO, legacy, etc.) labels Oct 29, 2022
@mPokornyETM
Copy link
Contributor Author

Bring the test green will be 'very funny'.

HtmlPage htmlPage = wc.goTo("lockable-resources");

does not works, when we use bootsrtap pluigin (dependency from DataTables)

@mPokornyETM mPokornyETM marked this pull request as ready for review November 1, 2022 20:08
@mPokornyETM mPokornyETM requested a review from a team as a code owner November 1, 2022 20:08
@mPokornyETM mPokornyETM requested a review from TobiX November 8, 2022 16:42
@mPokornyETM
Copy link
Contributor Author

@gaspardpetit what you think 🤔 about this changes

@mPokornyETM
Copy link
Contributor Author

One note. Documentation and test coming soon

@mPokornyETM
Copy link
Contributor Author

This PR will be closed at 14. Nov. 2022 when nobody has added new comment or request change.
After the we shall prepare new release.

Copy link
Contributor

@gounthar gounthar left a comment

Choose a reason for hiding this comment

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

Looks good to me.
Thanks a bunch for all this hard work.

@mPokornyETM mPokornyETM merged commit 108871a into jenkinsci:master Nov 14, 2022
@mPokornyETM
Copy link
Contributor Author

Looks good to me. Thanks a bunch for all this hard work.

You welcome, I am happy, that I can contribute here.

labels.table.column.free=Free
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this line have lost "resources"? Translations in the PR still have the equivalent word...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement java Pull requests that update Java code ui Features that may impact UI, pages made by the plugin or external UIs (BO, legacy, etc.)
Projects
None yet
3 participants