Commit Graph

24 Commits

Author SHA1 Message Date
Chris PeBenito
8e082f70cf Replace license text in sources with SPDX license indentifiers.
Signed-off-by: Chris PeBenito <pebenito@ieee.org>
2021-11-20 14:12:15 -05:00
Chris PeBenito
16c069631e
Merge pull request #57 from pebenito/apol-tab-metaclass
TabRegistry: Add a new metaclass for generating the tab selection.
2021-01-20 15:33:20 -05:00
Chris PeBenito
d3687c7705 TabRegistry: Add a new metaclass for generating the tab selection.
The ChooseAnalysis dialog lists the analysis tabs so the user can select
them.  Create a new metaclass so the listing of tabs, grouping in the menu,
and the invocation of the tab's class is automatic.  This requires section,
tab_title, and mlsonly class attributes.

Signed-off-by: Chris PeBenito <pebenito@ieee.org>
2021-01-20 15:27:38 -05:00
Chris PeBenito
bb5986724e apol: Suppress RuntimeErrors in analysis tab destructors.
Suppress errors like this:

Exception ignored in: <function DomainTransitionAnalysisTab.__del__ at 0x7fcb4e93c1f0>
Traceback (most recent call last):
  File "/home/pebenito/projects/setools/setoolsgui/apol/dta.py", line 54, in __del__
    self.thread.quit()
RuntimeError: wrapped C/C++ object of type ResultsUpdater has been deleted
Exception ignored in: <function ResultsUpdater.__del__ at 0x7fcb4e943550>
Traceback (most recent call last):
  File "/home/pebenito/projects/setools/setoolsgui/apol/dta.py", line 449, in __del__
    self.wait()
RuntimeError: wrapped C/C++ object of type ResultsUpdater has been deleted
Exception ignored in: <function BrowserUpdater.__del__ at 0x7fcb4e943820>
Traceback (most recent call last):
  File "/home/pebenito/projects/setools/setoolsgui/apol/dta.py", line 538, in __del__
    self.wait()
RuntimeError: wrapped C/C++ object of type BrowserUpdater has been deleted

Signed-off-by: Chris PeBenito <pebenito@ieee.org>
2021-01-20 14:27:59 -05:00
Chris PeBenito
6d7a672611 Update static testing and fix identified issues.
* Change pep8 to new pycodestyle tool.
* Load the policrep extension in pylint
2018-08-11 20:46:06 -04:00
Chris PeBenito
42c2bbd606 Move data in as package data.
Closes #136.
2016-11-12 11:13:21 -05:00
Chris PeBenito
ddca4536ee apol: Tabs raise exceptions if trying to save while there are errors.
Closes #97
Closes #98
2016-07-09 13:22:09 -04:00
Chris PeBenito
5fd724b300 apol: Convert tabs to use error methods from the base class. 2016-07-09 13:14:31 -04:00
Chris PeBenito
c4556ae85f apol: Implement analysis tab base class.
Add methods for clearing and setting UI error states.  Disable apply button
if there are errors in the tab.
2016-07-09 12:35:11 -04:00
Chris PeBenito
5367f1a288 apol: Whitespace fixes in tab save/load functions. 2016-06-22 14:23:55 -04:00
Chris PeBenito
83f232e55f MLS/RBACRuleQueryTab: Add tab save/restore functions.
For #97 and #98.
2016-06-09 09:35:27 -04:00
Chris PeBenito
b416862554 apol: rename models to make it clear they are tables 2016-04-01 14:03:41 -04:00
Chris PeBenito
f1f9c3186d Create new base class for table models.
Break up rule models into three files since RuleListModel doesn't make
sense any longer.
2016-04-01 09:00:17 -04:00
Chris PeBenito
c281b9410a apol: explicitly set initial result table sort orders. 2016-03-30 10:49:34 -04:00
Chris PeBenito
945a6548e0 apol: move queries to common updater thread class
Move logger to main tab class and have the result class send the result
count back on the finished signal.
2016-03-30 10:26:38 -04:00
Chris PeBenito
fcabb2f0e6 Move generic GUI classes up to the setoolsgui package. 2016-03-14 15:25:07 -04:00
Chris PeBenito
3434618aef LogHandlerToSignal: set default formatter and INFO level in __init__. 2016-03-11 09:00:20 -05:00
Chris PeBenito
6c2acc3fdd Rename LogToSignalHandler to LogHandlerToSignal. 2016-03-07 13:40:37 -05:00
Chris PeBenito
d268e7e7f7 apol: more logging for the status bar 2016-03-07 13:21:36 -05:00
Chris PeBenito
3f4630c6f9 apol: use INFO logs to update status displays
Connect all setools and setoolsgui INFO+ messages and display them on
the statusbar.

Use each tab's analysis/query INFO+ messages and display them on the
"busy" status dialog box.
2016-03-07 12:04:08 -05:00
Chris PeBenito
c017bd7cfa Apply logging best practices.
* Use __name__ for the logger name
* Add top-level library NullHandlers
2016-03-04 13:49:03 -05:00
Chris PeBenito
7e8fcba695 apol: switch tabs to (more discoverable) check boxes for hiding UI elements
Also drop the results expander.
2016-02-29 10:51:24 -05:00
Chris PeBenito
5c39a1fd8c apol: reset busy dialog in setupUI()
For some reason, on Fedora the dialog will show before an explicit show()
is issued.
2016-02-26 08:58:09 -05:00
Chris PeBenito
cf7b0789ba apol: add MLS rule query 2015-12-15 08:51:14 -05:00