Skip to content

Commit

Permalink
Pull instance id from app config
Browse files Browse the repository at this point in the history
  • Loading branch information
Sensational-Code committed Jan 29, 2024
1 parent 5175d8a commit 9044a5e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/ui/ManagementPortal/server/api/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { AppConfigurationClient } from '@azure/app-configuration';

const allowedKeys = [
'FoundationaLLM:APIs:ManagementAPI:APIUrl',
'FoundationaLLM:Instance:Id',

'FoundationaLLM:Management:Entra:ClientId',
'FoundationaLLM:Management:Entra:Instance',
Expand Down
6 changes: 6 additions & 0 deletions src/ui/ManagementPortal/stores/appConfigStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ export const useAppConfigStore = defineStore('appConfig', {
// API: Defines API-specific settings such as the base URL for application requests.
apiUrl: null,

instanceId: null,

// Style: These settings impact the visual style of the chat interface.
logoUrl: null,
logoText: null,
Expand Down Expand Up @@ -36,6 +38,7 @@ export const useAppConfigStore = defineStore('appConfig', {
async getConfigVariables() {
const [
// apiUrl,
instanceId,
logoUrl,
logoText,
primaryBg,
Expand All @@ -56,6 +59,8 @@ export const useAppConfigStore = defineStore('appConfig', {
authCallbackPath,
] = await Promise.all([
// api.getConfigValue('FoundationaLLM:APIs:ManagementAPI:APIUrl'),

api.getConfigValue('FoundationaLLM:Instance:Id'),

api.getConfigValue('FoundationaLLM:Branding:LogoUrl'),
api.getConfigValue('FoundationaLLM:Branding:LogoText'),
Expand All @@ -79,6 +84,7 @@ export const useAppConfigStore = defineStore('appConfig', {
]);

// this.apiUrl = apiUrl;
this.instanceId = instanceId;

this.logoUrl = logoUrl;
this.logoText = logoText;
Expand Down

0 comments on commit 9044a5e

Please sign in to comment.