Total Complexity | 5 |
Total Lines | 29 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | 1 | from .client_arf_input import ClientArfInput |
|
2 | 1 | from .client_html_output import ClientHtmlOutput |
|
3 | 1 | from ..converter import Converter |
|
4 | |||
5 | |||
6 | 1 | class ArfToHtml(ClientArfInput, ClientHtmlOutput): |
|
7 | 1 | def _get_message(self): |
|
8 | 1 | MESSAGES = { |
|
9 | 'description': 'Client for visualization of SCAP rule evaluation results', |
||
10 | 'source_filename': 'ARF scan file', |
||
11 | } |
||
12 | 1 | return MESSAGES |
|
13 | |||
14 | 1 | def create_dict_of_rule(self, rule_id): |
|
15 | 1 | converter = Converter(self.xml_parser.get_oval_tree(rule_id)) |
|
16 | 1 | return converter.to_JsTree_dict(self.hide_passing_tests) |
|
17 | |||
18 | 1 | def _put_to_dict_oval_trees(self, dict_oval_trees, rule): |
|
19 | 1 | dict_oval_trees[rule] = self.create_dict_of_rule(rule) |
|
20 | |||
21 | 1 | def _get_src_for_one_graph(self, rule): |
|
22 | 1 | return self.get_save_src(rule + self.date) |
|
23 | |||
24 | 1 | def prepare_parser(self): |
|
25 | 1 | super().prepare_parser() |
|
26 | 1 | self.prepare_args_all_in_one() |
|
27 | 1 | self.prepare_args_display() |
|
28 | self.prepare_args_when_user_can_list_in_rules() |
||
29 |