зеркало из https://github.com/Azure/Sia-EventUI.git
with eslint
This commit is contained in:
Родитель
70b6e202a0
Коммит
81e22f32a1
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче