diff --git a/app/javascript/components/rooms/room/room_settings/ServerTagRow.jsx b/app/javascript/components/rooms/room/room_settings/ServerTagRow.jsx index eacd56190cb..1f2ae7180d1 100644 --- a/app/javascript/components/rooms/room/room_settings/ServerTagRow.jsx +++ b/app/javascript/components/rooms/room/room_settings/ServerTagRow.jsx @@ -34,7 +34,7 @@ export default function ServerTagRow({ if (tag in serverTagsMap) { return serverTagsMap[tag]; } - return 'Default'; + return process.env.DEFAULT_TAG_NAME; } const updateAPI = useUpdateAPI(); @@ -57,9 +57,11 @@ export default function ServerTagRow({ {[ updateAPI.mutate({ settingName: 'serverTag', settingValue: '' })} - />, + > + {process.env.DEFAULT_TAG_NAME} + , ].concat(dropdownTags)} diff --git a/esbuild.dev.mjs b/esbuild.dev.mjs index b7a5fe9543b..5f1f9d93551 100644 --- a/esbuild.dev.mjs +++ b/esbuild.dev.mjs @@ -3,6 +3,7 @@ import * as esbuild from 'esbuild'; // Fetch 'RELATIVE_URL_ROOT' ENV variable value while removing any trailing slashes. const relativeUrlRoot = (process.env.RELATIVE_URL_ROOT || '').replace(/\/*$/, ''); const serverTagNames = (process.env.SERVER_TAG_NAMES || ''); +const defaultTagName = (process.env.DEFAULT_TAG_NAME || ''); esbuild.context({ entryPoints: ['app/javascript/main.jsx'], @@ -17,6 +18,7 @@ esbuild.context({ 'process.env.RELATIVE_URL_ROOT': `"${relativeUrlRoot}"`, 'process.env.OMNIAUTH_PATH': `"${relativeUrlRoot}/auth/openid_connect"`, // currently, only OIDC is implemented 'process.env.SERVER_TAG_NAMES': `"${serverTagNames}"`, + 'process.env.DEFAULT_TAG_NAME': `"${defaultTagName}"`, }, }).then(context => { if (process.argv.includes("--watch")) { diff --git a/esbuild.mjs b/esbuild.mjs index 86aaf208d44..3906da4a09c 100644 --- a/esbuild.mjs +++ b/esbuild.mjs @@ -3,6 +3,7 @@ import * as esbuild from 'esbuild'; // Fetch 'RELATIVE_URL_ROOT' ENV variable value while removing any trailing slashes. const relativeUrlRoot = (process.env.RELATIVE_URL_ROOT || '').replace(/\/*$/, ''); const serverTagNames = (process.env.SERVER_TAG_NAMES || ''); +const defaultTagName = (process.env.DEFAULT_TAG_NAME || ''); await esbuild.build({ entryPoints: ['app/javascript/main.jsx'], @@ -17,6 +18,7 @@ await esbuild.build({ 'process.env.RELATIVE_URL_ROOT': `"${relativeUrlRoot}"`, 'process.env.OMNIAUTH_PATH': `"${relativeUrlRoot}/auth/openid_connect"`, // currently, only OIDC is implemented 'process.env.SERVER_TAG_NAMES': `"${serverTagNames}"`, + 'process.env.DEFAULT_TAG_NAME': `"${defaultTagName}"`, }, }); diff --git a/sample.env b/sample.env index 2b5afd53b2f..7b2e391ec39 100644 --- a/sample.env +++ b/sample.env @@ -102,5 +102,6 @@ LOG_LEVEL=info # If your Greenlight instance is connected to Scalelite or another Loadbalancer with enabled support for the 'meta_server-tag' # parameter on create calls, you can use the following variables to configure support for this feature via the Greenlight UI. # Example (delimiters are , : and /): +# DEFAULT_TAG_NAME=Standard # friendly name for the untagged/default servers # SERVER_TAG_NAMES=tag1:Name 1,tag2:Name2 # defines available tags and their friendly names # SERVER_TAG_ROLES=tag2:xyz-123-321-aaaa-zyx/abc-321-123-zzzz-cba # allow tag only for given role ids (see role ids in DB)