From 8d6414af9a8bd75ef739de6dad29d6f1bc404d65 Mon Sep 17 00:00:00 2001
From: "m.kuhn" <m.kuhn@mkuhn.aditosoftware.local>
Date: Mon, 25 Mar 2019 14:31:18 +0100
Subject: [PATCH] create asys_audit, timeline view

---
 .../_____SYSTEMALIAS/_____SYSTEMALIAS.aod     | 41 +++++++++++++------
 .../LogHistory_entity/LogHistory_entity.aod   |  8 ++++
 .../LogHistoryFilter_view.aod                 | 17 +++++---
 .../db_changes/data_alias/basic/init/init.xml |  2 +-
 .../system_alias/struct/create_asys_audit.xml | 23 +++++++++++
 5 files changed, 72 insertions(+), 19 deletions(-)
 create mode 100644 others/db_changes/system_alias/struct/create_asys_audit.xml

diff --git a/aliasDefinition/_____SYSTEMALIAS/_____SYSTEMALIAS.aod b/aliasDefinition/_____SYSTEMALIAS/_____SYSTEMALIAS.aod
index d875563b31..c080c506aa 100644
--- a/aliasDefinition/_____SYSTEMALIAS/_____SYSTEMALIAS.aod
+++ b/aliasDefinition/_____SYSTEMALIAS/_____SYSTEMALIAS.aod
@@ -1445,19 +1445,6 @@
               <name>auditSyncConfig</name>
             </auditSyncConfig>
             <entityFields>
-              <entityFieldDb>
-                <name>ACOLUMNNAME</name>
-                <dbName></dbName>
-                <primaryKey v="false" />
-                <columnType v="12" />
-                <size v="127" />
-                <scale v="0" />
-                <notNull v="true" />
-                <isUnique v="false" />
-                <index v="false" />
-                <title></title>
-                <description></description>
-              </entityFieldDb>
               <entityFieldDb>
                 <name>ALIAS</name>
                 <dbName></dbName>
@@ -1614,6 +1601,34 @@
                 <title></title>
                 <description></description>
               </entityFieldDb>
+              <entityFieldDb>
+                <name>AOCOLUMNNAME</name>
+                <dbName></dbName>
+                <primaryKey v="false" />
+                <columnType v="12" />
+                <size v="127" />
+                <scale v="0" />
+                <notNull v="false" />
+                <isUnique v="false" />
+                <index v="false" />
+                <documentation></documentation>
+                <title></title>
+                <description></description>
+              </entityFieldDb>
+              <entityFieldDb>
+                <name>ID</name>
+                <dbName></dbName>
+                <primaryKey v="true" />
+                <columnType v="1" />
+                <size v="36" />
+                <scale v="0" />
+                <notNull v="true" />
+                <isUnique v="true" />
+                <index v="false" />
+                <documentation></documentation>
+                <title></title>
+                <description></description>
+              </entityFieldDb>
             </entityFields>
           </entityDb>
           <entityDb>
diff --git a/entity/LogHistory_entity/LogHistory_entity.aod b/entity/LogHistory_entity/LogHistory_entity.aod
index d2a3bbfd5d..d73a1326dc 100644
--- a/entity/LogHistory_entity/LogHistory_entity.aod
+++ b/entity/LogHistory_entity/LogHistory_entity.aod
@@ -12,16 +12,21 @@
     </entityProvider>
     <entityField>
       <name>DATE_NEW</name>
+      <title>Änderungsdatum</title>
       <contentType>DATE</contentType>
       <resolution>SECOND</resolution>
       <mandatory v="true" />
+      <groupable v="true" />
     </entityField>
     <entityField>
       <name>USER_NEW</name>
+      <title>Benutzer</title>
       <mandatory v="true" />
+      <groupable v="true" />
     </entityField>
     <entityField>
       <name>DESCRIPTION</name>
+      <title>Beschreibung</title>
       <contentType>TEXT</contentType>
       <mandatory v="true" />
     </entityField>
@@ -67,10 +72,13 @@
     </entityParameter>
     <entityField>
       <name>LOGHISTORYID</name>
+      <title>ID</title>
       <mandatory v="true" />
+      <searchable v="false" />
     </entityField>
     <entityField>
       <name>ICON</name>
+      <searchable v="false" />
       <valueProcess>%aditoprj%/entity/LogHistory_entity/entityfields/icon/valueProcess.js</valueProcess>
     </entityField>
   </entityFields>
diff --git a/neonView/LogHistoryFilter_view/LogHistoryFilter_view.aod b/neonView/LogHistoryFilter_view/LogHistoryFilter_view.aod
index f38a82a471..4b1e251cc0 100644
--- a/neonView/LogHistoryFilter_view/LogHistoryFilter_view.aod
+++ b/neonView/LogHistoryFilter_view/LogHistoryFilter_view.aod
@@ -2,17 +2,16 @@
 <neonView xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.0" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.0">
   <name>LogHistoryFilter_view</name>
   <majorModelMode>DISTRIBUTED</majorModelMode>
-  <filterable v="false" />
+  <filterable v="true" />
   <layout>
-    <boxLayout>
+    <groupLayout>
       <name>layout</name>
-    </boxLayout>
+    </groupLayout>
   </layout>
   <children>
     <tableViewTemplate>
       <name>LogHistoryTable</name>
-      <hideActions v="true" />
-      <isEditable v="false" />
+      <hideActions v="false" />
       <entityField>#ENTITY</entityField>
       <columns>
         <neonTableColumn>
@@ -29,5 +28,13 @@
         </neonTableColumn>
       </columns>
     </tableViewTemplate>
+    <timelineViewTemplate>
+      <name>LogHistoryTimeLine</name>
+      <dateField>DATE_NEW</dateField>
+      <titleField>USER_NEW</titleField>
+      <descriptionField>DESCRIPTION</descriptionField>
+      <iconIdField>#IMAGE</iconIdField>
+      <entityField>#ENTITY</entityField>
+    </timelineViewTemplate>
   </children>
 </neonView>
diff --git a/others/db_changes/data_alias/basic/init/init.xml b/others/db_changes/data_alias/basic/init/init.xml
index 815fe63a94..e4d68563bc 100644
--- a/others/db_changes/data_alias/basic/init/init.xml
+++ b/others/db_changes/data_alias/basic/init/init.xml
@@ -10,7 +10,7 @@
     <include relativeToChangelogFile="true" file="struct/AditoBasic/create_ab_countryinfo.xml"/>
     <include relativeToChangelogFile="true" file="struct/AditoBasic/create_ab_language.xml"/>
     <include relativeToChangelogFile="true" file="struct/AditoBasic/create_ab_loghistory.xml"/>
-</databaseChangeLog>
+
     <include relativeToChangelogFile="true" file="struct/create_person.xml"/>
     <include relativeToChangelogFile="true" file="struct/create_organisation.xml"/>
     <include relativeToChangelogFile="true" file="struct/create_contact.xml"/>    
diff --git a/others/db_changes/system_alias/struct/create_asys_audit.xml b/others/db_changes/system_alias/struct/create_asys_audit.xml
new file mode 100644
index 0000000000..9ca9fdf0c7
--- /dev/null
+++ b/others/db_changes/system_alias/struct/create_asys_audit.xml
@@ -0,0 +1,23 @@
+<?xml version="1.1" encoding="UTF-8" standalone="no"?>
+<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd">
+<changeSet author="m.kuhn" id="fcb1ff99-52bd-4ebc-8137-ec05b4cacbd7">
+    <createTable tableName="ASYS_AUDIT">
+        <column name="ID" type="CHAR(36)">
+            <constraints primaryKey="true" primaryKeyName="PK_ASYS_AUDIT_ID"/>
+        </column>
+        <column name="DATASETID" type="NVARCHAR(1023)"/>
+        <column name="DATASETNEWVALUE_STRING" type="NVARCHAR(1023)"/>
+        <column name="SQLACTION" type="CHAR(1)"/>
+        <column name="LOGWRITERUID" type="NVARCHAR(127)"/>
+        <column name="DATASETNEWVALUE_BLOB" type="LONGVARBINARY(2147483647)"/>
+        <column name="DATASETNEWVALUE_CLOB" type="LONGVARBINARY(2147483647)"/>
+        <column name="AOCOLUMNNAME" type="NVARCHAR(127)"/>
+        <column name="ALIAS" type="NVARCHAR(255)"/>
+        <column name="LOGTIME" type="TIMESTAMP"/>
+        <column name="ATABLENAME" type="NVARCHAR(127)"/>
+        <column name="ATIMESTAMP" type="TIMESTAMP"/>
+        <column name="LOGTYPE" type="INTEGER"/>
+        <column name="AUSER" type="NVARCHAR(255)"/>
+    </createTable>
+</changeSet>
+</databaseChangeLog>
\ No newline at end of file
-- 
GitLab