[Dive4elements-commits] [PATCH] Datacage: Rewrote the loading of the official lines based on the latest changes. Untested!
Wald Commits
scm-commit at wald.intevation.org
Sat Jun 22 00:03:24 CEST 2013
# HG changeset patch
# User Sascha L. Teichmann <teichmann at intevation.de>
# Date 1371852198 -7200
# Node ID f369d69e34888a03b5622afb01a7376e67c7d634
# Parent 25230bc3137cf098091a5cecbab88cc7eef42f44
Datacage: Rewrote the loading of the official lines based on the latest changes. Untested!
diff -r 25230bc3137c -r f369d69e3488 artifacts/doc/conf/meta-data.xml
--- a/artifacts/doc/conf/meta-data.xml Fri Jun 21 23:35:01 2013 +0200
+++ b/artifacts/doc/conf/meta-data.xml Sat Jun 22 00:03:18 2013 +0200
@@ -2318,60 +2318,28 @@
</dc:macro>
<dc:macro name="officiallines_user">
- <dc:comment comment=".wst -------------------------------">
- <!-- =============== THIS IS BROKEN! ============== -->
- <officiallines>
- <dc:for-each>
- <dc:context>
- <dc:statement>
- SELECT m.id AS a_id,
- m.state AS a_state,
- m.gid AS a_gid,
- m.creation AS a_creation,
- ardg.v AS gaugy,
- arv.v AS wqsingle
- FROM master_artifacts m,
- artifact_data ardg,
- artifact_data arv
- WHERE m.collection_id = ${collection_id}
- AND m.gid = CAST(${artifact-id} AS uuid)
- AND ardg.artifact_id = m.id
- AND ardg.k = 'ld_gaugename'
- AND arv.artifact_id = m.id
- AND arv.k = 'wq_single'
- AND EXISTS (
- SELECT id
- FROM artifact_data ad
- WHERE ad.artifact_id = m.id
- AND k = 'river'
- AND v = ${river})
- </dc:statement>
- <dc:for-each>
- <dc:context connection="system">
- <dc:statement>
- SELECT ol.wst_id AS wstid,
- ol.wst_column_pos AS wstcolpos,
- ol.name AS olname,
- ol.value AS oval
- FROM official_q_values ol
- WHERE ol.value = CAST(${wqsingle} AS NUMERIC(10,2))
- AND ol.gauge_name = ${gaugy}
- </dc:statement>
- <dc:for-each>
- <dc:element name="${olname}">
- <dc:attribute name="name" value="${olname}"/>
- <dc:attribute name="ids" value="additionals-wstv-${wstcolpos}-${wstid}"/>
- <dc:attribute name="factory" value="staticwkms"/>
- <dc:attribute name="target_out" value="${out}"/>
- <dc:attribute name="out" value="${out}"/>
- </dc:element>
- </dc:for-each>
- </dc:context>
- </dc:for-each>
- </dc:context>
- </dc:for-each>
- </officiallines>
- </dc:comment>
+ <dc:if test="dc:contains($parameters, 'official-lines')">
+ <dc:container-context container="official-lines">
+ <dc:properties>
+ <dc:property name="name" alias="olname"/>
+ <dc:property name="wst" alias="wstid"/>
+ <dc:property name="columnPos" alias="wstcolpos"/>
+ </dc:properties>
+ <dc:if test="dc:has-result()">
+ <officiallines>
+ <dc:for-each>
+ <dc:element name="${olname}">
+ <dc:attribute name="name" value="${olname}"/>
+ <dc:attribute name="ids" value="additionals-wstv-${wstcolpos}-${wstid}"/>
+ <dc:attribute name="factory" value="staticwkms"/>
+ <dc:attribute name="target_out" value="${out}"/>
+ <dc:attribute name="out" value="${out}"/>
+ </dc:element>
+ </dc:for-each>
+ </officiallines>
+ </dc:if>
+ </dc:container-context>
+ </dc:if>
</dc:macro>
<!-- Common stuff -->
More information about the Dive4elements-commits
mailing list