Skip to content

Commit

Permalink
removes AppInsights references
Browse files Browse the repository at this point in the history
* removes docker workflows
* removes azure workflows
* adds #initial_setup to GameModel
  • Loading branch information
n8rzz committed Feb 6, 2022
1 parent 658382a commit 158c0ab
Show file tree
Hide file tree
Showing 18 changed files with 24 additions and 337 deletions.
21 changes: 0 additions & 21 deletions .azure/pipelines/build-and-push-to-dev.yml

This file was deleted.

21 changes: 0 additions & 21 deletions .azure/pipelines/build-and-push-to-stage.yml

This file was deleted.

45 changes: 0 additions & 45 deletions .azure/pipelines/templates/build-and-push-to-registry.yml

This file was deleted.

1 change: 0 additions & 1 deletion .env.template
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
NEXT_PUBLIC_APP_INSIGHTS_INSTRUMENTATION_KEY=
NEXT_PUBLIC_APP_VERSION=develop--7f3cd0b
NEXT_PUBLIC_SHOULD_SHOW_VERSION=true
17 changes: 0 additions & 17 deletions .github/__disabled__/actions/build-tag/action.yml

This file was deleted.

67 changes: 0 additions & 67 deletions .github/__disabled__/build-and-deploy.yml

This file was deleted.

39 changes: 0 additions & 39 deletions .github/__disabled__/build-and-push-to-dev.yml

This file was deleted.

38 changes: 0 additions & 38 deletions .github/__disabled__/build-and-push-to-prod.yml

This file was deleted.

1 change: 0 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ COPY . .
ARG APP_INSIGHTS_KEY
ARG APP_VERSION

ENV NEXT_PUBLIC_APP_INSIGHTS_INSTRUMENTATION_KEY=$APP_INSIGHTS_KEY
ENV NEXT_PUBLIC_APP_VERSION=$APP_VERSION

RUN yarn install
Expand Down
70 changes: 0 additions & 70 deletions src/components/context/AppInsightsContextProvider.tsx

This file was deleted.

5 changes: 0 additions & 5 deletions src/components/pages/stats/StatsPage.store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { GameCollection } from '../../../domain/game/models/Game.collection';
import { getPlayerStats } from '../../../domain/player/player.service';
import { IPlayerStats } from '../../../domain/player/player.types';
import { initialResponseStatus } from '../../../util/mobx/mobx.utils';
import { appInsights } from '../../context/AppInsightsContextProvider';
import { Timeframe, timeframeToPeriod } from './StatsPage.constants';

export class StatsPageStore {
Expand Down Expand Up @@ -45,7 +44,6 @@ export class StatsPageStore {
}

*init(): any {
const provider = Router.router?.query?.provider as string;
const username = Router.router?.query?.username as string;
const timeframe = Router.router?.query?.timeframe as Timeframe;
const timeclass = Router.router?.query?.timeClass as TimeClass;
Expand All @@ -57,9 +55,6 @@ export class StatsPageStore {

yield Promise.all([this.loadPlayerStats(username), this.loadGameArchives(username)]);

appInsights?.setAuthenticatedUserContext(username, provider, true);
appInsights?.startTrackEvent('DataLoad');

this.isStoreReady = true;
}

Expand Down
4 changes: 0 additions & 4 deletions src/components/pages/stats/StatsPage.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@ jest.mock('next/router', () => ({
},
}),
}));
jest.mock('../../context/AppInsightsContextProvider', () => ({
appInsights: jest.fn(),
reactPlugin: jest.fn(),
}));

describe('StatsPage', () => {
test('does not throw with valid props', () => {
Expand Down
2 changes: 0 additions & 2 deletions src/components/pages/stats/StatsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { observer } from 'mobx-react-lite';
import { useRouter } from 'next/router';
import styles from '../../../styles/App.module.css';
import { TimePeriodSection } from './time-period-section/TimePeriodSection';
import { reactPlugin } from '../../context/AppInsightsContextProvider';
import { AppHeader } from '../shared/app-header/AppHeader';
import { PageLoader } from '../shared/page-loader/PageLoader';
import { PlayerStats } from './player-stats/PlayerStats';
Expand All @@ -29,7 +28,6 @@ export const StatsPage: React.FC<IProps> = observer((props) => {

const onClickPeriodButton = React.useCallback(
(nextTimeframe: Timeframe) => {
reactPlugin?.trackEvent({ name: 'ChangeTimePeriod' }, { timeframe: nextTimeframe });
props.localStore.setActiveTimeframe(nextTimeframe);
},
[props.localStore.isStoreReady, props.localStore.activeTimeframe],
Expand Down
Loading

1 comment on commit 158c0ab

@vercel
Copy link

@vercel vercel bot commented on 158c0ab Feb 6, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.