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

ALS-7867 #62

Open
wants to merge 2 commits into
base: release
Choose a base branch
from
Open

ALS-7867 #62

wants to merge 2 commits into from

Conversation

TDeSain
Copy link

@TDeSain TDeSain commented Dec 15, 2024

No description provided.

- Deleted `DashboardDrawerList` record from the project.
- Updated `DashboardDrawerController` to return a `List<DashboardDrawer>`.
- Modified `DashboardDrawerService` to utilize a `List` instead of `DashboardDrawerList`.
- Changed `DashboardDrawerRepository` to return `Optional<List<DashboardDrawer>>`.
- Adjusted SQL join in `getDashboardDrawerRows` to use a LEFT JOIN.
- Updated `DashboardDrawerService` to use "default" layout as the fallback.
- Simplified repository queries by removing materialized view checks.
- Renamed methods in `DashboardDrawerRepository` for better clarity.
- Removed `dashboard.layout.type` from `application-bdc.properties`.
- Added unit and integration tests for `DashboardDrawerService`, `DashboardDrawerRepository`, and `DashboardDrawerController`.
@@ -13,7 +15,7 @@ public class DashboardDrawerController {
private DashboardDrawerService dashboardDrawerService;

@GetMapping
public ResponseEntity<DashboardDrawerList> findAll() {
public ResponseEntity<List<DashboardDrawer>> findAll() {
Copy link
Author

Choose a reason for hiding this comment

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

Dumping DashboardDrawerList object in favor of using an actual list

String materializedViewSql = """
select * from dictionary_db.dict.dataset_meta_materialized_view dmmv;
""";
public Optional<List<DashboardDrawer>> getDashboardDrawerRows() {
Copy link
Author

Choose a reason for hiding this comment

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

Debug log is too chatty. removing materialized views as they are not in use anyways.

@@ -15,7 +15,7 @@ public class DashboardDrawerService {
private final String dashboardLayout;

@Autowired
public DashboardDrawerService(DashboardDrawerRepository repository, @Value("${dashboard.layout.type}") String dashboardLayout) {
public DashboardDrawerService(DashboardDrawerRepository repository, @Value("${dashboard.layout.type:default}") String dashboardLayout) {
Copy link
Author

@TDeSain TDeSain Dec 15, 2024

Choose a reason for hiding this comment

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

Since there is no other implementation or requirements for other projects at the moment, will just make this the default layout. I do not like the value to be bdc for obvious reasons.

@@ -7,7 +7,6 @@ server.port=80

dashboard.enable.extra_details=true
dashboard.enable.bdc_hack=true
Copy link
Author

Choose a reason for hiding this comment

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

just use default layout

Copy link
Author

Choose a reason for hiding this comment

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

Out of scope for this work. I wouldn't build a repository layer here. I would move the repository logic to the dataset repository.

@TDeSain TDeSain self-assigned this Dec 18, 2024
@TDeSain TDeSain requested a review from Luke-Sikina December 18, 2024 13:49
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.

1 participant