|
1 |
| -from deltascan.core.utils import (diffs_to_output_format, |
2 |
| - format_string) |
| 1 | +from deltascan.core.utils import (format_string) |
3 | 2 | from deltascan.core.output import Output
|
4 | 3 | from deltascan.core.schemas import ReportScanFromDB, ReportDiffs
|
5 | 4 | from deltascan.core.exceptions import DScanMethodNotImplemented
|
|
9 | 8 | from rich.table import Table
|
10 | 9 | from rich.panel import Panel
|
11 | 10 | from rich.columns import Columns
|
12 |
| - |
| 11 | +from deltascan.core.parser import Parser |
13 | 12 | import datetime
|
14 | 13 |
|
15 | 14 |
|
@@ -59,7 +58,7 @@ def _validate_data(self, data):
|
59 | 58 | articulated_diffs.append(
|
60 | 59 | {"date_from": diff["dates"][1],
|
61 | 60 | "date_to": diff["dates"][0],
|
62 |
| - "diffs": diffs_to_output_format(diff), |
| 61 | + "diffs": Parser.diffs_to_output_format(diff), |
63 | 62 | "generic": diff["generic"],
|
64 | 63 | "uuids": diff["uuids"]})
|
65 | 64 | for d in articulated_diffs:
|
@@ -279,17 +278,17 @@ def display(self):
|
279 | 278 | None
|
280 | 279 | """
|
281 | 280 | tables = self._display()
|
282 |
| - panel = Panel.fit(Columns(tables), title=self._display_title, border_style="conceal") |
| 281 | + panel = Panel.fit(Columns(tables), title=self._display_title) |
283 | 282 |
|
284 | 283 | self.console.print(panel)
|
285 | 284 | return self._index_to_uuid_mapping
|
286 | 285 |
|
287 | 286 | @classmethod
|
288 | 287 | def profiles(cls, profiles):
|
289 | 288 | _profiles_table = Table(show_header=True)
|
290 |
| - _profiles_table.add_column("Name", style="bright_yellow", no_wrap=True) |
291 |
| - _profiles_table.add_column("Arguments", style="rosy_brown", no_wrap=True) |
292 |
| - _profiles_table.add_column("Created at", style="bright_yellow", no_wrap=True) |
| 289 | + _profiles_table.add_column("Name", style="bright_yellow", no_wrap=False, width=50) |
| 290 | + _profiles_table.add_column("Arguments", style="rosy_brown", no_wrap=False) |
| 291 | + _profiles_table.add_column("Created at", style="bright_yellow", no_wrap=False, width=30) |
293 | 292 |
|
294 | 293 | for profile in profiles:
|
295 | 294 | _profiles_table.add_row(profile["profile_name"], profile["arguments"], str(profile["created_at"]))
|
|
0 commit comments