Difference between revisions of "/Alias ODB tree"

From MidasWiki
Jump to: navigation, search
m (Suz moved page /Alias ODB page to /Alias ODB tree)
(Symbolic Links)
 
Line 32: Line 32:
 
on the status page,  Clicking on this alias-button will show the contents of the link in a new frame.
 
on the status page,  Clicking on this alias-button will show the contents of the link in a new frame.
  
=== Symbolic Links ===
+
=== Links to ODB ===
 
The <span style="color: purple; font-style:italic;">/Alias</span> tree may also contain a list of symbolic links to any desired ODB location.
 
The <span style="color: purple; font-style:italic;">/Alias</span> tree may also contain a list of symbolic links to any desired ODB location.
  
The following [[odbedit]] commands demonstrate creating alias-buttons linking to ODB keys :
+
Create a string under /alias with this contents:
 
+
<pre>
 
+
?cmd=odb&odb_path=/Programs
[local:t2kgas:S] cd /Alias
+
</pre>
[local:t2kgas:S] ln /Equipment/TpcGasPlc/Common/ "TPC Common"      *** New frame, no &
 
[local:t2kgas:S] ln /Equipment/TpcGasPlc/Settings/ "TPC Settings&"  *** Same frame, with &
 
    (comments are preceded by ***)
 
 
 
This would create two alias-buttons
 
<span style="color: #444444; background-color: #CCCCCC; font-style:italic; font-size: 90; padding:0.25em;padding-left: 0.5em;padding-right: 0.5em;border:1px solid #808080;border-radius: 5px;margin-bottom:1px;">TPC&nbsp;Common</span> and
 
<span style="color: #444444; background-color: #CCCCCC; font-style:italic; font-size: 90; padding:0.25em;padding-left: 0.5em;padding-right: 0.5em;border:1px solid #808080;border-radius: 5px;margin-bottom:1px;">TPC&nbsp;Settings</span>.
 
Clicking on
 
<span style="color: #444444; background-color: #CCCCCC; font-style:italic; font-size: 90; padding:0.25em;padding-left: 0.5em;padding-right: 0.5em;border:1px solid #808080;border-radius: 5px;margin-bottom:1px;">TPC&nbsp;Common</span> would open the page in a '''new''' frame. Clicking on
 
<span style="color: #444444; background-color: #CCCCCC; font-style:italic; font-size: 90; padding:0.25em;padding-left: 0.5em;padding-right: 0.5em;border:1px solid #808080;border-radius: 5px;margin-bottom:1px;">TPC&nbsp;Settings</span> would open the page in the '''same''' frame (see [[#Keys in the /Alias tree|above]]).
 
 
 
  
 
[[Category:ODB Tree]]
 
[[Category:ODB Tree]]

Latest revision as of 19:03, 11 February 2019


Purpose

The ODB /Alias tree provides the user with a way to access other webpages via buttons placed on the mhttpd Status Page. It can provide links to external webpages, or symbolic links (short-cuts) to ODB sub-trees.

Creating the /Alias tree

The /Alias tree is optional, and is not present until created by the user.


Keys in the /Alias tree

Any key created under /Alias will appear as a button (i.e. alias-button) on the Status Page, with the same name as the key (except as noted below).

By default, the clicking of an alias-button in the web interface will spawn a new frame. To force the display of the alias page in the same frame, an "&" has to be appended to the name of the alias key. The "&" is stripped off the alias name when it appears as an alias-button (see example).

External links

The following odbedit commands demonstrate how to make a link to an external webpage:

[local:t2kgas:S] cd /Alias
[local:t2kgas:S]create string triumf
String length [32]:
[local:t2kgas:S] set triumf "http://triumf.ca"

This will cause a button triumf on the status page, Clicking on this alias-button will show the contents of the link in a new frame.

Links to ODB

The /Alias tree may also contain a list of symbolic links to any desired ODB location.

Create a string under /alias with this contents:

?cmd=odb&odb_path=/Programs