This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AppInsights.trackPageView( | |
"", /* (optional) page name */ | |
"", /* (optional) page url if available */ | |
{ }, /* (optional) dimension dictionary */ | |
{ }, /* (optional) metric dictionary */ | |
0 /* page view duration in milliseconds */ | |
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default class AppInsightsCustomizerApplicationCustomizer | |
extends BaseApplicationCustomizer<IAppInsightsCustomizerApplicationCustomizerProperties> { | |
@override | |
public onInit(): Promise<void> { | |
/* update with YOUR App Insights key: */ | |
let appInsightsKey: string = "bd755e10-2e26-4580-8d58-446c0dd329fe"; | |
AppInsights.downloadAndSetup({ instrumentationKey: appInsightsKey }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default class CobSpFxGaApplicationCustomizer | |
extends BaseApplicationCustomizer<ICobSpFxGaApplicationCustomizerProperties> { | |
@override | |
public onInit(): Promise<void> { | |
/* update with YOUR Google Analytics tracking code: */ | |
let trackingCode: string = "UA-104299656-1"; | |
let scriptTagGA: HTMLScriptElement = document.createElement("script"); | |
scriptTagGA.text = ` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.app { | |
.header { | |
height:60px; | |
text-align:center; | |
line-height:2.5; | |
font-weight:bold; | |
display: flex; | |
align-items: center; | |
justify-content: center; | |
background-color: goldenrod; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default class CobGlobalJsApplicationCustomizer | |
extends BaseApplicationCustomizer<ICobGlobalJsApplicationCustomizerProperties> { | |
private _externalJsUrl: string = "https://sharepointnutsandbolts.azurewebsites.net/scripts/SPFxGlobalScript.js"; | |
@override | |
public onInit(): Promise<void> { | |
console.log(`CobGlobalJsApplicationCustomizer.onInit(): Entered.`); | |
let scriptTag: HTMLScriptElement = document.createElement("script"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.helloWorld { | |
.container { | |
max-width: 700px; | |
margin: 0px auto; | |
box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.2), 0 25px 50px 0 rgba(0, 0, 0, 0.1); | |
} | |
.result { | |
margin-top: 10px; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Version } from '@microsoft/sp-core-library'; | |
import { | |
BaseClientSideWebPart, | |
IPropertyPaneConfiguration, | |
PropertyPaneTextField | |
} from '@microsoft/sp-webpart-base'; | |
import { HttpClient, SPHttpClient, HttpClientConfiguration, HttpClientResponse, ODataVersion, IHttpClientConfiguration, IHttpClientOptions, ISPHttpClientOptions } from '@microsoft/sp-http'; | |
import { escape } from '@microsoft/sp-lodash-subset'; | |
import styles from './CobSpFxAzureFunction.module.scss'; | |
import * as strings from 'cobSpFxAzureFunctionStrings'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Net; | |
using Newtonsoft.Json; | |
using Microsoft.SharePoint.Client; | |
using OfficeDevPnP.Core; | |
using OfficeDevPnP.Core.Pages; | |
private static readonly string ADMIN_USER_CONFIG_KEY = "SharePointAdminUser"; | |
private static readonly string ADMIN_PASSWORD_CONFIG_KEY = "SharePointAdminPassword"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"frameworks": { | |
"net46":{ | |
"dependencies": { | |
"SharePointPnPCoreOnline": "2.14.1704" | |
} | |
} | |
} | |
} |