* fix: changed sessions bucket * fix: text changes in login and signup forms * change: version number * change: config changes * fix: alerts image name * fix: alerts image name * Update README.md * chore(actions): pushing internalized to script. Signed-off-by: Rajesh Rajendran <rjshrjndrn@gmail.com> * feat(nginx): No redirection to HTTPS by default. Signed-off-by: Rajesh Rajendran <rjshrjndrn@gmail.com> * chore(deploy): optional nginx https redirect Signed-off-by: Rajesh Rajendran <rjshrjndrn@gmail.com> * fix: review fixes and other changes * fix: events modal openreplay logo * fix: stack event icon * Changes: - debugging - smtp status - session's issues - session's issue_types as array - changed Slack error message * Changes: - set chalice pull policy to always * fix(openreplay-cli): path issues. Signed-off-by: Rajesh Rajendran <rjshrjndrn@gmail.com> * fix(openreplay-cli): fix path Signed-off-by: Rajesh Rajendran <rjshrjndrn@gmail.com> * change: onboarding explore text changes * change: timeline issue pointers and static issue types * change: removed issues_types api call * connectors * Update README.md * Update README.md * Update README.md * Updating services * Update README.md * Updated alert-notification-string to chalice * Delete issues.md * Changes: - fixed connexion pool exhausted using Semaphores - fixed session-replay-url signing * Changes: - fixed connexion pool exhausted using Semaphores - fixed session-replay-url signing * Change pullPolicy to IfNotPresent * Fixed typo * Fixed typo * Fixed typos * Fixed typo * Fixed typo * Fixed typos * Fixed typos * Fixed typo * Fixed typo * Removed /ws * Update README.md * feat(nginx): increase minio upload size to 50M Signed-off-by: Rajesh Rajendran <rjshrjndrn@gmail.com> * fix(deploy): nginx custom changes are overriden in install Signed-off-by: Rajesh Rajendran <rjshrjndrn@gmail.com> * fix(nginx): deployment indentation issue Signed-off-by: Rajesh Rajendran <rjshrjndrn@gmail.com> * fix: revid filter crash * fix: onboarding links * fix: update password store new token * fix: report issue icon jira/github * fix: onboarding redirect on signup * Changes: - hardcoded S3_HOST * Changes: - changed "sourcemaps" env var to "sourcemaps_reader" - set "sourcemaps_reader" env var value * chore(script): remove logo Signed-off-by: Rajesh Rajendran <rjshrjndrn@gmail.com> * Making domain_name mandatory Signed-off-by: Rajesh Rajendran <rjshrjndrn@gmail.com> * Changes: - un-ignore *.js * feat(install): auto create jwt_secret for chalice. * docs(script): Adding Banner Signed-off-by: Rajesh Rajendran <rjshrjndrn@gmail.com> * chore(script): Remove verbose logging Signed-off-by: Rajesh Rajendran <rjshrjndrn@gmail.com> * Change: - use boto3-resource instead of boto3-client to check if file exists - changed .gitignore to allow *.js files - changed sourcemaps_reader env-var & env-var-value * fix (baxkend-ender): skip inputs with no label (technical) * Change: - changed DB structure * change: removed /flows api call * fix: skipping errorOnFetch check * Change: - changed sourcemaps_reader-nodejs script * Change: - changed sourcemaps_reader-nodejs script * fix (backend-postgres): correct autocomplete type-value * fix: slack webhooks PUT call * change: added external icon for integration doc links * fix: updated the sourcemap upload doc link * fix: link color of no sessions message * fix (frontend-player): show original domContentLoaded text values, while adjusted on timeline * fix (frontend-player): syntax * Changes: - changed requirements - changed slack add integration - added slack edit integration - removed sourcemaps_reader extra payload * Changes: - fixed sentry-issue-reporter - fixed telemetry reporter - fixed DB schema * fix(cli): fix logs flag Signed-off-by: Rajesh Rajendran <rjshrjndrn@gmail.com> * ci(deploy): Injecting domain_name Signed-off-by: Rajesh Rajendran <rjshrjndrn@gmail.com> * feat(nginx): Get real client ip Signed-off-by: Rajesh Rajendran <rjshrjndrn@gmail.com> * chore(nginx): restart on helm installation. Signed-off-by: Rajesh Rajendran <rjshrjndrn@gmail.com> * fix(deployment): respect image tags. * Changes: - changed sentry tags - changed asayer_session_id to openReplaySessionToken - EE full merge * fix: close the issue modal after creating * fix: show description in issue details modal * fix: integrate slack button redirect, and doc link * fix: code snippet conflict set back * fix: slack share channel selection * Changes: - fixed DB structure * Changes: - return full integration body on add slack * fix (integrations): ignore token expired + some logs * feat (sourcemaps-uploader): v.3.0.2 filename fix + logging arg * fix (tracker): 3.0.3 version: start before auth * fix: funnel calendar position * fix: fetch issue types * fix: missing icon blocking the session to play * change: sessions per browser widget bar height reduced * fix: github colored circles * Changes: - changed session-assignment-jira response * chore(nginx): pass x-forward-for Signed-off-by: Rajesh Rajendran <rjshrjndrn@gmail.com> * feat(chalice): included sourcemaps_reader It's not advised to run multiple processes in a single docker container. In Kubernetes we can run this as sidecar, but other platforms such as Heroku, and vanilla docker doesn't support such feature. So till we figure out better solution, this is the workaround. * chore(install): Remove sqs * feat(deployment): restart pods on installations. Signed-off-by: Rajesh Rajendran <rjshrjndrn@gmail.com> * Changes: - changed DB-oauth-unique constraint Co-authored-by: Shekar Siri <sshekarsiri@gmail.com> Co-authored-by: Mehdi Osman <estradino@users.noreply.github.com> Co-authored-by: KRAIEM Taha Yassine <tahayk2@gmail.com> Co-authored-by: ourvakan <hi-psi@yandex.com> Co-authored-by: ShiKhu <alex.kaminsky.11@gmail.com>
205 lines
5.8 KiB
JavaScript
205 lines
5.8 KiB
JavaScript
import { List, Map, Record } from 'immutable';
|
|
import Client from 'Types/client';
|
|
import Account from 'Types/account';
|
|
import { DELETE } from './jwt';
|
|
import withRequestState, { RequestTypes } from './requestStateCreator';
|
|
|
|
export const LOGIN = new RequestTypes('user/LOGIN');
|
|
export const SIGNUP = new RequestTypes('user/SIGNUP');
|
|
export const RESET_PASSWORD = new RequestTypes('user/RESET_PASSWORD');
|
|
export const REQUEST_RESET_PASSWORD = new RequestTypes('user/REQUEST_RESET_PASSWORD');
|
|
const FETCH_ACCOUNT = new RequestTypes('user/FETCH_ACCOUNT');
|
|
const FETCH_TENANTS = new RequestTypes('user/FETCH_TENANTS');
|
|
const UPDATE_ACCOUNT = new RequestTypes('user/UPDATE_ACCOUNT');
|
|
const RESEND_EMAIL_VERIFICATION = new RequestTypes('user/RESEND_EMAIL_VERIFICATION');
|
|
const UPDATE_APPEARANCE = new RequestTypes('user/UPDATE_APPEARANCE');
|
|
const FETCH_CLIENT = new RequestTypes('user/FETCH_CLIENT');
|
|
export const UPDATE_PASSWORD = new RequestTypes('user/UPDATE_PASSWORD');
|
|
const PUT_CLIENT = new RequestTypes('user/PUT_CLIENT');
|
|
|
|
const PUSH_NEW_SITE = 'user/PUSH_NEW_SITE';
|
|
const SET_SITE_ID = 'user/SET_SITE_ID';
|
|
const SET_ONBOARDING = 'user/SET_ONBOARDING';
|
|
|
|
const SITE_ID_STORAGE_KEY = "__$user-siteId$__";
|
|
const storedSiteId = localStorage.getItem(SITE_ID_STORAGE_KEY);
|
|
|
|
const initialState = Map({
|
|
client: Client(),
|
|
account: Account(),
|
|
siteId: null,
|
|
passwordRequestError: false,
|
|
passwordErrors: List(),
|
|
tenants: [],
|
|
onboarding: false
|
|
});
|
|
|
|
const setClient = (state, data) => {
|
|
const client = Client(data);
|
|
let siteId = state.get("siteId");
|
|
if (!siteId) {
|
|
siteId = !!client.sites.find(s => s.id === storedSiteId)
|
|
? storedSiteId
|
|
: client.getIn([ 'sites', 0, 'id' ]);
|
|
}
|
|
return state
|
|
.set('client', client)
|
|
.set('siteId', siteId);
|
|
}
|
|
|
|
const reducer = (state = initialState, action = {}) => {
|
|
switch (action.type) {
|
|
case UPDATE_PASSWORD.SUCCESS:
|
|
case LOGIN.SUCCESS:
|
|
return setClient(
|
|
state.set('account', Account(action.data.user)),
|
|
action.data.client,
|
|
);
|
|
case SIGNUP.SUCCESS:
|
|
return setClient(
|
|
state.set('account', Account(action.data.user)),
|
|
action.data.client,
|
|
).set('onboarding', true);
|
|
case REQUEST_RESET_PASSWORD.SUCCESS:
|
|
break;
|
|
case UPDATE_APPEARANCE.REQUEST: //TODO: failure handling
|
|
return state.mergeIn([ 'account', 'appearance' ], action.appearance)
|
|
case UPDATE_ACCOUNT.SUCCESS:
|
|
case FETCH_ACCOUNT.SUCCESS:
|
|
return state.set('account', Account(action.data)).set('passwordErrors', List());
|
|
case FETCH_TENANTS.SUCCESS:
|
|
return state.set('tenants', action.data.map(i => ({ text: i.name, value: i.tenantId})));
|
|
case UPDATE_PASSWORD.FAILURE:
|
|
return state.set('passwordErrors', List(action.errors))
|
|
case DELETE:
|
|
return initialState;
|
|
case PUT_CLIENT.REQUEST:
|
|
return state.mergeIn([ 'client' ], action.params);
|
|
case FETCH_CLIENT.SUCCESS:
|
|
return setClient(state, action.data);
|
|
case SET_SITE_ID:
|
|
localStorage.setItem(SITE_ID_STORAGE_KEY, action.siteId)
|
|
return state.set('siteId', action.siteId);
|
|
case PUSH_NEW_SITE:
|
|
return state.updateIn([ 'client', 'sites' ], list =>
|
|
list.push(action.newSite));
|
|
case SET_ONBOARDING:
|
|
return state.set('onboarding', action.state)
|
|
}
|
|
return state;
|
|
};
|
|
|
|
export default withRequestState({
|
|
loginRequest: LOGIN,
|
|
signupRequest: SIGNUP,
|
|
updatePasswordRequest: UPDATE_PASSWORD,
|
|
requestResetPassowrd: REQUEST_RESET_PASSWORD,
|
|
resetPassword: RESET_PASSWORD,
|
|
fetchUserInfoRequest: [ FETCH_ACCOUNT, FETCH_CLIENT, FETCH_TENANTS ],
|
|
putClientRequest: PUT_CLIENT,
|
|
updateAccountRequest: UPDATE_ACCOUNT,
|
|
updateAppearance: UPDATE_APPEARANCE,
|
|
}, reducer);
|
|
|
|
export const login = params => dispatch => dispatch({
|
|
types: LOGIN.toArray(),
|
|
call: client => client.post('/login', params),
|
|
});
|
|
|
|
export const signup = params => dispatch => dispatch({
|
|
types: SIGNUP.toArray(),
|
|
call: client => client.post('/signup', params),
|
|
});
|
|
|
|
export const resetPassword = params => dispatch => dispatch({
|
|
types: RESET_PASSWORD.toArray(),
|
|
call: client => client.post('/password/reset/2', params),
|
|
});
|
|
|
|
export const requestResetPassword = params => dispatch => dispatch({
|
|
types: REQUEST_RESET_PASSWORD.toArray(),
|
|
call: client => client.post('/password/reset/1', params),
|
|
});
|
|
|
|
export const updatePassword = params => dispatch => dispatch({
|
|
types: UPDATE_PASSWORD.toArray(),
|
|
call: client => client.post('/account/password', params),
|
|
})
|
|
|
|
export function fetchTenants() {
|
|
return {
|
|
types: FETCH_TENANTS.toArray(),
|
|
call: client => client.get('/signup')
|
|
}
|
|
}
|
|
|
|
export const fetchUserInfo = () => dispatch => Promise.all([
|
|
dispatch({
|
|
types: FETCH_ACCOUNT.toArray(),
|
|
call: client => client.get('/account'),
|
|
}),
|
|
dispatch({
|
|
types: FETCH_CLIENT.toArray(),
|
|
call: client => client.get('/client'),
|
|
}),
|
|
]);
|
|
|
|
export function logout() {
|
|
return {
|
|
type: DELETE,
|
|
};
|
|
}
|
|
|
|
export function updateClient(params) {
|
|
return {
|
|
types: PUT_CLIENT.toArray(),
|
|
call: client => client.put('/client', params),
|
|
params,
|
|
};
|
|
}
|
|
|
|
export function updateAccount(params) {
|
|
return {
|
|
types: UPDATE_ACCOUNT.toArray(),
|
|
call: client => client.post('/account', params),
|
|
}
|
|
}
|
|
|
|
export function resendEmailVerification(email) {
|
|
return {
|
|
types: RESEND_EMAIL_VERIFICATION.toArray(),
|
|
call: client => client.post('/re-validate', { email }),
|
|
}
|
|
}
|
|
|
|
export function updateAppearance(appearance) {
|
|
return {
|
|
types: UPDATE_APPEARANCE.toArray(),
|
|
call: client => client.post('/account', {
|
|
appearance: Record.isRecord(appearance) ? appearance.toData() : appearance
|
|
}),
|
|
appearance,
|
|
};
|
|
}
|
|
|
|
export function setSiteId(siteId) {
|
|
return {
|
|
type: SET_SITE_ID,
|
|
siteId,
|
|
};
|
|
}
|
|
|
|
export function pushNewSite(newSite) {
|
|
return {
|
|
type: PUSH_NEW_SITE,
|
|
newSite,
|
|
};
|
|
}
|
|
|
|
export function setOnboarding(state = false) {
|
|
return {
|
|
type: SET_ONBOARDING,
|
|
state
|
|
};
|
|
}
|
|
|