Hi I am creating dashboard using the api, I want t...
# gooddata-cloud
h
Hi I am creating dashboard using the api, I want to add edit permission while creating the dashboard how can I do it? Please share the payload because I am not getting it right in the api documentation. Thanks
j
Hi Haseeb, it should be under the meta parameter: “meta”: { • “accessInfo”: • { ◦ “private”: true • },“origin”: { ◦ “originId”: “string”, ◦ “originType”: “NATIVE” }, “permissions”: [ ◦ “EDIT” ]
sorry for that, the format is a little messy. Could you share what you have in your body?
h
Copy code
{
  "data": {
    "attributes": {
      "title": "#{dashbaord_name}",
      "content": {
        "version": "2"
      }
    },
    "meta": {
      "permissions": [
        "EDIT"
      ]
    },
    "type": "analyticalDashboard"
  }
}
@Joseph Heun, can you please check the payload and correct me?
j
If you have already created the dashboard, you should be able to edit the permissions with a simple call as this: https://www.gooddata.com/docs/cloud/api-and-sdk/api/api_reference_all/#operation/manageDashboardPermissions
are you receiving any error on your end? or is it just not changing the permission?
h
It is not showing the edit button on my react app..
I am not getting any error from good data.
Let me rephrase my query, I just want to create a dashboard with edit permission for that dashboard.... The dashboard is creating but on my react app it is not showing any edit button.... Even I set fields for permission in meta attribute
@Joseph Heun there?
j
are you using SDK at all? Iframe? Is the edit button missing due to user permissions?
h
I am using sdk, @Joseph Heun
Basically, I am using react app where dashboard is loaded and use an iframe to display this react application on another web app.... on react application it is showing the edit button but on iframe it is not showing edit button
j
Could you possibly provide screenshots of where the button is showing versus where it is not showing? Also, could you provide more details as to your full use case as to how you are actually embedding everything and why it is being done this way?
h
This is the react app where I used sdk for display dashboard , in this app edit button is showing....
This is another application and here I used I frame which shows above application in this app.... Here edit button is not showing. I have done this way becasue I want to change the styling of dashboard and insights....
j
Could you please check the width of your iframe? If you allocate less than 1170 px of horizontal space for the embedded component, certain control elements, such as the Edit button, will be hidden.
h
Yes, this is the case.. Can you please guide me how to show edit button on screen than 1170px?
j
you would edit this in your iframe sizing parameters: <iframe title=“My Embedded GoodData Dashboard” id=“embedded-app-frame” src=“<host_url>/dashboards/embedded/#/workspace/<workspace_id>/dashboard/<dashboard_id>” height=“500px” width=“100%” frameborder=“0"
</iframe>
h
How can I do it using dashboard sdk?
j
this should be defined right in your iframe with the height and width parameters. Could you share with us your code?
h
@Joseph Heun, I am using dashboard component from the good data sdk....
j
You wouldn’t do this from here. It needs to be set in the iframe size
h
But I am not using the iframe. I am using react component... Means dashboard react component does not allow to show edit button on smaller screen. right? @Joseph Heun
@Joseph Heun, I want a sidebar on the left side and good data dashboard on the right side with edit button, can you please guide me how to achieve it.
j
Hi Haseeb, I believe we are getting a bit off course here. We can certainly assist with break/fix issues, but implementation with SDK is totally up to you. Should you need direct assistance with this our professional services team can certainly assist, but you would need to speak to an account owner about using their services. If the edit button is still not displaying then you need to adjust the sizing of your window which it fits into. What exactly do you mean by a sidebar on the left side?