/Alias ODB tree: Difference between revisions

From MidasWiki
Jump to navigation Jump to search
m (Suz moved page /ALIAS to /Alias ODB page)
No edit summary
Line 1: Line 1:
'''Note:'''    The /Alias tree is applicable to mhttpd only, and ignored by odbedit.
<div style="column-count:4;-moz-column-count:4;-webkit-column-count:4">
* [[Midas_documentation|Midas Documentation]]
* [[Feature_listing|Feature Listing]]
* [[Application_listing|Application Listing]]
* [[Online_Database|Online Database]]
</div>


This optional ODB tree provides the user with a way to access other webpages via buttons placed on the mhttpd main Status page (hyperlinks prior to Dec 2009).


== 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.


The ODB /Alias key is not present until the user creates it. It is intended to contain a list of symbolic links to any desired ODB location. Any key created under /Alias will appear as a Button or Hyperlink on the Main Status page, with the same name as the key, except where noted below (e.g. alias links spawned in the same frame).
== Creating the /Alias tree ==
The /Alias tree is optional, and is not present until created by the user.


By default, the clicking of the 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. The & is stripped off the alias name when it appears on the main status page.
;Notes
# All examples in this page are shown using [[odbedit]] for simplicity. Alternatively, the [[mhttpd]] ODB page editor can be used.
# The /Alias tree is used by mhttpd,  and ignored by odbedit.


The following code demonstrates creating alias-buttons linking to ODB keys using odbedit :
== Contents of the /Alias tree ==
Any key created under /Alias will appear as a Button on the [[Status Page]], with the same name as the key (except as noted below).


odbedit
By default, the clicking of the 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 a button on the status page (see [[#Symbolic Links|example]]).
[local:t2kgas:S] mkdir Alias          ***  Create the optional /Alias directory
[local:t2kgas:S] cd Alias
[local:t2kgas:S] ln /Equipment/TpcGasPlc/Common/ "TPC Common"    *** New frame, no &
[local:t2kgas:S] ln /Equipment/TpcGasPlc/Common/ "TPC Common"&" *** Same frame, with &


The items preceded by *** are comments
=== External links ===
The following [[odbedit]] commands demonstrate how to make a link to an external webpage:


This would create two identical alias-buttons called "TPC Common". Clicking on the first alias-button TPC Common would open the page in a new frame as shown above; clicking on the second would open it in the same frame. (Two identical buttons have been created for demonstration purposes only. Normally all buttons would be created with unique names.)
[local:t2kgas:S] cd /Alias
[local:t2kgas:S]create string triumf
String length [32]:
[local:t2kgas:S] set triumf "http://triumf.ca"


The following code demonstrates how to make a link to an external webpage:
This will cause a button <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;">triumf</span>
on the status page,  Clicking on the alias-button
<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;">triumf</span>  will show the contents of the link in a new page.


[local:t2kgas:S] cd Alias
=== Symbolic Links ===
[local:t2kgas:S]create string triumf
The /Alias tree may also contain a list of symbolic links to any desired ODB location.
String length [32]:
[local:t2kgas:S] set triumf "http://triumf.ca"


Clicking on the alias-button triumf will show the contents of the link in a new page (see above).
The following [[odbedit]] commands demonstrate creating alias-buttons linking to ODB keys :
 
 
[local:t2kgas:S] cd /Alias
[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 [[#Contents of the /Alias tree|above]]).
 
 
[[Category:ODB Tree]]

Revision as of 14:21, 6 August 2014


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.

Notes
  1. All examples in this page are shown using odbedit for simplicity. Alternatively, the mhttpd ODB page editor can be used.
  2. The /Alias tree is used by mhttpd, and ignored by odbedit.

Contents of the /Alias tree

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

By default, the clicking of the 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 a button on the status page (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 the alias-button triumf will show the contents of the link in a new page.

Symbolic Links

The /Alias 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 :


[local:t2kgas:S] cd /Alias
[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 TPC Common and TPC Settings. Clicking on TPC Common would open the page in a new frame. Clicking on TPC Settings would open the page in the same frame (see above).