319 def _render(self, group: DalGroup):
320 console.clear()
321
322 if group.has_same_parents:
323 console.print(
324 Panel(
325 "[bold red]Renaming Disabled[/]\n\n"
326 "These duplicate DALs share the same parents.\n"
327 "Renaming would cause commit inconsistencies.",
328 title="⚠ WARNING",
329 border_style="red",
330 expand=False,
331 )
332 )
333 console.print()
334
335 table = Table(title="Duplicated DAL Objects")
336 for col, style in [("#", ""), ("DAL ID", "cyan"), ("Class", "magenta"),
337 ("Configuration", "purple"), ("Parents", "blue"),
338 ("Attributes", "green"), ("Relations", "yellow")]:
339 table.add_column(col, style=style, justify="right" if col == "#" else "left")
340
341 for i, ext in enumerate(group, 1):
342 attr_str = ", ".join(f"{k}={v}" for k, v in ext.attributes.items())
343 rel_str = ", ".join(f"{k}=[{', '.join(v)}]" for k, v in ext.relations.items())
344 table.add_row(
345 str(i), ext.id, ext.dal.className(),
346 str(ext.config), str(ext.get_parents()),
347 attr_str, rel_str,
348 )
349
350 console.print(table)
351