Template:Service: Difference between revisions

From MuHack
Jump to navigation Jump to search
No edit summary
No edit summary
 
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
<noinclude>
<noinclude>
You can use this in a page to make it part of [[:Category:Services]].
You can use this in a page to make it part of [[:Category:Services]].

The "Service URI" field in the form expects (comma-separated) tokens in the format: <code>name;uri:port</code> (port is optional).

For example, if you input:
* Token 1: <code>Main API;api.example.com:8080</code>
* Token 2: <code>Website;www.example.com:443</code>

The URI section below will render as:
{| class="wikitable" style="width: auto;"
! colspan=2| ''URIs''
|-
| style="vertical-align:top; padding-left: 10px;" | Main API
| api.example.com:8080
|-
| style="vertical-align:top; padding-left: 10px;" | Website
| www.example.com:443
|}

Or, using #arraymap for a live example:
{| class="wikitable" style="width: auto;"
|- style="background: {{Style|header}}; text-align:center;"
! colspan=2| ''URIs''
{{#arraymap:Main API;api.example.com:8080, Website;www.example.com:443|,|@@item@@|
{{!}}-
{{!}} style="vertical-align:top; padding-left: 10px;" {{!}} {{#explode:@@item@@|;|0}}
{{!}} {{#explode:@@item@@|;|1}}
{{!}}-
}}
|}

</noinclude>
</noinclude>
{| border="2" cellspacing="0" cellpadding="4" rules="all" style="float:right; clear:right; width:370px; margin:5px 0 1em 1em; border-collapse:collapse; font-size:95%; empty-cells:hide"
{| border="2" cellspacing="0" cellpadding="4" rules="all" style="float:right; clear:right; width:370px; margin:5px 0 1em 1em; border-collapse:collapse; font-size:95%; empty-cells:hide"
Line 11: Line 41:
}}
}}
|-
|-
| style="vertical-align:top" | Service URI
| style="vertical-align:top" | Operational Status
| {{#switch: {{{Operational Status|}}} | Working = style="background: #32CD32; text-align: center" | Functional = style="background: #BFFF00; text-align: center" | Broken = style="background: #FF6347; text-align: center" | Needs: Money = style="background: #FFCD17; text-align: center" | Needs: Parts = style="background: #FFCD17; text-align: center" | Needs: Work = style="background: #FFCD17; text-align: center" | Needs: Upgrades = style="background: #FFCD17; text-align: center" | #default = style="background: #BDBDBD"}} | [[Operational Status::{{{Operational Status|}}}]]
| [[Service URI::{{{Service URI|}}}]]
|-
|-
{{#if:{{{Location|}}}|
{{#if:{{{Location|}}}|
Line 19: Line 49:
}}
}}
|-
|-
{{#if:{{{Contact email|}}}|
| style="vertical-align:top" | Operational Status
{{!}} style="vertical-align:top;" {{!}} Contact
| {{#switch: {{{Operational Status|}}} | Working = style="background: #32CD32; text-align: center" | Functional = style="background: #BFFF00; text-align: center" | Broken = style="background: #FF6347; text-align: center" | Needs: Money = style="background: #FFCD17; text-align: center" | Needs: Parts = style="background: #FFCD17; text-align: center" | Needs: Work = style="background: #FFCD17; text-align: center" | Needs: Upgrades = style="background: #FFCD17; text-align: center" | #default = style="background: #BDBDBD"}} | [[Operational Status::{{{Operational Status|}}}]]
{{!}} [[Service Contact::{{{Contact email|}}}]]
}}
|-
|-
| style="vertical-align:top" | Super Users
| style="vertical-align:top" | Super Users
| {{#arraymap:{{{Super Users|}}}|,|@|[[Service super user::User:@|@]]}}
| {{#arraymap:{{{Super Users|}}}|,|@|[[Super user::User:@|@]]}}
|-
|-
| style="vertical-align:top" | Owner
| style="vertical-align:top" | Owner
Line 30: Line 62:
| style="vertical-align:top" | Last Update
| style="vertical-align:top" | Last Update
|{{REVISIONYEAR}}-{{REVISIONMONTH}}-{{REVISIONDAY2}}
|{{REVISIONYEAR}}-{{REVISIONMONTH}}-{{REVISIONDAY2}}
|- style="background: {{Style|header}}; text-align:center;"
|}<includeonly>[[Category:Services|{{{Name}}}]]</includeonly>
! colspan=2| ''URIs''
{{#arraymap:{{{Service URI|}}}|,|@@item@@|
{{!}}-
{{!}} style="vertical-align:top; padding-left: 10px;" {{!}} {{#explode:@@item@@|;|0}}
{{!}} [[Service URI::{{#explode:@@item@@|;|1}}]]
{{!}}-
}}
|}<includeonly>[[Category:Services|{{PAGENAME}}]]</includeonly>

Latest revision as of 14:58, 25 May 2025

You can use this in a page to make it part of Category:Services.

The "Service URI" field in the form expects (comma-separated) tokens in the format: name;uri:port (port is optional).

For example, if you input:

  • Token 1: Main API;api.example.com:8080
  • Token 2: Website;www.example.com:443

The URI section below will render as:

URIs
Main API api.example.com:8080
Website www.example.com:443

Or, using #arraymap for a live example:

URIs
Main API api.example.com:8080
Website www.example.com:443


Service: Service
Operational Status
Super Users
Owner {{{Owner}}}
Last Update 2025-05-25
URIs