Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
52e7b07
Added change logs to modules
r3-gabriel Oct 17, 2021
496e6f0
Reworked Gantt field
r3-gabriel Oct 18, 2021
303793c
Added field options, updated gantt/calendar styles
r3-gabriel Oct 18, 2021
6b9737a
Implemented part of relation access policies
r3-gabriel Oct 19, 2021
fe455cc
Implemented relation access policies for getting data
r3-gabriel Oct 19, 2021
4b4d5e8
Implemented relation access policies for updating data
r3-gabriel Oct 21, 2021
714831c
Updated Builder UI for relation policies
r3-gabriel Oct 21, 2021
1608bca
Embedded static resources into executable
r3-gabriel Oct 24, 2021
8f4cfee
Added CLI flag to use external web files
r3-gabriel Oct 24, 2021
2f12591
Enabled circular module dependency
r3-gabriel Oct 25, 2021
715ac11
Added missing error handling for DB row processing in data GET requests
r3-gabriel Oct 25, 2021
0f3bb26
Cleaned up websocket handling
r3-gabriel Oct 26, 2021
d6fddc8
Moved Builder mode toggle to admin panel
r3-gabriel Oct 26, 2021
b26d205
Added role dependent module start form
r3-gabriel Oct 28, 2021
ce3d32c
Fixed instance log function using identical time stamps
r3-gabriel Oct 31, 2021
0a9893e
Fixed initial repo retrieval broken since change logs
r3-gabriel Nov 1, 2021
8707bfe
Added calendar field parent attribute on form-open, middle-click navi…
r3-gabriel Nov 1, 2021
495e5ff
Updated README
r3-gabriel Nov 1, 2021
363a9cb
Added role dependent module start form
fabiograz Nov 2, 2021
74916cc
Merge pull request #4 from fabiograz/2.5
r3-gabriel Nov 2, 2021
5232ec1
Fixed unescaped characters in Italian language file
r3-gabriel Nov 2, 2021
1240844
Enabled new languages captions
r3-gabriel Nov 2, 2021
d660e8e
Added preset record ID as query filter
r3-gabriel Nov 2, 2021
c336ecf
Enabled SQL previews for calendar & chart fields
r3-gabriel Nov 2, 2021
c694270
Added fixed query result limits
r3-gabriel Nov 2, 2021
1aa3da2
Added default list limit as valid limit option
r3-gabriel Nov 2, 2021
b9da5b0
Update it_it
fabiograz Nov 2, 2021
2c218a8
Merge pull request #5 from fabiograz/2.5
r3-gabriel Nov 2, 2021
80f518e
Fixed relation policy inputs in Builder
r3-gabriel Nov 6, 2021
ba673e6
Improved form record handling with missing access
r3-gabriel Nov 6, 2021
6a2c646
Fixed filter 'record is new' not working on first form load
r3-gabriel Nov 6, 2021
712a0cb
Updated Go & vue
r3-gabriel Nov 6, 2021
689b4e3
Updated Builder documentation
r3-gabriel Nov 7, 2021
371b269
Added message if form cannot load record
r3-gabriel Nov 8, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 29 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,44 @@
REI3
====
REI3 is a business application platform that anyone can use. It includes access to a growing range of [business applications](https://rei3.de/applications/) that can be deployed and extended by organizations free of charge. New applications are created with the integrated [Builder](https://rei3.de/docu/) graphical utility and can be added to a global or self-hosted repositories.
REI3 is a business application platform that anyone can use. It provides access to a growing range of [business applications](https://rei3.de/applications_en/), which are offered for free.

Installation wizards for standalone as well as support for dedicated systems allow large and small organizations to deploy REI3 for their individual needs.
Individuals and organizations can extend or create applications with the integrated, graphical application [Builder](https://rei3.de/docu_en/). Applications can also be exported and, if desired, imported into repositories to be shared with others.

How to install
==============
REI3 runs on Windows or Linux systems. On Windows systems it can be installed in minutes with a graphical installation wizard, while Linux systems are easily deployed with a pre-packaged binary. A portable version is also available for Windows clients for testing and developing applications. [Downloads](https://rei3.de/download_en/) are available on the official [website](https://rei3.de/home_en/).

For information about how to install and configure REI3, please visit the [admin documentation](https://rei3.de/admindocu-en_us/).

How to build applications
=========================
All versions of REI3 include the Builder utility, which can create new or change existing applications. After installing REI3, an administrator can enable the Builder inside the system configuration page. The maintenance mode must be enabled first, which will kick all non-admin users from the system while changes are being made.

For information about how to use the Builder, please visit the [Builder documentation](https://rei3.de/builderdocu-en_us/).

How to build your own version of REI3
=====================================
Building your own version of REI3 is simple:
1. Install the latest version of [Golang](https://golang.org/dl/).
1. Download & extract the source code of the version you want to build (as in `2.4.3.2799`).
1. Go into the source code directory (where `r3.go` is located) and execute: `go build -ldflags "-X main.appVersion={YOUR_APP_VERSION}"`
* Make sure to replace `{YOUR_APP_VERSION}` with the version of the extracted source code. At least the major/minor version must match, otherwise you need to deal with upgrading the REI3 database as well (see `db/upgrade/upgrade.go`).
* By setting the environment parameter `GOOS`, you can build for either Windows (`GOOS=windows`) or Linux (`GOOS=linux`).
1. Use your new compiled version of REI3 to replace an installed version.
* Starting with REI3 2.5, static resource files (HTML, JS, CSS, language captions, etc.) are embedded into the binary during compilation. Replacing the binary is enough to fully overwrite REI3.
* With versions before 2.5, you need to also overwrite the folders `var` and `www` if you made any changes to the frontend or language captions.
1. You are now running your own version of REI3.

Technologies
============
The REI3 server application is built on [Golang](https://golang.org/) with the frontend primarily based on [Vue.js](https://vuejs.org/). By using modern web standards, REI3 applications run very fast (cached application schemas, data-only websocket transfers) and can optionally be installed as progressive web apps (PWA) on client devices.

REI3 heavily relies on [PostgreSQL](https://www.postgresql.org/) for data management, storage and backend functions.

How to build
============
To build REI3 a current version of [Golang](https://golang.org/dl/) must be installed. Inside the r3 source directory (where `r3.go` is located), `go build` will download Golang dependencies and build the current version of REI3. The Javascript parts of REI3 (located in `www`) do not need to be pre-compiled - REI3´s frontend runs natively in modern browsers. REI3 is compiled with [Rollup](https://rollupjs.org/guide/en/) for release builds.

To run your own REI3 version, the regular system requirements must be met - in short: A reachable PostgreSQL database with full permissions and connection details stored in the configuration file `config.json`. REI3 can be run from a console, such as `r3 -run`. For more details please refer to the [admin docs](https://rei3.de/admindocu-en_us/).

How to contribute
=================
Contributions are always welcome - feel free to fork and submit pull requests.

REI3 follows a four-digit versioning syntax, such as 2.4.2.2788 (MAJOR.MINOR.PATCH.BUILD). Major releases serve to introduce major changes to the application. Minor releases may bring new features, database changes and fixes. Patch releases should primarily focus on fixes, but may include small features as long as the database is not changed - they should only ever improve stability of a version, not introduce new issues.
REI3 follows a four-digit versioning syntax, such as 2.4.2.2788 (MAJOR.MINOR.PATCH.BUILD). Major releases serve to introduce major changes to the application. Minor releases may bring new features, database changes and fixes. Patch releases should primarily focus on fixes, but may include small features as long as the database is not changed.

The main branch will contain the currently released minor version of REI3; patches for this version can directly be submitted for the main branch. Each new minor release will use a separate branch, which will merge with main once the latest minor version is released.
The branch `main` will contain the currently released minor version of REI3; patches for this version can directly be submitted for the main branch. Each new minor release will use a separate branch, which will merge with `main` once the latest minor version is released.
15 changes: 10 additions & 5 deletions cache/cache_access.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,20 @@ func RenewAccessById(loginId int64) error {
return load(loginId, true)
}

// kick one login
func KickLoginById(loginId int64) {
// update clients
func KickLoginById(loginId int64) { // kick single login
ClientEvent_handlerChan <- types.ClientEvent{LoginId: loginId, Kick: true}
}

// kick all non-admins
func KickNonAdmins() {
func KickNonAdmins() { // kick all non-admins
ClientEvent_handlerChan <- types.ClientEvent{LoginId: 0, KickNonAdmin: true}
}
func ChangedBuilderMode(modeActive bool) {
if modeActive {
ClientEvent_handlerChan <- types.ClientEvent{LoginId: 0, BuilderOn: true}
} else {
ClientEvent_handlerChan <- types.ClientEvent{LoginId: 0, BuilderOff: true}
}
}

// load access permissions for login ID into cache
func load(loginId int64, renewal bool) error {
Expand Down
36 changes: 36 additions & 0 deletions cache/cache_caption.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
package cache

import (
"encoding/json"

_ "embed"
)

var (
//go:embed captions/de_de
caption_de_de json.RawMessage

//go:embed captions/en_us
caption_en_us json.RawMessage

//go:embed captions/it_it
caption_it_it json.RawMessage
)

func GetCaptions(code string) json.RawMessage {
switch code {
case "de_de":
return caption_de_de
case "en_us":
return caption_en_us
case "it_it":
return caption_it_it
}

// default to english, if language code was not valid
return caption_en_us
}

func GetCaptionLanguageCodes() []string {
return []string{"en_us", "de_de", "it_it"}
}
8 changes: 8 additions & 0 deletions cache/cache_package.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package cache

import (
_ "embed"
)

//go:embed packages/core_company.rei3
var Package_CoreCompany []byte
15 changes: 10 additions & 5 deletions cache/cache_schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,11 @@ var (
schema_mx sync.Mutex

// references to specific entities
ModuleIdMap map[uuid.UUID]types.Module
RelationIdMap map[uuid.UUID]types.Relation
AttributeIdMap map[uuid.UUID]types.Attribute
RoleIdMap map[uuid.UUID]types.Role
ModuleIdMap map[uuid.UUID]types.Module
RelationIdMap map[uuid.UUID]types.Relation
AttributeIdMap map[uuid.UUID]types.Attribute
RoleIdMap map[uuid.UUID]types.Role
PgFunctionIdMap map[uuid.UUID]types.PgFunction

// schema cache
schemaCache schemaCacheType // full cache
Expand Down Expand Up @@ -96,6 +97,7 @@ func UpdateSchema(moduleId pgtype.UUID, newVersion bool) error {
RelationIdMap = make(map[uuid.UUID]types.Relation)
AttributeIdMap = make(map[uuid.UUID]types.Attribute)
RoleIdMap = make(map[uuid.UUID]types.Role)
PgFunctionIdMap = make(map[uuid.UUID]types.PgFunction)
} else {
log.Info("cache", "starting schema processing for one module")
moduleIdsReload = append(moduleIdsReload, moduleId.Bytes)
Expand Down Expand Up @@ -267,13 +269,16 @@ func reloadModule(id uuid.UUID) error {
return err
}

// get pg functions
// store & backfill PG functions
log.Info("cache", "load functions")

mod.PgFunctions, err = pgFunction.Get(mod.Id)
if err != nil {
return err
}
for _, fnc := range mod.PgFunctions {
PgFunctionIdMap[fnc.Id] = fnc
}

// update cache map with parsed module
ModuleIdMap[mod.Id] = mod
Expand Down
43 changes: 37 additions & 6 deletions var/texts/de_de → cache/captions/de_de
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,12 @@
"nothingSelected":"Keine Auswahl getroffen",
"nothingThere":"Keine Ergebnisse verfügbar",
"notice":"Hinweis",
"order":"Reihenf.",
"password":"Passwort",
"results":"{CNT} Ergebnisse",
"resultsNone":"- keine Ergebnisse -",
"resultsOf":"/ {CNT}",
"role":"Rolle",
"title":"Titel",
"username":"Benutzername",
"version":"Version"
Expand All @@ -106,6 +108,11 @@
"apply":"Änderungen übernehmen",
"removeLogo":"Logo entfernen"
},
"dialog":{
"builderMode":"Der Builder dient zum Erstellen oder Verändern von Anwendungen.<br /><br />Das Ändern von Anwendungen kann zum Datenverlust führen und sollte <b>NIEMALS</b> in produktiven Umgebungen getan werden.<br /><br />Um den Builder sicher zu nutzen, bitte eine dedizierte Instanz von REI3 verwenden; fertige und getestete Anwendungen können dann in ein Produktivsystem transferiert werden.<br /><br />Um mehr zu lernen, steht die <a href=\"https://rei3.de/builderdocu-en_us/\" target=\"_blank\">Builder-Dokumentation</a> zur Verfügung.",
"productionMode":"Der Wartungsmodus wird genutzt, um Anwendungen zu aktualisieren, installieren oder zu entfernen.<br /><br />Beim Aktivieren des Wartungsmodus werden <b>alle Benutzer ohne Adminrechte abgemeldet</b>.",
"pleaseRead":"Bitte vor dem Speichern lesen"
},
"appName":"Instanzname",
"appNameShort":"Seitentitel",
"appVersion":"Plattform-Version",
Expand All @@ -121,6 +128,7 @@
"bruteforceCountTracked":"Verfolgte Hosts",
"bruteforceProtection":"Bruteforce-Schutz aktivieren",
"bruteforceTitle":"Bruteforce-Schutz",
"builderMode":"Builder-Modus",
"colorHint":"Leer lassen für Standardwerte",
"companyColorHeader":"Titelfarbe (Hauptmenü)",
"companyColorLogin":"Titelfarbe (Anmeldung)",
Expand Down Expand Up @@ -156,7 +164,7 @@
"logLevelTransfer":"Transfer",
"logsKeepDays":"Logs aufheben (in Tagen)",
"productionMode":"Wartungsmodus",
"publicHostName":"Public hostname",
"publicHostName":"Öffentlicher Hostname",
"pwForceDigit":"Erzwinge Zahl",
"pwForceLower":"Erzwinge Kleinbuchstaben",
"pwForceSpecial":"Erzwinge Sonderzeichen",
Expand Down Expand Up @@ -307,15 +315,18 @@
"updateAll":"Alle aktualisieren ({COUNT})"
},
"dialog":{
"delete":"Bist du sicher, dass du diese Anwendung löschen möchtest? Dies wird auch alle inkludierten Daten vom System löschen.<br /><br /><b>Diese Aktion ist ohne aktuelles Backup nicht rückgängig zu machen.</b>",
"delete":"Bist du sicher, dass du diese Anwendung löschen möchtest? Dies wird auch alle inkludierten Daten vom System löschen.<br /><br /><b>Diese Aktion ist ohne aktuelles Backup nicht rückgängig zu machen.</b>{APPS}",
"deleteApps":"<br /><br />Folgende Anwendungen sind von dieser abhängig und werden ebenfalls gelöscht:<ul>{LIST}</ul>",
"deleteMulti":"Diese Aktion wird <b>{COUNT} Anwendung(en)</b> mit dazugehörigen Daten <b>permanent</b> löschen.<br /><br />Möchtest du wirklich fortfahren?",
"deleteTitle":"Permanente Löschung der Anwendung \"{APP}\"",
"owner":"Wenn diese Option aktiviert ist, können Änderungen an dieser Anwendung als neue Version exportiert werden. Falls du nicht der originale Autor bist, werden alle Änderungen VERLOREN GEHEN, wenn eine neue Version vom Autoren installiert wird. Dies kann auch zu DATENVERLUST führen.<br /><br />Falls du vorhast, Anwendungen anderer Autoren zu verändern/erweitern, kannst du gefahrlos auf \"diesen aufbauen\" - bitte referenziere die Builder-Dokumentation für mehr Details.",
"ownerTitle":"Warnung - bitte vorsichtig lesen!"
},
"error":{
"installFailed":"Aktualisierung der Anwendung ist fehlgeschlagen. Bei Aktualisierung einer einzelnen Anwendung können fehlende Abhängigkeiten zu Problemen führen - bitte versuchen, alle Anwendungen gemeinsam zu aktualisieren, um diese zu lösen.<br /><br />Fehlermeldung: {ERROR}",
"uploadFailed":"Anwendung konnte nicht von der hochgeladenen Datei installiert werden. Bitte das Loglevel für Transfere auf \"Alles\" erhöhen und erneut versuchen - Details werden dann im Systemlog aufgeführt."
},
"dependOnUs":"Folgende Anwendungen sind hiervon abhängig: {NAMES}",
"changeLog":"Änderungshistorie",
"hidden":"Versteckt",
"import":"Von Datei hinzufügen",
"nothingInstalled":"Es sind keine Anwendungen installiert.",
Expand Down Expand Up @@ -553,7 +564,7 @@
"icon":"Formular-Icon",
"ics":"iCAL-Abonnements",
"layout":"Listen-Layout",
"limit":"Ergebnislimit",
"limit":"Ergebnisanzahl",
"new":"Neues Formular",
"onMobile":"In mobiler Ansicht",
"presetOpen":"Vord. Datensatz öffnen",
Expand Down Expand Up @@ -623,7 +634,7 @@
"languageCode":"Sprach-Code",
"languageCodeHint":"en_us, zh_cn, de_de, ...",
"languageMain":"Primäre Sprache*",
"languageMainHint":"*dient als Ersatz, wenn die gewählte Benutzersprache nicht verfügbar ist",
"languageMainHint":"*wird verwendet wenn die gewählte Benutzersprache nicht verfügbar ist.",
"languageTitle":"Anwendungstitel",
"languages":"Sprachen",
"new":"Neue Anwendung",
Expand All @@ -633,6 +644,10 @@
"releaseBuildApp":"Plattform-Version",
"releaseDate":"Veröff.-Datum",
"startForm":"Startformular",
"startFormDefault":"Standard-Startformular*",
"startFormDefaultHint":"*wird verwendet wenn kein anderes Formular per Rolle zugewiesen werden kann.",
"startForms":"Startformulare",
"startFormsExplanation":"Das erste Startformular wird verwendet, das einer Rolle der aktuellen Anmeldung entspricht.",
"title":"Anwendungen"
},
"pgFunction":{
Expand Down Expand Up @@ -713,6 +728,8 @@
"choices":"Filtersätze ({COUNT})*",
"choicesHint":"*Erste Satz ist erstmal aktiv - Auswahl möglich, wenn 2 oder mehr existieren.",
"filters":"Filter ({COUNT})",
"fixedLimit":"Festes Ergebnislimit",
"fixedLimit0":"nicht aktiv",
"joinAddHint":"Eine Relation mit dieser verbinden (join)",
"joinApplyCreateHint":"(C) Datensatz erzeugen auf dieser Relation",
"joinApplyDeleteHint":"(D) Datensatz löschen auf dieser Relation",
Expand Down Expand Up @@ -752,6 +769,16 @@
"onInsert":"INSERT",
"onUpdate":"UPDATE",
"perRow":"EACH ROW",
"policies":"Richtlinien",
"policyActions":"Handlung",
"policyActionDelete":"Löschen",
"policyActionSelect":"Anzeigen",
"policyActionUpdate":"Verändern",
"policyExplanation":"Die erste Richtlinie, die einer Rolle der aktuellen Anmeldung entspricht, wird angewendet, solange die versuchte Handlung für diese Richtlinie aktiviert ist. Um bspw. einer Rolle vollen Zugriff zu erlauben, kann eine Richtlinie mit allen Handlungen aktiviert und keinen Filtern an oberster Stelle gesetzt werden.",
"policyFunctions":"Filterfunktionen",
"policyFunctionExcl":"Datensatz-IDs blockieren",
"policyFunctionIncl":"Datensatz-IDs erlauben",
"policyNotSet":"ungefiltert",
"presets":"Vordefinierte Datensätze ({CNT})",
"presetProtected":"Geschützt",
"presetValues":"Werte",
Expand Down Expand Up @@ -816,6 +843,8 @@
"icsHint":"Auf Kalender von Extern zugreifen",
"icsPublish":"Für persönliche Nutzung veröffentlichen",
"ganttToggleHint":"Zwischen Stunden- & Tagmodus wechseln",
"ganttShowLabels":"Gruppen",
"ganttShowLabelsHint":"Gruppen anzeigen/verstecken",
"zoomResetHint":"Zoom-Level zurücksetzen"
},
"icsDesc":"Diese URL verwenden, um Kalender zu abonnieren (iCalendar, ICS).",
Expand Down Expand Up @@ -881,6 +910,7 @@
"javascript":"JavaScript-Ausdruck",
"languageCode":"Login-Sprach-Code (en_us, ...)",
"login":"Login-ID (Integer)",
"preset":"ID von vordefinierten Datensatz (Integer)",
"record":"Datensatz-ID (Integer, Formular Relation 0)",
"recordNew":"Datensatz ist neu (TRUE/FALSE, Formular)",
"role":"Login hat Rolle (TRUE/FALSE)",
Expand Down Expand Up @@ -929,7 +959,8 @@
"help":"Hilfeseiten",
"helpContextTitle":"Kontext",
"helpModuleTitle":"Anwendung",
"invalidInputs":"Eingaben prüfen!"
"invalidInputs":"Eingaben prüfen!",
"noAccess":"Kein Zugriff"
},
"home":{
"button":{
Expand Down
Loading