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

Save config in DB #594

Merged
merged 16 commits into from
Jan 18, 2021
Merged

Save config in DB #594

merged 16 commits into from
Jan 18, 2021

Conversation

TheSlimvReal
Copy link
Collaborator

@TheSlimvReal TheSlimvReal commented Jan 10, 2021

see issue: #558

Visible/Frontend Changes

  • New section in the admin panel to upload and download the config file

Architectural/Backend Changes

  • Initially, the config is loaded from the db with a fallback to a local config
  • Added hook for registering functions that should run, when the config changes
  • Move loading of routes, navigation and entity configs
  • New Config Entity
  • Increased test coverage for the admin component
  • Removed a library for saving files and replaced it with plain javascript

@TheSlimvReal TheSlimvReal changed the title implemented new methods for saving and loading the config from the db Save config in DB Jan 10, 2021
@github-actions
Copy link
Contributor

@sleidig sleidig mentioned this pull request Jan 11, 2021
7 tasks
@TheSlimvReal TheSlimvReal marked this pull request as ready for review January 13, 2021 16:04
@sleidig sleidig mentioned this pull request Jan 18, 2021
7 tasks
Copy link
Member

@sleidig sleidig left a comment

Choose a reason for hiding this comment

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

approving this as a first step towards the goal. We need to rework the startup process as soon as possible, though (#595). This is introducing tighter coupling and dependencies at the moment.

uploadConfigFile(file: Blob) {
this.readFile(file)
.then((res) =>
this.configService.saveConfig(this.entityMapper, JSON.parse(res))
Copy link
Member

Choose a reason for hiding this comment

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

use dependency injection instead of passing around the dependency here?


@NgModule({
declarations: [],
imports: [CommonModule],
imports: [CommonModule, EntityModule],
Copy link
Member

Choose a reason for hiding this comment

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

not necessary if dendency added to configmodule

@ghost
Copy link

ghost commented Jan 18, 2021

DeepCode's analysis on #a46cda found:

  • ℹ️ 1 minor issue. 👇

Top issues

Description Example fixes
No catch method for promise. This may result in an unhandled promise rejection. Occurrences: 🔧 Example fixes

👉 View analysis in DeepCode’s Dashboard | Configure the bot

@sleidig sleidig merged commit 1512b2c into master Jan 18, 2021
@sleidig sleidig deleted the config-to-db branch January 18, 2021 10:46
aam-digital-ci pushed a commit that referenced this pull request Jan 18, 2021
# [2.25.0](2.24.0...2.25.0) (2021-01-18)

### Features

* **core:** save config in DB ([#594](#594)) ([1512b2c](1512b2c)), closes [#558](#558)
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