diff --git a/dtool_lookup_gui/models/datasets.py b/dtool_lookup_gui/models/datasets.py
index 42043fa..91b804d 100644
--- a/dtool_lookup_gui/models/datasets.py
+++ b/dtool_lookup_gui/models/datasets.py
@@ -39,8 +39,6 @@
from dtool_info.inventory import _dataset_info
from dtool_lookup_api.core.LookupClient import ConfigurationBasedLookupClient
-
-
from ..utils.logging import _log_nested
from ..utils.multiprocessing import StatusReportingChildProcessBuilder, process_initializer
from ..utils.progressbar import ProgressBar
@@ -272,22 +270,30 @@ def __init__(self, uri=None, dataset_info=None):
raise ValueError('Please provide either `uri` or `dateset_info`.')
@classmethod
- async def get_datasets(cls, keyword, page_number, page_size,sort_fields,sort_order, pagination={} ,sorting={}):
+ async def get_datasets(cls, free_text=None, page_number=None, page_size=None,
+ sort_fields=None, sort_order=None, pagination={} , sorting={}):
async with ConfigurationBasedLookupClient() as lookup:
- datasets = await lookup.get_datasets(keyword, page_number=page_number, page_size=page_size,sort_fields=sort_fields,sort_order=sort_order, pagination=pagination,sorting=sorting)
+ datasets = await lookup.get_datasets(
+ free_text=free_text, page_number=page_number, page_size=page_size,
+ sort_fields=sort_fields, sort_order=sort_order,
+ pagination=pagination, sorting=sorting)
return [await cls.from_lookup(lookup_dict) for lookup_dict in datasets]
@classmethod
- async def query(cls, query_text, *args, **kwargs):
+ async def get_datasets_by_mongo_query(cls, query, *args, **kwargs):
async with ConfigurationBasedLookupClient() as lookup:
- datasets = await lookup.query(query_text, *args, **kwargs)
+ datasets = await lookup.get_datasets_by_mongo_query(query=query, *args, **kwargs)
return [await cls.from_lookup(lookup_dict) for lookup_dict in datasets]
@classmethod
- async def query_all(cls,sort_fields,sort_order, page_number=1, page_size=10, pagination={},sorting={}):
+ async def query_all(cls, sort_fields=None, sort_order=None, page_number=None,
+ page_size=None, pagination={}, sorting={}):
"""Query all datasets from the lookup server."""
async with ConfigurationBasedLookupClient() as lookup:
- datasets = await lookup.get_datasets(page_number=page_number, page_size=page_size,sort_fields=sort_fields,sort_order=sort_order, pagination=pagination,sorting=sorting)
+ datasets = await lookup.get_datasets(
+ page_number=page_number, page_size=page_size,
+ sort_fields=sort_fields, sort_order=sort_order,
+ pagination=pagination,sorting=sorting)
return [await cls.from_lookup(lookup_dict) for lookup_dict in datasets]
@classmethod
diff --git a/dtool_lookup_gui/views/login_window.py b/dtool_lookup_gui/views/login_window.py
index 07f7ed1..5421ed6 100644
--- a/dtool_lookup_gui/views/login_window.py
+++ b/dtool_lookup_gui/views/login_window.py
@@ -96,7 +96,7 @@ def on_skip_button_clicked(self, widget):
self.close()
@Gtk.Template.Callback()
- def settings_button_clicked_cb(self, widget):
+ def on_settings_button_clicked_cb(self, widget):
logger.info("Settings button clicked. Opening settings dialog.")
self.settings_dialog.show()
diff --git a/dtool_lookup_gui/views/login_window.ui b/dtool_lookup_gui/views/login_window.ui
index 8ed3150..5bae26e 100644
--- a/dtool_lookup_gui/views/login_window.ui
+++ b/dtool_lookup_gui/views/login_window.ui
@@ -19,7 +19,7 @@
True
True
end
-
+
-
-
+
True
- True
- end
- False
- 0
-
- - 10
- - 25
- - 50
- - 75
-
-
+ False
+
- 1
+ 3
0
-
+
True
False
- end
- True
- Entries per page:
- 0
+
- 0
+ 1
0
@@ -602,14 +580,14 @@
-
+
Prev
30
True
True
True
start
-
+
@@ -638,14 +616,14 @@
-
+
Next
30
True
True
True
start
-
+
@@ -656,14 +634,14 @@
-
+
2
30
True
True
True
start
-
+
@@ -674,14 +652,14 @@
-
+
0
30
True
True
True
start
-
+
@@ -692,14 +670,14 @@
-
+
1
30
True
True
True
start
-
+