Hey, guys! I'm trying to remove an attribute/Metri...
# gooddata-platform
m
Hey, guys! I'm trying to remove an attribute/Metric, from my Workspace, using Tags and passing excludeObjectsWithTags in the url (using iframe)... and still the element remains on the page! I did the step by step according to the documentation! I added the tag to my Metric, and then I passed the same tag to the url, as shown in the print below!
m
Hi @Mariana Lassala, the excludeObjectsWithTags does not affect the content of the dashboard, but only the list of objects which are displayed in various lists when user edits the dashboard. So this feature allows you to make it more convenient and easy for user who creates their own dashboard (hide some unrelated, internal insights, metrics etc.) but it is not meant for hiding metrics and numbers from the dashboard itself.
m
is there something in the documentation that helps to remove some element from the dashboard?
m
I am afraid that such feature is currently not available out of the box. It might be possible to do something like this using the dashboard plugins https://sdk.gooddata.com/gooddata-ui/docs/dashboard_plugins.html ad they are intended to modify how the visualizations are rendered on the dashboards, but that requires a front-end developer.
m
Hello, what would this (dashboard plugin name) be? this command: npx @gooddata/plugin-toolkit dashboard-plugin init
l
Completing Mariana's question, what would that be?
m
If I understand it right, you are trying to develop a plugin, which will allow you to hide some metrics and the development tool is asking you to name your plugin which you are developing? (There is no out of the box plugin that would do that). If that is the case, then you can choose any name you like for your plugin.
l
Ah ok, no problem, thank you very much for the reply.
Hi Michal. I have a doubt, the plug-ins installed through "npx @gooddata/plugin-toolkit dashboard-plugin init". It is used to create a new project or to be included in my existing project (project that is a platform that embeds goddata).
m
I would assume that it is a separate project (the plugin only affects how the dashboard is displayed, no matter whether it is embedded and where). But to be honest, I am not an expert on the plugins. @Andy, can you please help @Lucas Eduardo Barbosa de Siqueira with the dashboard plugins? As far as I understand, they are trying to build a plugin that would allow to hide some metrics from dashboards.
l
Thank you so much Michal. @Andy could you clear this doubt for me please? If the command "npx @gooddata/plugin-toolkit dashboard-plugin init", creates a new project only, or if I can use it to embed it in my project?
m
@Michal Hauzírek , I started a project " npx @gooddata/plugin-toolkit dashboard-plugin init I configured everything including plugins and .env, and my Goddata page appeared as expected. My page is all configured with insights, metrics, attributes, as I did it through Goddata. But I'm reading the documentation and what I realized is that there is a recommendation on how to create new metrics, attributes, and customize them. But I couldn't find anything about how to take something that is already done on my page and customize it, could you tell me where this is in the documentation, or tell me about it?
a
Hello Lukas, Mariana. I can confirm that the command
npx @gooddata/plugin-toolkit dashboard-plugin init
will only create a new boilerplate project for you to start your plugin development. We assume that you will then store the code in some git repo and work with it as with any other frontend web application. As for hiding the items on the dashboard, I’m not sure that the KD Plugins are the best fit here. There is no API to hide existing insights, however there is a way to replace any insight with your own implementation. So: • If you want to remove some insights from the dashboard - this is not possible (I’m not counting a “hack-ish” solutions like hiding them with CSS. • If you want to adjust the insight and change metrics/attributes used for the calculations - this is possible using insight provider API. Could you please give me an example of what you’re trying to achieve and I’ll let you know if that is possible and how. Thanks!
As for the plugin name - it’s up to you to decide. The generated folder will have this name as well as some internal variables in the generated boilerplate code. I would suggest using “kebab-case” (i.e. separate words with a hyphen) and use the name that would make sense to you. For example,
hide-city-attribute-plugin
.
l
Hi @Andy. Thanks for the feedback. Tell me if it's possible, please. I want to hide this value that is in the red circle. Can you confirm for me if this is possible or not? A note: within the Goddata platform, it cannot be removed.
a
Hi Lucas. That’s not possible out of box. However, you can make a plugin that would replace all Header insights with a custom implementation. Here is an example of how this could be done to give you a rough idea: https://gdui-examples.herokuapp.com/dashboardView/custom-chart Note, that this example is done for DashboardView component for embedding in React app. In case of plugins the boilerplate code would be different.
l
Ok @Andy, thank you. Another question, would it be possible for me to change the background color of the entire page? For example, the default color is white, would it be possible for me to put red as the background color of the entire page?
a
Are you using GoodData Platform or GoodData.CN ?
l
GooData Platform.
a
l
Okay, @Andy, thanks. Is there any particular point in the documentation or just following it will work? Because we already tested with themes, we followed the documentation to the letter and in the end nothing happened. But let's do it again, just confirm if I have to do something else, or just follow the link you sent me.
a
Let me check in with our support team. Perhaps there are some prerequisites.
l
Ok @Andy, awaiting.
b
Hi Lucas, thanks for bringing this to our attention, we needed to turn on one setting. It is now done, so it should be possible to use the themes
l
Hi @Boris, thank you very much, I will test it and let you know if it worked or not.
👍 1
@Michal Hauzírek, sorry to bother you. It clarifies one thing for me, on my GoodData page there are filters, I wanted to know if I "can pass these filters" to the URL of my page, I wanted to know if GoodData accepts filters in the URL? For example, passing a customer filter to the URL. So if the URL has a customer X, the page would only display information related to that customer.
b
Hi @Lucas Eduardo Barbosa de Siqueira I am afraid it's not possible via URL parameters, but your application can communicate with the embedded dashboard and set the filter value based on some user parameter https://help.gooddata.com/doc/growth/en/expand-your-gooddata-platform/gooddata-integr[…]ons/embed-a-dashboard/communication-with-embedded-dashboards However, I would like to point out that it's not a security feature and in some cases it might be possible for the users to access the data. If you want to strictly restrict users to see certain data, you would have to use data permissions (which are row level permissions based on some attribute value): https://help.gooddata.com/doc/growth/en/workspace-and-user-administration/managing-workspace-data-and-data-access/data-permissions
l
I see, I will read that documentation you sent me again. But just to reinforce, the URL cannot pass filters, which are parameters, right? The GoodData page URL is static, correct?
Hello @Boris. Changing the appearance of the Dashboard based on a JSON really worked, the correction you made took effect! Now regarding the URL, I was reading about the documentation you sent me in your last message and you really can't pass parameters and filter the URL, right? The documentation doesn't say anything about it...
b
Hi Lucas, yes that’s true.
l
@Boris sorry for the inconvenience of repeating this again, but in fact passing parameters that are filters, via Gooddata URL, (similar to the photo below) only in the URL, is it not possible?
m
Hi @Boris,could you please confirm for me if in fact it is not possible to do what @Lucas Eduardo Barbosa de Siqueira asked?
m
You can not pass filters in the URL, but there is more advanced way how to do this with a POST messages: https://help.gooddata.com/doc/growth/en/expand-your-gooddata-platform/gooddata-integr[…]ons/embed-a-dashboard/communication-with-embedded-dashboards To set he filter, you can use the setFilterContext command. But please note, that this can not be used as a security feature (i.e. to prevent some users from seeing some data) - as it is just a front-end feature to i.e. implement your own filters or integrate the dashboard more tightly with your application. But it is still possible for the user to bypass this kind of filter and see the data.
b
Yes, it is not possible
p
🎉 New note created.