readme, version

This commit is contained in:
Kazala Kinga (ID) 2023-02-06 18:40:36 +01:00
parent 29ef721e93
commit fcecabb9dd
3 changed files with 6 additions and 7 deletions

View File

@ -22,8 +22,8 @@ This web part displays different statistics data captured in the **Azure Applica
## Compatibility
![SPFx 1.10](https://img.shields.io/badge/SPFx-1.10.0-green.svg)
![Node.js v10 | v8](https://img.shields.io/badge/Node.js-v10%20%7C%20v8-green.svg)
![SPFx 1.16.1](https://img.shields.io/badge/SPFx-1.16.1-green.svg)
![Node.js v16](https://img.shields.io/badge/Node.js-v16-green.svg)
![Compatible with SharePoint Online](https://img.shields.io/badge/SharePoint%20Online-Compatible-green.svg)
![Does not work with SharePoint 2019](https://img.shields.io/badge/SharePoint%20Server%202019-Incompatible-red.svg "SharePoint Server 2019 requires SPFx 1.4.1 or lower")
![Does not work with SharePoint 2016 (Feature Pack 2)](https://img.shields.io/badge/SharePoint%20Server%202016%20(Feature%20Pack%202)-Incompatible-red.svg "SharePoint Server 2016 Feature Pack 2 requires SPFx 1.1")
@ -37,7 +37,7 @@ This web part displays different statistics data captured in the **Azure Applica
* [Injecting JavaScript with SharePoint Framework Extensions - Azure Application Insights](https://github.com/pnp/sp-dev-fx-extensions/tree/main/samples/js-application-appinsights)
* [JS Application AppInsights Advanced](https://github.com/pnp/sp-dev-fx-extensions/tree/main/samples/js-application-appinsights-advanced)
Following are required to access the data using **[App Insights API](https://dev.applicationinsights.io/)**. The API has been provided in a very simple way with **[API Explorer](https://dev.applicationinsights.io/apiexplorer)** for the developers to play around the API to understand the schema and the methods that can used.
Following are required to access the data using **[App Insights API](https://learn.microsoft.com/en-us/rest/api/application-insights/)**. To try the API without writing any code, see [Trying the Log Analytics API](https://learn.microsoft.com/en-us/azure/azure-monitor/logs/api/overview#trying-the-log-analytics-api)
* **Application ID** of the Application Insights
* **API Key** for the data access
@ -82,6 +82,7 @@ react-appinsights-dashboard | [Sudharsan K.](https://github.com/sudharsank)([@su
Version|Date|Comments
-------|----|--------
1.0.1.0| February 06, 2023 | Upgrade to SPFx 1.16
1.0.0.0|May 10, 2020|Initial release
1.0.0.1|June 16, 2020|Initial release
@ -90,7 +91,7 @@ Version|Date|Comments
- Clone this repository
- From your command line, change your current directory to the directory containing this sample (`react-appinsights-dashboard`, located under `samples`)
- in the command line run:
- `npm install`
- `npm install` (or even better, `pnpm install` )
- `gulp bundle --ship && gulp package-solution --ship`
> This sample can also be opened with [VS Code Remote Development](https://code.visualstudio.com/docs/remote/remote-overview). Visit https://aka.ms/spfx-devcontainer for further instructions.

View File

@ -3,7 +3,7 @@
"solution": {
"name": "React AppInsights Dashboard",
"id": "6696970c-955e-4d95-82a3-35c0d2a5818c",
"version": "1.0.0.0",
"version": "1.0.1.0",
"includeClientSideAssets": true,
"isDomainIsolated": false
},

View File

@ -29,10 +29,8 @@ export default class Helper {
const finalRes: IPageViewCountProps[] = [];
const finalPostUrl: string = this._postUrl + `/metrics/pageViews/count?timespan=${timespan}&interval=${timeinterval}`;
const response: HttpClientResponse = await this.httpClient.get(finalPostUrl, HttpClient.configurations.v1, this.httpClientOptions);
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const responseJson: any = await response.json();
if (responseJson.value && responseJson.value.segments.length > 0) {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const segments: any[] = responseJson.value.segments;
segments.map((seg: any) => {
finalRes.push({