Parametrize Auto Refresh for Superset Dashboard - real-time

My Superset Dashboard does auto-refresh but I wanted to parameterize it
Ex: http://192.168.223.16:8088/superset/dashboard/sample/?standalone=true&refreshTime=30
I found that we need to modify the DashBoard.jsx file but I am not able to locate where this file is.
I did search everything but dont know if this is hidden or something ?

DashBoard.jsx is under incubator-superset/caravel/assets/javascripts if you are using a clone version of apache-superset

Related

How can I change the datasource for a Grafana dashboard?

I've got a new datasource I would like an existing dashboard to use.
How can I change it over? Is there a quicker way than exporting / importing the dashboard?
Specifying a variable would not solve all the problems with changing a data source for the existing dashboard - there will be still some metadata pointing to the old one, which will result in failures. The only thing that worked for me was to go to dashboard setting and copy aside the JSON model, careful find+replace and pasting back the model. I know it's pretty lame, but this was the only thing that worked. There seems to be something missing with this feature in Grafana at the moment...
The following trick worked for me with Grafana 8.
As preparation you have to create a datasource variable "DS_PROMETHEUS".
Then inside the dashboard:
Click "Share Dashboard or Panel"
Switch to "Export" Tab
Activate "Export for sharing externally"
Click "View JSON" and copy the json to the clipboard
Then in the same dashboard open the "Dashboard settings"->"JSON Model" and paste the json from above.
You can specify data source variable for a dashboard:
http://docs.grafana.org/reference/templating/#variable-types
In the JSON Model (dashboard settings), you can just replace all the occurrence of the id of the old source by the id of your new one

How to configure Play for test environment

I have an app in Play 2.6 and Scala and I want to configure all my Action to return Future or not, or i could say, to be Action or Action.async by a config file. So I could configure my entire app to work in production or test environment.
I have no clue how to do that. Hpw can I start to study and implement it?
Thank you
I wonder if you're looking for something like this which would allow you to provide environment specific configuration values? Including how to use those values in your controller
That document also covers how to specify which application.conf to use via the command line.

Clone rep:policy on AEM

I am currently working on with a solution that would be able to clone/copy/backup my existing rep:policy. 'Cause when we do some jobs it accidentally removed. I am trying to apply this kind of fix, but am failing to. It says it is an invalid path.
javax.jcr.security.AccessControlException: OakAccessControl0006: Isolated policy node. Parent is not of type [rep:AccessControllable]
final Workspace ws = session.getWorkspace();
ws.copy("/etc/commerce/products/abccompany/TvPackChannelMap/rep:policy","/tmp/nxt/TvPackChannelMap/rep:policy");
Are there other ways that I can be able to take the rep:policy thru code?
You need to make sure that your job does not touch the permissions or the rep:policy, this is the best way forward for you.
The exception could be because of /etc/commerce/products/abccompany/TvPackChannelMap/rep:policy does not exist or the user whose session you are using does not have read access to the node.
Make sure the path is correct, copy paste it to your CRX/DE to make sure it exists.
I have tried to use your code to copy a rep:policy from one node to another, works fine. But I would not* recommend copying permissions that way. The best practice is to use the Access Control Management API for all things permissions.
You can check, install and use the access control tool from netcentric. It offers a jmx interface for exporting AC entries and maybe also some APIs you could use to implement your custom solution.
The Other approach is to retrieve the ACL permissions through the query language.
For example, SELECT * FROM [rep:ACL] or SELECT * FROM [rep:ACE] where [rep:principalName] is not null should give you the results.
For more information, I would recommend you to check the ACS commons ACL Packager Implementation which is available on GitHub.
Reference Link - https://github.com/Adobe-Consulting-Services/acs-aem-commons/blob/master/bundle/src/main/java/com/adobe/acs/commons/packaging/impl/ACLPackagerServletImpl.java

Export/Importing Expression Engine Entries

I'm currently building an Expression Engine site and have got to the stage when I would like to put it on a staging area for the client to see and start adding content too. However, if he starts adding content I'm not sure how to copy that over to my dev area before I do another update. I've had a look round for some import/export plugins but there doesn't seem to be a simple way to do it, the best way I've seen so far is to export it using a statement within this plugin:
http://brandnewbox.co.uk/products/details/export
And import it again using this plugin:
http://brandnewbox.co.uk/products/details/datagrab
Is there a better way?
Nope. That's the only way -- major failing of ExpressionEngine. Control panel used to have an export option built in under 'Tools', but it was removed for reasons unknown!

setting options while installing or after installing App

I want to set the language for one time once the user downloaded the app and started using it, for only first time. but not all the time he use the app. How can i do that?
like how we get select language options , while installing Microsoft products, etc
is this possible ?
you can control that when you application apears. Did you know about property lists?
You could use it. Or maybe you can create a file with Core data with name Configs. You need to check if field is blank and case yes, open a viewControllerChangeLanguange.After select save the data and start your application. Remember, everytime you start you will check your file. Case exists, set current language.Case not, invoke an interface to user select a language. All the controller could be made by just a file config.