Commit 52c4c8b4715f3fe4c364e23e6b6d10e17aaed391
1 parent
07460dff
Exists in
master
and in
7 other branches
$1
Showing
5 changed files
with
69 additions
and
47 deletions
Show diff stats
ferramentas/saiku/esquemaxml.php
| ... | ... | @@ -115,16 +115,25 @@ $xml .= " |
| 115 | 115 | </Hierarchy> |
| 116 | 116 | </Dimension> |
| 117 | 117 | "; |
| 118 | +//as dimensoes sao duplicadas | |
| 119 | +//uma delas contem o geocodigo que permite a geracao do mapa | |
| 120 | +$xml1 = ""; | |
| 121 | +$xml2 = ""; | |
| 118 | 122 | foreach($regioes as $regiao){ |
| 119 | 123 | $caminho = $m->hierarquiaPath($regiao["codigo_tipo_regiao"]); |
| 120 | - $xml .= " | |
| 124 | + $xml1 .= " | |
| 121 | 125 | <Dimension name='codigo_tipo_regiao_".$regiao["codigo_tipo_regiao"]."' caption='Onde:".converte($regiao["nome_tipo_regiao"])."'> |
| 122 | 126 | <Hierarchy hasAll='true' primaryKey='codigo'> |
| 123 | 127 | "; |
| 128 | + $xml2 .= " | |
| 129 | + <Dimension name='codigo_tipo_regiao_".$regiao["codigo_tipo_regiao"]."_geocod' caption='GeoCod:".converte($regiao["nome_tipo_regiao"])."'> | |
| 130 | + <Hierarchy hasAll='true' primaryKey='codigo'> | |
| 131 | + "; | |
| 124 | 132 | //cria uma view juntando as tabelas da hierarquia de regioes |
| 125 | 133 | $n = count($caminho); |
| 126 | 134 | $colunas = array(); |
| 127 | - $niveis = array(); | |
| 135 | + $niveis1 = array(); | |
| 136 | + $niveis2 = array(); | |
| 128 | 137 | $sql = "SELECT __COLUNAS__ FROM {$regiao['esquemadb']}.{$regiao['tabela']} AS regiao "; |
| 129 | 138 | $colunas[] = "regiao.{$regiao['identificador']} AS codigo "; |
| 130 | 139 | $colunas[] = "regiao.{$regiao['colunanomeregiao']} AS nome"; |
| ... | ... | @@ -137,16 +146,26 @@ foreach($regioes as $regiao){ |
| 137 | 146 | AS j$i ON j$i.{$r['identificador']}::text = {$tabelaAnt}.{$r['identificador']}::text |
| 138 | 147 | "; |
| 139 | 148 | $tabelaAnt = "j".$i; |
| 140 | - $niveis[] = " | |
| 149 | + $niveis1[] = " | |
| 141 | 150 | <Level name='".converte($r["nome_tipo_regiao"])."' |
| 142 | 151 | column='j$i{$r['identificador']}' |
| 143 | 152 | nameColumn='j$i{$r["colunanomeregiao"]}' uniqueMembers='false'/> |
| 144 | 153 | "; |
| 154 | + $niveis2[] = " | |
| 155 | + <Level name='".converte($r["nome_tipo_regiao"])." - GeoCod' | |
| 156 | + column='j$i{$r['identificador']}' | |
| 157 | + nameColumn='j$i{$r["identificador"]}' uniqueMembers='false'/> | |
| 158 | + "; | |
| 145 | 159 | } |
| 146 | - $niveis[] = " | |
| 160 | + $niveis1[] = " | |
| 147 | 161 | <Level name='".converte($regiao["nome_tipo_regiao"])."' |
| 148 | 162 | column='codigo' |
| 149 | - nameColumn='nome' uniqueMembers='true'> | |
| 163 | + nameColumn='nome' uniqueMembers='true' /> | |
| 164 | + "; | |
| 165 | + $niveis2[] = " | |
| 166 | + <Level name='".converte($regiao["nome_tipo_regiao"])." - GeoCod' | |
| 167 | + column='codigo' | |
| 168 | + nameColumn='codigo' uniqueMembers='true' /> | |
| 150 | 169 | "; |
| 151 | 170 | //verifica outras colunas |
| 152 | 171 | $vis = $regiao['colunasvisiveis']; |
| ... | ... | @@ -169,10 +188,15 @@ foreach($regioes as $regiao){ |
| 169 | 188 | $sql .= " WHERE regiao.".$rs["sql"]; |
| 170 | 189 | } |
| 171 | 190 | |
| 172 | - $xml .= " | |
| 191 | + $xml1 .= " | |
| 173 | 192 | <view alias='view_codigo_tipo_regiao_".$regiao["codigo_tipo_regiao"]."' ><SQL dialect='generic' >$sql</SQL></view> |
| 174 | 193 | "; |
| 175 | - $xml .= implode(" ",$niveis); | |
| 194 | + $xml2 .= " | |
| 195 | + <view alias='view_codigo_tipo_regiao_".$regiao["codigo_tipo_regiao"]."_GeoCod' ><SQL dialect='generic' >$sql</SQL></view> | |
| 196 | + "; | |
| 197 | + $xml1 .= implode(" ",$niveis1); | |
| 198 | + $xml2 .= implode(" ",$niveis2); | |
| 199 | + /* | |
| 176 | 200 | //verifica se existem propriedades (colunas adicionais) |
| 177 | 201 | if($vis != ""){ |
| 178 | 202 | //apelidos |
| ... | ... | @@ -193,13 +217,17 @@ foreach($regioes as $regiao){ |
| 193 | 217 | "; |
| 194 | 218 | } |
| 195 | 219 | } |
| 196 | - //fecha os elementos. LEVEL deve ser fechado pois o ultimo recebe as propriedades | |
| 197 | - $xml .= " | |
| 198 | - </Level> | |
| 220 | + */ | |
| 221 | + $xml1 .= " | |
| 222 | + </Hierarchy> | |
| 223 | + </Dimension> | |
| 224 | + "; | |
| 225 | + $xml2 .= " | |
| 199 | 226 | </Hierarchy> |
| 200 | 227 | </Dimension> |
| 201 | 228 | "; |
| 202 | 229 | } |
| 230 | +$xml .= $xml1.$xml2; | |
| 203 | 231 | //junta as medidas conforme o nome da tabela utilizada |
| 204 | 232 | $medidas = $m->listaMedidaVariavel(); |
| 205 | 233 | $tbs = array(); |
| ... | ... | @@ -223,6 +251,9 @@ foreach($tbs as $tb){ |
| 223 | 251 | $VirtualCubeDimension[] = " |
| 224 | 252 | <VirtualCubeDimension name='codigo_tipo_regiao_{$c["codigo_tipo_regiao"]}' /> |
| 225 | 253 | "; |
| 254 | + $VirtualCubeDimension[] = " | |
| 255 | + <VirtualCubeDimension name='codigo_tipo_regiao_{$c["codigo_tipo_regiao"]}_geocod' /> | |
| 256 | + "; | |
| 226 | 257 | //verifica as dimensoes do tipo tempo |
| 227 | 258 | $dimTempo = array(); |
| 228 | 259 | foreach($tb as $medida){ |
| ... | ... | @@ -233,30 +264,6 @@ foreach($tbs as $tb){ |
| 233 | 264 | if($parametro["tipo"] < 5){ |
| 234 | 265 | $parComposto[] = $parametro["coluna"]; |
| 235 | 266 | } |
| 236 | - /* | |
| 237 | - if($parametro["tipo"] == 1){ | |
| 238 | - if(count($parametros) == 1){ | |
| 239 | - $VirtualCubeDimension[] = " | |
| 240 | - <VirtualCubeDimension name='Anual' /> | |
| 241 | - "; | |
| 242 | - $dimTempo[] = " | |
| 243 | - <DimensionUsage foreignKey='".$parametro["coluna"]."_' name='Anual' source='Anual'/> | |
| 244 | - "; | |
| 245 | - } | |
| 246 | - $parComposto[] = $parametro["coluna"]; | |
| 247 | - } | |
| 248 | - if($parametro["tipo"] == 2){ | |
| 249 | - $parComposto[] = $parametro["coluna"]; | |
| 250 | - if(count($parametros) == 2){ | |
| 251 | - $VirtualCubeDimension[] = " | |
| 252 | - <VirtualCubeDimension name='Mensal' /> | |
| 253 | - "; | |
| 254 | - $dimTempo[] = " | |
| 255 | - <DimensionUsage foreignKey='".implode("_",$parComposto)."_' name='Mensal' source='Mensal'/> | |
| 256 | - "; | |
| 257 | - } | |
| 258 | - } | |
| 259 | - */ | |
| 260 | 267 | } |
| 261 | 268 | $VirtualCubeDimension[] = " |
| 262 | 269 | <VirtualCubeDimension name='Tempo' /> |
| ... | ... | @@ -264,7 +271,6 @@ foreach($tbs as $tb){ |
| 264 | 271 | $dimTempo[] = " |
| 265 | 272 | <DimensionUsage foreignKey='".implode("_",$parComposto)."_' name='Tempo' source='Tempo'/> |
| 266 | 273 | "; |
| 267 | - //echo "<pre>";var_dump($parametro);exit; | |
| 268 | 274 | } |
| 269 | 275 | $xml .= " |
| 270 | 276 | <Cube cache='false' name='{$c["esquemadb"]}{$c["tabela"]}'>"; |
| ... | ... | @@ -275,6 +281,7 @@ foreach($tbs as $tb){ |
| 275 | 281 | $xml .= " |
| 276 | 282 | <view alias='view_{$c["esquemadb"]}{$c["tabela"]}' ><SQL dialect='generic' >$sql</SQL></view> |
| 277 | 283 | <DimensionUsage foreignKey='".$c["colunaidgeo"]."' name='codigo_tipo_regiao_".$c["codigo_tipo_regiao"]."' source='codigo_tipo_regiao_".$c["codigo_tipo_regiao"]."'/> |
| 284 | + <DimensionUsage foreignKey='".$c["colunaidgeo"]."' name='codigo_tipo_regiao_".$c["codigo_tipo_regiao"]."_geocod' source='codigo_tipo_regiao_".$c["codigo_tipo_regiao"]."_geocod'/> | |
| 278 | 285 | "; |
| 279 | 286 | |
| 280 | 287 | $xml .= implode(" ",array_unique($dimTempo)); | ... | ... |
ferramentas/saiku/saiku-server/tomcat/webapps/WEB-INF/classes/saiku.properties
0 → 100755
| ... | ... | @@ -0,0 +1,15 @@ |
| 1 | +# SAIKU PROPERTIES | |
| 2 | + | |
| 3 | + | |
| 4 | +saiku.olap.nonempty = true | |
| 5 | +saiku.web.export.csv.name = saiku-export | |
| 6 | +saiku.web.export.excel.name = saiku-export | |
| 7 | +saiku.web.export.excel.format = xlsx | |
| 8 | +saiku.web.export.excel.numberformat=#.##0,00 | |
| 9 | + | |
| 10 | +saiku.format.numberformat=#.##0,00 | |
| 11 | + | |
| 12 | +# SET FIXED LOCALE, otherwise JVM locale | |
| 13 | +#saiku.format.default.locale=de_AT | |
| 14 | +#saiku.format.default.locale=en | |
| 15 | +#saiku.format.default.locale=lt | |
| 0 | 16 | \ No newline at end of file | ... | ... |
mashups/openlayers.js
| ... | ... | @@ -1601,10 +1601,10 @@ i3GEO.editorOL = { |
| 1601 | 1601 | } |
| 1602 | 1602 | } |
| 1603 | 1603 | YAHOO.editorOL.container.panel.show(); |
| 1604 | - if(i3GEO.configura) | |
| 1605 | - {$i("panelpropriedadesEditor").getElementsByTagName("div")[2].style.overflow = "auto";} | |
| 1606 | - else | |
| 1607 | - {$i("panelpropriedadesEditor").getElementsByTagName("div")[1].style.overflow = "auto";} | |
| 1604 | + temp = $i("panelpropriedadesEditor").getElementsByTagName("div") | |
| 1605 | + if(temp && temp[2]){ | |
| 1606 | + temp[2].style.overflow = "auto"; | |
| 1607 | + } | |
| 1608 | 1608 | }, |
| 1609 | 1609 | listaGeometrias: function(){ |
| 1610 | 1610 | if(!document.getElementById("panellistagEditor")){ | ... | ... |
mashups/openlayers_compacto.js
| ... | ... | @@ -4606,10 +4606,10 @@ temp.onclick = function(){i3GEO.janela.minimiza("panelpropriedadesEditor");}; |
| 4606 | 4606 | } |
| 4607 | 4607 | } |
| 4608 | 4608 | YAHOO.editorOL.container.panel.show(); |
| 4609 | -if(i3GEO.configura) | |
| 4610 | -{$i("panelpropriedadesEditor").getElementsByTagName("div")[2].style.overflow = "auto";} | |
| 4611 | -else | |
| 4612 | -{$i("panelpropriedadesEditor").getElementsByTagName("div")[1].style.overflow = "auto";} | |
| 4609 | +temp = $i("panelpropriedadesEditor").getElementsByTagName("div") | |
| 4610 | +if(temp && temp[2]){ | |
| 4611 | +temp[2].style.overflow = "auto"; | |
| 4612 | +} | |
| 4613 | 4613 | }, |
| 4614 | 4614 | listaGeometrias: function(){ |
| 4615 | 4615 | if(!document.getElementById("panellistagEditor")){ | ... | ... |
mashups/openlayers_compacto.js.php
| ... | ... | @@ -4606,10 +4606,10 @@ temp.onclick = function(){i3GEO.janela.minimiza("panelpropriedadesEditor");}; |
| 4606 | 4606 | } |
| 4607 | 4607 | } |
| 4608 | 4608 | YAHOO.editorOL.container.panel.show(); |
| 4609 | -if(i3GEO.configura) | |
| 4610 | -{$i("panelpropriedadesEditor").getElementsByTagName("div")[2].style.overflow = "auto";} | |
| 4611 | -else | |
| 4612 | -{$i("panelpropriedadesEditor").getElementsByTagName("div")[1].style.overflow = "auto";} | |
| 4609 | +temp = $i("panelpropriedadesEditor").getElementsByTagName("div") | |
| 4610 | +if(temp && temp[2]){ | |
| 4611 | +temp[2].style.overflow = "auto"; | |
| 4612 | +} | |
| 4613 | 4613 | }, |
| 4614 | 4614 | listaGeometrias: function(){ |
| 4615 | 4615 | if(!document.getElementById("panellistagEditor")){ | ... | ... |