Branch: refs/heads/master
Home:
https://github.com/tribe29/checkmk
Commit: 5fedb5cc7ecc0f634d0fb75e6dcdfdd563833c88
https://github.com/tribe29/checkmk/commit/5fedb5cc7ecc0f634d0fb75e6dcdfdd56…
Author: Óscar Nájera <oscar.najera(a)tribe29.com>
Date: 2021-05-06 (Thu, 06 May 2021)
Changed paths:
M cmk/gui/pages.py
Log Message:
-----------
Fix type because html.get_request is Dict[str, Any]
Change-Id: I5917925c535661fe5053f6e4552debdbf031b9a4
Commit: d472f829d13af366c063c2e20660a3a9bfb0bd97
https://github.com/tribe29/checkmk/commit/d472f829d13af366c063c2e20660a3a9b…
Author: Óscar Nájera <oscar.najera(a)tribe29.com>
Date: 2021-05-06 (Thu, 06 May 2021)
Changed paths:
M web/htdocs/js/modules/valuespecs.js
M web/htdocs/themes/facelift/scss/_main.scss
Log Message:
-----------
Remove text autocomplete
CMK-6935
Change-Id: Iac56dc31d39e17c934c625bbd4adaca59180b94d
Commit: 2f28b824a7f2b7adda2abe3b9ea200ee5b3c3d4f
https://github.com/tribe29/checkmk/commit/2f28b824a7f2b7adda2abe3b9ea200ee5…
Author: Óscar Nájera <oscar.najera(a)tribe29.com>
Date: 2021-05-06 (Thu, 06 May 2021)
Changed paths:
M cmk/gui/htmllib.py
M cmk/gui/plugins/dashboard/graph.py
M cmk/gui/plugins/metrics/utils.py
M cmk/gui/plugins/visuals/filters.py
M cmk/gui/plugins/wato/utils/__init__.py
M cmk/gui/valuespec.py
M cmk/gui/wato/pages/rulesets.py
M cmk/gui/wato/pages/sites.py
M cmk/gui/watolib/__init__.py
M web/htdocs/js/modules/forms.js
M web/htdocs/js/modules/valuespecs.js
Log Message:
-----------
Change text autocompletions by select2dropdowns
Text autocompletion was originally designed only for monitored hostnames
and configured hostnames. The text field allowed users to enter any
value and also to edit configured values. Additionally pasting a string
with particular characters(independent of autocomplete), would split it
in the case of listofstring valuespec and create new fields.
The text autocomplete suffered from some bugs and limitations:
- Options availability bug. Sometimes the request would block and no
new options would be fetched. Sometimes the workaround of clearing the
field, changing focus and returning would restart the query. Sometimes
worse in the case of configured hostnames, it was necessary to exit the
page.
- When request were not blocked, a request fired every onkeyup and when
request came back it overwrote the user input.
This commit exchanges the adhoc select2 dialog that floats on top of the
html.input with a clean drop-down, managed entirely by select2 which
directly ajax calls to request data. This allows for separated
concerns, the python valuespec does not need to inject JS to place hooks
to query the webapi. This fixes the following
- The data availability bug, changing input starts a new query. Thus
results are always found
- Requests are triggered 250ms after User stops typing. This saves on
requests.
- Select2 cancels previous request as soon as the user changes input and
only updates contents from the response of last request. This solves the
bug of previous request updating results and confusing user.
Old autocomplete valuespecs now inherit thus from dropdownchoice rather than text ascii.
- Monitored Hostname. Now has regex input validation. User custom input is permitted
- Configured Hostname. Now has regex input validation. User custom input is permitted
- Monitored Service. Now has regex input validation. User custom input is permitted
- Metric name. Now has input validation, metric name is strictly bound to known metrics
- Hostname and service filters. Render directly the dropdowns as filters
don't yet use the valuespecs.
- Configured Hostname, can be embedded in listofstrings. List of strings is
extended to expand on text input and text paste when the underlying
datatype is a dropdown. It works as before.
CMK-6935
Change-Id: I7c0dac8f4ee6deeaba7d614804500b7e98c1b95d
Commit: 8c3efe7991a4dcaaac1a44f8269c5f55ff3cff18
https://github.com/tribe29/checkmk/commit/8c3efe7991a4dcaaac1a44f8269c5f55f…
Author: Óscar Nájera <oscar.najera(a)tribe29.com>
Date: 2021-05-06 (Thu, 06 May 2021)
Changed paths:
M cmk/gui/plugins/visuals/filters.py
M cmk/gui/plugins/visuals/infos.py
M cmk/gui/valuespec.py
M tests/unit/cmk/gui/test_pages.py
M web/htdocs/js/modules/valuespecs.js
M web/htdocs/themes/facelift/scss/_page_menu.scss
Log Message:
-----------
Customgraphs editor use only select2
In order to use the modern autocomplete dropdowns for input in host,
service, and metric the old valuespec is completely removed.
Functionality is good enough
- There is no automatic refresh on any form action. This is even a
feature request: SUP-2485, SUP-5399, SUP-5949
- Added an apply button to save changes
- No need for metric & scalar selector ajax pages. The autocompleter
covers all
- Because no form & page refresh, can drop the JS part that did that,
and caused some bugfixing headaches when styles were changes. All
dropdowns use id instead of name like text_input
In the single info cases and custom graphs editor, where only a specific
hostname, service, and metric make sense enforce that constrain instead
of allowing user to write anything.
Filters have direct html render, enforce the exact match op=="=" for
only what is autocompleted.
Change-Id: I685fc48418ae3f743068cbdbd27f2ea3839f5c5c
Commit: edf6e50e7a1d28cb11ea374bdd78a9bd54b971c9
https://github.com/tribe29/checkmk/commit/edf6e50e7a1d28cb11ea374bdd78a9bd5…
Author: Óscar Nájera <oscar.najera(a)tribe29.com>
Date: 2021-05-06 (Thu, 06 May 2021)
Changed paths:
M cmk/gui/valuespec.py
M web/htdocs/js/modules/valuespecs.js
Log Message:
-----------
Autocompleter options mention incomplete results first
This announces user that the list could be incomplete.
User can't select as option, it is a warning only not an option
Change-Id: If87bc39c91fbbcdf03b428cb023fa051193cbb7d
Compare:
https://github.com/tribe29/checkmk/compare/fe19ad472c18...edf6e50e7a1d