ODB Page: Difference between revisions
No edit summary |
|||
(9 intermediate revisions by the same user not shown) | |||
Line 15: | Line 15: | ||
The ODB Page is accessed from the [[Status Page]] (or one of the other Pages) by clicking on the | The ODB Page is accessed from the [[Status Page]] (or one of the other Pages) by clicking on the | ||
menu | menu item {{Button|name=ODB}}. | ||
The top level ODB trees will be visible as key-links (i.e.links to a key) ([[#Example ODB Page|Figure 1]]). | The top level ODB trees will be visible as key-links (i.e.links to a key) ([[#Example ODB Page|Figure 1]]). | ||
Line 36: | Line 36: | ||
<br clear=all> | <br clear=all> | ||
By clicking on the key-links on the ODB page ([[#Example ODB Page|Figure 1]]), the user can browse the various subtrees ([[#Figure 2|Figure 2a]]). By clicking on the " | By clicking on the key-links on the ODB page ([[#Example ODB Page|Figure 1]]), the user can browse the various subtrees ([[#Figure 2|Figure 2a]]). By clicking on the "→" link adjacent to the "Value" heading ([[#Figure 2|Figure 2b]]), the type and size of the keys are shown. This is equivalent to the [[odbedit]] commands <span style="color:saddlebrown; ">ls</span> and <span style="color:saddlebrown;">ls -l</span>. | ||
= Change the value of an ODB key = | = Change the value of an ODB key = | ||
Line 48: | Line 48: | ||
The user can create a new ODB key in a tree or subtree using the [[ODB Page]] by | The user can create a new ODB key in a tree or subtree using the [[ODB Page]] by | ||
# entering the appropriate directory (see [[#Browse the ODB]]) | # entering the appropriate directory (see [[#Browse the ODB]]) | ||
# clicking the | # clicking the [[File:file-plus.svg]] button ([[#Figure 2|Figure 2]]). | ||
This will result in a "Create ODB Entry box" pop-up (Figure 3). | This will result in a "Create ODB Entry box" pop-up (Figure 3). | ||
Line 55: | Line 54: | ||
'''Figure 3: Create an ODB Key (click a thumbnail to enlarge)''' | '''Figure 3: Create an ODB Key (click a thumbnail to enlarge)''' | ||
<gallery> | <gallery> | ||
File:odb_page_create.png|Figure 3a:<br> Create | File:odb_page_create.png|Figure 3a:<br> Create an integer | ||
File:odb_array_create1.png|Figure 3b:<br> Create | File:odb_array_create1.png|Figure 3b:<br> Create an array of string | ||
File:odb_array_create2.png|Figure 3c:<br> Created | File:odb_array_create2.png|Figure 3c:<br> Created keys | ||
</gallery> | </gallery> | ||
The '''Type''' of key to be created is selected from the ''Type'' drop-down list (Figure 3a). | The '''Type''' of key to be created is selected from the ''Type'' drop-down list (Figure 3a). Any of the data types supported by midas can be created (floats, integers, strings etc), including subdirectories and symbolic links. | ||
<br clear=all> | <br clear=all> | ||
Line 96: | Line 67: | ||
[[#Figure 3|Figure 3a]] shows the creation of a key of type '''Integer''' (32-bit). The type "Integer (32-bit)" | [[#Figure 3|Figure 3a]] shows the creation of a key of type '''Integer''' (32-bit). The type "Integer (32-bit)" | ||
has been selected from the ''Type'' drop-down list ([[#Table 1|Table 1]] above). | has been selected from the ''Type'' drop-down list ([[#Table 1|Table 1]] above). | ||
The name of the key "Number of cycles" has been filled in using the ''Name'' box. This key is not an array so the ''Array Size'' box has the default (1) | The name of the key "Number of cycles" has been filled in using the ''Name'' box. This key is not an array so the ''Array Size'' box has the default (1). The key is created by pressing the {{Button|name=Create}} button on Figure 3a. The value of the key will be set to 0 when created. This has been changed to 10 in Figure 3c by clicking on the Key Value link . | ||
[[#Figure 3|Figure 3b]] shows the creation of a '''String Array'''. The type "String" | [[#Figure 3|Figure 3b]] shows the creation of a '''String Array'''. The type "String" | ||
Line 105: | Line 76: | ||
== 2. Create a subdirectory or symbolic link == | == 2. Create a subdirectory or symbolic link == | ||
Create a '''subdirectory''' key | Create a '''subdirectory''' key by clicking the [[File:folder-plus.svg]] icon. [[#Figure 4|Figure 4a]] shows the creation of | ||
a subdirectory {{Odbpath|path=Edit on start}} in the {{Odbpath|path=/Experiment}} directory. | a subdirectory {{Odbpath|path=Edit on start}} in the {{Odbpath|path=/Experiment}} directory. | ||
The subdirectory is created by pressing the | The subdirectory is created by pressing the {{Button|name=OK}} button on Figure 4a. | ||
<div id="symbolic link"></div> | <div id="symbolic link"></div> | ||
A '''symbolic link''' (or '''link''') is a key which is a short-cut to another key in the ODB. | A '''symbolic link''' (or '''link''') is a key which is a short-cut to another key in the ODB. | ||
Create a link by | Create a link by pressing the [[File:link.svg]] icon. | ||
Figure 4b shows the creation of | Figure 4b shows the creation of | ||
an [[Edit-on-start Parameters|edit-on-start parameter]] which is a symbolic link called " | an [[Edit-on-start Parameters|edit-on-start parameter]] which is a symbolic link called "My link". The target of the link can be chosen either by typing in the text box, or by pressing the {{Button|name=...}} button, which will present an ODB "picker", as shown in Figure 4c. The resulting link is shown in Figure 4d. | ||
The | |||
<div id="Figure 4"></div> | <div id="Figure 4"></div> | ||
Line 122: | Line 91: | ||
File:odb_create_subdir.png|Figure 4a:<br> Create <span style="color:green">subdirectory</span> | File:odb_create_subdir.png|Figure 4a:<br> Create <span style="color:green">subdirectory</span> | ||
File: odb_link1.png | Figure 4b: <br> Create <span style="color:fuchsia">symbolic link</span> | File: odb_link1.png | Figure 4b: <br> Create <span style="color:fuchsia">symbolic link</span> | ||
File: odb_link2.png | Figure 4c: | File: odb_link2.png | Figure 4c: Choose the target of the symbolic link | ||
File: odb_link3.png | Figure 4d: Symbolic link has been created | File: odb_link3.png | Figure 4d: Symbolic link has been created | ||
</gallery> | </gallery> | ||
<br clear=all> | <br clear=all> | ||
= Delete an ODB key = | = Delete an ODB key = | ||
Line 132: | Line 100: | ||
<div id="Figure 5"></div> | <div id="Figure 5"></div> | ||
[[File:odb_page_delete.png|thumb|left|Figure 5: ODB page Delete a key]] | [[File:odb_page_delete.png|thumb|left|Figure 5: ODB page Delete a key]] | ||
The user can delete a key in | The user can delete a key using the [[File:trash-2.svg]] icon. There are two usages of the icon: | ||
* Click on the row of an ODB key and it will be highlighted in blue. Then click the [[File:trash-2.svg]] icon. You will be prompted to confirm that you want to delete that key. You can select multiple keys by holding the Ctrl or Shift keys and clicking again (just like in your computer's file browser). | |||
* If you don't select any ODB keys before clicking the [[File:trash-2.svg]] icon, you are saying you want to delete the entire subdirectory that you're currently in. You will be prompted to confirm that you want to delete everything in the current subdirectory. | |||
You can also delete a key by right-clicking on a row and selecting "Delete key". | |||
<br clear=all> | <br clear=all> | ||
= Search the ODB for a key = | = Search the ODB for a key = | ||
[[File: | Click on the [[File:search.svg]] icon to find any keys in the entire ODB that match a given term. A pop-up (Figure 6a) appears in which the user types the relevant information. The results appear as shown in Figure 6b. Note you are searching for the key names, not the values. | ||
<gallery> | |||
File:odb_page_find.png|Figure 6a:<br> Enter search term | |||
File:odb_search results.png| Figure 6b: <br> View search results | |||
</gallery> | |||
<br clear=all> | |||
= Reorder ODB keys in a subdirectory = | |||
<br clear=all> | You can enter "re-order" mode by clicking the [[File:shuffle.svg]] icon. A [[File:menu.svg]] icon will then appear next to each ODB key, as shown in Figure 7. You can click and drag this icon to change the position of the key in the subdirectory. | ||
Click the [[File:shuffle.svg]] icon again to exit "re-order" mode. | |||
<div id="Figure 7"></div> | |||
[[File:odb_reorder.png|thumb|left|Figure 7: Re-order ODB keys]] | |||
<br clear=all> | |||
= Copy and paste ODB values = | |||
You can copy and paste ODB information to/from your clipboard using the [[File:odb_copy.svg]] and [[File:odb_clipboard.svg]] icons. | |||
For copying there are 4 options: | |||
* Just click the [[File:odb_copy.svg]] icon. This will copy the entire directory (and any subdirectories) as JSON. | |||
* Click on a row (or rows) and they will be highlighted in blue. Then click the [[File:odb_copy.svg]] icon. This will copy the names/values of the selected keys as JSON. | |||
* Right-click on a row and choose "Copy key". This will copy the name/value of the selected key as JSON. | |||
* Right-click on a row and choose "Copy plain text". This will copy the name/value of the selected key as plain text. | |||
The result of the first 3 can be used to paste the data elsewhere using the [[File:odb_clipboard.svg]] icon. If a key already exists with the given name, a new version is made with "copy" (or "copy 2" etc.) appended. | |||
[[File: | |||
= Rename ODB keys = | |||
You can change the name of an ODB key in two ways: | |||
* Click on a row and it will be highlighted in blue. Then click the [[File:edit-3.svg]] icon and you will be prompted for the new name. | |||
* Right-click on a row and select "Rename key..." | |||
[[Category:mhttpd Pages]] | [[Category:mhttpd Pages]] | ||
[[Category:ODB]] | [[Category:ODB]] |
Latest revision as of 16:01, 20 June 2023
Links
Purpose
The purpose of the mhttpd ODB page is to allow the user to browse, search and edit the ODB of an experiment. This gives a user-friendly graphical alternative to the ODB editor odbedit.
Access the ODB page
Click image to enlarge
The ODB Page is accessed from the Status Page (or one of the other Pages) by clicking on the menu item ODB.
The top level ODB trees will be visible as key-links (i.e.links to a key) (Figure 1). The ODB Page is largely self-explanatory. However, a brief description of its functionality and limitations is given below.
- Note
- If "ODB" button is not present on the Status Page, it may have been hidden.
Browse the ODB
By clicking on the key-links on the ODB page (Figure 1), the user can browse the various subtrees (Figure 2a). By clicking on the "→" link adjacent to the "Value" heading (Figure 2b), the type and size of the keys are shown. This is equivalent to the odbedit commands ls and ls -l.
Change the value of an ODB key
By clicking on a Key Value link (Figure 2), the user can change the value (unless password-protected or the key is write-protected - see Security). If web access is restricted, the user will be asked for a password the first time he/she attempts to edit a value.
Create an ODB key
The user can create a new ODB key in a tree or subtree using the ODB Page by
- entering the appropriate directory (see #Browse the ODB)
- clicking the button (Figure 2).
This will result in a "Create ODB Entry box" pop-up (Figure 3).
Figure 3: Create an ODB Key (click a thumbnail to enlarge)
The Type of key to be created is selected from the Type drop-down list (Figure 3a). Any of the data types supported by midas can be created (floats, integers, strings etc), including subdirectories and symbolic links.
1. Create a single value or array
Figure 3a shows the creation of a key of type Integer (32-bit). The type "Integer (32-bit)" has been selected from the Type drop-down list (Table 1 above). The name of the key "Number of cycles" has been filled in using the Name box. This key is not an array so the Array Size box has the default (1). The key is created by pressing the Create button on Figure 3a. The value of the key will be set to 0 when created. This has been changed to 10 in Figure 3c by clicking on the Key Value link .
Figure 3b shows the creation of a String Array. The type "String" has been selected from the Type drop-down list (Table 1 above). The Array size and String size boxes are set with the desired parameters. After pressing the Create button on Figure 3b, the resulting array is shown in Figure 3c. The values of the array elements are set to "Empty" when created. The array values can be set by clicking on the Key Value links.
2. Create a subdirectory or symbolic link
Create a subdirectory key by clicking the icon. Figure 4a shows the creation of a subdirectory Edit on start in the /Experiment directory. The subdirectory is created by pressing the OK button on Figure 4a.
A symbolic link (or link) is a key which is a short-cut to another key in the ODB. Create a link by pressing the icon. Figure 4b shows the creation of an edit-on-start parameter which is a symbolic link called "My link". The target of the link can be chosen either by typing in the text box, or by pressing the ... button, which will present an ODB "picker", as shown in Figure 4c. The resulting link is shown in Figure 4d.
Figure 4 Creating subdirectory or symbolic link (click to enlarge thumbnails)
Delete an ODB key
The user can delete a key using the icon. There are two usages of the icon:
- Click on the row of an ODB key and it will be highlighted in blue. Then click the icon. You will be prompted to confirm that you want to delete that key. You can select multiple keys by holding the Ctrl or Shift keys and clicking again (just like in your computer's file browser).
- If you don't select any ODB keys before clicking the icon, you are saying you want to delete the entire subdirectory that you're currently in. You will be prompted to confirm that you want to delete everything in the current subdirectory.
You can also delete a key by right-clicking on a row and selecting "Delete key".
Search the ODB for a key
Click on the icon to find any keys in the entire ODB that match a given term. A pop-up (Figure 6a) appears in which the user types the relevant information. The results appear as shown in Figure 6b. Note you are searching for the key names, not the values.
Reorder ODB keys in a subdirectory
You can enter "re-order" mode by clicking the icon. A icon will then appear next to each ODB key, as shown in Figure 7. You can click and drag this icon to change the position of the key in the subdirectory.
Click the icon again to exit "re-order" mode.
Copy and paste ODB values
You can copy and paste ODB information to/from your clipboard using the and icons.
For copying there are 4 options:
- Just click the icon. This will copy the entire directory (and any subdirectories) as JSON.
- Click on a row (or rows) and they will be highlighted in blue. Then click the icon. This will copy the names/values of the selected keys as JSON.
- Right-click on a row and choose "Copy key". This will copy the name/value of the selected key as JSON.
- Right-click on a row and choose "Copy plain text". This will copy the name/value of the selected key as plain text.
The result of the first 3 can be used to paste the data elsewhere using the icon. If a key already exists with the given name, a new version is made with "copy" (or "copy 2" etc.) appended.
Rename ODB keys
You can change the name of an ODB key in two ways: