Difference between revisions of "Template: GetContainers"
From Genesys Documentation
m (1 revision imported) |
|||
(36 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
− | <tr> | + | <includeonly><tr> |
<td><!-- get component name --> | <td><!-- get component name --> | ||
− | {{#cargo_query: | + | {{#cargo_query:tables= |
− | tables=ComponentRN,Component | + | ComponentRN, |
− | |join on=ComponentRN.ComponentId | + | Component |
+ | |join on=ComponentRN.ComponentId=Component.Id | ||
|fields=Component.Name | |fields=Component.Name | ||
|group by=Name | |group by=Name | ||
− | |where=ComponentId | + | |where= |
+ | ComponentRN.ComponentId="{{{ComponentId|}}}" | ||
+ | AND PrivateEditionReleaseDate="{{{PrivateEditionReleaseDate|}}}" | ||
+ | AND ComponentRN._pageNamespace="{{NAMESPACENUMBER}}" | ||
}} | }} | ||
</td> | </td> | ||
<td><!-- get release number --> | <td><!-- get release number --> | ||
− | {{#cargo_query: | + | {{#cargo_query:tables= |
− | tables=ComponentRN | + | ComponentRN |
− | |fields=MAX(ReleaseNumber) | + | |fields= |
− | |where=ComponentId | + | MAX(ReleaseNumber) |
+ | |where= | ||
+ | ComponentRN.ComponentId="{{{ComponentId|}}}" | ||
+ | AND PrivateEditionReleaseDate="{{{PrivateEditionReleaseDate|}}}" | ||
+ | AND ComponentRN._pageNamespace="{{NAMESPACENUMBER}}" | ||
+ | }} | ||
+ | </td> | ||
+ | <td><!-- get release date and format as link to ArticleCloudRN page --> | ||
+ | {{#cargo_query:tables= | ||
+ | ArticleCloudRN__ComponentId, | ||
+ | ArticleCloudRN, | ||
+ | ComponentRN, | ||
+ | Component | ||
+ | |join on= | ||
+ | ArticleCloudRN__ComponentId._rowID=ArticleCloudRN._ID, | ||
+ | ArticleCloudRN__ComponentId._value = ComponentRN.ComponentId, | ||
+ | ComponentRN.ComponentId=Component.Id | ||
+ | |fields= | ||
+ | CONCAT('[[',ArticleCloudRN._pageName,'#',Component.Name,'-',ReleaseNumber,'|',DATE_FORMAT(MAX(PrivateEditionReleaseDate),'%M %d, %Y'),']]') | ||
+ | |where= | ||
+ | ComponentRN.ComponentId="{{{ComponentId|}}}" | ||
+ | AND ArticleCloudRN._pageNamespace="{{NAMESPACENUMBER}}" | ||
+ | AND PrivateEditionReleaseDate="{{{PrivateEditionReleaseDate|}}}" | ||
+ | |group by=ComponentRN.ComponentId | ||
}} | }} | ||
</td> | </td> | ||
<td> | <td> | ||
− | {{#cargo_query: | + | <!-- finding helm from RNElements with default to manual containers list from ComponentRN --> |
− | + | {{#cargo_query:tables= | |
− | |fields= | + | ComponentRN, |
− | |where= | + | Component, |
− | }}{{#cargo_query: | + | RNElements |
− | tables=ComponentRN | + | |join on= |
− | |fields= | + | ComponentRN.ComponentId=Component.Id, |
− | |where=ComponentId | + | Component.IpName=RNElements.IpName |
+ | |fields= | ||
+ | RNElements.Filename | ||
+ | |having= | ||
+ | MAX(ComponentRN.ReleaseNumber)=RNElements.Version | ||
+ | |group by= | ||
+ | RNElements.Version,RNElements.Filename | ||
+ | |format= | ||
+ | ul | ||
+ | |where= | ||
+ | ComponentRN.ComponentId="{{{ComponentId|}}}" | ||
+ | AND PrivateEditionReleaseDate="{{{PrivateEditionReleaseDate|}}}" | ||
+ | AND Type="helm" | ||
+ | AND ComponentRN._pageNamespace="{{NAMESPACENUMBER}}" | ||
+ | |default= | ||
+ | {{#cargo_query:tables=ComponentRN | ||
+ | |fields=Containers | ||
+ | |where= | ||
+ | ComponentRN.ComponentId="{{{ComponentId|}}}" | ||
+ | AND PrivateEditionReleaseDate="{{{PrivateEditionReleaseDate|}}}" | ||
+ | AND ComponentRN._pageNamespace="{{NAMESPACENUMBER}}" | ||
+ | AND Containers IS NOT NULL | ||
+ | |format=template | ||
+ | |template=ArrayMapHelm | ||
+ | |default= | ||
+ | {{#cargo_query: | ||
+ | tables= | ||
+ | ArticleHelmRN, | ||
+ | Component | ||
+ | |join on=ArticleHelmRN.ComponentId HOLDS Component.ParentComponentId | ||
+ | |fields=CONCAT('See [[',ArticleHelmRN._pageName,'|parent]]*') | ||
+ | |where= | ||
+ | Component.Id = "{{{ComponentId|}}}" | ||
+ | AND ArticleHelmRN._pageNamespace="{{NAMESPACENUMBER}}" | ||
+ | |delimiter= | ||
+ | |default=N/A | ||
+ | |group by=ArticleHelmRN._pageName,Component.Name | ||
+ | }} | ||
+ | }} | ||
}} | }} | ||
</td> | </td> | ||
<td> | <td> | ||
+ | <!-- finding containers from RNElements with default to manual containers list from ComponentRN --> | ||
{{#cargo_query:tables=ComponentRN,Component,RNElements | {{#cargo_query:tables=ComponentRN,Component,RNElements | ||
− | |join on=ComponentRN.ComponentId | + | |join on=ComponentRN.ComponentId=Component.Id,Component.IpName=RNElements.IpName |
|fields=RNElements.Filename | |fields=RNElements.Filename | ||
|having=MAX(ComponentRN.ReleaseNumber)=RNElements.Version | |having=MAX(ComponentRN.ReleaseNumber)=RNElements.Version | ||
|group by=RNElements.Version,RNElements.Filename | |group by=RNElements.Version,RNElements.Filename | ||
|format=ul | |format=ul | ||
− | |where=ComponentRN.ComponentId | + | |where=ComponentRN.ComponentId="{{{ComponentId|}}}" AND PrivateEditionReleaseDate="{{{PrivateEditionReleaseDate|}}}" AND Type="docker" AND ComponentRN._pageNamespace="{{NAMESPACENUMBER}}" |
+ | |default= | ||
+ | {{#cargo_query:tables=ComponentRN | ||
+ | |fields=Containers | ||
+ | |where=ComponentRN.ComponentId="{{{ComponentId|}}}" AND PrivateEditionReleaseDate="{{{PrivateEditionReleaseDate|}}}" AND ComponentRN._pageNamespace="{{NAMESPACENUMBER}}" AND Containers IS NOT NULL | ||
+ | |format=template | ||
+ | |template=ArrayMapDocker | ||
+ | |default= | ||
+ | {{#cargo_query: | ||
+ | tables=ArticleHelmRN,Component | ||
+ | |join on=ArticleHelmRN.ComponentId HOLDS Component.ParentComponentId | ||
+ | |fields=CONCAT('See [[',ArticleHelmRN._pageName,'|parent]]*') | ||
+ | |where=Component.Id = "{{{ComponentId|}}}" AND ArticleHelmRN._pageNamespace="{{NAMESPACENUMBER}}" | ||
+ | |delimiter= | ||
+ | |default=N/A | ||
+ | |group by=ArticleHelmRN._pageName,Component.Name | ||
+ | }} | ||
+ | }} | ||
}} | }} | ||
− | |||
− | |||
− | |||
</td> | </td> | ||
− | <tr> | + | </tr></includeonly><noinclude>[[Category:PrivateEdition]][[Category:ComponentRN.ComponentId cleanup]]</noinclude> |