Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore: Update to 6.5.0 #2158

Merged
merged 39 commits into from
Oct 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
32cfa71
chore(release): 4.3.0 (#852)
ElinorW Feb 16, 2021
a42b742
chore(release): 4.4.0 (#860)
ElinorW Feb 22, 2021
8190568
chore(release): 4.4.1 (#878)
thewahome Mar 3, 2021
bc65ddf
chore(release): 4.4.2 (#912)
thewahome Mar 30, 2021
5368580
chore(release): 4.5.0 (#929)
thewahome Apr 13, 2021
d690cd8
Fix linting errors preventing the pipeline from runnings (#930)
thewahome Apr 13, 2021
69758cb
chore(release): 4.6.0 (#938)
thewahome May 5, 2021
9107145
Set GET as default HTTP method if method specified in query params is…
millicentachieng May 13, 2021
40d8316
Task: Update version number (#951)
millicentachieng May 13, 2021
e0ef4a4
chore(release): 4.9.0 (#989)
thewahome Jun 10, 2021
c477432
chore(release): 4.10.0 (#1014)
thewahome Jul 6, 2021
19733ac
chore(release): 4.11.0 (#1031)
thewahome Jul 15, 2021
c919328
chore(release): 4.12.0 (#1046)
thewahome Aug 3, 2021
d16607c
Release: September 2021 (#1091)
thewahome Sep 1, 2021
edfb717
Release: November 2021 (#1238)
ElinorW Nov 18, 2021
932a672
Release: December 2021 (#1308)
Onokaev Dec 9, 2021
194610a
Merge branch 'dev'
Onokaev Jan 5, 2022
f167a60
Revert "Merge branch 'dev'"
Onokaev Jan 5, 2022
1ff4ea0
Release 01-2022 (#1344)
millicentachieng Jan 13, 2022
0b3facd
Release: February 2022 (#1417)
ElinorW Feb 3, 2022
4be0d11
Chore (release): 4.17.0 (#1549)
github-actions[bot] Mar 10, 2022
8e825b1
Chore (release): 4.18.0 (#1553)
github-actions[bot] Mar 11, 2022
d47dd98
Chore (patch): 4.18.1 (#1558)
thewahome Mar 15, 2022
fef5627
Chore (release): 5.0.0 (#1582)
github-actions[bot] Mar 30, 2022
bb595f7
Chore (release): 5.1.0 (#1662)
github-actions[bot] Apr 13, 2022
bc54fb4
Chore (release): 5.1.1 (#1678)
github-actions[bot] Apr 22, 2022
d523741
Chore (release): 5.2.0 (#1729)
github-actions[bot] May 16, 2022
972e995
Chore (release): 6.0.0 (#1821)
github-actions[bot] Jun 15, 2022
e4a3615
Chore (release): 6.1.0 (#1928)
github-actions[bot] Jul 15, 2022
97ca0df
Chore (release): 6.2.0 (#1960)
github-actions[bot] Aug 3, 2022
f695350
Chore (release): 6.3.0 (#2015)
ElinorW Aug 10, 2022
3604275
Chore Release: 6.4.0 (#2079)
thewahome Sep 2, 2022
c2893de
Bump version to 6.5.0
invalid-email-address Oct 6, 2022
3b423c4
Merge branch 'master' into release/6.5.0
thewahome Oct 6, 2022
f89fa40
fix duplicate isPropertyName export
thewahome Oct 6, 2022
d49650e
fix profile component
thewahome Oct 6, 2022
5bc277c
remove flaky test
thewahome Oct 7, 2022
f4b30b4
Task: Remove errors telemetry filter to capture more details (#2124)
millicentachieng Oct 7, 2022
50367b1
Fix: Pass empty array to signOutSuccess when signing out (#2162)
Onokaev Oct 7, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
820 changes: 699 additions & 121 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "graph-explorer-v2",
"version": "6.4.0",
"version": "6.5.0",
"private": true,
"dependencies": {
"@augloop/types-core": "file:packages/types-core-2.16.189.tgz",
Expand Down
2 changes: 1 addition & 1 deletion src/app/services/actions/auth-action-creators.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ describe('Auth Action Creators', () => {

it('should dispatch LOGOUT_SUCCESS when signOutSuccess() is called', () => {
// Arrange
const response: boolean = false;
const response: boolean = true;
const expectedAction = {
type: LOGOUT_SUCCESS,
response
Expand Down
2 changes: 1 addition & 1 deletion src/app/services/reducers/auth-reducers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export function consentedScopes(state: string[] = [], action: IAction): any {
case GET_CONSENTED_SCOPES_SUCCESS:
return action.response;
case LOGOUT_SUCCESS:
return action.response;
return [];
default:
return state;
}
Expand Down
17 changes: 0 additions & 17 deletions src/app/views/App.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,23 +116,6 @@ describe('App rendering', () => {
expect(screen.getByRole('tab', { name: /expand/i} )).toBeDefined();
});

it('should hide the sidebar when \'minimize sidebar button\' is clicked', async () => {
const user = userEvent.setup();
renderApp({ mobileScreen: false, showSidebar: true });
const minimizeButton = screen.getByRole('button', { name: /minimize sidebar/i });
await user.click(minimizeButton);
expect(screen.getByText(/sidebar minimized/i)).toBeDefined();

// resources, samples and history tabs are now buttons on the sidebar
const samplesButton = screen.getByRole('button', { name: /sample queries/i});
expect(screen.getByRole('button', { name: /resources/i})).toBeDefined();
expect(screen.getByRole('button', { name: /history/i})).toBeDefined();

await user.click(samplesButton);
expect(screen.getByText(/sidebar maximized/i)).toBeDefined();
expect(screen.getByRole('tab',{ name: /sample queries/i}));
})

it('should render http methods dropdown when the \'request method button\' is clicked', async () => {
const user = userEvent.setup();
renderApp({mobileScreen: false, showSidebar: true});
Expand Down
27 changes: 14 additions & 13 deletions src/app/views/authentication/profile/Profile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ const Profile = (props: any) => {
const labelId = useId('callout-label');
const descriptionId = useId('callout-description');
const theme = getTheme();
const { personaStyleToken , profileSpinnerStyles, permissionsLabelStyles, personaButtonStyles,
const { personaStyleToken, profileSpinnerStyles, permissionsLabelStyles, personaButtonStyles,
profileContainerStyles } = profileStyles(theme);

useEffect(() => {
Expand Down Expand Up @@ -99,7 +99,7 @@ const Profile = (props: any) => {

const onRenderSecondaryText = (prop: IPersonaProps): JSX.Element => {
return (
<span style={{fontSize: FontSizes.small}}>
<span style={{ fontSize: FontSizes.small }}>
{prop.secondaryText}
</span>
);
Expand Down Expand Up @@ -142,25 +142,26 @@ const Profile = (props: any) => {
beakWidth={10}
onDismiss={toggleIsCalloutVisible}
setInitialFocus
styles={{root: {border: '1px solid' + theme.palette.neutralTertiary}}}
styles={{ root: { border: '1px solid' + theme.palette.neutralTertiary } }}
>
<Stack horizontal horizontalAlign='space-between' styles={{root:{ paddingBottom: 0}}}>
<Stack horizontal horizontalAlign='space-between' styles={{ root: { paddingBottom: 0 } }}>
{profile &&
<ActionButton text={`${profile.tenant}`} disabled={true}/>
<ActionButton text={`${profile.tenant}`} disabled={true} />
}
<ActionButton key={'sign-out'} onClick={() => handleSignOut()}>
{translateMessage('sign out')}
</ActionButton>
</Stack>
<Stack styles={{root:{ paddingLeft: 10 }}}>{fullPersona}</Stack>
<Stack styles={{ root: { paddingLeft: 10 } }}>{fullPersona}</Stack>
{graphExplorerMode === Mode.Complete &&
<ActionButton key={'view-all-permissions'} onClick={() => changePanelState()} styles={permissionsLabelStyles}>
{translateMessage('view all permissions')}
</ActionButton>
<ActionButton key={'view-all-permissions'}
onClick={() => changePanelState()} styles={permissionsLabelStyles}>
{translateMessage('view all permissions')}
</ActionButton>
}
<Stack styles={{root:{ background: theme.palette.neutralLighter, padding:10}}}>
<Stack styles={{ root: { background: theme.palette.neutralLighter, padding: 10 } }}>
<ActionButton key={'sign-other-account'} onClick={() => handleSignInOther()}
iconProps={{iconName: 'AddFriend'}}
iconProps={{ iconName: 'AddFriend' }}
>
{translateMessage('sign in other account')}
</ActionButton>
Expand All @@ -175,7 +176,7 @@ const Profile = (props: any) => {
return (
<div className={classes.profile} style={profileContainerStyles}>
{showProfileComponent(persona)}
{permissionsPanelOpen && <Permission panel={true}/>}
{permissionsPanelOpen && <Permission panel={true} />}
</div>
);
}
Expand All @@ -190,4 +191,4 @@ const styles = mergeStyleSets({
// @ts-ignore
const styledProfile = styled(Profile, authenticationStyles);
// @ts-ignore
export default styledProfile;
export default styledProfile;
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import {
getTheme, IStyle, ITheme, Label, Link,
MessageBar, MessageBarType, styled
} from '@fluentui/react';

import { componentNames, telemetry } from '../../../../telemetry';
import { IRootState } from '../../../../types/root';
import { lookupToolkitUrl } from '../../../utils/graph-toolkit-lookup';
Expand Down
29 changes: 0 additions & 29 deletions src/telemetry/filters.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { ITelemetryItem } from '@microsoft/applicationinsights-web';
import { errorTypes } from '.';
import {
ADAPTIVE_CARD_URL,
DEVX_API_URL,
Expand Down Expand Up @@ -92,31 +91,3 @@ export function sanitizeTelemetryItemUriProperty(envelope: ITelemetryItem) {
}
return true;
}

export function sanitizeStackTrace(envelope: ITelemetryItem) {
if (envelope.baseType === 'ExceptionData') {
const telemetryItem = envelope.baseData || {};
telemetryItem.properties = telemetryItem.properties || {};

if (telemetryItem.exceptions && telemetryItem.exceptions.length > 0) {
const exception = telemetryItem.exceptions[0];
const parsedStack = exception.parsedStack[0];

// Only capture errors coming from our source code and not dependencies, to reduce noise
if (!parsedStack.fileName.startsWith('webpack-internal')) {
return false;
}

// Add properties for unhandled exceptions only
if (!telemetryItem.properties.ComponentName) {
telemetryItem.properties.ComponentName = parsedStack.assembly;
telemetryItem.properties.Message = exception.stack.split('\n')[0]; // Read first line only
exception.message = errorTypes.UNHANDLED_ERROR;
}

exception.hasFullStack = false;
exception.stack = null;
}
}
return true;
}
7 changes: 4 additions & 3 deletions src/telemetry/telemetry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,14 @@ import {
addCommonTelemetryItemProperties,
filterRemoteDependencyData,
filterTelemetryTypes,
sanitizeStackTrace,
sanitizeTelemetryItemUriProperty
} from './filters';
import ITelemetry from './ITelemetry';
import { getVersion } from '../app/utils/version';
import { getBrowserScreenSize, getDeviceScreenScale } from '../app/utils/device-characteristics-telemetry';
import {
getBrowserScreenSize,
getDeviceScreenScale
} from '../app/utils/device-characteristics-telemetry';

class Telemetry implements ITelemetry {
private appInsights: ApplicationInsights;
Expand Down Expand Up @@ -58,7 +60,6 @@ class Telemetry implements ITelemetry {
this.appInsights.trackPageView();
this.appInsights.addTelemetryInitializer(filterTelemetryTypes);
this.appInsights.addTelemetryInitializer(filterRemoteDependencyData);
this.appInsights.addTelemetryInitializer(sanitizeStackTrace);
this.appInsights.addTelemetryInitializer(sanitizeTelemetryItemUriProperty);
this.appInsights.addTelemetryInitializer(addCommonTelemetryItemProperties);
this.appInsights.context.application.ver = getVersion().toString();
Expand Down
43 changes: 6 additions & 37 deletions src/tests/telemetry/filters.spec.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { ITelemetryItem } from '@microsoft/applicationinsights-web';
import {
filterTelemetryTypes, filterRemoteDependencyData, addCommonTelemetryItemProperties, sanitizeTelemetryItemUriProperty,
sanitizeStackTrace
filterTelemetryTypes,
filterRemoteDependencyData,
addCommonTelemetryItemProperties,
sanitizeTelemetryItemUriProperty
} from '../../../src/telemetry/filters';


describe('Telemetry filters should', () => {
it('ensure telemetry types to include are correct when filterTelemetryTypes() is called', () => {
// Arrange
Expand All @@ -21,7 +22,6 @@ describe('Telemetry filters should', () => {

// Assert
expect(result).toBe(true);

});

it('return true by default when filterRemoteDependencyData() is called', () => {
Expand Down Expand Up @@ -56,7 +56,7 @@ describe('Telemetry filters should', () => {

// Assert
expect(result).toBe(true);
});
})

it('sanitize telemetry item uri property', () => {
// Arrange
Expand All @@ -77,35 +77,4 @@ describe('Telemetry filters should', () => {
// Assert
expect(result).toBe(true);
})

it('sanitize stack trace', () => {
// Arrange
const envelope: ITelemetryItem = {
ver: '1.0',
name: 'test',
time: '',
iKey: '',
baseType: 'ExceptionData',
baseData: {
exceptions: [
{
parsedStack: [
{
fileName: 'webpack-internal',
assembly: 'Assembly'
}
],
stack: '\n First line of test, \n Second line of test'
}
]
}
}

// Act
const result = sanitizeStackTrace(envelope);

// Assert
expect(result).toBe(true);
})

})
})