Hi, i am struggling with adding customized logo, p...
# gd-beginners
o
Hi, i am struggling with adding customized logo, problem with “not allowed in CSP”, what should i do?
j
Hi Otilia, could you describe the process you have taken to set this up based on the documentation here: https://www.gooddata.com/docs/cloud/customize-appearance/white-label-your-organization/#update-logo Also, is there a full error log available?
o
Hi, thanks for quick response, i prepared my imgae on imgbb, and i am getting a response as i described before. I tryied to allowed multiple items in CSP but without result. What should I try next? Thank you in advance
j
Would you be able to provide the url of the image you are using?
o
j
Hi @Otília Porubiaková, the address of your hosted image is:
<https://i.ibb.co/5rgD8wc/Fravebot-logo-grey-bez-napisu.png>
this means, that if you would like to embed it from here, you need to allow
img-src
CSP directive for above address. Can you give that a try?
o
i dont have an option image-src in my CSP
j
oh, I can see we allowed that directive for all possible options because of markdown widgets (= means it should be ready to go). I just did a simple test: • added the image to settings • did nothing with the CSP • refreshed the page and observed the the logo up there Can you check?
o
Thanks, its working now
👍 1
Hi, can I have another question? I though that in my workspace i can create limitless dashboards, isn’t it true?
j
Yes, that should be valid statement, unless you restrict a user from creating.
o
Than I don’t know why I can’t make more than two, can u help me with solving this problem?
j
yes, can you send an error (printscreen) you are getting?
o
I am not having an error, just “plus” button next to the dashboards is not reacting
i can’t even swich between my existing dashboards
j
I would start with refreshing the browser first, then please, try to recreate the following process and see if you hit any error in the
Network
tab. Is there any item signed in red font color?
o
Screenshot 2024-06-10 at 17.50.21.png
j
that seems to be a matter for our support, I am sending an email and CCing you.
o
thank you, let me know if i can do anything
j
just please respond if support asks you for anything additional 😉 (via email)
o
of course, thank you
Hi, please, I am trying to set permissions and filters for workspace and dashboards of my customer (screenshot attached) - I can’t see any options where to set it, can you advice me an approach?
j
Hi Otília, permissions can be set in this dialog, tab
Workspaces
(whether to view or edit content inside), for the Dashboard, you need to go one by one inside that particular workspace, upper right corner a button to share each of them. As for the data filters is a bit different story, all of them need to be set up via API interface: • I presume you are after user filtering. This one is set up again per each workspace, sending a POST request as below (I will try to rewrite as much customised for your case as possible - I do not know the workspace id) • Please be aware you need to use MAQL for the actual filtering - you refer to current attribute value (more details here)
Copy code
### Create new User Data Filter
POST {{host}}/api/v1/entities/workspaces/{{workspace_id}}/userDataFilters
Content-Type: application/vnd.gooddata.api+json
Authorization: Bearer {{token}} 

{
 "data": {
   "type": "userDataFilter",
   "id": "filter_dominik",
   "attributes": {
     "maql": "{label/your_category} = \"Somevalue\"",
     "title": "Status filter"
   },
   "relationships": {
     "user": {
       "data": {
         "id": "dominik.konicek.673...",
         "type": "user"
       }
     }
   }
 }
}
o
Hi, Jakub, i was able to create .json-s for that, but i have a problem with uploading to dashboards, can you help me?
j
Hi, yes, I can help you, first of all, you need an API tool, something like a postman.co - let me know you prefference and we can adjust to that. Second, you need to generate an API token - main page - settings - create access token Once you have these two things, let me know and we can upload the json.
o
Good morning, I am more comfortable with python, and prepared an API request (attachment). Is it possible to make multiple filter in my API or I have to upload them one by one? Where can I see all filters I uploaded? Thank you in advance
j
Yes, this should be possible... we have a wonderful Python SDK, that can achieve a declarative way (one step prepare filters, second upload to gooddata), let me post below how you can achieve that. For getting all defined UDFs within a workspace, you simply send a GET request to the same endpoint. you can install python sdk via
pip3 install gooddata-sdk
Copy code
from gooddata_sdk import GoodDataSdk, CatalogDeclarativeUserDataFilters, CatalogDeclarativeUserDataFilter
from gooddata_sdk.catalog.identifier import CatalogUserIdentifier

sdk = GoodDataSdk.create(host_url, api_token)

filter_list = [
        {"entity_id": "john.doe", "entity_type": "user", "filter_field": "city", "filter_value": "Alabama"},
        #{"entity_id": "", "entity_type": "user", "filter_field": "", "filter_value": ""},
        #{"entity_id": "", "entity_type": "user", "filter_field": "", "filter_value": ""},
    ]

udf_prepare = []
for fl in filter_list:
    udf_prepare.append(
        CatalogDeclarativeUserDataFilter(
            id=f'filter-{fl["entity_id"]}',
            title="Programatically created UDF",
            maql=f'{{label/{fl["filter_field"]}}} = "{fl["filter_value"]}"',
            user=CatalogUserIdentifier(
                id=fl["entity_id"],
                type=fl["entity_type"]
            )
        )
    )
sdk.catalog_workspace.put_declarative_user_data_filters(
    workspace_id=workspace_id,
    user_data_filters=CatalogDeclarativeUserDataFilters(
        user_data_filters=udf_prepare
    )
)