Skip to content

Commit

Permalink
chore(release): 4.1.10 (#747)
Browse files Browse the repository at this point in the history
* Telemetry for Graph Explorer usage (#672)

* Capture telemetry data for actions on History tab

* Capture telemetry data for actions on Sample Queries tab

* Capture telemetry data for theme change actions

* Capture telemetry data for office dev program link click

* Capture telemetry data for Graph API version change event

* Capture telemetry data for Adaptive Cards tab click

* Capture telemetry data for Code Snippets click and copy events

* Update .gitignore file

* Remove QueryUrl from history item telemetry data

* Capture old version and new version telemetry data on version change

* Update query version comparison to strict equality comparison

* Capture telemetry data for clicking history tab on header click

* Capture telemetry data for Permissions and Auth tab click events

* Fix imports ordering

* Add telemetry for tabs in query response section

* Rename RUN_QUERY_EVENT

* Update how we send telemetry data for custom events

* Add property to telemetry data to report if a user was authenitcated or not during an event

* Update method for collecting telemetry data for request tabs

* Update azure-pipelines to use a different AppInsights instrumentation key for staging

* Track component usage for permissions, auth, snippets and history tabs

* Provide name of component for AppInsights React component tracking

* Use interface as type instead of any when tracking documentation link click event

* Enable telemetry

* Rename telemetry custom property from QueryUrl to QuerySignature

* Disable telemetry if AppInsights instrumentation key does not exist

* HB of localized GE.jsons (#727)

* HB of localized GE.jsons

Co-authored-by: Charles Wahome <thewahome.cw@gmail.com>
Co-authored-by: OfficeGlobal <OfficeGlobal@microsoft.com>

* Task: display history items ttl message (#733)

* Fix: create onenote page (#708)

* display the page content in the request body

* fix linting errors

* add appropriate content type header

* remove filter for content-type header

* refine comment for clarity

* upgrade to the latest javascript sdk

* remove content type header checks

* simplify json content check

* refactor code to be concise

* Format code on save and paste

* Fix: breaking change with the adaptive cards templating library (#735)

* update adaptive card templating library

* fix breaking change

* fix linting error

* fix formatting

* HB of localized GE.jsons (#742)

Co-authored-by: OfficeGlobal <OfficeGlobal@microsoft.com>

* chore(release): 4.1.10

Co-authored-by: jobala <japhethobalak@gmail.com>
Co-authored-by: OfficeGlobal <47977325+OfficeGlobal@users.noreply.github.com>
Co-authored-by: OfficeGlobal <OfficeGlobal@microsoft.com>
Co-authored-by: Azure Static Web Apps <opensource@microsoft.com>
Co-authored-by: Elinor <ekaguongo@gmail.com>
Co-authored-by: Millicent Achieng <achieng.milli@gmail.com>
  • Loading branch information
7 people authored Oct 22, 2020
1 parent a292351 commit 1ddaf86
Show file tree
Hide file tree
Showing 37 changed files with 545 additions and 177 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@ yarn-error.log*

.idea
.vscode
.vs
14 changes: 12 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,15 @@
"**/node_modules": true,
"**/.github": true,
},
"files.trimTrailingWhitespace": true
}
"files.trimTrailingWhitespace": true,
"editor.codeActionsOnSave": {
"source.fixAll.tslint": true
},
"editor.formatOnSave": true,
"editor.formatOnPaste": true,
"typescript.updateImportsOnFileMove.enabled": "always",
"eslint.validate": [
"typescript",
"typescriptreact"
],
}
2 changes: 1 addition & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ jobs:
npm run build
env:
REACT_APP_CLIENT_ID: $(REACT_APP_STAGING_CLIENT_ID)
REACT_APP_INSTRUMENTATION_KEY: $(REACT_APP_INSTRUMENTATION_KEY)
REACT_APP_INSTRUMENTATION_KEY: $(REACT_APP_STAGING_INSTRUMENTATION_KEY)
displayName: 'Build static assets for staging'
- task: PowerShell@2
Expand Down
118 changes: 111 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{
"name": "graph-explorer-v2",
"version": "4.1.9",
"version": "4.1.10",
"private": true,
"dependencies": {
"@babel/core": "7.2.2",
"@microsoft/applicationinsights-react-js": "2.3.1",
"@microsoft/applicationinsights-web": "2.3.1",
"@microsoft/microsoft-graph-client": "2.0.0",
"@microsoft/microsoft-graph-client": "2.1.0",
"@svgr/webpack": "4.1.0",
"@uifabric/react-cards": "0.109.101",
"@uifabric/styling": "7.13.1",
"adaptivecards": "1.2.3",
"adaptivecards-templating": "0.1.0-alpha.1",
"adaptivecards-templating": "1.4.0",
"babel-core": "7.0.0-bridge.0",
"babel-eslint": "9.0.0",
"babel-jest": "23.6.0",
Expand Down
28 changes: 17 additions & 11 deletions src/app/services/actions/adaptive-cards-action-creator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import { IAction } from '../../../types/action';
import { IQuery } from '../../../types/query-runner';
import { lookupTemplate } from '../../utils/adaptive-cards-lookup';
import {
FETCH_ADAPTIVE_CARD_ERROR ,
FETCH_ADAPTIVE_CARD_ERROR,
FETCH_ADAPTIVE_CARD_PENDING,
FETCH_ADAPTIVE_CARD_SUCCESS
FETCH_ADAPTIVE_CARD_SUCCESS,
} from '../redux-constants';

export function getAdaptiveCardSuccess(result: string = ''): IAction {
Expand All @@ -18,20 +18,22 @@ export function getAdaptiveCardSuccess(result: string = ''): IAction {
export function getAdaptiveCardError(error: string): IAction {
return {
type: FETCH_ADAPTIVE_CARD_ERROR,
response: error
response: error,
};
}

export function getAdaptiveCardPending(): IAction {
return {
type: FETCH_ADAPTIVE_CARD_PENDING,
response: ''
response: '',
};
}

export function getAdaptiveCard(payload: string, sampleQuery: IQuery): Function {
export function getAdaptiveCard(
payload: string,
sampleQuery: IQuery
): Function {
return async (dispatch: Function) => {

if (!payload) {
// no payload so return empty result
return dispatch(getAdaptiveCardSuccess());
Expand All @@ -51,20 +53,24 @@ export function getAdaptiveCard(payload: string, sampleQuery: IQuery): Function
dispatch(getAdaptiveCardPending());

return fetch(`https://templates.adaptivecards.io/graph.microsoft.com/${templateFileName}`)
.then(resp => resp.json())
.then((resp) => resp.json())
.then((fetchResult) => {
if (fetchResult.error) {
throw (fetchResult.error);
throw fetchResult.error;
}
// create a card from the template
const template = new AdaptiveCardsTemplateAPI.Template(fetchResult);
const context = new AdaptiveCardsTemplateAPI.EvaluationContext();
context.$root = payload;
const context: AdaptiveCardsTemplateAPI.IEvaluationContext = {
$root: payload,
};
AdaptiveCardsTemplateAPI.GlobalSettings.getUndefinedFieldValueSubstitutionString = (
path: string
) => ' ';
const card = template.expand(context);
// give back the result of the card
return dispatch(getAdaptiveCardSuccess(card));
})
.catch(error => {
.catch((error) => {
// something wrong happened
return dispatch(getAdaptiveCardError(error));
});
Expand Down
5 changes: 0 additions & 5 deletions src/app/services/actions/query-action-creator-util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,6 @@ const makeRequest = (httpVerb: string, scopes: string[]): Function => {

if (query.sampleHeaders && query.sampleHeaders.length > 0) {
query.sampleHeaders.forEach(header => {

// We are relying on the graph client to set the content type header.
if (header.name.toLowerCase() === 'content-type') {
return;
}
sampleHeaders[header.name] = header.value;
});
}
Expand Down
1 change: 1 addition & 0 deletions src/app/services/actions/query-action-creators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ async function createHistory(response: Response, respHeaders: any, query: IQuery


const historyItem: IHistoryItem = {
index: -1,
url: query.sampleUrl,
method: query.selectedVerb,
headers: query.sampleHeaders,
Expand Down
3 changes: 2 additions & 1 deletion src/app/views/query-response/QueryResponse.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { Mode } from '../../../types/enums';
import { IQueryResponseProps, IQueryResponseState } from '../../../types/query-response';
import { copy } from '../common/copy';
import { createShareLink } from '../common/share';
import { getPivotItems } from './pivot-items/pivot-items';
import { getPivotItems, onPivotItemClick } from './pivot-items/pivot-items';
import './query-response.scss';

class QueryResponse extends Component<IQueryResponseProps, IQueryResponseState> {
Expand Down Expand Up @@ -122,6 +122,7 @@ class QueryResponse extends Component<IQueryResponseProps, IQueryResponseState>
</>}
<Pivot className='pivot-response'
styles={{ root: { display: 'flex', flexWrap: 'wrap' } }}
onLinkClick={(pivotItem) => onPivotItemClick(pivotItem)}
>
{pivotItems}
</Pivot>
Expand Down
Loading

0 comments on commit 1ddaf86

Please sign in to comment.