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 zabbix_screen.py limit screen columns #41487

Merged
merged 3 commits into from
Jun 21, 2018
Merged

Conversation

tacid
Copy link
Contributor

@tacid tacid commented Jun 13, 2018

Add option graphs_in_row that allows to limit the count of columns on zabbix screen. When graphs_in_row columns is filled, begins to draw next row. If there is many hosts with many graphs each, draws all graphs for one host in an column each below each other

SUMMARY

This patch adds functionality to draws graphs in many rows with max count of graphs_in_row
Before, there was strange behavior all graphs draws in one row, when where is more then 5 hosts in
group -- you got very long row in zabbix screen, one should scroll it vertically

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

module monitoring zabbix zabbix_screen.py

ANSIBLE VERSION
ansible 2.5.4
  config file = /home/srvadm/ansible.cfg
  configured module search path = [u'/home/srvadm/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/dist-packages/ansible
  executable location = /usr/bin/ansible
  python version = 2.7.12 (default, Dec  4 2017, 14:50:18) [GCC 5.4.0 20160609]

Add option graphs_in_row that allows to limit the count of columns on zabbix screen. When graphs_in_row columns is filled, begins to draw next row. If there is many hosts with many graphs each, draws all graphs for one host in an column each below each other
@ansibot
Copy link
Contributor

ansibot commented Jun 13, 2018

@ansibot ansibot added affects_2.7 This issue/PR affects Ansible v2.7 community_review In order to be merged, this PR must follow the community review workflow. feature This issue/PR relates to a feature request. module This issue/PR relates to a module. needs_triage Needs a first human triage before being processed. new_contributor This PR is the first contribution by a new community member. support:community This issue/PR relates to code supported by the Ansible community. labels Jun 13, 2018
@ansibot
Copy link
Contributor

ansibot commented Jun 13, 2018

The test ansible-test sanity --test ansible-doc --python 2.7 [explain] failed with 1 error:

lib/ansible/modules/monitoring/zabbix/zabbix_screen.py:0:0: missing documentation (or could not parse documentation): expected string or buffer

The test ansible-test sanity --test ansible-doc --python 2.6 [explain] failed with 1 error:

lib/ansible/modules/monitoring/zabbix/zabbix_screen.py:0:0: missing documentation (or could not parse documentation): expected string or buffer

The test ansible-test sanity --test ansible-doc --python 3.5 [explain] failed with 1 error:

lib/ansible/modules/monitoring/zabbix/zabbix_screen.py:0:0: missing documentation (or could not parse documentation): expected string or bytes-like object

The test ansible-test sanity --test ansible-doc --python 3.6 [explain] failed with 1 error:

lib/ansible/modules/monitoring/zabbix/zabbix_screen.py:0:0: missing documentation (or could not parse documentation): expected string or bytes-like object

The test ansible-test sanity --test ansible-doc --python 3.7 [explain] failed with 1 error:

lib/ansible/modules/monitoring/zabbix/zabbix_screen.py:0:0: missing documentation (or could not parse documentation): expected string or bytes-like object

The test ansible-test sanity --test pep8 [explain] failed with 4 errors:

lib/ansible/modules/monitoring/zabbix/zabbix_screen.py:265:23: E201 whitespace after '('
lib/ansible/modules/monitoring/zabbix/zabbix_screen.py:265:55: E202 whitespace before ')'
lib/ansible/modules/monitoring/zabbix/zabbix_screen.py:298:110: E201 whitespace after '('
lib/ansible/modules/monitoring/zabbix/zabbix_screen.py:298:129: E202 whitespace before ')'

The test ansible-test sanity --test validate-modules [explain] failed with 1 error:

lib/ansible/modules/monitoring/zabbix/zabbix_screen.py:0:0: E305 DOCUMENTATION.options.screens.description.5: expected str @ data['options']['screens']['description'][5]. Got {'Option graphs_in_row will limit columns of screen and make multiple rows (default': '3)'}

click here for bot help

@ansibot ansibot added ci_verified Changes made in this PR are causing tests to fail. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. and removed community_review In order to be merged, this PR must follow the community review workflow. labels Jun 13, 2018
Fixing ansible-test sanity --test pep8 errors
moved
Fixing error: missing documentation (or could not parse documentation): expected string or buffer
@ansibot ansibot added community_review In order to be merged, this PR must follow the community review workflow. and removed ci_verified Changes made in this PR are causing tests to fail. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Jun 13, 2018
@tacid
Copy link
Contributor Author

tacid commented Jun 13, 2018

fixed all CI errors

@jborean93 jborean93 removed the needs_triage Needs a first human triage before being processed. label Jun 14, 2018
@eikef
Copy link
Contributor

eikef commented Jun 14, 2018

I like it, and LGTM. Thank you!

shipit

@D3DeFi
Copy link
Contributor

D3DeFi commented Jun 21, 2018

Don't have a chance to test your changes, but they look good.
shipit

@ansibot ansibot added automerge This PR was automatically merged by ansibot. shipit This PR is ready to be merged by Core and removed community_review In order to be merged, this PR must follow the community review workflow. labels Jun 21, 2018
@ansibot ansibot merged commit b21673b into ansible:devel Jun 21, 2018
@tacid
Copy link
Contributor Author

tacid commented Jun 22, 2018

Maybe we should bump metadata_version in ANSIBLE_MATADATA?
Should I open ne PR?

@D3DeFi
Copy link
Contributor

D3DeFi commented Jun 25, 2018

Imo that is not tied to module itself and shouldn't be changed:
"metadata_version is the version of the ANSIBLE_METADATA schema, not the version of the module.

For more information see this documentation page

@tacid
Copy link
Contributor Author

tacid commented Jun 25, 2018

Oh! thank you for explaining

jacum pushed a commit to jacum/ansible that referenced this pull request Jun 26, 2018
* Update zabbix_screen.py limit screen columns

Add option graphs_in_row that allows to limit the count of columns on zabbix screen. When graphs_in_row columns is filled, begins to draw next row. If there is many hosts with many graphs each, draws all graphs for one host in an column each below each other

* fix remove whitespaces before and after brackets

Fixing ansible-test sanity --test pep8 errors
moved

* fix documentation parsing error

Fixing error: missing documentation (or could not parse documentation): expected string or buffer
@dagwieers dagwieers added the zabbix Zabbix community label Jan 28, 2019
@ansible ansible locked and limited conversation to collaborators Jun 21, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.7 This issue/PR affects Ansible v2.7 automerge This PR was automatically merged by ansibot. feature This issue/PR relates to a feature request. module This issue/PR relates to a module. new_contributor This PR is the first contribution by a new community member. shipit This PR is ready to be merged by Core support:community This issue/PR relates to code supported by the Ansible community. zabbix Zabbix community
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants