This commit is contained in:
Ying Zhao 2018-02-07 17:16:08 -08:00
Родитель 70b6e202a0
Коммит 81e22f32a1
4 изменённых файлов: 5 добавлений и 0 удалений

Просмотреть файл

@ -12,6 +12,7 @@ export const loginInProgress = () => ({
export const userLoggedIn = (user) =>{
if(config.useAppInsight){
// eslint-disable-next-line no-undef
appInsights.setAuthenticatedUserContext(user.userName.replace(/[,;=| ]+/g, "_"), null, true);
}
return ({

Просмотреть файл

@ -6,6 +6,7 @@ import config from 'config'
var trackLinkClick = (name) => {
if(config.useAppInsight){
// eslint-disable-next-line no-undef
appInsights.trackEvent(name + 'Clicked')
}
}

Просмотреть файл

@ -15,6 +15,7 @@ const testToken = 'testToken'
export const login = (dispatch) => {
if(config.useAppInsight){
// eslint-disable-next-line no-undef
appInsights.trackEvent("SIA Login")
}
dispatch(authActions.loginInProgress())
@ -32,6 +33,7 @@ export const login = (dispatch) => {
export const logOut = (dispatch) => {
if(config.useAppInsight){
// eslint-disable-next-line no-undef
appInsights.trackEvent("SIA Logout")
}
switch (authVersion) {

Просмотреть файл

@ -20,6 +20,7 @@ const tryFetch = (dispatch, relativeUrl, init, returnJson = true, baseUrl = defa
.then(response => {
var timeUsed = new Date() - startTime
if(config.useAppInsight){
// eslint-disable-next-line no-undef
appInsights.trackDependency("myAjaxCall", init.method? init.method: "GET", [baseUrl + relativeUrl], relativeUrl, timeUsed, response.ok, response.status)
}
const localResponse = response