Cross filtering in viz plugin - apache-superset

I need to create a custom viz plugin in apache-superset. It needs to send cross filters data to other viz in the same dashboard.
So I created a time-series plugin using this tutorial. I then added the the emitFilterControl (from #superset-ui/chart-controls) in my plugin controlPanel.ts. I know have the 'Enable dashboard cross filters' checkbox in my viz settings menu.
Now, I need to implement filter emission in my plugin code. Unfortunately, I was not able to find any docs relating to this. I also looked through superset/superset-frontend source code but it was not successful either. Has anyone implemented such a feature ?
Thanks in advance
I enabled these flags in superset/config.py:
FEATURE_FLAGS: Dict[str, bool] = {
"DASHBOARD_CROSS_FILTERS": True,
"DASHBOARD_NATIVE_FILTERS": True,
"DASHBOARD_NATIVE_FILTERS_SET": True,
"DASHBOARD_FILTERS_EXPERIMENTAL": True,
}

Related

Wagtail page promote tab - "Show in Menu" - How does it work?

The default Wagtail page model includes the "Show in Menu" option on the promote tab. I've been searching through the documentation for awhile now trying to find more information about how this works and I don't see anything.
What is this option used for, and how do I hook into that field so that I can build a simple list of links to be used is some arbitrary template like a footer?
Am I supposed to just build my own queryset of page models and then filter on that value, or is there a simpler utility include with Wagtail that I can use directly?
This is a generic field that is available on Page models that does not do anything by default.
https://docs.wagtail.org/en/stable/reference/pages/model_reference.html?highlight=show_in_menua#wagtail.core.models.Page.show_in_menus
While the documentation is not the clearest, the only thing this impacts is whether the page is returned in in_menu() querysets.
https://docs.wagtail.org/en/stable/reference/pages/queryset_reference.html#wagtail.core.query.PageQuerySet.in_menu
As Wagtail does not make assumptions about what your frontend (front facing pages) will look like it is up to you to determine what this field means for your application.
Additional links
https://wagtailmenus.readthedocs.io/en/stable/ - a package for building complex menus within Wagtail
https://www.accordbox.com/blog/how-to-create-and-manage-menus-in-wagtail/ - good tutorial on building custom Wagtail menus
The Wagtail Getting Started section could use some information about how to use 'show in menu' to create menus. Until that gets added, try this tutorial for how to use this 'from scratch': https://www.accordbox.com/blog/how-to-create-and-manage-menus-in-wagtail/
Or install wagtailmenus per instructions in this tutorial: https://engineertodeveloper.com/wagtail-site-navigation/
(At work we built ours by hand but if we were doing it over, I would definitely look into wagtailmenus)

Oracle Apex IG modify Action Menu

I want to hide some specific features from IG's Action Menu.
I know how to to do it for example for highlight and stretch option
function(config){
apex.util.getNestedObject(config, "views.grid.features").highlight = false;
apex.util.getNestedObject(config, "views.grid.features").stretchColumns = false;
return config;
}
I can't find list of all features in that Menu. I want to keep only "Filtter", "Download" and "Help". Rest shouldn't be available.
And also how to hide column features with that configuration (I must do it here becouse it will be dynamic, depending on item). I want to keep only filter feature on columns.
When the page has been loaded, run apex.region("regionStaticId").call("option","config") in Browsers Developer Tools, to get the config object.
Now you can view and navigate through all options that has been currently set for the current Interactive Grid. This should give you an overview of all the other options you want to differentiate from.
The options you already found, views.grid.features.highlight and views.grid.features.strechColumns, are also in there.
For more information, see https://github.com/mgoricki/orclapex-ig-cheat-sheet
There are lots of examples and links to other blogs, on how to customize your Interactive Grid. Including the must read to John Snyders (member of the APEX Team) blog series about the Interactive Grid.

Sitecore add here button not showing the Add rendering dialog

All of a sudden the Add here button in experience editor to add a rendering is not working. When clicked nothing happens. Do you have any idea where can I start look into? I already tried to remove the custom styles and scripts in my Editing theme. Sitecore version is 9 update 2 and SXA is 1.7
You have started from the right thing. Please make sure that you have the valid base themes defined in the Media Library: /sitecore/Media Library/Base Themes, especially, the Editing Theme with the logic used to edit components in Experience Editor.
Another idea is to check the order in which the layers load in Sitecore. The default order is defined in Website/App_Config/layers.config, make sure that SXA configuration loads last in the Modules layer, so that all custom modules are processed ahead of the SXA. It is recommended to create a custom patch file instead of modifying the standard configuration.
Hope this helps.
Did you check the console?
Maybe you have some error caused by some new custom script and that's preventing the add button to work
We had this issue for a specific set of placeholders, fortunately affecting only a single project in our solution. To fix the behavior, we had to manually set "editable" to false -> save item and then back to true -> save item for every affected placeholder.
[EDIT]
We finally found the culprit, it was related to a Sitecore bug documented here: https://kb.sitecore.net/articles/706490
Setting the value for Query.MaxSize from 100 to 400 permanently fixed the issue

oracle apex 18.2 chart conditional formatting

As i am totally newbie to oracle apex technologies i am developing a simple chart application in which I have build a simple Bar Chart in apex 18.2, i want to do some conditional changes on chart on the basis of data retrieving from database , i didn't found any HTML expression box to enter custom HTML Expression , I need some Suggestion or Some good examples for to Customize the Chart behavior via css or java script , i have done googling but didn't found any useful material for apex 18.2 as all of examples are for some older versions.
Charts in APEX 18.2 are based on Oracle JET engine. If you're going spend more time on charts development, I advice you to check out this toolkit, and how it works. (https://www.oracle.com/webfolder/technetwork/jet/globalGetStarted.html)
If you just need a quick suggestions how to customize chart behavior then:
-set a static ID for your chart in application builder. It should be static ID of whole chart region, not just particular series.
-in the application use developer tools to figure out how chart widget works. In console you can easly catch the widget by jQuery selector $("#yourStaticID_jet"). "_jet" is crucial here. On this jQuery object you can use method ojChart() to interact with chart widget.
All available options for ojChart method are documented here: https://docs.oracle.com/cd/E87657_01/jet/reference-jet/oj.ojChart.html
At the beginning you can try:
$("#yourStaticID_jet").ojChart("option");
what should return object with all current options of the widget. Many of them let you impact the way your chart works. Some of them are not possible to set from application builder.
When you decide to change something dynamicly you can create Dynamic Action (for e.g. on some button) and choose type of action "Execute JavaScript Code". A nice example would be turning on stack property of your chart:
$("#yourStaticID_jet").ojChart({stack: 'on'});
There is also way to initialize your chart with some options. For this purpose go to Attribute section of your chart, and scroll down to "Advanced" JavaScript Initialization Code. Help text for this section will provide you example code.

custom sitecore shell tools for en masse workflow approval

I'm wondering about documentation to create a simple custom ribbon control for sitecore shell.
The problem i'm trying to address is that Admins should be able to force all subitems recursively to be approved to a certain workflow state (rather than approve each one manually), but we currently don't know any way to achieve that.
To solve this, we want to force items throught the workflow state (triggering the corresponding commands) programmatically, but we need a sane way for admins to interact with this, the sensible option would be a custom thingie in sitecore shell, but we aren't sure how easy is to achieve that.
any recommended readings for this problem?
Though this article claims to be written for Sitecore 5.3, the same steps apply for 6.x as well. Note: it requires access to the SDN: How to create a ribbon button in Sitecore v5.3
The high-level points from the article are:
Create a new class that inherits from Sitecore.Shell.Framework.Commands.Command
Mark the class as [Serializable]. It might not be necessary for simple commands, but add it now so you don't get problems later! Otherwise the button might not work correctly (this is related to pipelines - and the fact that pipelines might be stopped and resumed)
Override Execute() and possibly also GetIcon(), GetHeader(), QueryState(), GetClick(), GetSubmenuItems()
Add a new <command name="…" type="..."> tag to /App_Config/Commands.config file
Log into Sitecore and switch to the core database
Navigate to /sitecore/content/Applications/Content Editor/Ribbons and create (or copy) a command in the desired chunk
Enter your command name (the one from step 4) in the "Click" field (and supply a Header, Icon, Tooltip, etc)