From db858095444a794c1b605589a0eefbd19c015c19 Mon Sep 17 00:00:00 2001 From: Daniel Quathamer Date: Thu, 13 Aug 2026 09:54:01 +0200 Subject: [PATCH] Barrierefreiheit und Tabellenlayout angepasst #15 --- .../edustore/db/install/conf/builddatum.txt | 2 +- .../conf/his1/dbconv/sch.eduetl/job_log.idx | 4 + .../conf/his1/dbconv/sch.eduetl/job_log.tab | 13 ++ .../his1/dbconv/view.eduetl/cifx_key.view | 9 + .../his1/dbconv/view.eduetl/cifx_table.view | 13 ++ .../edustore_kern_drop_pg.xml | 3 + .../edustore_kern_integrate_pg.sql | 2 + .../conf/edustore/db/install/conf/kern.html | 212 +++++++++++++++++- .../install/conf/module_alter_table_schema.x | 1 + .../db/install/conf/module_drop_views.sql | 16 ++ .../edustore/db/install/conf/module_grant.x | 3 + .../edustore/db/install/conf/module_revoke.x | 3 + .../db/install/conf/sx_fields_fuellen.sql | 166 ++++++++++++++ .../db/install/conf/sx_fields_loeschen.sql | 18 ++ .../db/install/conf/sx_tables_fuellen.sql | 24 ++ .../conf/edustore/db/install/kern_backup.x | 1 + .../conf/edustore/db/install/kern_drop_pg.sql | 1 + .../edustore/db/install/kern_indexes_drop.sql | 1 + .../edustore/db/install/kern_indexes_pg.sql | 5 + .../edustore/db/install/kern_install_pg.sql | 59 +++++ .../edustore/db/install/kern_purge_pg.sql | 2 + .../conf/edustore/db/install/kern_restore.x | 1 + .../upgrade/kern_upgrade_fields_pg.sql | 33 ++- .../upgrade/kern_upgrade_indexes_pg.sql | 28 ++- .../upgrade/kern_upgrade_tables_pg.sql | 43 +++- .../install/upgrade/kern_upgrade_views_pg.sql | 80 +++++++ superx/WEB-INF/kern_dbforms-config_pg.xml | 28 ++- superx/edit/kern/cifx_customize_edit.jsp | 10 +- superx/edit/kern/cifx_customize_list.jsp | 4 +- superx/edit/kern/portlets_edit.jsp | 8 +- superx/edit/kern/portlets_list.jsp | 2 +- superx/xml/js/memtext/sx_functions.js | 2 +- superx/xml/nd_templates.xsl | 8 +- 33 files changed, 776 insertions(+), 29 deletions(-) create mode 100644 superx/WEB-INF/conf/edustore/db/install/conf/his1/dbconv/sch.eduetl/job_log.idx create mode 100644 superx/WEB-INF/conf/edustore/db/install/conf/his1/dbconv/sch.eduetl/job_log.tab create mode 100644 superx/WEB-INF/conf/edustore/db/install/conf/his1/dbconv/view.eduetl/cifx_key.view create mode 100644 superx/WEB-INF/conf/edustore/db/install/conf/his1/dbconv/view.eduetl/cifx_table.view diff --git a/superx/WEB-INF/conf/edustore/db/install/conf/builddatum.txt b/superx/WEB-INF/conf/edustore/db/install/conf/builddatum.txt index 67a308f..b6408b2 100644 --- a/superx/WEB-INF/conf/edustore/db/install/conf/builddatum.txt +++ b/superx/WEB-INF/conf/edustore/db/install/conf/builddatum.txt @@ -1 +1 @@ -09.08.2026 +13.08.2026 diff --git a/superx/WEB-INF/conf/edustore/db/install/conf/his1/dbconv/sch.eduetl/job_log.idx b/superx/WEB-INF/conf/edustore/db/install/conf/his1/dbconv/sch.eduetl/job_log.idx new file mode 100644 index 0000000..09a96e7 --- /dev/null +++ b/superx/WEB-INF/conf/edustore/db/install/conf/his1/dbconv/sch.eduetl/job_log.idx @@ -0,0 +1,4 @@ + +{### job_log - automatisch generiert ############################################## +} +create unique index ix_job_log1 on job_log (job_instance_id ); diff --git a/superx/WEB-INF/conf/edustore/db/install/conf/his1/dbconv/sch.eduetl/job_log.tab b/superx/WEB-INF/conf/edustore/db/install/conf/his1/dbconv/sch.eduetl/job_log.tab new file mode 100644 index 0000000..56f6681 --- /dev/null +++ b/superx/WEB-INF/conf/edustore/db/install/conf/his1/dbconv/sch.eduetl/job_log.tab @@ -0,0 +1,13 @@ +{### job_log - automatisch generiert #########} +create table job_log( + job_instance_id int8 not null, +log TEXT , +status TEXT +); + +comment on column job_log.job_instance_id is 'Job-Instanz-ID'; + +comment on column job_log.log is 'Job-Log'; + +comment on column job_log.status is 'Job-Status'; + \ No newline at end of file diff --git a/superx/WEB-INF/conf/edustore/db/install/conf/his1/dbconv/view.eduetl/cifx_key.view b/superx/WEB-INF/conf/edustore/db/install/conf/his1/dbconv/view.eduetl/cifx_key.view new file mode 100644 index 0000000..13f72f1 --- /dev/null +++ b/superx/WEB-INF/conf/edustore/db/install/conf/his1/dbconv/view.eduetl/cifx_key.view @@ -0,0 +1,9 @@ +create view cifx_key( + key, +druck) as + + SELECT distinct C.key, + coalesce(trim(I.druck) || '- ' ,'') || C.key as druck + from cifx C left outer join cif I on (I.apnr=C.key and I.key=2) + ; + \ No newline at end of file diff --git a/superx/WEB-INF/conf/edustore/db/install/conf/his1/dbconv/view.eduetl/cifx_table.view b/superx/WEB-INF/conf/edustore/db/install/conf/his1/dbconv/view.eduetl/cifx_table.view new file mode 100644 index 0000000..dd7a094 --- /dev/null +++ b/superx/WEB-INF/conf/edustore/db/install/conf/his1/dbconv/view.eduetl/cifx_table.view @@ -0,0 +1,13 @@ +create view cifx_table( + name, +caption) as + + SELECT + name, + case when caption='' then name else coalesce(caption,name) end as caption + FROM sx_tables + where name like '%cifx' + and name !='trans_cifx' + and table_type='Schlüsseltabelle' + ; + \ No newline at end of file diff --git a/superx/WEB-INF/conf/edustore/db/install/conf/his1/edustore_install/edustore_kern_drop_pg.xml b/superx/WEB-INF/conf/edustore/db/install/conf/his1/edustore_install/edustore_kern_drop_pg.xml index 1c6507b..368db4a 100644 --- a/superx/WEB-INF/conf/edustore/db/install/conf/his1/edustore_install/edustore_kern_drop_pg.xml +++ b/superx/WEB-INF/conf/edustore/db/install/conf/his1/edustore_install/edustore_kern_drop_pg.xml @@ -598,6 +598,9 @@ eduetl:drop table if exists k_astat_lfb_fg cascade; + + eduetl:drop table if exists job_log cascade; + diff --git a/superx/WEB-INF/conf/edustore/db/install/conf/his1/edustore_install/edustore_kern_integrate_pg.sql b/superx/WEB-INF/conf/edustore/db/install/conf/his1/edustore_install/edustore_kern_integrate_pg.sql index d8f5143..061f15d 100644 --- a/superx/WEB-INF/conf/edustore/db/install/conf/his1/edustore_install/edustore_kern_integrate_pg.sql +++ b/superx/WEB-INF/conf/edustore/db/install/conf/his1/edustore_install/edustore_kern_integrate_pg.sql @@ -284,6 +284,8 @@ delete from db_tabellen where name='k_source'; insert into db_tabellen (name,protokollierung) values('k_source',0); delete from db_tabellen where name='k_astat_lfb_fg'; insert into db_tabellen (name,protokollierung) values('k_astat_lfb_fg',0); +delete from db_tabellen where name='job_log'; +insert into db_tabellen (name,protokollierung) values('job_log',0); -- Fülle sachgebiete, systeminfo und themenbaum diff --git a/superx/WEB-INF/conf/edustore/db/install/conf/kern.html b/superx/WEB-INF/conf/edustore/db/install/conf/kern.html index 666ec64..315ecc4 100644 --- a/superx/WEB-INF/conf/edustore/db/install/conf/kern.html +++ b/superx/WEB-INF/conf/edustore/db/install/conf/kern.html @@ -229,6 +229,7 @@ a:active {
  • hisinone_deleted_entity
  • hochschulinfo
  • implicit_orgunit_rights
  • +
  • job_log
  • k_astat_abschl_grp
  • k_astat_abschluss2steller
  • k_astat_abschluss3steller_land
  • @@ -325,6 +326,8 @@ a:active {
  • Views
      +
    • cifx_key
    • +
    • cifx_table
    • dim_abschluss
    • dim_kost
    • dim_kotr
    • @@ -401,6 +404,7 @@ a:active {
    • hisinone_deleted_entity
    • hochschulinfo
    • implicit_orgunit_rights
    • +
    • job_log
    • k_astat_lfb_fg
    • k_prio_param
    • k_source
    • @@ -526,6 +530,7 @@ a:active {
    • hisinone_deleted_entity
    • hochschulinfo
    • implicit_orgunit_rights
    • +
    • job_log
    • k_astat_lfb_fg
    • k_prio_param
    • k_source
    • @@ -655,6 +660,7 @@ a:active {
    • arch_datum
    • data_upload
    • hisinone_deleted_entity
    • +
    • job_log
    • kern_cifx_neu
    • kern_pruefrout
    • masken_prot_feld
    • @@ -1734,7 +1740,7 @@ a:active { true Tabelle - + cifx_table : name
      key @@ -1744,7 +1750,7 @@ a:active { true Schlüssel - + cifx_key : key
      apnr @@ -5639,6 +5645,76 @@ a:active { +
      Tabelle job_log
      +

      Log-Tabelle für ETL-Jobs der Komponentenverwaltung

      +

      Typ: Datentabelle, Themenbereich: Administration

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      FeldnameFeldtypGrößeDefaultNot NullBeschreibungKommentarFremdschlüssel
      job_instance_idBIGINTtrueJob-Instanz-ID
      logTEXTfalseJob-Log
      statusTEXTfalseJob-Status
      Primärschlüssel: +

      +
      Index/Indizes: +
        +
      • unique ix_job_log1 auf job_log (job_instance_id );
      • +
      +
      Wird benutzt in: +
        +
        Tabelle k_astat_abschl_grp (Amtl.Abschlüsse (Bundesschlüssel) und Gruppen)

        Typ: Schlüsseltabelle, Themenbereich: Stammdaten verwalten

          @@ -17407,6 +17483,138 @@ a:active {
        +
        View cifx_table (CIFX-Tabellenvariante)
        +

        View auf sx_tables-Tabelle (nur cifx-Tabellen)

        +

          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        FeldnameFeldtypGrößeDefaultNot NullBeschreibungKommentarFremdschlüssel
        nameVARCHAR255falseName der Tabelle
        captionVARCHAR255falseBeschriftung
        Primärschlüssel: +

        +
        SQL-Ausdruck: +
          +
        • + SELECT + name, + case when caption='' then name else coalesce(caption,name) end as caption + FROM sx_tables + where name like '%cifx' + and name !='trans_cifx' + and table_type='Schlüsseltabelle' +
        • +
        +
        Wird benutzt in: +
          +
          +
          View cifx_key (CIFX-Schlüssel)
          +

          Übericht aller exisiterenden cifx-keys

          +

            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
          FeldnameFeldtypGrößeDefaultNot NullBeschreibungKommentarFremdschlüssel
          keyINTEGER255falseNummer des Schlüssels
          druckVARCHAR255falseName des Schlüssels
          Primärschlüssel: +

          +
          SQL-Ausdruck: +
            +
          • + SELECT distinct C.key, + coalesce(trim(I.druck) || '- ' ,'') || C.key as druck + from cifx C left outer join cif I on (I.apnr=C.key and I.key=2) +
          • +
          +
          Wird benutzt in: +
            +
            View dim_staat (Nationalität)

            Staaten

            Typ: Schlüsseltabelle, Themenbereich: Studierende

              diff --git a/superx/WEB-INF/conf/edustore/db/install/conf/module_alter_table_schema.x b/superx/WEB-INF/conf/edustore/db/install/conf/module_alter_table_schema.x index 0dad8a8..9ecd099 100755 --- a/superx/WEB-INF/conf/edustore/db/install/conf/module_alter_table_schema.x +++ b/superx/WEB-INF/conf/edustore/db/install/conf/module_alter_table_schema.x @@ -146,3 +146,4 @@ DOQUERY "alter table arch_datum SET SCHEMA $SCHEMA;" DOQUERY "alter table k_prio_param SET SCHEMA $SCHEMA;" DOQUERY "alter table k_source SET SCHEMA $SCHEMA;" DOQUERY "alter table k_astat_lfb_fg SET SCHEMA $SCHEMA;" +DOQUERY "alter table job_log SET SCHEMA $SCHEMA;" diff --git a/superx/WEB-INF/conf/edustore/db/install/conf/module_drop_views.sql b/superx/WEB-INF/conf/edustore/db/install/conf/module_drop_views.sql index 478760b..f6f34f8 100644 --- a/superx/WEB-INF/conf/edustore/db/install/conf/module_drop_views.sql +++ b/superx/WEB-INF/conf/edustore/db/install/conf/module_drop_views.sql @@ -31,6 +31,12 @@ select sp_table_exists('dimension_view') from xdummy; select sp_table_exists('fact_table') from xdummy; + +select sp_table_exists('cifx_table') from xdummy; + + +select sp_table_exists('cifx_key') from xdummy; + select sp_table_exists('dim_staat') from xdummy; @@ -101,6 +107,16 @@ drop view fact_table; +<#if cifx_table_view_exists ==1> +drop view cifx_table; + + + +<#if cifx_key_view_exists ==1> +drop view cifx_key; + + + <#if dim_staat_view_exists ==1> drop view dim_staat; diff --git a/superx/WEB-INF/conf/edustore/db/install/conf/module_grant.x b/superx/WEB-INF/conf/edustore/db/install/conf/module_grant.x index 16e96f1..771236e 100755 --- a/superx/WEB-INF/conf/edustore/db/install/conf/module_grant.x +++ b/superx/WEB-INF/conf/edustore/db/install/conf/module_grant.x @@ -488,6 +488,7 @@ if [ "$DATABASE" == "POSTGRES" -a "$RIGHT" != "select" ] DOQUERY "grant update on k_astat_lfb_fg_tid_seq to $GRANTEE;" fi +DOQUERY "grant $RIGHT on job_log to $GRANTEE;" #Besonderheit Kernmodul: #Zum Login braucht man Update Rechte auf einzelne Tabellen:" @@ -516,6 +517,8 @@ DOQUERY "grant $RIGHT on user_inst_org to $GRANTEE;" DOQUERY "grant $RIGHT on hochschulen to $GRANTEE;" DOQUERY "grant $RIGHT on dimension_view to $GRANTEE;" DOQUERY "grant $RIGHT on fact_table to $GRANTEE;" +DOQUERY "grant $RIGHT on cifx_table to $GRANTEE;" +DOQUERY "grant $RIGHT on cifx_key to $GRANTEE;" DOQUERY "grant $RIGHT on dim_staat to $GRANTEE;" DOQUERY "grant $RIGHT on dim_stg to $GRANTEE;" DOQUERY "grant $RIGHT on dim_abschluss to $GRANTEE;" diff --git a/superx/WEB-INF/conf/edustore/db/install/conf/module_revoke.x b/superx/WEB-INF/conf/edustore/db/install/conf/module_revoke.x index 55a61cf..4fb5c8e 100755 --- a/superx/WEB-INF/conf/edustore/db/install/conf/module_revoke.x +++ b/superx/WEB-INF/conf/edustore/db/install/conf/module_revoke.x @@ -488,6 +488,7 @@ if [ "$DATABASE" == "POSTGRES" -a "$RIGHT" != "select" ] DOQUERY "revoke update on k_astat_lfb_fg_tid_seq from $GRANTEE;" fi +DOQUERY "revoke $RIGHT on job_log from $GRANTEE;" #Views: DOQUERY "revoke $RIGHT on user_groups from $GRANTEE;" DOQUERY "revoke $RIGHT on menu_element_fieldmode from $GRANTEE;" @@ -498,6 +499,8 @@ DOQUERY "revoke $RIGHT on user_inst_org from $GRANTEE;" DOQUERY "revoke $RIGHT on hochschulen from $GRANTEE;" DOQUERY "revoke $RIGHT on dimension_view from $GRANTEE;" DOQUERY "revoke $RIGHT on fact_table from $GRANTEE;" +DOQUERY "revoke $RIGHT on cifx_table from $GRANTEE;" +DOQUERY "revoke $RIGHT on cifx_key from $GRANTEE;" DOQUERY "revoke $RIGHT on dim_staat from $GRANTEE;" DOQUERY "revoke $RIGHT on dim_stg from $GRANTEE;" DOQUERY "revoke $RIGHT on dim_abschluss from $GRANTEE;" diff --git a/superx/WEB-INF/conf/edustore/db/install/conf/sx_fields_fuellen.sql b/superx/WEB-INF/conf/edustore/db/install/conf/sx_fields_fuellen.sql index bf1916d..c4585c7 100644 --- a/superx/WEB-INF/conf/edustore/db/install/conf/sx_fields_fuellen.sql +++ b/superx/WEB-INF/conf/edustore/db/install/conf/sx_fields_fuellen.sql @@ -1549,6 +1549,12 @@ values('cifx_customize', 0, 1); +update tmp_fields set foreignkey_tab='cifx_table', +foreignkey_col='name', +foreignkey_cap='caption', +foreignkey_uniquename='' +where trim(table_name) || '_' || trim(name) ='cifx_customize_cifx_table'; + insert into tmp_fields ( table_name, name, @@ -1571,6 +1577,12 @@ values('cifx_customize', 0, 1); +update tmp_fields set foreignkey_tab='cifx_key', +foreignkey_col='key', +foreignkey_cap='druck', +foreignkey_uniquename='' +where trim(table_name) || '_' || trim(name) ='cifx_customize_key'; + insert into tmp_fields ( table_name, name, @@ -7171,6 +7183,72 @@ values('implicit_orgunit_rights', 0, 1); +insert into tmp_fields ( +table_name, +name, +caption, +description, +field_type, +field_size, +field_not_null, +currentlyUsed, +check_integrity, +is_sum) +values('job_log', +'job_instance_id', +'Job-Instanz-ID', +'', +'BIGINT', +'', +1, +1, +0, +1); + +insert into tmp_fields ( +table_name, +name, +caption, +description, +field_type, +field_size, +field_not_null, +currentlyUsed, +check_integrity, +is_sum) +values('job_log', +'log', +'Job-Log', +'', +'TEXT', +'', +0, +1, +0, +1); + +insert into tmp_fields ( +table_name, +name, +caption, +description, +field_type, +field_size, +field_not_null, +currentlyUsed, +check_integrity, +is_sum) +values('job_log', +'status', +'Job-Status', +'', +'TEXT', +'', +0, +1, +0, +1); + insert into tmp_fields ( table_name, name, @@ -22851,6 +22929,94 @@ values('xdummy', 0, 1); +insert into tmp_fields ( +table_name, +name, +caption, +description, +field_type, +field_size, +field_not_null, +currentlyUsed, +check_integrity, +is_sum) +values('cifx_key', +'key', +'Nummer des Schlüssels', +'', +'INTEGER', +'255', +0, +1, +0, +1); + +insert into tmp_fields ( +table_name, +name, +caption, +description, +field_type, +field_size, +field_not_null, +currentlyUsed, +check_integrity, +is_sum) +values('cifx_key', +'druck', +'Name des Schlüssels', +'', +'VARCHAR', +'255', +0, +1, +0, +1); + +insert into tmp_fields ( +table_name, +name, +caption, +description, +field_type, +field_size, +field_not_null, +currentlyUsed, +check_integrity, +is_sum) +values('cifx_table', +'name', +'Name der Tabelle', +'', +'VARCHAR', +'255', +0, +1, +0, +1); + +insert into tmp_fields ( +table_name, +name, +caption, +description, +field_type, +field_size, +field_not_null, +currentlyUsed, +check_integrity, +is_sum) +values('cifx_table', +'caption', +'Beschriftung', +'', +'VARCHAR', +'255', +0, +1, +0, +1); + insert into tmp_fields ( table_name, name, diff --git a/superx/WEB-INF/conf/edustore/db/install/conf/sx_fields_loeschen.sql b/superx/WEB-INF/conf/edustore/db/install/conf/sx_fields_loeschen.sql index 8749f3d..1720eed 100644 --- a/superx/WEB-INF/conf/edustore/db/install/conf/sx_fields_loeschen.sql +++ b/superx/WEB-INF/conf/edustore/db/install/conf/sx_fields_loeschen.sql @@ -1914,6 +1914,24 @@ name) values('implicit_orgunit_rights', 'lid'); +insert into tmp_fields ( +table_name, +name) +values('job_log', +'job_instance_id'); + +insert into tmp_fields ( +table_name, +name) +values('job_log', +'log'); + +insert into tmp_fields ( +table_name, +name) +values('job_log', +'status'); + insert into tmp_fields ( table_name, name) diff --git a/superx/WEB-INF/conf/edustore/db/install/conf/sx_tables_fuellen.sql b/superx/WEB-INF/conf/edustore/db/install/conf/sx_tables_fuellen.sql index 40f3bf1..abbda1c 100644 --- a/superx/WEB-INF/conf/edustore/db/install/conf/sx_tables_fuellen.sql +++ b/superx/WEB-INF/conf/edustore/db/install/conf/sx_tables_fuellen.sql @@ -359,6 +359,14 @@ values('implicit_orgunit_rights','','Schlüsseltabelle für LiveMapping', 'Administration', 0); +insert into tmp_tables (name,caption,description,table_type,systeminfo_id,systeminfo_orig,thema,sachgebiete_id) +values('job_log','','Log-Tabelle für ETL-Jobs der Komponentenverwaltung', +'Datentabelle', +9, +9, +'Administration', +0); + insert into tmp_tables (name,caption,description,table_type,systeminfo_id,systeminfo_orig,thema,sachgebiete_id) values('k_astat_abschl_grp','Amtl.Abschlüsse (Bundesschlüssel) und Gruppen','', 'Schlüsseltabelle', @@ -1103,6 +1111,22 @@ values('xdummy','','', 'Administration', 0); +insert into tmp_tables (name,caption,description,table_type,systeminfo_id,systeminfo_orig,thema,sachgebiete_id) +values('cifx_key','CIFX-Schlüssel','Übericht aller exisiterenden cifx-keys', +'', +9, +9, +'', +0); + +insert into tmp_tables (name,caption,description,table_type,systeminfo_id,systeminfo_orig,thema,sachgebiete_id) +values('cifx_table','CIFX-Tabellenvariante','View auf sx_tables-Tabelle (nur cifx-Tabellen)', +'', +9, +9, +'', +0); + insert into tmp_tables (name,caption,description,table_type,systeminfo_id,systeminfo_orig,thema,sachgebiete_id) values('dim_abschluss','Abschluss','Abschluss (intern)', 'Schlüsseltabelle', diff --git a/superx/WEB-INF/conf/edustore/db/install/kern_backup.x b/superx/WEB-INF/conf/edustore/db/install/kern_backup.x index c4e3044..775d38f 100755 --- a/superx/WEB-INF/conf/edustore/db/install/kern_backup.x +++ b/superx/WEB-INF/conf/edustore/db/install/kern_backup.x @@ -164,6 +164,7 @@ DOQUERY "select arch_table, datum, bezugszeit_von, bezugszeit_bis, bezugsart, us DOQUERY "select id, name, sortorder from k_prio_param;" false $DBDELIMITER ${BACKUP_PFAD_INDIVIDUELL_MODULE}/k_prio_param.unl txt DOQUERY "select id, name, sortorder from k_source;" false $DBDELIMITER ${BACKUP_PFAD_INDIVIDUELL_MODULE}/k_source.unl txt DOQUERY "select tid, fgr, fgr_str, lfb, lfb_str, fg, fg_str, gueltig_von, gueltig_bis from k_astat_lfb_fg;" false $DBDELIMITER ${BACKUP_PFAD_INDIVIDUELL_MODULE}/k_astat_lfb_fg.unl txt +DOQUERY "select job_instance_id, log, status from job_log;" false $DBDELIMITER ${BACKUP_PFAD_INDIVIDUELL_MODULE}/job_log.unl txt echo "Finished unloading" diff --git a/superx/WEB-INF/conf/edustore/db/install/kern_drop_pg.sql b/superx/WEB-INF/conf/edustore/db/install/kern_drop_pg.sql index 8abd936..31a7e69 100644 --- a/superx/WEB-INF/conf/edustore/db/install/kern_drop_pg.sql +++ b/superx/WEB-INF/conf/edustore/db/install/kern_drop_pg.sql @@ -211,6 +211,7 @@ drop table if exists arch_datum cascade; drop table if exists k_prio_param cascade; drop table if exists k_source cascade; drop table if exists k_astat_lfb_fg cascade; +drop table if exists job_log cascade; select now(), 'Uninstall-Actions'; diff --git a/superx/WEB-INF/conf/edustore/db/install/kern_indexes_drop.sql b/superx/WEB-INF/conf/edustore/db/install/kern_indexes_drop.sql index d0c83b6..6e81b6b 100644 --- a/superx/WEB-INF/conf/edustore/db/install/kern_indexes_drop.sql +++ b/superx/WEB-INF/conf/edustore/db/install/kern_indexes_drop.sql @@ -49,4 +49,5 @@ drop index ix_group_felder2 ; drop index ix_dim_datum_day_date ; drop index ix_etl_job1 ; drop index k_astat_staat_eu_idx1 ; + drop index ix_job_log1 ; \ No newline at end of file diff --git a/superx/WEB-INF/conf/edustore/db/install/kern_indexes_pg.sql b/superx/WEB-INF/conf/edustore/db/install/kern_indexes_pg.sql index 1ccbacc..7b23c7a 100644 --- a/superx/WEB-INF/conf/edustore/db/install/kern_indexes_pg.sql +++ b/superx/WEB-INF/conf/edustore/db/install/kern_indexes_pg.sql @@ -277,3 +277,8 @@ select now(), 'Erzeuge Index k_astat_staat_eu_idx1'; create index k_astat_staat_eu_idx1 on k_astat_staat_eu (astat, semester_von, semester_bis ); + + +select now(), 'Erzeuge Index ix_job_log1'; + +create unique index ix_job_log1 on job_log (job_instance_id ); diff --git a/superx/WEB-INF/conf/edustore/db/install/kern_install_pg.sql b/superx/WEB-INF/conf/edustore/db/install/kern_install_pg.sql index 0850bcd..3a0fdc7 100644 --- a/superx/WEB-INF/conf/edustore/db/install/kern_install_pg.sql +++ b/superx/WEB-INF/conf/edustore/db/install/kern_install_pg.sql @@ -4565,6 +4565,35 @@ select now(), 'Tabelle k_astat_lfb_fg erzeugt'; +select now(), 'Erzeuge Tabelle job_log'; + +create table job_log( + job_instance_id int8 not null, +log TEXT , +status TEXT +) +; + + + +comment on table job_log is 'Log-Tabelle für ETL-Jobs der Komponentenverwaltung'; + +comment on column job_log.job_instance_id is 'Job-Instanz-ID'; + +comment on column job_log.log is 'Job-Log'; + +comment on column job_log.status is 'Job-Status'; + + +select now(), 'Erzeuge Index ix_job_log1'; + +create unique index ix_job_log1 on job_log (job_instance_id ); + + +select now(), 'Tabelle job_log erzeugt'; + + + select now(), 'Erzeuge View user_groups'; create view user_groups( @@ -4848,6 +4877,34 @@ where T.name in (select distinct fact_table from dimension) ; +select now(), 'Erzeuge View cifx_table'; + +create view cifx_table( + name, +caption) as + + SELECT + name, + case when caption='' then name else coalesce(caption,name) end as caption + FROM sx_tables + where name like '%cifx' + and name !='trans_cifx' + and table_type='Schlüsseltabelle' + ; + + +select now(), 'Erzeuge View cifx_key'; + +create view cifx_key( + key, +druck) as + + SELECT distinct C.key, + coalesce(trim(I.druck) || '- ' ,'') || C.key as druck + from cifx C left outer join cif I on (I.apnr=C.key and I.key=2) + ; + + select now(), 'Erzeuge View dim_staat'; create view dim_staat( @@ -5779,6 +5836,8 @@ delete from db_tabellen where name='k_source'; insert into db_tabellen (name,protokollierung) values('k_source',0); delete from db_tabellen where name='k_astat_lfb_fg'; insert into db_tabellen (name,protokollierung) values('k_astat_lfb_fg',0); +delete from db_tabellen where name='job_log'; +insert into db_tabellen (name,protokollierung) values('job_log',0); select now(), 'Fülle sachgebiete, systeminfo und themenbaum'; diff --git a/superx/WEB-INF/conf/edustore/db/install/kern_purge_pg.sql b/superx/WEB-INF/conf/edustore/db/install/kern_purge_pg.sql index 08e1bd4..1c37332 100644 --- a/superx/WEB-INF/conf/edustore/db/install/kern_purge_pg.sql +++ b/superx/WEB-INF/conf/edustore/db/install/kern_purge_pg.sql @@ -33,3 +33,5 @@ truncate table hisinone_deleted_entity; vacuum full hisinone_deleted_entity; truncate table arch_datum; vacuum full arch_datum; +truncate table job_log; +vacuum full job_log; diff --git a/superx/WEB-INF/conf/edustore/db/install/kern_restore.x b/superx/WEB-INF/conf/edustore/db/install/kern_restore.x index 21fee61..5ef756b 100755 --- a/superx/WEB-INF/conf/edustore/db/install/kern_restore.x +++ b/superx/WEB-INF/conf/edustore/db/install/kern_restore.x @@ -139,6 +139,7 @@ sx_auto_upload_table.x arch_datum tmp"$MANDANTENID"/arch_datum.unl sx_auto_upload_table.x k_prio_param tmp"$MANDANTENID"/k_prio_param.unl sx_auto_upload_table.x k_source tmp"$MANDANTENID"/k_source.unl sx_auto_upload_table.x k_astat_lfb_fg tmp"$MANDANTENID"/k_astat_lfb_fg.unl +sx_auto_upload_table.x job_log tmp"$MANDANTENID"/job_log.unl echo 'Finished restoring' diff --git a/superx/WEB-INF/conf/edustore/db/install/upgrade/kern_upgrade_fields_pg.sql b/superx/WEB-INF/conf/edustore/db/install/upgrade/kern_upgrade_fields_pg.sql index 2b9309a..ca25122 100644 --- a/superx/WEB-INF/conf/edustore/db/install/upgrade/kern_upgrade_fields_pg.sql +++ b/superx/WEB-INF/conf/edustore/db/install/upgrade/kern_upgrade_fields_pg.sql @@ -143,7 +143,8 @@ and C.relname::varchar(255) in ('sichtart_rechttabelle', 'arch_datum', 'k_prio_param', 'k_source', -'k_astat_lfb_fg') UNION SELECT trim(N.nspname||'.'||C.relname) || '.' || trim(A.attname),trim(N.nspname||'.'||C.relname) || '.' || trim(A.attname) +'k_astat_lfb_fg', +'job_log') UNION SELECT trim(N.nspname||'.'||C.relname) || '.' || trim(A.attname),trim(N.nspname||'.'||C.relname) || '.' || trim(A.attname) FROM pg_attribute A, pg_class C, pg_namespace N where C.oid = A.attrelid and N.oid = C.relnamespace @@ -283,7 +284,8 @@ and N.nspname||'.'||C.relname in ('sichtart_rechttabelle', 'arch_datum', 'k_prio_param', 'k_source', -'k_astat_lfb_fg' +'k_astat_lfb_fg', +'job_log' ) order by 1; @@ -9272,3 +9274,30 @@ select now(), 'field k_astat_lfb_fg.gueltig_bis will be added'; alter table k_astat_lfb_fg add column gueltig_bis DATE ; + +<#if !fields?seq_contains("job_log.job_instance_id") > + + +select now(), 'field job_log.job_instance_id will be added'; + +alter table job_log add column job_instance_id int8 not null; + + + +<#if !fields?seq_contains("job_log.log") > + + +select now(), 'field job_log.log will be added'; + +alter table job_log add column log TEXT ; + + + +<#if !fields?seq_contains("job_log.status") > + + +select now(), 'field job_log.status will be added'; + +alter table job_log add column status TEXT ; + + diff --git a/superx/WEB-INF/conf/edustore/db/install/upgrade/kern_upgrade_indexes_pg.sql b/superx/WEB-INF/conf/edustore/db/install/upgrade/kern_upgrade_indexes_pg.sql index 1146ab2..02e1794 100644 --- a/superx/WEB-INF/conf/edustore/db/install/upgrade/kern_upgrade_indexes_pg.sql +++ b/superx/WEB-INF/conf/edustore/db/install/upgrade/kern_upgrade_indexes_pg.sql @@ -144,7 +144,8 @@ where D.relname::varchar(200) in ('sichtart_rechttabelle', 'arch_datum', 'k_prio_param', 'k_source', -'k_astat_lfb_fg')) UNION SELECT +'k_astat_lfb_fg', +'job_log')) UNION SELECT C.relname, C.relname from pg_class C, pg_index I where I.indexrelid=C.oid and I.indrelid in ( @@ -285,7 +286,8 @@ and N.nspname||'.'||D.relname in ('sichtart_rechttabelle', 'arch_datum', 'k_prio_param', 'k_source', -'k_astat_lfb_fg' +'k_astat_lfb_fg', +'job_log' )); @@ -1416,3 +1418,25 @@ semester_von, semester_bis ); + +<#assign exists="false" /> +<#list indexes as i> +<#if i.getName()="ix_job_log1"> +<#assign exists="true" /> + + + +<#if exists="true" > + + +select now(), 'index ix_job_log1 exists - fine'; + + +<#else> + + +select now(), 'Erzeuge Index ix_job_log1'; + +create unique index ix_job_log1 on job_log (job_instance_id ); + + diff --git a/superx/WEB-INF/conf/edustore/db/install/upgrade/kern_upgrade_tables_pg.sql b/superx/WEB-INF/conf/edustore/db/install/upgrade/kern_upgrade_tables_pg.sql index 6e12d59..0d0a752 100644 --- a/superx/WEB-INF/conf/edustore/db/install/upgrade/kern_upgrade_tables_pg.sql +++ b/superx/WEB-INF/conf/edustore/db/install/upgrade/kern_upgrade_tables_pg.sql @@ -139,7 +139,8 @@ select relname,relname as tabelle from pg_class JOIN pg_namespace ON pg_namespac 'arch_datum', 'k_prio_param', 'k_source', -'k_astat_lfb_fg') UNION SELECT pg_namespace.nspname||'.'||relname as relname,pg_namespace.nspname||'.'||relname as tabelle from pg_class JOIN pg_namespace ON pg_namespace.oid = pg_class.relnamespace WHERE pg_namespace.nspname||'.'||relname in ('sichtart_rechttabelle', +'k_astat_lfb_fg', +'job_log') UNION SELECT pg_namespace.nspname||'.'||relname as relname,pg_namespace.nspname||'.'||relname as tabelle from pg_class JOIN pg_namespace ON pg_namespace.oid = pg_class.relnamespace WHERE pg_namespace.nspname||'.'||relname in ('sichtart_rechttabelle', 'group_field_pref', 'stylesheet_field', 'db_tabellen', @@ -274,7 +275,8 @@ select relname,relname as tabelle from pg_class JOIN pg_namespace ON pg_namespac 'arch_datum', 'k_prio_param', 'k_source', -'k_astat_lfb_fg' +'k_astat_lfb_fg', +'job_log' ); @@ -5946,6 +5948,43 @@ comment on column k_astat_lfb_fg.fg_str is 'Fachgebiet'; delete from db_tabellen where name='k_astat_lfb_fg'; insert into db_tabellen (name,protokollierung) values('k_astat_lfb_fg',0); + +<#if !deleted_tables?seq_contains("job_log") && tables?is_sequence && tables?seq_contains("job_log") > + + +select now(), 'table job_log exists - fine'; + + +<#else> + + +select now(), 'Erzeuge Tabelle job_log'; + +create table job_log( + job_instance_id int8 not null, +log TEXT , +status TEXT +) +; + + + +comment on table job_log is 'Log-Tabelle für ETL-Jobs der Komponentenverwaltung'; + +comment on column job_log.job_instance_id is 'Job-Instanz-ID'; + +comment on column job_log.log is 'Job-Log'; + +comment on column job_log.status is 'Job-Status'; + + +select now(), 'Erzeuge Index ix_job_log1'; + +create unique index ix_job_log1 on job_log (job_instance_id ); + + +delete from db_tabellen where name='job_log'; +insert into db_tabellen (name,protokollierung) values('job_log',0); -- update primary keys, see ticket: #296420 alter table if exists sichtart_rechttabelle drop constraint if exists sichtart_rechttabelle_pkey; alter table if exists sichtart_rechttabelle drop constraint if exists ix_sichtart_rt_p1; diff --git a/superx/WEB-INF/conf/edustore/db/install/upgrade/kern_upgrade_views_pg.sql b/superx/WEB-INF/conf/edustore/db/install/upgrade/kern_upgrade_views_pg.sql index be56bb9..f992b62 100644 --- a/superx/WEB-INF/conf/edustore/db/install/upgrade/kern_upgrade_views_pg.sql +++ b/superx/WEB-INF/conf/edustore/db/install/upgrade/kern_upgrade_views_pg.sql @@ -13,6 +13,8 @@ select relname,relname as tabelle from pg_class where relname::varchar(200) in ( 'hochschulen', 'dimension_view', 'fact_table', +'cifx_table', +'cifx_key', 'dim_staat', 'dim_stg', 'dim_abschluss', @@ -31,6 +33,8 @@ WHERE N.oid = C.relnamespace and N.nspname||'.'||C.relname in ('user_groups', 'hochschulen', 'dimension_view', 'fact_table', +'cifx_table', +'cifx_key', 'dim_staat', 'dim_stg', 'dim_abschluss', @@ -420,6 +424,54 @@ where T.name in (select distinct fact_table from dimension) +<#if views?seq_contains("cifx_table") > + + +select now(), 'view cifx_table exists - fine'; + + +<#else> + + +select now(), 'Erzeuge View cifx_table'; + +create view cifx_table( + name, +caption) as + + SELECT + name, + case when caption='' then name else coalesce(caption,name) end as caption + FROM sx_tables + where name like '%cifx' + and name !='trans_cifx' + and table_type='Schlüsseltabelle' + ; + + + +<#if views?seq_contains("cifx_key") > + + +select now(), 'view cifx_key exists - fine'; + + +<#else> + + +select now(), 'Erzeuge View cifx_key'; + +create view cifx_key( + key, +druck) as + + SELECT distinct C.key, + coalesce(trim(I.druck) || '- ' ,'') || C.key as druck + from cifx C left outer join cif I on (I.apnr=C.key and I.key=2) + ; + + + <#if views?seq_contains("dim_staat") > @@ -962,6 +1014,34 @@ where T.name in (select distinct fact_table from dimension) ; +select now(), 'Erzeuge View cifx_table'; + +create view cifx_table( + name, +caption) as + + SELECT + name, + case when caption='' then name else coalesce(caption,name) end as caption + FROM sx_tables + where name like '%cifx' + and name !='trans_cifx' + and table_type='Schlüsseltabelle' + ; + + +select now(), 'Erzeuge View cifx_key'; + +create view cifx_key( + key, +druck) as + + SELECT distinct C.key, + coalesce(trim(I.druck) || '- ' ,'') || C.key as druck + from cifx C left outer join cif I on (I.apnr=C.key and I.key=2) + ; + + select now(), 'Erzeuge View dim_staat'; create view dim_staat( diff --git a/superx/WEB-INF/kern_dbforms-config_pg.xml b/superx/WEB-INF/kern_dbforms-config_pg.xml index 94ffb0b..70824fe 100644 --- a/superx/WEB-INF/kern_dbforms-config_pg.xml +++ b/superx/WEB-INF/kern_dbforms-config_pg.xml @@ -104,6 +104,12 @@ + + + + + +
            @@ -587,6 +593,12 @@
            + + + + + +
            @@ -1477,19 +1489,19 @@ - + - + - + - + @@ -1968,6 +1980,14 @@
            + + + +
            + + + +
            diff --git a/superx/edit/kern/cifx_customize_edit.jsp b/superx/edit/kern/cifx_customize_edit.jsp index a41e143..0d06b1b 100644 --- a/superx/edit/kern/cifx_customize_edit.jsp +++ b/superx/edit/kern/cifx_customize_edit.jsp @@ -145,16 +145,18 @@ dbConnectionName="<%= mandantenid %>" > diff --git a/superx/edit/kern/cifx_customize_list.jsp b/superx/edit/kern/cifx_customize_list.jsp index 19b75cf..e7715d0 100644 --- a/superx/edit/kern/cifx_customize_list.jsp +++ b/superx/edit/kern/cifx_customize_list.jsp @@ -107,9 +107,7 @@ dbConnectionName="<%= mandantenid %>" > - @@ -137,7 +137,7 @@ dbConnectionName="<%= mandantenid %>" > @@ -146,7 +146,7 @@ dbConnectionName="<%= mandantenid %>" > @@ -171,7 +171,7 @@ dbConnectionName="<%= mandantenid %>" > diff --git a/superx/edit/kern/portlets_list.jsp b/superx/edit/kern/portlets_list.jsp index 191b187..375eeba 100644 --- a/superx/edit/kern/portlets_list.jsp +++ b/superx/edit/kern/portlets_list.jsp @@ -102,7 +102,7 @@ dbConnectionName="<%= mandantenid %>" >
            -
            - +
            + +<% sql = "select name, caption from cifx_table order by caption;"; %>
            -
            - +
            + +<% sql = "select key, druck from cifx_key order by druck;"; %>
            - - + <% sql = "select name, caption from cifx_table order by caption;"; %> <% sql = "select key, druck from cifx_key order by druck;"; %> <% if(currentRow_cifx_customize != null) diff --git a/superx/edit/kern/portlets_edit.jsp b/superx/edit/kern/portlets_edit.jsp index a68e5a1..0b4ccb6 100644 --- a/superx/edit/kern/portlets_edit.jsp +++ b/superx/edit/kern/portlets_edit.jsp @@ -128,7 +128,7 @@ dbConnectionName="<%= mandantenid %>" >
            -<% sql = "select element_value, description from menu_element where menu_element.element = \'portlet_type\' order by description;"; %> +<% sql = "select element_value, description from menu_element where menu_element.element = \'portlet_type\' order by description;"; %>
            -<% sql = "select element_value, description from menu_element where menu_element.element = \'portlet_css_class\' order by description;"; %> +<% sql = "select element_value, description from menu_element where menu_element.element = \'portlet_css_class\' order by description;"; %>
            "green" oder "red"
            -<% sql = "select element_value, description from menu_element where menu_element.element = \'portlet_icon\' order by description;"; %> +<% sql = "select element_value, description from menu_element where menu_element.element = \'portlet_icon\' order by description;"; %>
            z.B. "icon-user-plus" oder "icon-help-circled"
            -<% sql = "select element_value, description from menu_element where menu_element.element = \'portlet_visible\' order by description;"; %> +<% sql = "select element_value, description from menu_element where menu_element.element = \'portlet_visible\' order by description;"; %>
            false=wird nicht ausgegeben, all=auch nicht angemeldete Personen sehen das Portlet.
            - <% sql = "select element_value, description from menu_element where menu_element.element = \'portlet_type\' order by description;"; %> <% sql = "select element_value, description from menu_element where menu_element.element = \'portlet_css_class\' order by description;"; %> <% sql = "select element_value, description from menu_element where menu_element.element = \'portlet_icon\' order by description;"; %> <% sql = "select element_value, description from menu_element where menu_element.element = \'portlet_visible\' order by description;"; %> + <% sql = "select element_value, description from menu_element where menu_element.element = \'portlet_type\' order by description;"; %> <% sql = "select element_value, description from menu_element where menu_element.element = \'portlet_css_class\' order by description;"; %> <% sql = "select element_value, description from menu_element where menu_element.element = \'portlet_icon\' order by description;"; %> <% sql = "select element_value, description from menu_element where menu_element.element = \'portlet_visible\' order by description;"; %> diff --git a/superx/xml/js/memtext/sx_functions.js b/superx/xml/js/memtext/sx_functions.js index 84d9e85..40f471c 100644 --- a/superx/xml/js/memtext/sx_functions.js +++ b/superx/xml/js/memtext/sx_functions.js @@ -1953,7 +1953,7 @@ function resetValidation() var el=document.getElementById('validation'); if(el) el.innerHTML = ""; - if(1=2) + if(1==2) { //still experimental for(var i=1; i < felder.length; i++) { diff --git a/superx/xml/nd_templates.xsl b/superx/xml/nd_templates.xsl index e193a18..9a8df19 100644 --- a/superx/xml/nd_templates.xsl +++ b/superx/xml/nd_templates.xsl @@ -545,7 +545,7 @@ jQuery.ajaxPrefilter( function( s ) {
            -