Skip to content

database: improve subscription view#1542

Merged
BareosBot merged 6 commits intobareos:masterfrom
bruno-at-bareos:dev/bruno/master/improve_subscription_view
Sep 21, 2023
Merged

database: improve subscription view#1542
BareosBot merged 6 commits intobareos:masterfrom
bruno-at-bareos:dev/bruno/master/improve_subscription_view

Conversation

@bruno-at-bareos
Copy link
Contributor

@bruno-at-bareos bruno-at-bareos commented Sep 5, 2023

  • fix subscription view for plugin with parameter config_file
  • add warning sentence about number
  • modify sightly the webui sentence to use estimated

OP#5449 OP#5488

Please check

  • Short description and the purpose of this PR is present above this paragraph
  • Your name is present in the AUTHORS file (optional)

If you have any questions or problems, please give a comment in the PR.

Helpful documentation and best practices

Checklist for the reviewer of the PR (will be processed by the Bareos team)

Make sure you check/merge the PR using devtools/pr-tool to have some simple automated checks run and a proper changelog record added.

General
  • Is the PR title usable as CHANGELOG entry?
  • Purpose of the PR is understood
  • Commit descriptions are understandable and well formatted
  • Check backport line
  • Required backport PRs have been created
Source code quality
  • Source code changes are understandable
  • Variable and function names are meaningful
  • Code comments are correct (logically and spelling)
  • Required documentation changes are present and part of the PR
Tests
  • Decision taken that a test is required (if not, then remove this paragraph)
  • The choice of the type of test (unit test or systemtest) is reasonable
  • Testname matches exactly what is being tested
  • On a fail, output of the test leads quickly to the origin of the fault

@bruno-at-bareos bruno-at-bareos force-pushed the dev/bruno/master/improve_subscription_view branch from 581cb4d to 18cbc5c Compare September 6, 2023 08:33
j.jobbytes / 1000000 AS total_mb,
CASE
WHEN f.filesettext ILIKE '%{%{%File%=%' THEN NULL
WHEN f.filesettext ILIKE '%{%{%File%=%' AND f.filesettext NOT ILIKE '%:config_file%=%' THEN NULL
Copy link
Member

Choose a reason for hiding this comment

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

Ignoring config_file= feels oddly specific.
Wouldn't reordering the WHENs to move the File= to the bottom achieve the same goal?
Otherwise we could rewrite ILIKE '%{%{%File%=%' to something like SIMILAR TO '%{%{\s*File\s*=%' which is less portable, but as we're PostgreSQL-only now shouldn't be an issue.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I would avoid regexp but in that particular case, it is certainly the best possible option as it will highly simplifies the string especially if in the same time we move the file to the end of each block.
Will do a proposal with that solution.

Copy link
Member

@arogge arogge left a comment

Choose a reason for hiding this comment

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

That looks pretty good!
Maybe we should add a comment above the view definition to tell people that the ordering is actually important.

bruno-at-bareos and others added 6 commits September 21, 2023 12:49
- fix subscription view for plugin with parameter config_file
- move create update versionid to end of ddl

Signed-off-by: Bruno Friedmann <bruno.friedmann@bareos.com>
- filter Estimate sentence in testrunner
- add additionnal resulting blank line in expected output

Signed-off-by: Bruno Friedmann <bruno.friedmann@bareos.com>
- reorder match for File= plugin
- add missing plugin
- webui adjust copyright year
@BareosBot BareosBot force-pushed the dev/bruno/master/improve_subscription_view branch from fb38cbb to f3dbaca Compare September 21, 2023 12:49
@BareosBot BareosBot merged commit 4661789 into bareos:master Sep 21, 2023
@bruno-at-bareos bruno-at-bareos deleted the dev/bruno/master/improve_subscription_view branch January 15, 2024 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants