update server reports extension (#10165)

* update server reports extension

* add description
This commit is contained in:
Alan Ren
2020-04-27 10:51:01 -07:00
committed by GitHub
parent b202647090
commit 1d3568a2aa
10 changed files with 4772 additions and 6714 deletions

View File

@@ -54,3 +54,9 @@ We would like to thank all our users who raised issues, and in particular the fo
## What's new in Server Reports v1.1?
* Fixed DB Space Usage where it threw an error when database names contain special characters
* Changed DB Space Usage and DB Buffer Usage to show only top 10 data
## How to produce an extension installation package
Run the following commands sequentially in the context of this directory:
- `yarn install` - to install the dependencies
- `yarn build` - to build the code
- `vsce package` - to produce an extension installation package

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

@@ -0,0 +1 @@
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 18 18"><defs><style>.cls-1{fill:url(#linear-gradient);}.cls-2{fill:url(#linear-gradient-2);}.cls-3{fill:#fff;}.cls-4{fill:#c3f1ff;}.cls-5{fill:#50e6ff;}.cls-6{fill:#9cebff;}</style><linearGradient id="linear-gradient" x1="12.282" y1="11.436" x2="12.282" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#005ba1"/><stop offset="0.525" stop-color="#0074cd"/><stop offset="1" stop-color="#0078d4"/></linearGradient><linearGradient id="linear-gradient-2" x1="7.923" y1="18" x2="7.923" y2="3.129" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#0078d4"/><stop offset="0.16" stop-color="#1380da"/><stop offset="0.53" stop-color="#3c91e5"/><stop offset="0.82" stop-color="#559cec"/><stop offset="1" stop-color="#5ea0ef"/></linearGradient></defs><rect class="cls-1" x="6.564" width="11.436" height="11.436" rx="1"/><rect class="cls-2" y="3.129" width="15.846" height="14.871" rx="1"/><path class="cls-3" d="M9.31,7.449V4.311H8.48V8.123h2.27V7.449ZM2.72,5.908a1.722,1.722,0,0,1-.471-.286.405.405,0,0,1-.11-.3.313.313,0,0,1,.138-.277.63.63,0,0,1,.388-.11,1.5,1.5,0,0,1,.923.267V4.413a2.382,2.382,0,0,0-.923-.148,1.514,1.514,0,0,0-1.006.314,1,1,0,0,0-.388.821c0,.471.3.84.923,1.117a2.634,2.634,0,0,1,.572.332.39.39,0,0,1,.139.3.351.351,0,0,1-.148.286.747.747,0,0,1-.415.1,1.533,1.533,0,0,1-1.006-.387V8a2.01,2.01,0,0,0,.987.222,1.735,1.735,0,0,0,1.089-.3.994.994,0,0,0,.305-.84.972.972,0,0,0-.231-.646A2.227,2.227,0,0,0,2.72,5.908ZM7.557,7.375a2.16,2.16,0,0,0,.3-1.163,2.145,2.145,0,0,0-.3-.978,1.671,1.671,0,0,0-.646-.692,1.846,1.846,0,0,0-.923-.24,1.942,1.942,0,0,0-1,.249,1.717,1.717,0,0,0-.674.683,2.27,2.27,0,0,0-.24,1.052,2.094,2.094,0,0,0,.221.923,1.627,1.627,0,0,0,.637.683,1.9,1.9,0,0,0,.923.277l.794.923H7.769L6.634,8.077A1.654,1.654,0,0,0,7.557,7.375Zm-.923-.23a.871.871,0,0,1-.7.323.846.846,0,0,1-.7-.333,1.4,1.4,0,0,1-.268-.923,1.412,1.412,0,0,1,.268-.923.921.921,0,0,1,.72-.341.8.8,0,0,1,.692.341,1.5,1.5,0,0,1,.249.923A1.353,1.353,0,0,1,6.634,7.145Z"/><rect class="cls-4" x="10.218" y="11.745" width="1.729" height="5.088" rx="0.278"/><rect class="cls-5" x="12.677" y="9.248" width="1.729" height="7.584" rx="0.278"/><rect class="cls-6" x="7.758" y="10.374" width="1.729" height="6.458" rx="0.278"/></svg>

After

Width:  |  Height:  |  Size: 2.3 KiB

File diff suppressed because it is too large Load Diff

View File

@@ -1,403 +1,408 @@
{
"name": "server-report",
"displayName": "Server Reports",
"description": "Server Reports",
"version": "0.3.0",
"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": "Pause",
"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.",
"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",
"title": "TempDB",
"container": {
"server-reports-tempdb-container": {}
},
"icon": {
"light": "./out/src/media/tempdb.svg",
"dark": "./out/src/media/tempdb_inverse.svg"
}
}
]
}
}
],
"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"
},
"dependencies": {
"fs-extra": "^8.1.0",
"handlebars": "^4.5.3",
"openurl": "^1.1.1"
},
"devDependencies": {
"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"
}
"name": "server-report",
"displayName": "Server Reports",
"description": "Server Reports",
"version": "0.4.0",
"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": "Pause",
"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"
},
"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

@@ -29,10 +29,10 @@ export default class MainController extends ControllerBase {
}
public activate(): Promise<boolean> {
azdata.tasks.registerTask("tempdb.startEvent", e => this.onExecute(e, 'startEvent.sql'));
azdata.tasks.registerTask("tempdb.stopEvent", e => this.onExecute(e, 'stopEvent.sql'));
azdata.tasks.registerTask("tempdb.contention", () => this.openurl('https://aka.ms/tempdbblog'));
azdata.tasks.registerTask("tempdb.pauseEvent", e => this.stopAutoRefresh(e));
azdata.tasks.registerTask('tempdb.startEvent', e => this.onExecute(e, 'startEvent.sql'));
azdata.tasks.registerTask('tempdb.stopEvent', e => this.onExecute(e, 'stopEvent.sql'));
azdata.tasks.registerTask('tempdb.contention', () => this.openurl('https://aka.ms/tempdbblog'));
azdata.tasks.registerTask('tempdb.pauseEvent', e => this.stopAutoRefresh(e));
return Promise.resolve(true);
}
@@ -42,7 +42,7 @@ export default class MainController extends ControllerBase {
}
private onExecute(connection: azdata.IConnectionProfile, fileName: string): void {
//Command to start/stop autorefresh and run the query
// Command to start/stop autorefresh and run the query
vscode.commands.executeCommand('azdata.widget.setAutoRefreshState', 'type-of-contention', connection.id, true);
vscode.commands.executeCommand('azdata.widget.setAutoRefreshState', 'metadata-contention', connection.id, true);
vscode.commands.executeCommand('azdata.widget.setAutoRefreshState', 'allocation-contention', connection.id, true);
@@ -55,7 +55,7 @@ export default class MainController extends ControllerBase {
});
}
private stopAutoRefresh(connection: azdata.IConnectionProfile) {
private stopAutoRefresh(connection: azdata.IConnectionProfile): void {
vscode.commands.executeCommand('azdata.widget.setAutoRefreshState', 'type-of-contention', connection.id, false);
vscode.commands.executeCommand('azdata.widget.setAutoRefreshState', 'metadata-contention', connection.id, false);
vscode.commands.executeCommand('azdata.widget.setAutoRefreshState', 'allocation-contention', connection.id, false);

View File

@@ -1,8 +0,0 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
/// <reference path='../../../../src/sql/azdata.d.ts'/>
/// <reference path='../../../../src/sql/azdata.proposed.d.ts'/>
/// <reference types='@types/node'/>

View File

@@ -3,7 +3,7 @@
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
"use strict";
'use strict';
let del = require('del');
let gulp = require('gulp');
@@ -24,11 +24,10 @@ gulp.task('clean', function (done) {
gulp.task('lint', () => {
return gulp.src([
config.paths.project.root + '/src/**/*.ts',
config.paths.project.root + '/test/**/*.ts'
config.paths.project.root + '/src/**/*.ts'
])
.pipe((tslint({
formatter: "verbose"
formatter: 'verbose'
})))
.pipe(tslint.report());
});
@@ -55,69 +54,20 @@ gulp.task('compile:src', function (done) {
process.exit(1);
}
})
// TODO: Reinstate localization code
// .pipe(nls.rewriteLocalizeCalls())
// .pipe(nls.createAdditionalLanguageFiles(nls.coreLanguages, config.paths.project.root + '/localization/i18n', undefined, false))
.pipe(srcmap.write('.', { sourceRoot: function (file) { return file.cwd + '/src'; } }))
.pipe(srcmap.write('.', {
sourceRoot: function (file) {
return file.cwd + '/src';
}
}))
.pipe(gulp.dest('out/src/'));
});
gulp.task('compile:test', function (done) {
let srcFiles = [
config.paths.project.root + '/test/**/*.ts',
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 test source, see above.');
process.exit(1);
}
})
.pipe(srcmap.write('.', { sourceRoot: function (file) { return file.cwd + '/test'; } }))
.pipe(gulp.dest('out/test/'));
});
// COMPOSED GULP TASKS /////////////////////////////////////////////////////
gulp.task("compile", gulp.series("compile:src", "compile:test"));
gulp.task('compile', gulp.series('compile:src'));
gulp.task("build", gulp.series("clean", "lint", "compile"));
gulp.task('build', gulp.series('clean', 'lint', 'compile'));
gulp.task("watch", function () {
gulp.watch([config.paths.project.root + '/src/**/*',
config.paths.project.root + '/test/**/*.ts'],
gulp.task('watch', function () {
gulp.watch([config.paths.project.root + '/src/**/*'],
gulp.series('build'));
});
gulp.task('test', (done) => {
let workspace = process.env['WORKSPACE'];
if (!workspace) {
workspace = process.cwd();
}
process.env.JUNIT_REPORT_PATH = workspace + '/test-reports/ext_xunit.xml';
let azuredatastudioPath = 'azuredatastudio';
if (process.env['SQLOPS_DEV']) {
let suffix = os.platform === 'win32' ? 'bat' : 'sh';
azuredatastudioPath = `${process.env['SQLOPS_DEV']}/scripts/sql-cli.${suffix}`;
}
console.log(`Using SQLOPS Path of ${azuredatastudioPath}`);
cproc.exec(`${azuredatastudioPath} --extensionDevelopmentPath="${workspace}" --extensionTestsPath="${workspace}/out/test" --verbose`, (error, stdout, stderr) => {
if (error) {
console.error(`exec error: ${error}`);
process.exit(1);
}
console.log(`stdout: ${stdout}`);
console.log(`stderr: ${stderr}`);
done();
});
});
gulp.task('copytypings', function () {
return gulp.src(config.paths.project.root + '/../../src/sql/azdata.proposed.d.ts')
.pipe(gulp.dest('typings/'));
});

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1 @@
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 18 18"><defs><style>.cls-1{fill:url(#linear-gradient);}.cls-2{fill:url(#linear-gradient-2);}.cls-3{fill:#fff;}.cls-4{fill:#c3f1ff;}.cls-5{fill:#50e6ff;}.cls-6{fill:#9cebff;}</style><linearGradient id="linear-gradient" x1="12.282" y1="11.436" x2="12.282" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#005ba1"/><stop offset="0.525" stop-color="#0074cd"/><stop offset="1" stop-color="#0078d4"/></linearGradient><linearGradient id="linear-gradient-2" x1="7.923" y1="18" x2="7.923" y2="3.129" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#0078d4"/><stop offset="0.16" stop-color="#1380da"/><stop offset="0.53" stop-color="#3c91e5"/><stop offset="0.82" stop-color="#559cec"/><stop offset="1" stop-color="#5ea0ef"/></linearGradient></defs><rect class="cls-1" x="6.564" width="11.436" height="11.436" rx="1"/><rect class="cls-2" y="3.129" width="15.846" height="14.871" rx="1"/><path class="cls-3" d="M9.31,7.449V4.311H8.48V8.123h2.27V7.449ZM2.72,5.908a1.722,1.722,0,0,1-.471-.286.405.405,0,0,1-.11-.3.313.313,0,0,1,.138-.277.63.63,0,0,1,.388-.11,1.5,1.5,0,0,1,.923.267V4.413a2.382,2.382,0,0,0-.923-.148,1.514,1.514,0,0,0-1.006.314,1,1,0,0,0-.388.821c0,.471.3.84.923,1.117a2.634,2.634,0,0,1,.572.332.39.39,0,0,1,.139.3.351.351,0,0,1-.148.286.747.747,0,0,1-.415.1,1.533,1.533,0,0,1-1.006-.387V8a2.01,2.01,0,0,0,.987.222,1.735,1.735,0,0,0,1.089-.3.994.994,0,0,0,.305-.84.972.972,0,0,0-.231-.646A2.227,2.227,0,0,0,2.72,5.908ZM7.557,7.375a2.16,2.16,0,0,0,.3-1.163,2.145,2.145,0,0,0-.3-.978,1.671,1.671,0,0,0-.646-.692,1.846,1.846,0,0,0-.923-.24,1.942,1.942,0,0,0-1,.249,1.717,1.717,0,0,0-.674.683,2.27,2.27,0,0,0-.24,1.052,2.094,2.094,0,0,0,.221.923,1.627,1.627,0,0,0,.637.683,1.9,1.9,0,0,0,.923.277l.794.923H7.769L6.634,8.077A1.654,1.654,0,0,0,7.557,7.375Zm-.923-.23a.871.871,0,0,1-.7.323.846.846,0,0,1-.7-.333,1.4,1.4,0,0,1-.268-.923,1.412,1.412,0,0,1,.268-.923.921.921,0,0,1,.72-.341.8.8,0,0,1,.692.341,1.5,1.5,0,0,1,.249.923A1.353,1.353,0,0,1,6.634,7.145Z"/><rect class="cls-4" x="10.218" y="11.745" width="1.729" height="5.088" rx="0.278"/><rect class="cls-5" x="12.677" y="9.248" width="1.729" height="7.584" rx="0.278"/><rect class="cls-6" x="7.758" y="10.374" width="1.729" height="6.458" rx="0.278"/></svg>

After

Width:  |  Height:  |  Size: 2.3 KiB