This repo does not support Python 2 anymore, so we don't need
six for compatibility between Python2 and 3, convert six usage to Python
3 code.
Needed-By: https://review.opendev.org/701743
Change-Id: I5f4d701a6cf3ad6d9684608820dc863c7b3fa12c
On initial render, the placeholder row in the joins variable has only
2 items instead of the needed 3, causing rendering to fail.
Change-Id: I01da6bd2b9d9ee78ee4cab5f706e0f5da5b2f020
Closes-bug: 1820129
Removes use of future tag (not available in Django 1.10+).
Flatten Context into dict for render (necessary for Django 1.11+).
Both changes compatible with Django >= 1.8.
Change-Id: I5db4af45208423753dd5d60616ee781e6471b9e6
Closes-bug: 1816707
In library policy dashboard, sometimes the same rule is
repeated multiple times, overwriting some subsequent rules.
For example, in Policy Details: TagBasedNetworkSecurityZone,
the first two rules displays as
security_zone_tags('demo_zone'),
security_zone_tags('demo_zone')
rather than the correct
security_zone_tags('demo_zone'),
security_zone_tags('production_zone').
This patch fixes the issue by making sure a distinct ID is
assigned to each rule for django.
Change-Id: I20d758ec4dffeaecf60f6c60c401bb08e359def5
Closes-Bug: 1784770
The functions xrange() and cmp() are not supported in python3.
This commit removes usage of these two.
Reference - https://docs.python.org/3.0/whatsnew/3.0.html
Change-Id: I26fd0d6a06cd2ddb32da17c4d6d7329d773f7828
The django form field default is "required=True", so this patch
remove the redundant "required=True" in the form.
Change-Id: I570c8ec25f9434c9b8c84d3c5ed6ffd1789cd1a2
Recently horizon test configuration was changed to use
the Django default test runner because nose is in maintenance mode
for the past several years [1]. Django testcase and oslotest are
incompatible, so congress_dashboard testcase now fails.
test_fake.py actually tests nothing, so there is no reason
to keep it. It sounds reasonable to drop this file.
[1] horizon commit 1f80d94459856a8c477310cc0fe4b0e165d8c0c1
Change-Id: I0b99e709fda9c933ec229bb1dde161cf5bea319b
Replace django.core.urlresolves with django.urls
(In Django 2.0) The django.core.urlresolvers module is removed
in favor of its new location, django.urls.
It was deprecated in Django 1.10:
https://docs.djangoproject.com/en/2.0/releases/1.10/#id3
Add py35dj20 job to test Django 2.0 integration.
Change-Id: I89dea8aaeb2a7d42a9ce99e7cb236c491b34c138
This commit adds support to activate a library policy.
Partially-Implements blueprint add-policy-library-gui
Depends-On: I0c4a70002bd172c0b5842cc7de1c9bb5ad0bcf5a
I9d038dd4c33ed509261f6b404ab278bd33318d3b
Change-Id: Ibe3223b08ae402037c6efe5ef50d05ba6e4d0379
This commit uses the include_rules option supported in client
and server for listing library policies.
Partially-Implements blueprint add-policy-library-gui
Depends-On: Ib27119ba03d5658ff937f514f6ff3abfe5c390fe
I2271579f655481b156ec66382d887b8784b13ad6
Change-Id: I3a9b95a4fd9b23c91658d464b6ba4e4a7ca105c7
This commit adds support list rules for specific library policy.
Reference screenshot of GUI: https://imagebin.ca/v/3fkr2eDbDS9i
Partially-Implements blueprint add-policy-library-gui
Change-Id: Icd51bd408a295241d763e8369049b9aff5db5504
This commit is to list library policies through congress-dashboard
TODO: show rules
activate policy
Partially-Implements blueprint add-policy-library-gui
Change-Id: Iff59145001af7df9afb3c654346fada3c451e966
Do not set value to 0 and do not add rows without non-zero value.
Also fix javascript in template to avoid coloring 'No items to display.'
With the following rules:
$ openstack congress policy rule create action 'warning(x) :- blah(x)'
$ openstack congress policy rule create classification 'blah(x) :- error(x)'
Monitoring pane pre-patch shows rows of zero warning/error
screenshot: https://imagebin.ca/v/3VXCVtZxXYUQ
rows suppressed post-patch.
screenshot: https://imagebin.ca/v/3VXX9g34QOGf
Closes-Bug: 1708294
Change-Id: I56adc4da430e3e1e15bd31c42fe3f7bce996dcd0
reload the monitoring page every 30 secondsa
checkbox to enable/disable auto refresh
screenshot:
https://imagebin.ca/v/3UAtqA25IGK5
longer term, we want a more refined implementation with
refreshing partial page and customizable refresh interval.
But this primitive solution works reasonably well to start.
Implements blueprint enhance-congress-dashboard
Partial-Bug:#1670520
Change-Id: I50b678682480d5f2686fb099a6093ac9eb60aa52
coloring javascript added to
congress_dashboard/monitoring/templates/monitoring/index.html
None zero error cell colored red
None zero warning cell colored yellow
"monitoring" div id changed to "monitoring_panel" to
avoid clashing with the monitoring table of the same id.
screen shot example: https://imagebin.ca/v/3UAZHzzxqkwX
Implements blueprint enhance-congress-dashboard
Partial-Bug:#1670520
Change-Id: I8702b6dac75612449e0025b13a1db7f481b6c532
This patch adds the link to show error and warning table data
directly from monitoring panel. And also adds the link to
violated policy information.
Implements blueprint enhance-congress-dashboard
Partial-Bug:#1670520
Change-Id: Ibddb35c5feb040d3a340bc392a69ba68bf93e5d2
This commit adds new panel to monitor violations in congress UI.
Assumes each policy would have only one defined error or warning table.
This panel lists the errors count and warnings count for each policy
if defined.
TODO:
1. Add link to policy error table to list the rows
2. Coloring for error and warning
3. Periodic refresh of data.
Partial-Bug:#1670520
Change-Id: I24f16df716e58121bc22cf2ae4426de80d06a8ee
This commit is to adds support in congress-ui to enter the rule
directly in policy language. And also, renames the existing name
'Create Rule' to 'Construct Rule'.
Implements blueprint enhance-congress-dashboard
Change-Id: I99a88d9c98b507d53163dcdb4f0e25d6ab088e69
This commit adds the support to create and delete
datasources through UI
Partially-Implements blueprint enhance-congress-dashboard
Change-Id: I08512ed2bdfba6d669aad966338678744e149303
This commit changes the datasources page layout, to avoid
loading all the data at once and showing the data in more
relevant page
Change-Id: Iaedc7be9d00060f3701b53c309738e5073450fdf
Partially-Implements: blueprint enhance-congress-dashboard
This patch is to fixes the problem that the cancel button of
create-rule dialogue box floats too far to the left outside
of the dialogue box
porting from I1821605d644f1b5b19479127f317d770dc82c138
Change-Id: I8d7764a14a5f916e2f248b99734fe5b1cccf78af
This commit ports the dashboard fix to new project.
Change-Id: Ibfa239b4a487587ff909eac74230fe2449ae4ba6
Partially-Implements: blueprint enahance-congress-dashboard