Skip to content

Commit 9d26a72

Browse files
committed
Feature: diff between two given xml, without storing to the database
1 parent 4a6d82e commit 9d26a72

15 files changed

+549
-340
lines changed

deltascan/cli/cli_output.py

+7-8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
from deltascan.core.utils import (diffs_to_output_format,
2-
format_string)
1+
from deltascan.core.utils import (format_string)
32
from deltascan.core.output import Output
43
from deltascan.core.schemas import ReportScanFromDB, ReportDiffs
54
from deltascan.core.exceptions import DScanMethodNotImplemented
@@ -9,7 +8,7 @@
98
from rich.table import Table
109
from rich.panel import Panel
1110
from rich.columns import Columns
12-
11+
from deltascan.core.parser import Parser
1312
import datetime
1413

1514

@@ -59,7 +58,7 @@ def _validate_data(self, data):
5958
articulated_diffs.append(
6059
{"date_from": diff["dates"][1],
6160
"date_to": diff["dates"][0],
62-
"diffs": diffs_to_output_format(diff),
61+
"diffs": Parser.diffs_to_output_format(diff),
6362
"generic": diff["generic"],
6463
"uuids": diff["uuids"]})
6564
for d in articulated_diffs:
@@ -279,17 +278,17 @@ def display(self):
279278
None
280279
"""
281280
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)
283282

284283
self.console.print(panel)
285284
return self._index_to_uuid_mapping
286285

287286
@classmethod
288287
def profiles(cls, profiles):
289288
_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)
293292

294293
for profile in profiles:
295294
_profiles_table.add_row(profile["profile_name"], profile["arguments"], str(profile["created_at"]))

0 commit comments

Comments
 (0)