-
Notifications
You must be signed in to change notification settings - Fork 67
feat: add api to gooddata-sdk for agg fact #1087
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -705,7 +705,8 @@ def add_title_description_tags( | |
|
|
||
| @staticmethod | ||
| def set_title_description(workspace_object: Any, translated: dict[str, str]) -> None: | ||
| if workspace_object.title: | ||
| # Aggregated facts do not have a title as a property | ||
| if hasattr(workspace_object, "title") and workspace_object.title: | ||
| workspace_object.title = translated[workspace_object.title] | ||
| if workspace_object.description: | ||
| workspace_object.description = translated[workspace_object.description] | ||
|
|
@@ -735,6 +736,8 @@ def get_texts_to_translate( | |
| self.add_title_description_tags(to_translate, label.title, label.description, label.tags) | ||
| for fact in dataset.facts or []: | ||
| self.add_title_description_tags(to_translate, fact.title, fact.description, fact.tags) | ||
| for agg_fact in dataset.aggregated_facts or []: | ||
| self.add_title_description_tags(to_translate, None, agg_fact.description, agg_fact.tags) | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Doublecheck, not sure if we should trasnlate also agg facts.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is ok. |
||
| for date_dataset in workspace_content.ldm.date_instances: | ||
| self.add_title_description_tags( | ||
| to_translate, date_dataset.title, date_dataset.description, date_dataset.tags | ||
|
|
@@ -792,6 +795,8 @@ def set_translated_texts( | |
| self.set_title_description_tags(label, translated) | ||
| for fact in dataset.facts or []: | ||
| self.set_title_description_tags(fact, translated) | ||
| for agg_fact in dataset.aggregated_facts or []: | ||
| self.set_title_description_tags(agg_fact, translated) | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Doublecheck
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is ok. |
||
| for date_dataset in new_workspace_content.ldm.date_instances: | ||
| self.set_title_description_tags(date_dataset, translated) | ||
| # ADM | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| # (C) 2025 GoodData Corporation | ||
| version: 1 | ||
| interactions: | ||
| - request: | ||
| method: GET | ||
| uri: http://localhost:3000/api/v1/entities/workspaces/demo/aggregatedFacts?page=0&size=500 | ||
| body: null | ||
| headers: | ||
| Accept: | ||
| - application/vnd.gooddata.api+json | ||
| Accept-Encoding: | ||
| - br, gzip, deflate | ||
| X-GDC-VALIDATE-RELATIONS: | ||
| - 'true' | ||
| X-Requested-With: | ||
| - XMLHttpRequest | ||
| response: | ||
| status: | ||
| code: 200 | ||
| message: OK | ||
| headers: | ||
| Cache-Control: | ||
| - no-cache, no-store, max-age=0, must-revalidate | ||
| Content-Length: | ||
| - '211' | ||
| Content-Type: | ||
| - application/vnd.gooddata.api+json | ||
| DATE: &id001 | ||
| - PLACEHOLDER | ||
| Expires: | ||
| - '0' | ||
| Featurepolicy: | ||
| - geolocation 'none'; midi 'none'; notifications 'none'; push 'none'; sync-xhr | ||
| 'none'; microphone 'none'; camera 'none'; magnetometer 'none'; gyroscope | ||
| 'none'; speaker 'none'; vibrate 'none'; fullscreen 'none'; payment 'none'; | ||
| Pragma: | ||
| - no-cache | ||
| Referrer-Policy: | ||
| - same-origin | ||
| Vary: | ||
| - Origin | ||
| - Access-Control-Request-Method | ||
| - Access-Control-Request-Headers | ||
| X-Content-Type-Options: | ||
| - nosniff | ||
| X-Frame-Options: | ||
| - SAMEORIGIN | ||
| X-GDC-TRACE-ID: *id001 | ||
| X-Xss-Protection: | ||
| - 1; mode=block | ||
| body: | ||
| string: | ||
| data: [] | ||
| links: | ||
| self: http://localhost:3000/api/v1/entities/workspaces/demo/aggregatedFacts?page=0&size=500 | ||
| next: http://localhost:3000/api/v1/entities/workspaces/demo/aggregatedFacts?page=1&size=500 |
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doublecheck, not sure if this should be done also for agg facts. I took it from facts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is ok.