Difference between revisions of "Template:Laboratory"

From I Do Imaging
Jump to: navigation, search
Line 9: Line 9:
 
This list of pages created using this template is generated by an '''ask''' query (view source to see the query): {{#ask: [[category:Laboratories]]}}
 
This list of pages created using this template is generated by an '''ask''' query (view source to see the query): {{#ask: [[category:Laboratories]]}}
 
</noinclude>
 
</noinclude>
<!-- ------------------------------------------------------------------------------------------------------- -->
+
<!--
<!-- This second section is what is actually loaded when the template is included into a page. -->
+
-------------------------------------------------------------------------------------------------------
<!-- ------------------------------------------------------------------------------------------------------- -->
+
-- This second section is what is actually loaded when the template is included into a page.
 +
-------------------------------------------------------------------------------------------------------
 +
-->
 
<includeonly>
 
<includeonly>
 
Description of this Laboratory:
 
Description of this Laboratory:
 
<!--
 
<!--
-------------------------------------------------------------------------------------------------------
+
-- -------------------------------------------------------------------------------------------------------
Create a table showing the values of the properties (Department and Building) that are stored in the page that this template is included into.
+
-- Create a table showing the values of the properties (Department and Building) that are stored in the page that this template is included into.
Also display a list of the servers operated by this Laboratory.  This is done with an 'ask' query.
+
-- Also display a list of the servers operated by this Laboratory.  This is done with an 'ask' query.
The query returns pages with a category of Servers, and who have the 'owner' property set to the name of this page (the name of the Laboratory)
+
-- The query returns pages with a category of Servers, and who have the 'owner' property set to the name of this page (the name of the Laboratory)
The special variable {{PAGENAME}} returns the name of the page that this template is included into.  So its value depends on which page is including the template.
+
-- The special variable {{PAGENAME}} returns the name of the page that this template is included into.  So its value depends on which page is including the template.
-------------------------------------------------------------------------------------------------------
+
-- -------------------------------------------------------------------------------------------------------
 
-->
 
-->
 
{| class="wikitable"
 
{| class="wikitable"
Line 37: Line 39:
  
 
<!--  
 
<!--  
I am a multi line comment.
+
-- -------------------------------------------------------------------------------------------------------
Do I work?
+
-- Query for a list of Processes that are run by this Laboratory, through the chain Process <-> Server <-> Laboratory.
 +
-- The first part of the query returns pages with a category of 'Processes'.
 +
-- The second part of the query is a chained query refining the first part.
 +
-- It first extracts the 'Hosted on server' property of the pages from the first part.
 +
-- These are the names of pages of the Server category.
 +
-- The query selects the Server pages whose 'Owner' property whose value is the including page's name (the name of the Laboratory).
 +
-- In this way we select processes that run on servers that belong to the laboratory whose name is the name of the page this template is included into (the Laboratory page).
 +
-- The last two lines are to format the result set and display only those fields we are interested in ('Hosted on server' and 'Port number').
 +
-- -------------------------------------------------------------------------------------------------------
 
-->
 
-->
  
Line 48: Line 58:
 
|? Port number = Port
 
|? Port number = Port
 
}}
 
}}
 +
 +
<!-- The following text is included verbatim into the page this template is included into -->
  
 
== How this page is made ==
 
== How this page is made ==

Revision as of 02:21, 18 October 2017


This is the "Laboratory" template. It uses form:Laboratory and category:Laboratories

Edit the page, or click View source, to see the template text.

This list of pages created using this template is generated by an ask query (view source to see the query): Cardiac Lab, Neuro Imaging Lab