Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
Prev Previous commit
Next Next commit
fix: use OF provider for GOFF OFREP in the ui
Signed-off-by: Lukas Reining <[email protected]>
  • Loading branch information
lukas-reining committed Apr 21, 2024
commit ffd0abcfe36148b285ed06b077de19d3a7831743
5 changes: 3 additions & 2 deletions packages/provider/src/lib/provider.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,13 +113,14 @@ export class ProviderService {
new GoFeatureFlagProvider({
endpoint: process.env.GO_FEATURE_FLAG_URL as string,
}),
available: () => !!process.env.GO_FEATURE_FLAG_WEB_URL,
available: () => !!process.env.GO_FEATURE_FLAG_URL,
url: process.env.GO_FEATURE_FLAG_WEB_URL as string
},
[GO_OFREP_PROVIDER_ID]: {
factory: () => {
return new OFREPProvider({ baseUrl: process.env.GO_FEATURE_FLAG_URL as string });
},
available: () => !!process.env.GO_FEATURE_FLAG_URL,
available: () => !!process.env.GO_FEATURE_FLAG_WEB_URL,
url: process.env.GO_FEATURE_FLAG_WEB_URL as string
},
[FLAGSMITH_PROVIDER_ID]: {
Expand Down
4 changes: 2 additions & 2 deletions packages/ui/src/app/demos.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ export class Demos extends Component<
[GO_OFREP_PROVIDER_ID]: {
factory: () => {
const ofrepConfig = this.state.availableProviders.find((p) => p.id === GO_OFREP_PROVIDER_ID);
const endpoint = ofrepConfig?.url ?? 'http://localhost:1031';
return new GoFeatureFlagWebProvider({ endpoint }, console);
const baseUrl = ofrepConfig?.url ?? 'http://localhost:1031';
return new OFREPWebProvider({ baseUrl, pollInterval: 1000 }, console);
},
},
[HARNESS_PROVIDER_ID]: {
Expand Down