Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: enable UI config overrides post build #1830

Conversation

rajasekharreddyparvatha
Copy link
Contributor

@rajasekharreddyparvatha rajasekharreddyparvatha commented Apr 25, 2022

Signed-off-by: rajasekhar reddy reddy.rajasekhar.parvatha@gmail.com

Summary of Changes

Currently the Amundsen frontend needs to be rebuilt for any config change (example: enabling dashboards, enabling ML features etc)

This feature allows this frontend appConfig to be overriden by an externally injected js file (example: via helmchart volume mounts, docker-compose volumes etc)

This will make it easier to run amundsen with custom config without the need to rebuild from source.

Sample External config js file

Create new js file with name as config-external.js in static directory as below
filename : config-external.js

window['configExternal'] = {
  badges: {},
  browse: {
    curatedTags: [],
    showAllTags: true,
    showBadgesInHome: true,
  },
  date: {
    default: 'MMM DD, YYYY',
    dateTimeShort: 'MMM DD, YYYY ha z',
    dateTimeLong: 'MMMM Do YYYY [at] h:mm:ss a',
  },
  editableText: {
    tableDescLength: 750,
    columnDescLength: 250,
  },
  analytics: {
    plugins: [],
  },
  indexDashboards: {
    enabled: false,
  }
}

Tests

Documentation

CheckList

Make sure you have checked all steps below to ensure a timely review.

  • PR title addresses the issue accurately and concisely. Example: "Updates the version of Flask to v1.0.2"
  • PR includes a summary of changes.
  • PR adds unit tests, updates existing unit tests, OR documents why no test additions or modifications are needed.
  • In case of new functionality, my PR adds documentation that describes how to use it.
    • All the public functions and the classes in the PR contain docstrings that explain what it does

@boring-cyborg boring-cyborg bot added area:frontend From the Frontend folder category:ui labels Apr 25, 2022
@rajasekharreddyparvatha rajasekharreddyparvatha changed the title Apply App config with out rebuild the application feat: work in progress Apr 25, 2022
Copy link
Member

@Golodhros Golodhros left a comment

Choose a reason for hiding this comment

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

LGTM

Signed-off-by: rajasekhar reddy <reddy.rajasekhar.parvatha@gmail.com>
@rajasekharreddyparvatha rajasekharreddyparvatha force-pushed the asm-apply-external-app-config branch from 933412c to ad24ac3 Compare April 26, 2022 08:56
@feng-tao
Copy link
Member

could we update the pr description so that everyone is aware of the change?

@rajasekharreddyparvatha rajasekharreddyparvatha requested a review from a team as a code owner April 28, 2022 02:01
@aneesh-joseph aneesh-joseph force-pushed the asm-apply-external-app-config branch from fd5cf73 to 49c4607 Compare April 28, 2022 09:06
Signed-off-by: Aneesh Joseph <kaneeshjoseph@gmail.com>
@aneesh-joseph aneesh-joseph force-pushed the asm-apply-external-app-config branch from 49c4607 to dde0408 Compare April 28, 2022 09:13
@rajasekharreddyparvatha rajasekharreddyparvatha changed the title feat: work in progress feat: enable UI config overrides post build May 2, 2022
Signed-off-by: rajasekhar reddy <reddy.rajasekhar.parvatha@gmail.com>
@rajasekharreddyparvatha rajasekharreddyparvatha force-pushed the asm-apply-external-app-config branch from 5599d32 to 64e8682 Compare May 6, 2022 05:52
Signed-off-by: Aneesh Joseph <kaneeshjoseph@gmail.com>
@aneesh-joseph
Copy link
Contributor

@feng-tao , done . can you please help run the PR tests

Signed-off-by: rajasekhar reddy <reddy.rajasekhar.parvatha@gmail.com>
@rajasekharreddyparvatha rajasekharreddyparvatha force-pushed the asm-apply-external-app-config branch from 03f2522 to 274b40e Compare May 10, 2022 04:43
@Golodhros Golodhros merged commit 6d805e0 into amundsen-io:main May 11, 2022
@boring-cyborg
Copy link

boring-cyborg bot commented May 11, 2022

Awesome work, congrats on your first merged pull request!

zacr pushed a commit to SaltIO/amundsen that referenced this pull request May 13, 2022
* Apply App config with out rebuild the application

Signed-off-by: rajasekhar reddy <reddy.rajasekhar.parvatha@gmail.com>

* use config override if JS_CONFIG_OVERRIDE_ENABLED is set

Signed-off-by: Aneesh Joseph <kaneeshjoseph@gmail.com>

* Fixed lint errors

Signed-off-by: rajasekhar reddy <reddy.rajasekhar.parvatha@gmail.com>

* fix lint errors

Signed-off-by: Aneesh Joseph <kaneeshjoseph@gmail.com>

* Resolved lint errors

Signed-off-by: rajasekhar reddy <reddy.rajasekhar.parvatha@gmail.com>

Co-authored-by: Aneesh Joseph <kaneeshjoseph@gmail.com>
hansadriaans pushed a commit to DataChefHQ/amundsen that referenced this pull request Jun 30, 2022
* Apply App config with out rebuild the application

Signed-off-by: rajasekhar reddy <reddy.rajasekhar.parvatha@gmail.com>

* use config override if JS_CONFIG_OVERRIDE_ENABLED is set

Signed-off-by: Aneesh Joseph <kaneeshjoseph@gmail.com>

* Fixed lint errors

Signed-off-by: rajasekhar reddy <reddy.rajasekhar.parvatha@gmail.com>

* fix lint errors

Signed-off-by: Aneesh Joseph <kaneeshjoseph@gmail.com>

* Resolved lint errors

Signed-off-by: rajasekhar reddy <reddy.rajasekhar.parvatha@gmail.com>

Co-authored-by: Aneesh Joseph <kaneeshjoseph@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:frontend From the Frontend folder
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants