add link in frontend to inspector, change Env var name

This commit is contained in:
einhornimmond 2025-11-26 09:17:43 +01:00
parent 72c0b3d8df
commit be0c9d0e34
13 changed files with 30 additions and 18 deletions

View File

@ -17,6 +17,7 @@ const logging = {
const server = {
BACKEND_PORT: process.env.BACKEND_PORT ?? 4000,
DLT_ACTIVE: process.env.DLT_ACTIVE === 'true' || false,
JWT_SECRET: process.env.JWT_SECRET ?? 'secret123',
JWT_EXPIRES_IN: process.env.JWT_EXPIRES_IN ?? '10m',
REDEEM_JWT_TOKEN_EXPIRATION: process.env.REDEEM_JWT_TOKEN_EXPIRATION ?? '10m',
@ -41,9 +42,7 @@ const COMMUNITY_URL = process.env.COMMUNITY_URL ?? `${URL_PROTOCOL}://${COMMUNIT
const DLT_CONNECTOR_PORT = process.env.DLT_CONNECTOR_PORT ?? 6010
const dltConnector = {
DLT_CONNECTOR: process.env.DLT_CONNECTOR === 'true' || false,
DLT_CONNECTOR_URL: process.env.DLT_CONNECTOR_URL ?? `${COMMUNITY_URL}:${DLT_CONNECTOR_PORT}`,
DLT_GRADIDO_NODE_SERVER_HOME_FOLDER: process.env.DLT_GRADIDO_NODE_SERVER_HOME_FOLDER ?? '~/.gradido',
}
const community = {

View File

@ -4,6 +4,7 @@ import {
COMMUNITY_SUPPORT_MAIL,
COMMUNITY_URL,
DECAY_START_TIME,
DLT_ACTIVE,
GDT_ACTIVE,
GDT_API_URL,
GMS_ACTIVE,
@ -27,6 +28,7 @@ export const schema = Joi.object({
COMMUNITY_DESCRIPTION,
COMMUNITY_SUPPORT_MAIL,
DECAY_START_TIME,
DLT_ACTIVE,
GDT_API_URL,
GDT_ACTIVE,
GMS_ACTIVE,
@ -68,20 +70,11 @@ export const schema = Joi.object({
.default('http://0.0.0.0/redeem/CL-')
.required(),
DLT_CONNECTOR: Joi.boolean()
.description('Flag to indicate if DLT-Connector is used. (Still in development)')
.default(false)
.required(),
DLT_CONNECTOR_URL: Joi.string()
.uri({ scheme: ['http', 'https'] })
.default('http://localhost:6010')
.when('DLT_CONNECTOR', { is: true, then: Joi.required() })
.description('The URL for GDT API endpoint'),
DLT_GRADIDO_NODE_SERVER_HOME_FOLDER: Joi.string()
.default('~/.gradido')
.description('The home folder for the gradido dlt node server'),
.when('DLT_ACTIVE', { is: true, then: Joi.required() })
.description('The URL for DLT connector'),
EMAIL: Joi.boolean()
.default(false)

View File

@ -35,6 +35,11 @@ export const COMMUNITY_URL = Joi.string()
.default('http://0.0.0.0')
.required()
export const DLT_ACTIVE = Joi.boolean()
.description('Flag to indicate if the DLT (Decentralized Ledger Technology) service is used.')
.default(false)
.required()
export const GRAPHQL_URI = Joi.string()
.uri({ scheme: ['http', 'https'] })
.description(

View File

@ -90,7 +90,7 @@ GDT_ACTIVE=false
AUTO_POLL_INTERVAL=30000
# DLT-Connector (still in develop)
DLT_CONNECTOR=false
DLT_ACTIVE=false
DLT_CONNECTOR_PORT=6010
DLT_NODE_SERVER_PORT=8340
DLT_NODE_SERVER_URL=$URL_PROTOCOL://$COMMUNITY_HOST/dlt

View File

@ -216,7 +216,7 @@ log_step "======================================================================
export DLT_NGINX_CONF="${DLT_NGINX_CONF:-# dlt disabled}"
# prepare inspector and gradido dlt node nginx config blocks if enabled
if [ "$DLT_CONNECTOR" = true ] ; then
if [ "$DLT_ACTIVE" = true ] ; then
log_step "prepare inspector and dlt gradido node nginx config block"
envsubst '$DLT_NODE_SERVER_PORT' < $NGINX_CONFIG_DIR/gradido-dlt.conf.template >> $NGINX_CONFIG_DIR/gradido-dlt.conf
export DLT_NGINX_CONF=$(< $NGINX_CONFIG_DIR/gradido-dlt.conf)
@ -256,7 +256,7 @@ MODULES=(
dht-node
federation
)
if [ "$DLT_CONNECTOR" = true ] ; then
if [ "$DLT_ACTIVE" = true ] ; then
MODULES+=("inspector")
MODULES+=("dlt-connector")
fi
@ -306,7 +306,7 @@ log_step 'build all modules'
turbo build --env-mode=loose --concurrency=$(nproc)
# build inspector and dlt-connector
if [ "$DLT_CONNECTOR" = true ]; then
if [ "$DLT_ACTIVE" = true ]; then
log_step 'build inspector'
cd $PROJECT_ROOT/inspector
bun install
@ -339,7 +339,7 @@ pm2 start --name gradido-backend \
-l $GRADIDO_LOG_PATH/pm2.backend.$TODAY.log \
--log-date-format 'YYYY-MM-DD HH:mm:ss.SSS'
if [ "$DLT_CONNECTOR" = true ] ; then
if [ "$DLT_ACTIVE" = true ] ; then
pm2 start --name dlt-connector \
"env TZ=UTC NODE_ENV=production bun ./build/index.js" \
--cwd $PROJECT_ROOT/dlt-connector \

View File

@ -43,6 +43,13 @@
<BNavItem :href="`mailto:${supportEmail}`" target="_blank">
{{ $t('navigation.support') }}
</BNavItem>
<BNavItem
v-if="CONFIG.DLT_ACTIVE"
:href="`https://${CONFIG.COMMUNITY_URL}/inspector`"
target="_blank"
>
{{ $t('footer.inspector') }}
</BNavItem>
</BNav>
</BCol>
</BRow>

View File

@ -9,6 +9,7 @@ import {
COMMUNITY_URL,
DEBUG,
DECAY_START_TIME,
DLT_ACTIVE,
GMS_ACTIVE,
GRAPHQL_URI,
HUMHUB_ACTIVE,
@ -30,6 +31,7 @@ module.exports = Joi.object({
COMMUNITY_URL,
DEBUG,
DECAY_START_TIME,
DLT_ACTIVE,
GMS_ACTIVE,
GRAPHQL_URI,
HUMHUB_ACTIVE,

View File

@ -158,6 +158,7 @@
"year": "© {year}"
},
"imprint": "Impressum",
"inspector": "Inspektor (experimentell)",
"privacy_policy": "Datenschutzerklärung",
"short_hash": "({shortHash})",
"whitepaper": "Whitepaper"

View File

@ -158,6 +158,7 @@
"year": "© {year}"
},
"imprint": "Legal notice",
"inspector": "Inspector (experimental)",
"privacy_policy": "Privacy policy",
"short_hash": "({shortHash})",
"whitepaper": "Whitepaper"

View File

@ -140,6 +140,7 @@
"year": "© {year}"
},
"imprint": "Aviso legal",
"inspector": "Inspector (experimental)",
"privacy_policy": "Protección de Datos",
"short_hash": "({shortHash})",
"whitepaper": "Whitepaper"

View File

@ -145,6 +145,7 @@
"year": "© {year}"
},
"imprint": "Notification légale",
"inspector": "Inspecteur (expérimental)",
"privacy_policy": "Politique de confidentialité",
"short_hash": "({shortHash})",
"whitepaper": "Papier blanc"

View File

@ -140,6 +140,7 @@
"year": "© {year}"
},
"imprint": "Colofon",
"inspector": "Inspecteur (experimenteel)",
"privacy_policy": "Privacyverklaring",
"short_hash": "({shortHash})",
"whitepaper": "Witboek"

View File

@ -114,6 +114,7 @@ export default defineConfig(async ({ command }) => {
AUTO_POLL_INTERVAL: CONFIG.AUTO_POLL_INTERVAL,
BUILD_COMMIT: CONFIG.BUILD_COMMIT,
CROSS_TX_REDEEM_LINK_ACTIVE: CONFIG.CROSS_TX_REDEEM_LINK_ACTIVE,
DLT_ACTIVE: CONFIG.DLT_ACTIVE,
GMS_ACTIVE: CONFIG.GMS_ACTIVE,
HUMHUB_ACTIVE: CONFIG.HUMHUB_ACTIVE,
DEFAULT_PUBLISHER_ID: null,