Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 18 additions & 1 deletion app/save-and-restore/app/doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,21 @@ Below screen shot shows the tree structure and a configuration editor.
.. image:: images/screenshot1.png
:width: 80%

Annotations on nodes
--------------------

Snapshots and composite snapshots may be tagged with user defined tags, see :ref:`tagging`. Presence of one or multiple
tags is indicated with a symbol to the right of the node name:

.. image:: images/snapshot-with-tag.png

Similarly, snapshots and composite snapshots referenced in other composite snapshots are annotated with a symbol to the
right of the node name:

.. image:: images/snapshot-with-references.png



Node names and ordering
-----------------------

Expand Down Expand Up @@ -71,7 +86,7 @@ Tree View Context Menu

Most actions performed in the client UI are invoked from the tree view's context menu, which appears like so:

.. image:: images/tree_view_context_menu.png
.. image:: images/treeview-context-menu.png
:width: 30%

Since the set of applicable actions varies between node types, items in the context menu enabled/disabled
Expand Down Expand Up @@ -453,6 +468,8 @@ still interact with non-matching items.
There may be additional nodes matching the current filter, but these will be rendered and highlighted only when their parent nodes
are expanded. To easily find *all* matching items user will need to use the search tool.

.. _tagging:

Tagging
-------

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

package org.phoebus.applications.saveandrestore.ui;

import javafx.application.Platform;
import javafx.scene.control.Label;
import javafx.scene.control.Tooltip;
import javafx.scene.control.TreeCell;
Expand All @@ -38,9 +39,13 @@
import org.phoebus.applications.saveandrestore.model.Node;
import org.phoebus.applications.saveandrestore.model.NodeType;
import org.phoebus.applications.saveandrestore.model.Tag;
import org.phoebus.applications.saveandrestore.model.search.SearchResult;
import org.phoebus.framework.jobs.JobManager;
import org.phoebus.ui.javafx.ImageCache;
import org.phoebus.util.time.TimestampFormats;

import javax.ws.rs.core.MultivaluedHashMap;
import javax.ws.rs.core.MultivaluedMap;
import java.util.ArrayList;
import java.util.List;

Expand Down Expand Up @@ -183,6 +188,7 @@ public void updateItem(Node node, boolean empty) {
tagImage.setPreserveRatio(true);
hBox.getChildren().add(tagImage);
}
annotateContainedInCompositeSnapshot(node, hBox);
break;
case COMPOSITE_SNAPSHOT:
hBox.getChildren().add(new ImageView(ImageRepository.COMPOSITE_SNAPSHOT));
Expand All @@ -193,6 +199,7 @@ public void updateItem(Node node, boolean empty) {
tagImage.setPreserveRatio(true);
getChildren().add(tagImage);
}
annotateContainedInCompositeSnapshot(node, hBox);
break;
case CONFIGURATION:
hBox.getChildren().add(new ImageView(ImageRepository.CONFIGURATION));
Expand All @@ -209,4 +216,17 @@ public void updateItem(Node node, boolean empty) {

setGraphic(hBox);
}

private void annotateContainedInCompositeSnapshot(Node node, HBox hbox) {
JobManager.schedule("Annotate contained in snapshot", monitor -> {
MultivaluedMap<String, String> multivaluedMap = new MultivaluedHashMap<>();
multivaluedMap.put("referenced", List.of(node.getUniqueId()));
SearchResult searchResult = saveAndRestoreController.saveAndRestoreService.search(multivaluedMap);
if (searchResult.getHitCount() > 0) {
Platform.runLater(() -> {
hbox.getChildren().add(new ImageView(ImageRepository.LINK));
});
}
});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,7 @@ public class ImageRepository {
ImageCache.getImage(ImageRepository.class, "/icons/save-and-restore/edit-configuration.png");
public static final Image SNAPSHOT_ADD_TAG =
ImageCache.getImage(ImageRepository.class, "/icons/save-and-restore/snapshot-add_tag.png");
public static final Image LINK =
ImageCache.getImage(ImageRepository.class, "/icons/save-and-restore/link.png");

}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.