I've been looking for a way to directly access a widget from my SonarQube instance with a direct URL, the way it's possible to access a Dashboard. Is it possible to do that adding the respective metrics from the configuration of the Widget? The problem I found is that I can only "build" a widget and it takes the filter parameter, sizes, but when it comes to the metrics, they are ignored and it builds it with the default ones for the respective widget.
I have the following Widget configured (with metrics: Classes, Comment_Density and size - Complexity):
When building the URL to get directly this widget, I found it impossible to access it by its Id. So, I added all configuration details, but the widget I get is this, holding the default metrics - Lines of Code, Issues and Technical Debt. Built widget:
Is accessing directly a configured Widget even possible with the current versions of the SonarQube?
The URL I used is :
<sonarqubeinstance>/widget?id=measure_filter_bubble_chart&filter=1&chartTitle=Measure%20Bubble%20Chart&chartHeight=400&widget_width=1279px&metric1=classes&metric2=comment_lines_density&metric3=complexity
Thanks in advance for your help!
What you try to achieve is not possible.
What's more, keep in mind that those widgets do not exist any more starting with SonarQube 6.2. And there is no plan to reintroduce them.
Related
I know how to use input widget in Slate but I have a use case where I need to create several inputs from an array. Maybe one, maybe more, let's say around 10 or 15. Is that possible to create a input and to catch the user entry just by using an HTML widget.
One other way to say shoud be: I would like to have a table of 1 to 15 rows with one column dedicated to an input area. Number of row depend of the source data, so I want that the input is created dynamically. Is it possible in foundry-slate ?
Best regards
You can't do this in a plain HTML widget - the dependency graph can't read state from arbitrary HTML input elements.
There are a couple other options here; the one that most directly works they way you would like it to in your question, would be to use the Code Sandbox widget, which effectively let's you build your own widget and wire it up to the Slate dependency graph for interaction with the rest of the app. You can use a 3rd-party library, assuming you have the license, to do something more advanced (you can search your Foundry instance for some examples in the Slate Reference Examples) or simply use HTML and Javascript to build the widget as you would in normal web development as you have access to the DOM and JQuery when working in the Sandbox.
Slightly more in-line with how Slate might expect you to build this functionality, you can use a single input widget, but toggle what you do with the associated input based on other state, for example what row the user has selected. This, in combination with a button that stores the input into a Variable with a click event, can be used to let users build up a "bag" of edits, that you can then apply with Actions (or you can apply them immediately - all depends on the workflow). You'll find some examples of that pattern in the "Events" folder in the Slate Reference Examples.
Thinking a bit more expansively, if you model your data in the ontology, you can set up an editable table pattern in Workshop and have a quite straightforward experience once you have the right Action and Object Type configuration. You'll find the documentation on this on your Foundry instance at https://www.palantir.com/docs/foundry/workshop/widgets-object-table/#inline-edits-or-cell-level-writeback and an example in the Flight Alert Inbox example application.
I would like to rename the default tab value of Taxonomy in the backend page editor. I didn't find anything in the twig or yml files that would address this. Any ideas?
I checked with bolt developers and there is no way currently to do this. One potential option was to use the messages file but it was not recommended.
As you can imagine, since this isn't supported via the public configs, this will need a bit more advanced plugging together.
Here is a way to add an additional resource to the stack of translations.
https://gist.github.com/rossriley/c74fdee4fec3eaffb12f
This is a technique to add your own messages onto the translation stack without touching the underlying core files.
After creating this, you'll need to add your new service provider to the app, which you normally will bootstrap either in your index.php or a custom bootstrap file.
If a person has some important text on a widget and accidentally he removes/deletes the widget by expanding it and clicking delete in wp-admin widget's area. Then do this mean that the widget has been lost forever?
Do widget resides somewhere in any of the mysql database's table? Are there any revisions of widgets available?
Another way to get the text is to search the web caching engines like Google Cache, Wayback Machine etc. But what if we are unlucky enough that we have not allowed web crawler in robots.txt file?
Update (August 21, 2013) :-
Besides you give a general answer. Also state whether I can recover a simple 'text/html widget' that comes along with WordPress? Thanks.
It depends on the widget:
the widget developer decides where and how to store the widget data and if that data has revisions or not.
At this point you have the fallowing options:
1) access your database and have a look in the "_options" table for for the option_name %LIKE% widget -> it will show you all the data you have saved related to that widget, if you don't find what you are looking for:
2) check the php code of the widget to see if you can find where it saves the data and if it has revisions.
Your best luck is to have the data in the "_options" table and if you have backup of the table you can extract the data from there.
I need to get all configuration settings (current role or all roles not matter) from Azure cscfg file. I want to do this because i dont want to get all values one by one via RoleEnvironment.GetConfigurationSettingValue(key) method.
Is there any way to do this?
Regards
The short answer is 'no' the RoleEnvironment does not support getting all the configuration setting values.
A slightly longer answer is that getting configuration settings from the role environment in the current implementation is done through a call to native code. The separation of Windows Azure Application from Windows Azure Configuration and the ability to swap settings on a running application is at the root of this somehow. This is done inside of msshrtmi.dll (which should mean something like Microsoft Shared Runtime Managed Interop). This is the only reference Microsoft.WindowsAzure.ServiceRuntime.dll has apart from standard references to .NET.
Here is the method call to native code (I have not gone further than this):
[MethodImpl(MethodImplOptions.Unmanaged, MethodCodeType=MethodCodeType.Native), SuppressUnmanagedCodeSecurity, DllImport("", EntryPoint="", CallingConvention=CallingConvention.StdCall, SetLastError=true)]
internal static extern unsafe int modopt(IsLong) modopt(CallConvStdcall) RdGetApplicationConfigurationSetting(ushort modopt(IsConst), ushort*);
It might seem like a slightly round-about way of doing it, but if you want to get the configurations for all the roles in a deployment you can use the management api.
Kudu has an API for this.
You get to Kudu like via App Services > Advanced Details > Go
https://{app-service-name}.scm.azurewebsites.net/
or
https://{app-service-name}-{slot-name}.scm.azurewebsites.net/
The Url for the settings API is:
https://{app-service-name}.azurewebsites.net/api/settings or https://{app-service-name}-{slot-name}.scm.azurewebsites.net/
I'm a little confused about this, even though I have read all of the API and searched for hours.
When I activate my plugin I add some values to the options database, e.g.
add_option('code','24');
How do I update that value or use it in the widget? I only see "instances" now, like the example on this page:
http://wpcoderz.com/creating-a-multi-instance-widget-with-wordpress-2-8/
You can get an option using get_option and update it using update_option. But you should use instances instead of options for widget settings (like title) because that's the purpose of instances. You don't have to care about storing instance value - WP does it for you. If you don't understand instances well, look at codex.wordpress.org/Widgets_API.