Prevent Kendo Scheduler events from inconsistent removal - kendo-ui

We do have a kendo scheduler bound to a remote data source.
The transport configuration of this scheduler's data source is done using remote urls (for CRUD), and this works perfectly,
On the server side, we make a lot of checks. So if some requirements are missing, Create, Update or event Destroy operations wouldn't pass and user will be shown the meaningful error.
The problem we're facing now is like the following :
For the Destroy action, what kind of response should we send back (from the server) to the scheduler component (in the browser on the client side ) to prevent removal of events in the UI?
We've tried :
Sending back HTTP 500 status code
Putting an error field in the response and linking it to the schema.error configuration
But events are still removed from the UI, nevertheless the error event is fired. We even use this event to notify errors to end used.
Thank you.

Related

How to get streaming subscription failure EWS

I want to reproduce a bug, these are the conditions :
GetStreamingEvents request should fail and preferably get 500 error from office365/exchange
The Resync request to send GetStreamingEvents periodically should keep failing.
Here is what I have tried so far :
I have tried to remove X-AnchorMailbox header and not send any Impersonation header but my syncing still works and GetStreamingEvents is a success.
On Exchange I moved users from one Database to another and Streaming events failed for a while till migration was in progress but it succeeded eventually.
Tried disabling Admin mailbox on exchange but that too didn't lead to any error.
Of course I tried to hardcode exchange's response but this hack is not 100% reliable.
I have Exchange2019 (acting as office365). I just want to lose my subscriptions somehow through Streaming notification mechanism of EWS. Please help me in this - what can I tweak on exchange or in my request to get streaming event failure.

ColdFusion API and Websockets

I am hoping someone can point me in the right direction. I have a CF2021 Server which uses a Node.js websocket server and CF pages (via javascript) as a client. Messages from user to user work as expected, so no issue there.
This CF Server also has a custom API built using CFML that handles and routes inbound SMS messages. My question is; what would be the best way to send the SMS message (by now its json) to the Node.js websocket to it can send it to the user(s).
I tried using the same javascript that the browser client uses, but it appears that the CFML API script is "browser-less", so that doesn't work, or should it?
I thought something like Apache Groovy may be the solution, but I am having difficulties with any websocket example I have found.
Any suggestions would be greatly appreciated.
thanks in advance
Flow matters.
If you want to handle an incoming message by delivering it to all currently logged in users who are subscribed to messages of the current sort: set up your message handler to deliver using lucee/adobe-coldfusion websockets. Be forewarned, Lucee takes some setup time, but once running, it is a great solution.
If you don't need immediate delivery, or you need a super simple solution: I actually have had some success with "Long Polling" you just have to remember to use "flush" early in the request, before any pause/sleep, then loop your message lookup requests for new data, with a 1-5 second delay between each loop. Once new data is found, I like to return the request to the client, close that polling request and start a new polling request using the client side. I typically won't poll for more than 60 seconds. Even if the returned json object is empty.

How to click a button on pop uo URL in jmeter without recording the script so that a data can be saved in the application

i have a web application which has confirmation pop up to save a record . i have used post on the HTTP request sampler and used parameter body , but still the record is not getting saved in the web application using jmeter . i have to click save then yes on the confirmation pop up
JMeter doesn't actually perform "clicks", it sends HTTP Requests, in your case this "popup" seems to be used for populating the USER_COMMENT section:
with regards to "record is not getting saved in the web application" - it indicates that your script fails somewhere somehow, you should inspect response details using View Results Tree listener, it might be the case the application will tell you what's wrong with your request.
The most common reasons are:
Your login request fails hence all subsequent requests are landing at the login page. JMeter automatically treats HTTP status codes below 400 as successful therefore you can see them as "green" or false-positive so check that all previous responses return expected data using the aforementioned View Results Tree listener
The request may fail due to missing or improperly implemented correlation, i.e. you're updating the record which was created during recording instead of adding a new one

Send custom info with WebBrowser control

i have the following problem:
i need to send some custom info with every request made by a WebBrowser control. For example one of the infos is the used app version.
Now i have already read here that it is impossible to set custom headers for a WebBrowser control.
I have already tried to intercept all requests and perform them on my own with a WebClient (or HttpWebRequest). It partially works but is very buggy and often throws errors.
Any other ideas how to send the custom infos with every request that is made by the WebBrowser control?
Is the web server you are interacting with your own? Could you just add a query string parameter for all the data you want? Something like
http://yourwebsite/YourPage.aspx?version=2
Then you'd be able to process it on the server, either during that request in the aspx page, or via the logfiles for the web server.
I suspect that as you can't modify the content that gets sent directly from the WebBrowser and that intercepting every call and acting as a proxy for every request, while still maintaining all browser functionality may be too cumbersome.
Instead I'd suggest sending an additional request with just the additional information you want to record every time you make a request.
That could lead to a lot of overhead so it might be easier to send this once and then pass a hash of it, or some other identifying key to the webpage (as a querystring parameter) on the first request so it can reconcile the 2 pieces of information. Assuming that you are in control of the web server you could then have the web server set that hash/key as a cookie so it would be passed again with subsequent request from the control.

Grails: server-to-client notification

I'm building a Grails app which queries several API's across the Web. The problem is that this queries are very time consuming and it is really annoying for the user to click one button and wait so much time without nothing changes in the page.
The basic architecture of my app is, when the user clicks the button, the client side performs an Ajax request with Prototype library to the server side. The server side, then, connects to the Last.fm API and retrieve a list of events. When the server side is finished populating the list with events it sends a JSON response to the client side which allows the client side to create markers for each event on a Google map.
What I want to achieve is, instead of waiting for all the events being retrieved from the API to send the JSON response, the server side sends a JSON response as soon as it retrieve one event, allowing the client side to populate the map while other events are yet being retrieved.
Any ideas how can I implement this? I read about the concept of Ajax Push but I'm not sure if it is what I need.
Thanks for the help!
There is no way to open a listening connection on the client that your server might connect to. Instead, what you need is a connection to the server that is kept alive and can be used to receive events. This way, you could directly return the "action" request and inform the client through your persistent event connection once the last.fm request was completed.
That said, the way I would implement is using ajax keep alive.
Take a look at cometd plugin.

Resources