[Main][Task]28736784: Update the Config Used for Type Docs with Test Web Config Endpoint (#2403)

* update test endpoint

* update

* update

* update

* update
This commit is contained in:
Karlie-777 2024-09-10 10:43:45 -07:00 коммит произвёл GitHub
Родитель 1d6a1c56a4
Коммит 5df231cc55
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
4 изменённых файлов: 55 добавлений и 2 удалений

Просмотреть файл

@ -803,6 +803,13 @@ module.exports = function (grunt) {
{ src: "./tools/config/config.json", dest: `./tools/config/browser/es5/ai.config${configVer}.cfg.json` },
{ src: "./tools/config/config.json", dest: `./tools/config/browser/es5/ai.config${configMajorVer}.cfg.json` }
]
},
testConfig: {
files: [
{ src: "./tools/config/test-config.json", dest: `./tools/config/browser/es5/ai_test.config${configVer}.cfg.json` },
{ src: "./tools/config/test-config.json", dest: `./tools/config/browser/es5/ai_test.config${configMajorVer}.cfg.json` }
]
}
}
}));
@ -955,6 +962,7 @@ module.exports = function (grunt) {
grunt.registerTask("serve", ["connect:server:keepalive"]);
grunt.registerTask("copy-config", ["copy:config"]);
grunt.registerTask("copy-testConfig", ["copy:testConfig"]);
grunt.registerTask("example-aisku", tsBuildActions("example-aisku"));
grunt.registerTask("example-dependency", tsBuildActions("example-dependency"));

Просмотреть файл

@ -10,8 +10,9 @@
},
"scripts": {
"clean": "git clean -xdf",
"build": "npm run build:browser",
"build": "npm run build:browser && npm run build:test",
"build:browser": "grunt copy-config",
"build:test": "grunt copy-testConfig",
"rebuild": "npm run build",
"test": ""
},

Просмотреть файл

@ -0,0 +1,42 @@
{
"version": "1.0.0",
"enabled": true,
"featureOptIn": {
"iKeyUsage": {
"mode": 3,
"onCfg": {
"throttleMgrCfg.109.disabled": false,
"throttleMgrCfg.106.disabled": false
},
"offCfg": {
"throttleMgrCfg.109.disabled": true,
"throttleMgrCfg.106.disabled": true
}
}
},
"config": {
"throttleMgrCfg": {
"109": {
"disabled": false,
"limit": {
"samplingRate": 2000000,
"maxSendNumber": 1
},
"interval": {
"dayInterval": 2
}
},
"106": {
"disabled": false,
"limit": {
"samplingRate": 1,
"maxSendNumber": 1
},
"interval": {
"monthInterval": 2,
"daysOfMonth": [1]
}
}
}
}
}

Просмотреть файл

@ -31,7 +31,9 @@ let scriptContent = fs.readFileSync(scriptFilePath, 'utf8');
// Replace the placeholder string with the actual connection string
const connectionString = 'InstrumentationKey=1ae9e7ce-18f1-4e14-8fc0-acbf0ed28895;IngestionEndpoint=https://eastus-8.in.applicationinsights.azure.com/;LiveEndpoint=https://eastus.livediagnostics.monitor.azure.com/';
let iKeyForCfgSync = "1ae9e7ce-18f1-4e14-8fc0-acbf0ed28895";
scriptContent = scriptContent.replace(`connectionString: "YOUR_CONNECTION_STRING"`, `instrumentationKey: "${iKeyForCfgSync}",\n \texpCfg: {\n\t\tinclScripts: true,\n\t\t\n\t\tmaxLogs: 100},\n\t\textensionConfig: {\n\t\t\t"AppInsightsCfgSyncPlugin": {\n\t\t\t\tcfgUrl:"https://js.monitor.azure.com/beta/ai.config.1.cfg.json"\n\t\t\t}\n\t\t}`);
//let cfgUrl = "https://js.monitor.azure.com/beta/ai.config.1.cfg.json";
let cfgUrl = "https://js.monitor.azure.com/nightly/ai_test.config.1-nightly3.cfg.json";
scriptContent = scriptContent.replace(`connectionString: "YOUR_CONNECTION_STRING"`, `instrumentationKey: "${iKeyForCfgSync}",\n \texpCfg: {\n\t\tinclScripts: true,\n\t\t\n\t\tmaxLogs: 100},\n \t\textensionConfig: {\n\t\t\t"AppInsightsCfgSyncPlugin": {\n\t\t\t\tcfgUrl:"${cfgUrl}"\n\t\t\t}\n\t\t}`);
//scriptContent = scriptContent.replace('YOUR_CONNECTION_STRING', connectionString);
scriptContent = `<script type="text/javascript">${scriptContent}</script>`;