Skip to content

Commit

Permalink
implemented review resuggestion.
Browse files Browse the repository at this point in the history
- sentence case
- add `children`
- format lines
  • Loading branch information
superstar54 committed Jan 9, 2025
1 parent 30e0629 commit 02a989c
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 31 deletions.
28 changes: 14 additions & 14 deletions calculation_history.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -50,33 +50,33 @@
" color: #2c3e50;\n",
" }\n",
" </style>\n",
" <div class=\"page-title\">Calculation History</div>\n",
" <div class=\"page-title\">Calculation history</div>\n",
" <div class=\"how-to-section\">\n",
" <h2>How to Use This Page</h2>\n",
" <h2>How to use this page</h2>\n",
" <p>\n",
" This page allows you to view, filter, sort, and manage your calculation history.\n",
" </p>\n",
" <h4>Filters and Search</h4>\n",
" <h4>Filters and search</h4>\n",
" <ul>\n",
" <li><b>Quick Search Field:</b> Use the search bar above the table to find jobs by any visible field.</li>\n",
" <li><b>Column-Specific Filters:</b> Filter data directly in each column using their respective filter options.</li>\n",
" <li><b>Job State Dropdown:</b> Filter jobs by their state (e.g., Finished, Running).</li>\n",
" <li><b>Date Range Picker:</b> Select a start and end date to narrow down jobs based on creation date.</li>\n",
" <li><b>Properties Filter:</b> Select one or more properties to narrow the results. Only calculations that include all the selected properties will be displayed. Leave all checkboxes unselected to include calculations regardless of their properties.</li>\n",
" <li><b>Quick search field:</b> Use the search bar above the table to find jobs by any visible field.</li>\n",
" <li><b>Column-specific filters:</b> Filter data directly in each column using their respective filter options.</li>\n",
" <li><b>Job state dropdown:</b> Filter jobs by their state (e.g., Finished, Running).</li>\n",
" <li><b>Date range picker:</b> Select a start and end date to narrow down jobs based on creation date.</li>\n",
" <li><b>Properties filter:</b> Select one or more properties to narrow the results. Only calculations that include all the selected properties will be displayed. Leave all checkboxes unselected to include calculations regardless of their properties.</li>\n",
" </ul>\n",
" <h4>Table Actions</h4>\n",
" <h4>Table actions</h4>\n",
" <ul>\n",
" <li><b>Editable Fields:</b> Edit the <b>label</b> and <b>description</b> of a job directly by clicking on the respective fields.</li>\n",
" <li><b>Editable fields:</b> Edit the <b>label</b> and <b>description</b> of a job directly by clicking on the respective fields.</li>\n",
" <li><b>Inspect:</b> Click on a job's ID link to view detailed information.</li>\n",
" <li><b>Delete:</b> Remove a job by clicking the \"Delete\" link in its row. A confirmation page will be opened.</li>\n",
" <li><b>Download:</b> Download raw data (i.e. input and output files) and/or the AiiDA archive of a job using the \"Download\" link.</li>\n",
" </ul>\n",
" <h4>Display Options</h4>\n",
" <h4>Display options</h4>\n",
" <ul>\n",
" <li><b>Sorting:</b> Click any column header to sort the table by that column.</li>\n",
" <li><b>Column Management:</b> Show, hide columns to customize the table view.</li>\n",
" <li><b>Time Format:</b> Toggle between \"Absolute\" (specific dates) and \"Relative\" (time elapsed).</li>\n",
" <li><b>ID Format:</b> Switch between \"PK\" or \"UUID\" for job identification.</li>\n",
" <li><b>Column management:</b> Show, hide columns to customize the table view.</li>\n",
" <li><b>Time format:</b> Toggle between \"Absolute\" (specific dates) and \"Relative\" (time elapsed).</li>\n",
" <li><b>ID format:</b> Switch between \"PK\" or \"UUID\" for job identification.</li>\n",
" </ul>\n",
" </div>\n",
" \"\"\"\n",
Expand Down
28 changes: 11 additions & 17 deletions src/aiidalab_qe/app/utils/search_jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@
COLUMNS = {
"ID": {"headerName": "ID 🔗", "dataType": "link", "editable": False},
"Creation time absolute": {
"headerName": "Creation Time ⏰ (absolute)",
"headerName": "Creation time ⏰ (absolute)",
"type": "date",
"width": 150,
"editable": False,
},
"Creation time relative": {
"headerName": "Creation Time ⏰ (relative)",
"headerName": "Creation time ⏰ (relative)",
"width": 150,
"editable": False,
},
Expand All @@ -34,7 +34,7 @@
"editable": True,
"hide": True,
},
"Relax_type": {"headerName": "Relax_type", "editable": False, "hide": True},
"Relax_type": {"headerName": "Relax type", "editable": False, "hide": True},
"Delete": {"headerName": "Delete", "dataType": "link", "editable": False},
"Download": {"headerName": "Download", "dataType": "link", "editable": False},
"UUID": {"headerName": "UUID", "editable": False, "hide": True},
Expand Down Expand Up @@ -209,7 +209,7 @@ def setup_widgets(self):
children=[
ipw.HTML("<h4>Display options:</h4>"),
ipw.VBox(
[
children=[
self.toggle_time_format,
self.toggle_id_format,
# self.toggle_multi_selection,
Expand All @@ -218,36 +218,30 @@ def setup_widgets(self):
],
layout=ipw.Layout(
border="1px solid #ddd",
padding="0px",
margin="0px, 0px, 100px, 0px",
background_color="#f9f9f9",
border_radius="5px",
box_shadow="0 2px 5px rgba(0, 0, 0, 0.1)",
),
)
filters = ipw.VBox(
children=[
ipw.HTML("<h4>Filters:</h4>"),
ipw.VBox(
[
children=[
self.job_state_dropdown,
self.time_box,
ipw.VBox(
[self.properties_filter_description, self.properties_box],
children=[
self.properties_filter_description,
self.properties_box,
],
layout=ipw.Layout(
border="1px solid #ddd", padding="5px", margin="5px"
border="1px solid #ddd", # fmt: off
margin="5px",
),
),
]
),
],
layout=ipw.Layout(
border="1px solid #ddd",
padding="0px",
margin="0px, 0px, 100px, 0px",
background_color="#f9f9f9",
border_radius="5px",
box_shadow="0 2px 5px rgba(0, 0, 0, 0.1)",
),
)

Expand Down

0 comments on commit 02a989c

Please sign in to comment.