Djaty - What is the `djatyReqId` that's being sent with all ajax requests? - djaty

I have installed Djaty JS SDK normally as the following:
<!DOCTYPE html>
<html lang="en">
<head>
<!-- ... -->
<script src="djaty.min.js" djaty-api-key="djaty-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx">
</script>
<!-- ... -->
</head>
<body>
<!-- ... -->
</body>
</html>
It works now successfully and I start receiving my first test errors.
I just wonder, what is the djatyReqId that's being sent with all ajax requests sent from my application?

Djaty will be able to link the bugs coming from frontend and backend together by sending this djatyReqId with every Ajax request.
For example, if an Ajax request causes a (5xx) failure at the server side, two bugs will be created - One from the frontend SDK (That has the end user activities and logs) and another from the backend SDK.
Using djatyReqId, Djaty knows that those bugs are related to each other and - At the dashboard - will show the Ajax timeline item with a "Backend Timeline" tab to help you debug what was happening at the server side during this Ajax was sent.

Related

how to open javascript code after website load

my website loading time is too much for zendesk chat, when i remove zendesk chat the website loading time under 2 seconds
here is my zendesk code
<script>
window.$zopim||(function(d,s){var z=$zopim=function(c){z._.push(c)},$=z.s= d.createElement(s),e=d.getElementsByTagName(s)[0];z.set=function(o){z.set._.push(o)};z._=[];z.set._=[];$.async=!0;$.setAttribute("charset","utf-8");$.src="//v2.zopim.com/?14mOH4BM2323DFADFSAS";z.t=+new Date;$.type="text/javascript";e.parentNode.insertBefore($,e)})(document,"script");
</script>
To combat this, a common practice is putting your scripts at the bottom of your body, so that the visual aspects of the website load first before the scripts.
For example:
<html>
<body>
<h1>My Website Contents</h1>
<script>console.log('My scripts go down here');</script>
</body>
</html>

how to set X-Frame-Options for local file

I create a web browser in python3 with pygobject (gtk3 and webkit2) and I want create a home page include google. I create a html file with a iframe but I see the error :
Refused to display 'https://www.google.com/' in a frame because it set 'X-Frame-Options' to 'SAMEORIGIN'.
How I can set X-Frame-Options ? All the solution in the web is a configuration in a local serveur but I don't have local serveur.
Here is my home page
<!DOCTYPE html>
<html>
<head>
<title>(Nouvelle page)</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>
<iframe src="https://www.google.com/"></iframe>
</body>
</html>
This is not something you can fix locally, unfortunately.
There is a similar question here: https://stackoverflow.com/a/8700754/2773979
The problem isn't that your page is missing that header, it is that Google sets this header precisely to prevent people from embedding the site into an iframe. Browsers comply to this by refusing to load/display the content of the iframe.
Note that there are solutions, like proxying the google page, but those are probably against the terms of service.

Minimizing Azure QnA Chat bot to Website

I have recently made a chat bot and am seeking to further edit the components of the interface by adding a minimizing button and an anchor so that the Chatbot is statically secured to the bottom right of the page (which is the most common area). This is made with the Azure QnA framework, so I'm not sure how much I can really edit..
Is there any way that I can access the code so that I can minimize the chat bot or add a button?
I will show a photo to make things more clear: minimizing image
The webchat interface that you are using is coming from Microsoft GitHub's project named BotFramework-WebChat available here.
If you look at the documentation provided on GitHub's main page, you will see that you have several ways of implementing your webchat on your website, from the easiest iframe inclusion to more detailed solutions.
If you want to customize your interface, I would suggest an implementation like the following in your hosting page code:
<!DOCTYPE html>
<html>
<head>
<link href="https://cdn.botframework.com/botframework-webchat/latest/botchat.css" rel="stylesheet" />
</head>
<body>
<div id="bot"/>
<script src="https://cdn.botframework.com/botframework-webchat/latest/botchat.js"></script>
<script>
BotChat.App({
directLine: { secret: direct_line_secret },
user: { id: 'userid' },
bot: { id: 'botid' },
resize: 'detect'
}, document.getElementById("bot"));
</script>
</body>
</html>
Here you are declaring the chat and using js and css files from the CDN.
All the code for the webchat component is in the js, so you should get it, make your customization and host it on your side to have what you want.
From the CDN it is minified, but you can rebuild the file using the process described here: https://github.com/Microsoft/BotFramework-WebChat#building-web-chat
For example an interface that we made from those sources:
For this example, we have customized the header in js to :
add 1 button to maximize
add 1 button to close
Then the image of the buttons is made with CSS

ASP.Net MVC project with office ui fabric react

We are trying to build a sample application with asp.net MVC using office ui fabric react. Followed the the below steps from node js command prompt as mentioned here.
By following the steps I could get the normal react sample working. I tried to add the fabric UI label code as given below in index.tsx file and then running the application, but fabric react label component is not getting rendered in the browser.
index.tsx code:
/* tslint:disable:no-unused-variable */
import * as React from 'react';
/* tslint:enable:no-unused-variable */
import { Label } from 'office-ui-fabric-react/lib/Label';
export const LabelBasicExample = () => (
<div>
<Label>I'm a Label</Label>
<Label disabled={ true }>I'm a disabled Label</Label>
<Label required={ true }>I'm a required Label</Label>
</div>
);
After adding this code ran webpack from nodejs command prompt and then tried browsing my index.html which has the below code. But could not see the react component getting rendered and neither I get any error.
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Hello React!</title>
</head>
<body>
<div id="example"></div>
<!-- Dependencies -->
<script src="./node_modules/react/umd/react.development.js"></script>
<script src="./node_modules/react-dom/umd/react-dom.development.js"></script>
<!-- Main -->
<script src="./dist/bundle.js"></script>
</body>
</html>
Can someone help here on is there any additional step that I am missing here or guide me to have the fabric react component working with asp.net.
Thanks

bootstrap full year calendar setup

I'm trying to get this package http://www.bootstrap-year-calendar.com up and running. I've got nodeJS installed, have grabbed the package with npm and have setup an html page as per the usage instructions, but I cannot actually get the calendar to render. This is my first foray into nodejs, so I suspect I'm missing something straightforward. Any ideas on what the problem might be?
Thanks as always. My html/js currently looks like this:
<html>
<head></head>
<body>
<script src="./jquery/dist/jquery.js"></script>
<script src="./bootstrap/dist/js/bootstrap.js"></script>
<script src="./bootstrap-year-calendar/js/bootstrap-year-calendar.min.js"></script>
<script>
$('.calendar').calendar()
</script>
</body>
</html>

Resources