move server report ext to extensions (#14087)

* move server report ext to extensions

* limit the size of data

* comments
This commit is contained in:
Alan Ren
2021-01-28 13:23:30 -08:00
committed by GitHub
parent f9ea6430ee
commit c16aee760f
59 changed files with 535 additions and 4885 deletions

View File

@@ -223,9 +223,10 @@ const externalExtensions = [
'profiler',
'query-history',
'schema-compare',
'server-report',
'sql-assessment',
'sql-database-projects',
'sql-migration',
'sql-migration'
];
// extensions that require a rebuild since they have native parts
const rebuildExtensions = [

View File

@@ -257,9 +257,10 @@ const externalExtensions = [
'profiler',
'query-history',
'schema-compare',
'server-report',
'sql-assessment',
'sql-database-projects',
'sql-migration',
'sql-migration'
];
// extensions that require a rebuild since they have native parts

1
extensions/server-report/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
*.vsix

View File

@@ -0,0 +1,6 @@
*.vsix
src/**
.gitignore
**/*.ts
**/*.map
.gitignore

View File

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

Before

Width:  |  Height:  |  Size: 52 KiB

After

Width:  |  Height:  |  Size: 52 KiB

View File

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

@@ -0,0 +1,395 @@
{
"name": "server-report",
"displayName": "Server Reports",
"description": "Server Reports",
"version": "0.2.3",
"publisher": "Microsoft",
"preview": true,
"engines": {
"vscode": "^1.26.0",
"azdata": "*"
},
"icon": "images/extension.png",
"license": "https://raw.githubusercontent.com/Microsoft/azuredatastudio/main/LICENSE.txt",
"repository": "https://github.com/Microsoft/azuredatastudio",
"categories": [
"Other"
],
"activationEvents": [
"*"
],
"main": "./out/extension",
"forceReload": true,
"contributes": {
"commands": [
{
"command": "tempdb.startEvent",
"title": "Start",
"icon": {
"light": "./out/media/launch.svg",
"dark": "./out/media/launch_inverse.svg"
}
},
{
"command": "tempdb.stopEvent",
"title": "Stop",
"icon": {
"light": "./out/media/blocker.svg",
"dark": "./out/media/blocker_inverse.svg"
}
},
{
"command": "tempdb.contention",
"title": "Contention Help for Tempdb",
"icon": {
"light": "./out/media/documentation.svg",
"dark": "./out/media/documentation_inverse.svg"
}
},
{
"command": "tempdb.pauseEvent",
"title": "Toggle Auto Refresh",
"icon": {
"light": "./out/media/insights.svg",
"dark": "./out/media/insights_inverse.svg"
}
}
],
"configuration": [],
"views": {},
"menus": {},
"dashboard.tabs": [
{
"id": "Server-Reports",
"title": "Server Reports",
"description": "This extension shows useful reports for a server.",
"icon": "images/server_reports.svg",
"group": "monitoring",
"container": {
"nav-section": [
{
"id": "server-reports-monitoring",
"title": "Monitor",
"icon": {
"light": "./out/media/monitor.svg",
"dark": "./out/media/monitor_inverse.svg"
},
"container": {
"server-reports-monitoring-container": {}
}
},
{
"id": "server-reports-performance",
"title": "Performance",
"icon": {
"light": "./out/media/performance.svg",
"dark": "./out/media/performance_inverse.svg"
},
"container": {
"server-reports-performance-container": {}
}
}
]
}
},
{
"id": "server-reports-tempdb-tab",
"title": "TempDB",
"group": "monitoring",
"description": "TempDB reports",
"icon": {
"light": "./out/media/tempdb.svg",
"dark": "./out/media/tempdb_inverse.svg"
},
"container": {
"server-reports-tempdb-container": {}
}
}
],
"dashboard.insights": [
{
"id": "extension-dbspace-usage",
"contrib": {
"type": {
"horizontalBar": {
"dataDirection": "vertical",
"dataType": "number",
"legendPosition": "top",
"labelFirstColumn": false,
"columnsAsLabels": true
}
},
"queryFile": "./out/sql/all_db_space_used.sql"
}
},
{
"id": "extension-cpu-utilization",
"contrib": {
"type": {
"timeSeries": {
"dataDirection": "horizontal",
"dataType": "point",
"legendPosition": "top",
"labelFirstColumn": false,
"columnsAsLabels": false
}
},
"queryFile": "./out/sql/cpumetric.sql"
}
},
{
"id": "extension-backup-growth-trend",
"details": "Abbie wants it",
"contrib": {
"type": {
"timeSeries": {
"dataDirection": "horizontal",
"dataType": "point",
"legendPosition": "none",
"labelFirstColumn": false,
"columnsAsLabels": false
}
},
"queryFile": "./out/sql/backup_size_trend.sql"
}
},
{
"id": "extension-wait-counts-by-Paul-Randal",
"contrib": {
"type": {
"horizontalBar": {
"dataDirection": "vertical",
"dataType": "number",
"legendPosition": "none",
"labelFirstColumn": false,
"columnsAsLabels": true
}
},
"queryFile": "./out/sql/waits_paul_randal.sql",
"details": {
"queryFile": "./out/sql/waits_detail_paul_randal.sql",
"label": {
"column": "WaitType",
"state": []
},
"value": "Percentage"
}
}
},
{
"id": "extension-wait-resource-statistics",
"contrib": {
"type": {
"bar": {
"dataDirection": "horizontal",
"dataType": "number",
"legendPosition": "none",
"labelFirstColumn": false,
"columnsAsLabels": true
}
},
"queryFile": "./out/sql/wait_resources.sql",
"details": {
"queryFile": "./out/sql/wait_resources.sql",
"label": {
"column": "WaitType",
"state": []
},
"value": "Percentage"
}
}
},
{
"id": "extension-dbbuffer-usage",
"contrib": {
"type": {
"horizontalBar": {
"dataDirection": "vertical",
"dataType": "number",
"legendPosition": "top",
"labelFirstColumn": false,
"columnsAsLabels": true
}
},
"queryFile": "./out/sql/memorybydb.sql"
}
},
{
"id": "type-of-contention",
"contrib": {
"type": {
"bar": {
"dataDirection": "vertical",
"columnsAsLabels": true,
"labelFirstColumn": false,
"legendPosition": "none"
}
},
"queryFile": "./out/sql/typeofContentions.sql",
"autoRefreshInterval": 0.05
}
},
{
"id": "metadata-contention",
"contrib": {
"type": {
"bar": {
"dataDirection": "vertical",
"columnsAsLabels": true,
"labelFirstColumn": false,
"legendPosition": "none",
"xAxisLabel": "Object Ids for System Tables"
}
},
"queryFile": "./out/sql/metadataContention.sql",
"autoRefreshInterval": 0.05
}
},
{
"id": "allocation-contention",
"contrib": {
"type": {
"bar": {
"dataDirection": "vertical",
"columnsAsLabels": true,
"labelFirstColumn": false,
"legendPosition": "none",
"xAxisLabel": "Page Types"
}
},
"queryFile": "./out/sql/allocationContention.sql",
"autoRefreshInterval": 0.05
}
}
],
"dashboard.containers": [
{
"id": "server-reports-monitoring-container",
"container": {
"widgets-container": [
{
"name": "Top 10 DB Space Usage",
"gridItemConfig": {
"sizex": 2,
"sizey": 2
},
"widget": {
"extension-dbspace-usage": {}
}
},
{
"name": "Top 10 DB Buffer Usage",
"gridItemConfig": {
"sizex": 2,
"sizey": 2
},
"widget": {
"extension-dbbuffer-usage": {}
}
},
{
"name": "CPU Utilization",
"gridItemConfig": {
"sizex": 2,
"sizey": 1
},
"widget": {
"extension-cpu-utilization": {}
}
},
{
"name": "Backup Growth Trend",
"gridItemConfig": {
"sizex": 2,
"sizey": 1
},
"widget": {
"extension-backup-growth-trend": {}
}
}
]
}
},
{
"id": "server-reports-performance-container",
"container": {
"widgets-container": [
{
"name": "Wait Counts by Paul Randal",
"gridItemConfig": {
"sizex": 2,
"sizey": 2
},
"widget": {
"extension-wait-counts-by-Paul-Randal": {}
}
}
]
}
},
{
"id": "server-reports-tempdb-container",
"container": {
"widgets-container": [
{
"name": "Tasks",
"widget": {
"tasks-widget": [
"tempdb.startEvent",
"tempdb.contention",
"tempdb.pauseEvent",
"tempdb.stopEvent"
]
}
},
{
"name": "Overall Contention",
"gridItemConfig": {
"sizex": 2,
"sizey": 1
},
"widget": {
"type-of-contention": {}
}
},
{
"name": "Metadata Contention",
"gridItemConfig": {
"sizex": 2,
"sizey": 1
},
"widget": {
"metadata-contention": {}
}
},
{
"name": "Allocation Contention",
"gridItemConfig": {
"sizex": 2,
"sizey": 1
},
"widget": {
"allocation-contention": {}
}
}
]
}
}
],
"snippets": []
},
"dependencies": {
"fs-extra": "^8.1.0",
"handlebars": "^4.5.3",
"openurl": "^1.1.1",
"vscode-nls": "^5.0.0"
},
"devDependencies": {
"@types/fs-extra": "8.1.0"
},
"__metadata": {
"id": "12",
"publisherDisplayName": "Microsoft",
"publisherId": "Microsoft"
}
}

View File

@@ -19,7 +19,6 @@ import * as constants from '../constants';
export default class MainController extends ControllerBase {
private autoRefreshState: boolean = false;
public apiWrapper;
// PUBLIC METHODS //////////////////////////////////////////////////////
/**
* Deactivates the extension

View File

Before

Width:  |  Height:  |  Size: 847 B

After

Width:  |  Height:  |  Size: 847 B

View File

Before

Width:  |  Height:  |  Size: 852 B

After

Width:  |  Height:  |  Size: 852 B

View File

Before

Width:  |  Height:  |  Size: 339 B

After

Width:  |  Height:  |  Size: 339 B

View File

Before

Width:  |  Height:  |  Size: 338 B

After

Width:  |  Height:  |  Size: 338 B

View File

Before

Width:  |  Height:  |  Size: 282 B

After

Width:  |  Height:  |  Size: 282 B

View File

Before

Width:  |  Height:  |  Size: 287 B

After

Width:  |  Height:  |  Size: 287 B

View File

Before

Width:  |  Height:  |  Size: 247 B

After

Width:  |  Height:  |  Size: 247 B

View File

Before

Width:  |  Height:  |  Size: 315 B

After

Width:  |  Height:  |  Size: 315 B

View File

Before

Width:  |  Height:  |  Size: 969 B

After

Width:  |  Height:  |  Size: 969 B

View File

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

View File

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

View File

@@ -5,6 +5,8 @@ format(backup_start_date, 'yyyy-MM-dd') as date,
AVG([backup_size]/1024/1024) AS "size MB"
--AVG([compressed_backup_size]/1024/1024) AS "Compressed Backup Size MB",
--AVG([backup_size]/[compressed_backup_size]) AS "Compression Ratio"
from (SELECT TOP 100 *
FROM msdb.dbo.backupset
where [type] = 'D'
ORDER BY backup_start_date DESC) AS recentbackups
GROUP BY [database_name], format(backup_start_date, 'yyyy-MM-dd') --DATEPART(mm,[backup_start_date]);

View File

@@ -3,9 +3,7 @@
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
"use strict";
// NOTE: These are es6 gulpfiles
// Basic build tasks
require('./tasks/buildtasks');
/// <reference path='../../../../src/sql/azdata.d.ts'/>
/// <reference path='../../../../src/sql/azdata.proposed.d.ts'/>
/// <reference path='../../../../src/vs/vscode.d.ts'/>
/// <reference types='@types/node'/>

View File

@@ -0,0 +1,23 @@
{
"extends": "../shared.tsconfig.json",
"compileOnSave": true,
"compilerOptions": {
"outDir": "./out",
"lib": [
"es6",
"es2015.promise"
],
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"moduleResolution": "node",
"declaration": false,
"typeRoots": [
"./node_modules/@types"
],
"strict": false,
"noUnusedParameters": false,
},
"exclude": [
"node_modules"
]
}

View File

@@ -0,0 +1,95 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
"@types/fs-extra@8.1.0":
version "8.1.0"
resolved "https://registry.yarnpkg.com/@types/fs-extra/-/fs-extra-8.1.0.tgz#1114834b53c3914806cd03b3304b37b3bd221a4d"
integrity sha512-UoOfVEzAUpeSPmjm7h1uk5MH6KZma2z2O7a75onTGjnNvAvMVrPzPL/vBbT65iIGHWj6rokwfmYcmxmlSf2uwg==
dependencies:
"@types/node" "*"
"@types/node@*":
version "14.14.22"
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.22.tgz#0d29f382472c4ccf3bd96ff0ce47daf5b7b84b18"
integrity sha512-g+f/qj/cNcqKkc3tFqlXOYjrmZA+jNBiDzbP3kH+B+otKFqAdPgVTGP1IeKRdMml/aE69as5S4FqtxAbl+LaMw==
commander@~2.20.3:
version "2.20.3"
resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33"
integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==
fs-extra@^8.1.0:
version "8.1.0"
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-8.1.0.tgz#49d43c45a88cd9677668cb7be1b46efdb8d2e1c0"
integrity sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==
dependencies:
graceful-fs "^4.2.0"
jsonfile "^4.0.0"
universalify "^0.1.0"
graceful-fs@^4.1.6, graceful-fs@^4.2.0:
version "4.2.3"
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.3.tgz#4a12ff1b60376ef09862c2093edd908328be8423"
integrity sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ==
handlebars@^4.5.3:
version "4.7.6"
resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.6.tgz#d4c05c1baf90e9945f77aa68a7a219aa4a7df74e"
integrity sha512-1f2BACcBfiwAfStCKZNrUCgqNZkGsAT7UM3kkYtXuLo0KnaVfjKOyf7PRzB6++aK9STyT1Pd2ZCPe3EGOXleXA==
dependencies:
minimist "^1.2.5"
neo-async "^2.6.0"
source-map "^0.6.1"
wordwrap "^1.0.0"
optionalDependencies:
uglify-js "^3.1.4"
jsonfile@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb"
integrity sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=
optionalDependencies:
graceful-fs "^4.1.6"
minimist@^1.2.5:
version "1.2.5"
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602"
integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==
neo-async@^2.6.0:
version "2.6.1"
resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.1.tgz#ac27ada66167fa8849a6addd837f6b189ad2081c"
integrity sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw==
openurl@^1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/openurl/-/openurl-1.1.1.tgz#3875b4b0ef7a52c156f0db41d4609dbb0f94b387"
integrity sha1-OHW0sO96UsFW8NtB1GCduw+Us4c=
source-map@^0.6.1:
version "0.6.1"
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263"
integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==
uglify-js@^3.1.4:
version "3.9.1"
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.9.1.tgz#a56a71c8caa2d36b5556cc1fd57df01ae3491539"
integrity sha512-JUPoL1jHsc9fOjVFHdQIhqEEJsQvfKDjlubcCilu8U26uZ73qOg8VsN8O1jbuei44ZPlwL7kmbAdM4tzaUvqnA==
dependencies:
commander "~2.20.3"
universalify@^0.1.0:
version "0.1.2"
resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66"
integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==
vscode-nls@^5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-5.0.0.tgz#99f0da0bd9ea7cda44e565a74c54b1f2bc257840"
integrity sha512-u0Lw+IYlgbEJFF6/qAqG2d1jQmJl0eyAGJHoAJqr2HT4M2BNuQYSEiSE75f52pXHSJm8AlTjnLLbBFPrdz2hpA==
wordwrap@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb"
integrity sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=

View File

@@ -1,8 +0,0 @@
out
node_modules
.vscode-test/
*.vsix
.DS_Store
.idea
test-reports/**

View File

@@ -1,57 +0,0 @@
// A launch configuration that launches the extension inside a new window
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
// To debug the extension:
// 1. please install the "Azure Data Studio Debug" extension into VSCode
// 2. Ensure azuredatastudio is added to your path:
// - open Azure Data Studio
// - run the command "Install 'azuredatastudio' command in PATH"
{
"version": "0.2.0",
"configurations": [
{
"name": "Debug in AzureDataStudio install",
"type": "azuredatastudioExtensionHost",
"request": "launch",
"runtimeExecutable": "azuredatastudio",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}"
]
},
{
"type": "node",
"request": "attach",
"name": "Attach to Ops Studio",
"protocol": "inspector",
"port": 5870,
"restart": true,
"sourceMaps": true,
"outFiles": [
"${workspaceRoot}/out/**/*.js"
],
"preLaunchTask": "",
"timeout": 25000
},
{
"name": "Debug in enlistment",
"type": "azuredatastudioExtensionHost",
"request": "launch",
"windows": {
"runtimeExecutable": "${workspaceFolder}/../../scripts/sql.bat"
},
"osx": {
"runtimeExecutable": "${workspaceFolder}/../../scripts/sql.sh"
},
"linux": {
"runtimeExecutable": "${workspaceFolder}/../../scripts/sql.sh"
},
"args": [
"--extensionDevelopmentPath=${workspaceFolder}"
],
"timeout": 20000
}
]
}

View File

@@ -1,29 +0,0 @@
# Unwanted compiled files
out/test/**
out/**/*.map
*.vsix
# Build/Source files
src/**
tasks/**
test/**
typings/**
packages/**
samples/**
.gitignore
tsconfig.json
# IDE Settings
.vscode/**
.vscode-test/**
.idea/**
.azuredatastudio/**
# Reference files
**/*.ts
**/*.map
.gitignore
tsconfig.json
*.exe
*.dat
gulpfile.js

View File

@@ -1,24 +0,0 @@
MICROSOFT SOFTWARE LICENSE TERMS
MICROSOFT Azure Data Studio
Microsoft Corporation ("Microsoft") grants you a nonexclusive, perpetual,
royalty-free right to use, copy, and modify the software code provided by us
("Software Code"). You may not sublicense the Software Code or any use of it
(except to your affiliates and to vendors to perform work on your behalf)
through distribution, network access, service agreement, lease, rental, or
otherwise. Unless applicable law gives you more rights, Microsoft reserves all
other rights not expressly granted herein, whether by implication, estoppel or
otherwise.
THE SOFTWARE CODE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
AND NONINFRINGEMENT. IN NO EVENT SHALL MICROSOFT OR ITS LICENSORS
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE
SAMPLE CODE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View File

@@ -1,409 +0,0 @@
{
"name": "server-report",
"displayName": "Server Reports",
"description": "Server Reports",
"version": "0.2.3",
"publisher": "Microsoft",
"preview": true,
"engines": {
"vscode": "^1.26.0",
"azdata": "*"
},
"icon": "images/extension.png",
"license": "SEE LICENSE IN LICENSE.txt",
"repository": "https://github.com/Microsoft/azuredatastudio",
"categories": [
"Other"
],
"activationEvents": [
"*"
],
"main": "./out/src/extension",
"forceReload": true,
"contributes": {
"commands": [
{
"command": "tempdb.startEvent",
"title": "Start",
"icon": {
"light": "./out/src/media/launch.svg",
"dark": "./out/src/media/launch_inverse.svg"
}
},
{
"command": "tempdb.stopEvent",
"title": "Stop",
"icon": {
"light": "./out/src/media/blocker.svg",
"dark": "./out/src/media/blocker_inverse.svg"
}
},
{
"command": "tempdb.contention",
"title": "Contention Help for Tempdb",
"icon": {
"light": "./out/src/media/documentation.svg",
"dark": "./out/src/media/documentation_inverse.svg"
}
},
{
"command": "tempdb.pauseEvent",
"title": "Toggle Auto Refresh",
"icon": {
"light": "./out/src/media/insights.svg",
"dark": "./out/src/media/insights_inverse.svg"
}
}
],
"configuration": [],
"views": {},
"menus": {},
"dashboard.tabs": [
{
"id": "Server-Reports",
"title": "Server Reports",
"description": "This extension shows useful reports for a server.",
"icon": "images/server_reports.svg",
"group": "monitoring",
"container": {
"nav-section": [
{
"id": "server-reports-monitoring",
"title": "Monitor",
"icon": {
"light": "./out/src/media/monitor.svg",
"dark": "./out/src/media/monitor_inverse.svg"
},
"container": {
"server-reports-monitoring-container": {}
}
},
{
"id": "server-reports-performance",
"title": "Performance",
"icon": {
"light": "./out/src/media/performance.svg",
"dark": "./out/src/media/performance_inverse.svg"
},
"container": {
"server-reports-performance-container": {}
}
}
]
}
},
{
"id": "server-reports-tempdb-tab",
"title": "TempDB",
"group": "monitoring",
"description": "TempDB reports",
"icon": {
"light": "./out/src/media/tempdb.svg",
"dark": "./out/src/media/tempdb_inverse.svg"
},
"container": {
"server-reports-tempdb-container": {}
}
}
],
"dashboard.insights": [
{
"id": "extension-dbspace-usage",
"contrib": {
"type": {
"horizontalBar": {
"dataDirection": "vertical",
"dataType": "number",
"legendPosition": "top",
"labelFirstColumn": false,
"columnsAsLabels": true
}
},
"queryFile": "./out/src/sql/all_db_space_used.sql"
}
},
{
"id": "extension-cpu-utilization",
"contrib": {
"type": {
"timeSeries": {
"dataDirection": "horizontal",
"dataType": "point",
"legendPosition": "top",
"labelFirstColumn": false,
"columnsAsLabels": false
}
},
"queryFile": "./out/src/sql/cpumetric.sql"
}
},
{
"id": "extension-backup-growth-trend",
"details": "Abbie wants it",
"contrib": {
"type": {
"timeSeries": {
"dataDirection": "horizontal",
"dataType": "point",
"legendPosition": "none",
"labelFirstColumn": false,
"columnsAsLabels": false
}
},
"queryFile": "./out/src/sql/backup_size_trend.sql"
}
},
{
"id": "extension-wait-counts-by-Paul-Randal",
"contrib": {
"type": {
"horizontalBar": {
"dataDirection": "vertical",
"dataType": "number",
"legendPosition": "none",
"labelFirstColumn": false,
"columnsAsLabels": true
}
},
"queryFile": "./out/src/sql/waits_paul_randal.sql",
"details": {
"queryFile": "./out/src/sql/waits_detail_paul_randal.sql",
"label": {
"column": "WaitType",
"state": []
},
"value": "Percentage"
}
}
},
{
"id": "extension-wait-resource-statistics",
"contrib": {
"type": {
"bar": {
"dataDirection": "horizontal",
"dataType": "number",
"legendPosition": "none",
"labelFirstColumn": false,
"columnsAsLabels": true
}
},
"queryFile": "./out/src/sql/wait_resources.sql",
"details": {
"queryFile": "./out/src/sql/wait_resources.sql",
"label": {
"column": "WaitType",
"state": []
},
"value": "Percentage"
}
}
},
{
"id": "extension-dbbuffer-usage",
"contrib": {
"type": {
"horizontalBar": {
"dataDirection": "vertical",
"dataType": "number",
"legendPosition": "top",
"labelFirstColumn": false,
"columnsAsLabels": true
}
},
"queryFile": "./out/src/sql/memorybydb.sql"
}
},
{
"id": "type-of-contention",
"contrib": {
"type": {
"bar": {
"dataDirection": "vertical",
"columnsAsLabels": true,
"labelFirstColumn": false,
"legendPosition": "none"
}
},
"queryFile": "./out/src/sql/typeofContentions.sql",
"autoRefreshInterval": 0.05
}
},
{
"id": "metadata-contention",
"contrib": {
"type": {
"bar": {
"dataDirection": "vertical",
"columnsAsLabels": true,
"labelFirstColumn": false,
"legendPosition": "none",
"xAxisLabel": "Object Ids for System Tables"
}
},
"queryFile": "./out/src/sql/metadataContention.sql",
"autoRefreshInterval": 0.05
}
},
{
"id": "allocation-contention",
"contrib": {
"type": {
"bar": {
"dataDirection": "vertical",
"columnsAsLabels": true,
"labelFirstColumn": false,
"legendPosition": "none",
"xAxisLabel": "Page Types"
}
},
"queryFile": "./out/src/sql/allocationContention.sql",
"autoRefreshInterval": 0.05
}
}
],
"dashboard.containers": [
{
"id": "server-reports-monitoring-container",
"container": {
"widgets-container": [
{
"name": "Top 10 DB Space Usage",
"gridItemConfig": {
"sizex": 2,
"sizey": 2
},
"widget": {
"extension-dbspace-usage": {}
}
},
{
"name": "Top 10 DB Buffer Usage",
"gridItemConfig": {
"sizex": 2,
"sizey": 2
},
"widget": {
"extension-dbbuffer-usage": {}
}
},
{
"name": "CPU Utilization",
"gridItemConfig": {
"sizex": 2,
"sizey": 1
},
"widget": {
"extension-cpu-utilization": {}
}
},
{
"name": "Backup Growth Trend",
"gridItemConfig": {
"sizex": 2,
"sizey": 1
},
"widget": {
"extension-backup-growth-trend": {}
}
}
]
}
},
{
"id": "server-reports-performance-container",
"container": {
"widgets-container": [
{
"name": "Wait Counts by Paul Randal",
"gridItemConfig": {
"sizex": 2,
"sizey": 2
},
"widget": {
"extension-wait-counts-by-Paul-Randal": {}
}
}
]
}
},
{
"id": "server-reports-tempdb-container",
"container": {
"widgets-container": [
{
"name": "Tasks",
"widget": {
"tasks-widget": [
"tempdb.startEvent",
"tempdb.contention",
"tempdb.pauseEvent",
"tempdb.stopEvent"
]
}
},
{
"name": "Overall Contention",
"gridItemConfig": {
"sizex": 2,
"sizey": 1
},
"widget": {
"type-of-contention": {}
}
},
{
"name": "Metadata Contention",
"gridItemConfig": {
"sizex": 2,
"sizey": 1
},
"widget": {
"metadata-contention": {}
}
},
{
"name": "Allocation Contention",
"gridItemConfig": {
"sizex": 2,
"sizey": 1
},
"widget": {
"allocation-contention": {}
}
}
]
}
}
],
"snippets": []
},
"scripts": {
"build": "gulp build",
"compile": "gulp compile",
"watch": "gulp watch",
"postinstall": "node ./node_modules/vscode/bin/install && node ./node_modules/azdata/bin/install"
},
"dependencies": {
"fs-extra": "^8.1.0",
"handlebars": "^4.5.3",
"openurl": "^1.1.1",
"vscode-nls": "^5.0.0"
},
"devDependencies": {
"azdata": "^1.0.0",
"child-process-promise": "^2.2.1",
"del": "^3.0.0",
"gulp": "^4.0.0",
"gulp-color": "0.0.1",
"gulp-sourcemaps": "^2.6.4",
"gulp-tslint": "^6.0.2",
"gulp-typescript": "^3.2.4",
"should": "^13.2.1",
"tslint": "^3.14.0",
"typemoq": "^2.1.0",
"typescript": "^2.9.2",
"vsce": "1.36.2",
"vscode": "^1.1.6"
}
}

View File

@@ -1,73 +0,0 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
'use strict';
let del = require('del');
let gulp = require('gulp');
let srcmap = require('gulp-sourcemaps');
let tslint = require('gulp-tslint');
let ts = require('gulp-typescript');
let cproc = require('child_process');
let os = require('os');
let config = require('./config');
let tsProject = ts.createProject('tsconfig.json');
// GULP TASKS //////////////////////////////////////////////////////////////
gulp.task('clean', function (done) {
return del('out', done);
});
gulp.task('lint', () => {
return gulp.src([
config.paths.project.root + '/src/**/*.ts'
])
.pipe((tslint({
formatter: 'verbose'
})))
.pipe(tslint.report());
});
gulp.task('compile:src', function (done) {
gulp.src([
config.paths.project.root + '/src/**/*.sql',
config.paths.project.root + '/src/**/*.svg',
config.paths.project.root + '/src/**/*.html'
]).pipe(gulp.dest('out/src/'));
let srcFiles = [
config.paths.project.root + '/src/**/*.ts',
config.paths.project.root + '/src/**/*.js',
config.paths.project.root + '/typings/**/*.ts'
];
return gulp.src(srcFiles)
.pipe(srcmap.init())
.pipe(tsProject())
.on('error', function () {
if (process.env.BUILDMACHINE) {
done('Failed to compile extension source, see above.');
process.exit(1);
}
})
.pipe(srcmap.write('.', {
sourceRoot: function (file) {
return file.cwd + '/src';
}
}))
.pipe(gulp.dest('out/src/'));
});
// COMPOSED GULP TASKS /////////////////////////////////////////////////////
gulp.task('compile', gulp.series('compile:src'));
gulp.task('build', gulp.series('clean', 'lint', 'compile'));
gulp.task('watch', function () {
gulp.watch([config.paths.project.root + '/src/**/*'],
gulp.series('build'));
});

View File

@@ -1,24 +0,0 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
var path = require('path');
var projectRoot = path.resolve(path.dirname(__dirname));
var srcRoot = path.resolve(projectRoot, 'src');
var localization = path.resolve(projectRoot, 'localization');
var config = {
paths: {
project: {
root: projectRoot,
localization: localization
},
extension: {
root: srcRoot
}
}
};
module.exports = config;

View File

@@ -1,16 +0,0 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"outDir": "out",
"lib": [
"es6"
],
"sourceMap": true,
"rootDir": "."
},
"exclude": [
"node_modules",
".vscode-test"
]
}

View File

@@ -1,123 +0,0 @@
{
"rules": {
"align": [
true,
"parameters",
"statements"
],
"ban": false,
"class-name": true,
"comment-format": [
true,
"check-space"
],
"curly": true,
"eofline": true,
"forin": true,
"indent": [
true,
"tabs"
],
"interface-name": true,
"jsdoc-format": true,
"label-position": true,
"label-undefined": true,
"max-line-length": [
true,
160
],
"member-access": false,
"member-ordering": false,
"no-any": false,
"no-arg": true,
"no-bitwise": true,
"no-conditional-assignment": true,
"no-consecutive-blank-lines": false,
"no-console": [
true,
"debug",
"info",
"time",
"timeEnd",
"trace"
],
"no-construct": true,
"no-constructor-vars": false,
"no-debugger": true,
"no-duplicate-key": true,
"no-duplicate-variable": true,
"no-empty": true,
"no-eval": true,
"no-inferrable-types": false,
"no-internal-module": true,
"no-null-keyword": true,
"no-require-imports": false,
"no-shadowed-variable": true,
"no-string-literal": false,
"no-switch-case-fall-through": false,
"no-trailing-whitespace": true,
"no-unreachable": true,
"no-unused-expression": false,
"no-unused-variable": true,
"no-use-before-declare": true,
"no-var-keyword": true,
"no-var-requires": false,
"object-literal-sort-keys": false,
"one-line": [
true,
"check-open-brace",
"check-catch",
"check-else",
"check-finally",
"check-whitespace"
],
"quotemark": [
true,
"single",
"avoid-escape"
],
"radix": true,
"semicolon": true,
"switch-default": true,
"trailing-comma": [
true,
{
"multiline": "never",
"singleline": "never"
}
],
"triple-equals": [
true,
"allow-null-check"
],
"typedef": [
true,
"call-signature",
"property-declaration"
],
"typedef-whitespace": [
true,
{
"call-signature": "nospace",
"index-signature": "nospace",
"parameter": "nospace",
"property-declaration": "nospace",
"variable-declaration": "nospace"
}
],
"use-strict": false,
"variable-name": [
true,
"allow-leading-underscore",
"ban-keywords"
],
"whitespace": [
true,
"check-branch",
"check-decl",
"check-operator",
"check-separator",
"check-type"
]
}
}

File diff suppressed because it is too large Load Diff