refactored and updated tags cmdlet and hydrusnetwork interaction plugin features
This commit is contained in:
@@ -72,12 +72,16 @@ def prepare_detail_metadata(
|
||||
from SYS.result_table import extract_item_metadata
|
||||
|
||||
metadata = extract_item_metadata(subject) or {}
|
||||
if "Store" in metadata and "Instance" not in metadata:
|
||||
metadata["Instance"] = metadata.pop("Store")
|
||||
|
||||
if include_subject_fields and isinstance(subject, dict):
|
||||
for key, value in subject.items():
|
||||
if str(key).startswith("_") or key in {"selection_action", "selection_args"}:
|
||||
continue
|
||||
label = _labelize_key(str(key))
|
||||
if label == "Store":
|
||||
label = "Instance"
|
||||
if label not in metadata and _has_display_value(value):
|
||||
metadata[label] = value
|
||||
|
||||
@@ -86,7 +90,7 @@ def prepare_detail_metadata(
|
||||
if hash_value:
|
||||
metadata["Hash"] = hash_value
|
||||
if store:
|
||||
metadata["Store"] = store
|
||||
metadata["Instance"] = store
|
||||
if path:
|
||||
metadata["Path"] = path
|
||||
|
||||
@@ -122,7 +126,14 @@ def create_detail_view(
|
||||
if exclude_tags:
|
||||
kwargs["exclude_tags"] = True
|
||||
if detail_order is not None:
|
||||
kwargs["detail_order"] = list(detail_order)
|
||||
normalized_order: list[str] = []
|
||||
for key in detail_order:
|
||||
text = str(key)
|
||||
if text.lower() == "store":
|
||||
normalized_order.append("Instance")
|
||||
else:
|
||||
normalized_order.append(text)
|
||||
kwargs["detail_order"] = normalized_order
|
||||
|
||||
table = ItemDetailView(title, **kwargs)
|
||||
if table_name:
|
||||
|
||||
Reference in New Issue
Block a user