How can I get a notification when a chart is removed from a hawtio dashboard - hawtio

I need to know when one of my charts have been deleted from a hawtio dashboard. Is that possible?
I have a plugin that adds charts to a hawtio dashboard. Once added, the charts can be customized. However, since I can't change the charts' search params once they have been added, I'm adding them with a short chart id. That id is then used to lookup the full options from localStorage when rendering the chart.
This all works fine. However, when a chart is deleted from the dashboard, I'd like to clean up my localStorage.
For now I'm running a customized build of hawtio.war. I've added a
scope.$broadcast("removedFromDashboard");
to gridsterDirective.ts just before the scope gets destroyed in the removeWidget() function. I then listen for that event and clean up my localStorage. This works but I don't want to distribute my custom hawtio.war file with my plugin.
Is there an existing way to know when my dashboard chart is removed? I've looked in the event.targetScope that gets passed in my $scope.on('$destroy') event, but it appears identical to a normal destroy that I get when I navigate off of the dashboard page.

Related

Azure devops widget based on json

I am creating a custom widget and having some stastics which is coming from jason data. i am able to create widget and fine. Now i want to automate this process so that as soon as jason file arrives in folder it refreshes the graph in widget. Is there any way to do it.
Is there any way to do it.
As far as I know , the Dashboards widget uses the load and reload function to load the widgets.
You can add conditions according to your needs, and then use the load or reload method in the return function to refresh the widget.
Here is an example, you could refer to it.
In addition,the dashboard also has automatic refresh function.
You could select the Automatically refresh the dashboard every 5 minutes option in Dashboards settings. Then the widgets will refresh every 5 minutes.
Hope this helps.

Getting INVALID_TAB_OPERATION when trying to delete or modify "Restrict Changes" Tabs in drafted Envelopes since v2.1

We've been developing a web application which uses DocuSign's API for around a year now and it was just updated to version 2.1, which seems to have caused an issue with our application. One use case for our application, which is now unable to work, is as follows:
A document has errors and needs to be sent back to our representatives and clients while maintaining information that was already filled in to be re-signed, but the simple cloning of an envelope removes all information filled in.
In order to circumvent this problem and get our application functioning as intended, we do the following:
Get a list of all of the tabs on the envelope
Clone the envelope as a draft (status: 'created')
Delete all of the tabs off of the newly cloned envelope
Making modifications such as removing any signatures from signature boxes
Add all of the tabs to the cloned envelope
Send the envelope
This all worked until around the end of last week (v2.1 of the API releasing on 08/02) when we realized that tabs were starting to be duplicated. After some investigation, we noticed that the tabs being duplicated were set to be "Restrict Changes" and were not being deleted by our API calls which used to override that sender permission. Since then, we've tried simply updating the cloned tabs with a PUT request after adding a value to certain tabs, which also gives us an INVALID_TAB_OPERATION error. While we haven't seen any documentation in the v2.1 update to suggest that change, we believe it has happened, whether it be a feature or a bug.
So the question is: was this change intended and can it be circumvented somehow to get our application functioning? If it was an intended change, can admins have an option to allow API calls to override these types of lock outs?
Yes, this was an intended change to the API as deleting and modifying restricted tabs in the v2 API was seen as a bug.

Outlook Add-in : Not getting Outlook Addin RoamingSettings on OWA after saving the same in Outlook Client

I am building an outlook-addin which saves the data in the RoamingSettings.
Using the code :
Office.context.roamingSettings.set('key1', 'AmIABug');
Once I save it in RoamingSettings my assumption is that when I open an email on the OutlookWebApp. It will immediately pull that save value when I request for it.
Office.context.roamingSettings.get('key1');
However this is not the case.
First, considering that there is an issue with RoamingSettings : Pointed out here.
Why Outlook's RoamingSettings object initialized with old values after page re-load/ redirect?
Which I was able to overcome with the work around mentioned:
https://github.com/joeparzel/RoamingFix
which seemed to work properly on the Outlook client, however Now. I am using the OutlookWebApp and what I see is that even when I have the OutlookWebApp already open I do not see the new RoamingSettings values when requested even when I close the TaskPane on one email and open the same using another email.
If I refresh the page I get the expected output. Can someone please tell me if RoamingSetting for OWA is only set once when the page loads, unlike the thick client where if I reopen my task pane, it gets the latest values.
In may have I missed something silly, please help.
This is the expected behavior. OWA only loads RoamingSettings once which is why when you reload the page you get the new values. Also note that since you are using a thick client to set the properties and the thick client by default runs in cached mode, there may be cases where you might not get the properties back on owa even after reload for some time since the properties haven't been synced back to exchange from thick client yet. Once thick client's sync kicks in, you should be able to see the props in OWA after a reload.

Orchard Dynamic Forms Workflow not invoked

I made a simple workflow in Orchard 1.9.1 to notify when a dynamic forms is submitted.
I didn't set any prpoperty/data on the Start Activity so that it can capture all Dynamic Forms submission. However there seems an issue and the workflow is NOT being invoked.
I followed steps from here: http://docs.orchardproject.net/Documentation/Workflows
But this notify activity or may be even the start activity doesn't seem to be invoked/working . What More settings are required to get this workflow in action ?
Also, I have set the redirect URL in "Forms" element properties but the form isn't redirecting. What can be the issue here as well ?
I have not seen this problem with a workflow before. I assume there's nothing in the logs?
My first guess would be that it's your form that is not submitting properly, try to remove that redirect, also make sure there's isn't some validation error blocking it, if you placed recaptcha element remove it and try again.
Second guess which is not very likely is that you have somehow managed to hide notification zone, either with CSS or in layout view #Zone(Model.Messages)

How can I refresh the XPages File Download Control and have it display updated attachments without full page refresh?

When I create file download control on a document I can display the attached files from a Rich Text Field.
In a separate process I am attaching more documents to the same document. I want to periodically refresh the download control container to see if there are new attachments. I do not want to do a full refresh of the page.
I have discovered that the partialRefresh of the file download control container either programmatically or manually does not result in the contents (downloadable files) being accurately updated.
XSP.partialRefreshGet('view:_id1:fileDownload1')
A full refresh of the screen shows the newly attached documents but I want to be able to partial refresh the panel container and see the new documents without full page refresh.
I have added a Random() computed text value into the panel and I can see that it is being refreshing correctly. I have even looked at the xhr response from the server and I can see that there is an update being made - but not with the new attachments in it - the "attached files" are not refreshing without full page refresh.
I can only assume this is a feature of the filedownload control in that it does not know that new files are attached at any other time other than page load.
Suggestions?
When partially refreshing a XPage, the datasources are not reloaded, only their last state (stored in memory or hdd ) is restored. If you change the scope of your datasource to request, the XPages engine is forced to recreate the datasource instead of using the cached one on each request (which includes partial refreshs).
This should allow you to refresh your fileDownload control without a full refresh.
Marky,
Yes, I have run into this before. You must do a full refresh with attachments.
http://xpagesblog.com/XPagesHome.nsf/Entry.xsp?documentId=FBAC0D921B677EA0852578CB006678D7
The link is fairly old, but I believe it still applies.
Matt White says in the article comments: "...Basically it is not currently possible to post a file attachment over AJAX, you either have to use Flash or a virtual iFrame solution if you don't want the entire page to refresh. As far as I know there is nothing that IBM can do about this at the moment.
Matt"

Resources