From 7bed6fca3a992251fc2d0cad8a13841888f996a2 Mon Sep 17 00:00:00 2001 From: Adam Fekete Date: Thu, 6 Jun 2024 09:20:58 +0200 Subject: [PATCH] cleanup --- src/nomad_aitoolkit/apps/__init__.py | 30 +++++++++++++--------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/src/nomad_aitoolkit/apps/__init__.py b/src/nomad_aitoolkit/apps/__init__.py index 9c025c0..ea091e6 100644 --- a/src/nomad_aitoolkit/apps/__init__.py +++ b/src/nomad_aitoolkit/apps/__init__.py @@ -12,11 +12,15 @@ FilterMenus, FilterMenuSizeEnum, Filters, + Format, Layout, + ModeEnum, + RowDetails, + Rows, + RowSelection, + RowURLActions, ScaleEnum, WidgetTerms, - Format, - ModeEnum ) from pydantic import Field @@ -68,12 +72,8 @@ class AIToolkitAppEntryPoint(AppEntryPoint): 'entry_id', 'entry_type', 'authors', - # 'references', - # 'upload_create_time', 'data.name#nomad_aitoolkit.schema.package.AIToolkitNotebook', 'data.category#nomad_aitoolkit.schema.package.AIToolkitNotebook', - # 'data.systems#nomad_aitoolkit.schema.package.AIToolkitNotebook', - # 'data.methods#nomad_aitoolkit.schema.package.AIToolkitNotebook', 'data.platform#nomad_aitoolkit.schema.package.AIToolkitNotebook', 'data.date#nomad_aitoolkit.schema.package.AIToolkitNotebook', ], @@ -87,26 +87,19 @@ class AIToolkitAppEntryPoint(AppEntryPoint): 'entry_id': Column(), 'entry_type': Column(label='Entry type', align=AlignEnum.LEFT), 'authors': Column(label='Authors', align=AlignEnum.LEFT), - # 'references': Column(label='References', align=AlignEnum.LEFT), - # 'upload_create_time': Column(label='Upload time', align=AlignEnum.LEFT), 'data.name#nomad_aitoolkit.schema.package.AIToolkitNotebook': Column( label='Name', align=AlignEnum.LEFT ), 'data.category#nomad_aitoolkit.schema.package.AIToolkitNotebook': Column( label='Category' ), - # 'data.systems#nomad_aitoolkit.schema.package.AIToolkitNotebook': Column( - # label='Systems' - # ), - # 'data.authors_list#nomad_aitoolkit.schema.package.AIToolkitNotebook': Column( - # label='Authors', - # align=AlignEnum.LEFT - # ), 'data.platform#nomad_aitoolkit.schema.package.AIToolkitNotebook': Column( label='Platform', align=AlignEnum.LEFT ), 'data.date#nomad_aitoolkit.schema.package.AIToolkitNotebook': Column( - label='Upload time', align=AlignEnum.LEFT, format=Format(mode=ModeEnum.DATE) + label='Upload time', + align=AlignEnum.LEFT, + format=Format(mode=ModeEnum.DATE), ), }, ), @@ -164,5 +157,10 @@ class AIToolkitAppEntryPoint(AppEntryPoint): ), ] ), + rows=Rows( + actions=RowURLActions(enabled=True, label='Launch notebook'), + details=RowDetails(enabled=True), + selection=RowSelection(enabled=True), + ), ), )