Skip to content

Add UI env for entity types override#175

Merged
zhouzhuojie merged 1 commit into
masterfrom
zz/add-env-for-ui-entity-types-override
Oct 8, 2018
Merged

Add UI env for entity types override#175
zhouzhuojie merged 1 commit into
masterfrom
zz/add-env-for-ui-entity-types-override

Conversation

@zhouzhuojie
Copy link
Copy Markdown
Collaborator

Description

Use FLAGR_UI_POSSIBLE_ENTITY_TYPES as build arg for UI, by default it's null, which means it doesn't imply any restrictions.

Motivation and Context

To limit the choices and normalize entity types for better data analytics

How Has This Been Tested?

Tested locally and with docker build-arg

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

return arr
}

if (process.env.FLAGR_UI_POSSIBLE_ENTITY_TYPES) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FLAGR_UI_POSSIBLE_ENTITY_TYPES

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a bit different, I have to use process.env.FLAGR_UI_POSSIBLE_ENTITY_TYPES here, and also it also needs to be registered in browser/flagr-ui/config. What the compiler does is to do a string interpolation by using the env variables.

Copy link
Copy Markdown

@michberr michberr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@zhouzhuojie zhouzhuojie merged commit 1f7a0e1 into master Oct 8, 2018
@zhouzhuojie zhouzhuojie deleted the zz/add-env-for-ui-entity-types-override branch October 8, 2018 23:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants