Browse Source

xCube mit Sparklines #3

master
Daniel Quathamer 11 months ago
parent
commit
48920608b3
  1. 4
      src-modules/module/xcube/conf/xcube.xml
  2. 6
      src-modules/module/xcube/masken/21000_felderinfo.unl
  3. 12
      src-modules/module/xcube/masken/21000_maskeninfo.unl
  4. 45
      src-modules/module/xcube/schluesseltabellen/sx_stylesheets_einfuegen.sql

4
src-modules/module/xcube/conf/xcube.xml

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!--<!DOCTYPE module SYSTEM "../../../conf/superx-module.dtd">--> <!--<!DOCTYPE module SYSTEM "../../../conf/superx-module.dtd">-->
<module name="xcube" version="0.1" sachgebiet_id="1000" sachgebiet="xcube" systeminfo_id="1000" system="xcube" thema="Xcubes" thema_parent=""> <module name="xcube" version="0.2b" sachgebiet_id="1000" sachgebiet="xcube" systeminfo_id="1000" system="xcube" thema="Xcubes" thema_parent="">
<database name="superx" version="2.1" system="superx"> <database name="superx" version="2.1" system="superx">
<table name="xcube" thema="Kreuztabellen" typ="Datentabelle" caption="Kreuztabellen"> <table name="xcube" thema="Kreuztabellen" typ="Datentabelle" caption="Kreuztabellen">
<columns> <columns>
@ -238,6 +238,7 @@ parent="Xcubes">Abfragen zur Administration von Xcubes </thema>
<nativeaction sql="" scriptfile="$XCUBE_PFAD/schluesseltabellen/xcube_dims_install.sql" database=""/> <nativeaction sql="" scriptfile="$XCUBE_PFAD/schluesseltabellen/xcube_dims_install.sql" database=""/>
<nativeaction sql="" scriptfile="$XCUBE_PFAD/schluesseltabellen/sichten_fuellen.sql" database=""/> <nativeaction sql="" scriptfile="$XCUBE_PFAD/schluesseltabellen/sichten_fuellen.sql" database=""/>
<nativeaction sql="" scriptfile="$XCUBE_PFAD/schluesseltabellen/purge_themenbaum.sql" database=""/> <nativeaction sql="" scriptfile="$XCUBE_PFAD/schluesseltabellen/purge_themenbaum.sql" database=""/>
<nativeaction sql="" scriptfile="$XCUBE_PFAD/schluesseltabellen/sx_stylesheets_einfuegen.sql" database=""/>
</action> </action>
</install-step> </install-step>
</install> </install>
@ -250,6 +251,7 @@ parent="Xcubes">Abfragen zur Administration von Xcubes </thema>
<nativeaction sql="" scriptfile="$XCUBE_PFAD/schluesseltabellen/xcube_dims_install.sql" database=""/> <nativeaction sql="" scriptfile="$XCUBE_PFAD/schluesseltabellen/xcube_dims_install.sql" database=""/>
<nativeaction sql="" scriptfile="$XCUBE_PFAD/schluesseltabellen/sichten_fuellen.sql" database=""/> <nativeaction sql="" scriptfile="$XCUBE_PFAD/schluesseltabellen/sichten_fuellen.sql" database=""/>
<nativeaction sql="" scriptfile="$XCUBE_PFAD/schluesseltabellen/purge_themenbaum.sql" database=""/> <nativeaction sql="" scriptfile="$XCUBE_PFAD/schluesseltabellen/purge_themenbaum.sql" database=""/>
<nativeaction sql="" scriptfile="$XCUBE_PFAD/schluesseltabellen/sx_stylesheets_einfuegen.sql" database=""/>
</action> </action>
</upgrade-step> </upgrade-step>

6
src-modules/module/xcube/masken/21000_felderinfo.unl

@ -42,5 +42,9 @@ and trim(F.table_name) || '.' || F.name in (select trim(tablename)||'.'||trim(fi
21027^Hörerstatus (intern)^43^0^0^140^80^1^char^30^0^12^<<SQL>> select tid,name,sortnr from sichten where art in ('XCUBE-Hörerstatus-Sicht') order by 3,2;^^^ 21027^Hörerstatus (intern)^43^0^0^140^80^1^char^30^0^12^<<SQL>> select tid,name,sortnr from sichten where art in ('XCUBE-Hörerstatus-Sicht') order by 3,2;^^^
21028^Spaltenvisualisierung^10000^0^0^140^80^1^char^30^0^1^<<SQL>> select '_graph','Balken (horiz. linksb.)' from xdummy\ 21028^Spaltenvisualisierung^10000^0^0^140^80^1^char^30^0^1^<<SQL>> select '_graph','Balken (horiz. linksb.)' from xdummy\
union select '_graphbarright','Balken (horiz. rechtsb.)' from xdummy\ union select '_graphbarright','Balken (horiz. rechtsb.)' from xdummy\
union select '_graphbaralternating','Balken (horiz. rechtsb./linksb.)' from xdummy^^^ union select '_graphbaralternating','Balken (horiz. rechtsb./linksb.)' from xdummy\
union select '_sparkbar','Balkendiagramm' from xdummy\
where 0 < (select count(*) from sx_stylesheets where filename='tabelle_html_viz.xsl')\
union select '_sparkline','Liniendiagramm' from xdummy\
where 0 < (select count(*) from sx_stylesheets where filename='tabelle_html_viz.xsl')^^^
21029^Zeilenfilter bis Ebene^140^0^0^140^80^1^integer^30^0^0^ ^^^ 21029^Zeilenfilter bis Ebene^140^0^0^140^80^1^integer^30^0^0^ ^^^

12
src-modules/module/xcube/masken/21000_maskeninfo.unl

@ -380,7 +380,11 @@ select \
ebene as level, --bei Grafiken keine Ebenenanzeige\ ebene as level, --bei Grafiken keine Ebenenanzeige\
</#if>\ </#if>\
</#if>\ </#if>\
<#if graph_col?starts_with("_spark")>\
name as _categorySpark\
<#else>\
name\ name\
</#if>\
--TODO: wenn <<2.Ansicht in Zeilen>>"!="" dann ,col2\ --TODO: wenn <<2.Ansicht in Zeilen>>"!="" dann ,col2\
<#assign i=0/>\ <#assign i=0/>\
<#foreach spalte in ergspalten>\ <#foreach spalte in ergspalten>\
@ -393,14 +397,22 @@ name\
<#else>\ <#else>\
, '' || c${i}::${datatype} || '|' || tmp_cellmax.maxvalue as _graphbarright${i}\ , '' || c${i}::${datatype} || '|' || tmp_cellmax.maxvalue as _graphbarright${i}\
</#if>\ </#if>\
<#elseif graph_col?starts_with("_spark")>\
, c${i} as ${graph_col}${i}\
<#else>\ <#else>\
, '' || c${i}::${datatype} || '|' || tmp_cellmax.maxvalue as ${graph_col}${i}\ , '' || c${i}::${datatype} || '|' || tmp_cellmax.maxvalue as ${graph_col}${i}\
</#if>\ </#if>\
\ \
<#else>\ <#else>\
--letzte Spalte:\
<#if graph_col?starts_with("_spark")>\
, c${i} as ${graph_col}${i}\
<#else>\
, c${i}::${datatype} as col${i}\ , c${i}::${datatype} as col${i}\
</#if>\ </#if>\
\ \
</#if>\
\
</#foreach>\ </#foreach>\
\ \
from tmp_erg, tmp_cellmax order by sortnr;^--freemarker Template\ from tmp_erg, tmp_cellmax order by sortnr;^--freemarker Template\

45
src-modules/module/xcube/schluesseltabellen/sx_stylesheets_einfuegen.sql

@ -0,0 +1,45 @@
--Freemarker Template
create temp table tmp_hilf (tid integer);
--Sicherstellen, dass keine Duplikate vorkommen:
--####################################################################################################
delete from sx_mask_style where maskeninfo_id=21000 and stylesheet_id in (select tid from sx_stylesheets where filename ='tabelle_html.xsl') and ord=1;
delete from sx_mask_style where maskeninfo_id=21000 and stylesheet_id in (select tid from sx_stylesheets where filename ='tabelle_html_viz.xsl') and ord=10;
-- Mask Style füllen
--####################################################################################################
create temp table tmp_mask_style (
tid serial not null,
maskeninfo_id INTEGER ,
stylesheet_id INTEGER ,
ord SMALLINT,
filename char(255)
);
delete from tmp_hilf;
insert into tmp_hilf select max(tid) from sx_mask_style;
update tmp_hilf set tid=1 where tid is null;
insert into tmp_mask_style (tid,maskeninfo_id,ord,filename)
select max(tid)+1,21000,10,'tabelle_html_viz.xsl' from tmp_hilf
where 0< (select count(*) from sx_stylesheets where filename='tabelle_html_viz.xsl');
update tmp_mask_style set stylesheet_id=(select max(tid) from sx_stylesheets where filename='tabelle_html_viz.xsl')
where filename='tabelle_html_viz.xsl';
insert into sx_mask_style ( tid, maskeninfo_id, stylesheet_id, ord)
SELECT tid, maskeninfo_id, stylesheet_id, ord
FROM tmp_mask_style;
drop table tmp_mask_style;
drop table tmp_hilf;
select sp_update_sequence('sx_stylesheets');
select sp_update_sequence('sx_mask_style');
select sp_update_sequence('stylesheet_field');
Loading…
Cancel
Save