mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
Add compile options to a few extensions (#8252)
* add compile options to a few extensions * move dep to dev dep * fix return types
This commit is contained in:
@@ -3,8 +3,6 @@
|
|||||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
import * as azdata from 'azdata';
|
import * as azdata from 'azdata';
|
||||||
import * as vscode from 'vscode';
|
import * as vscode from 'vscode';
|
||||||
|
|
||||||
@@ -26,7 +24,7 @@ export class ExtHostObjectExplorerNodeStub implements azdata.objectexplorer.Obje
|
|||||||
public metadata: azdata.ObjectMetadata;
|
public metadata: azdata.ObjectMetadata;
|
||||||
public errorMessage: string;
|
public errorMessage: string;
|
||||||
|
|
||||||
constructor(nodeName: string, nodeSchema: string, nodeType, parent: azdata.objectexplorer.ObjectExplorerNode) {
|
constructor(nodeName: string, nodeSchema: string, nodeType: string, parent: azdata.objectexplorer.ObjectExplorerNode) {
|
||||||
this.parent = parent;
|
this.parent = parent;
|
||||||
this.nodeType = nodeType;
|
this.nodeType = nodeType;
|
||||||
this.metadata = { metadataType: undefined, metadataTypeName: undefined, name: nodeName, schema: nodeSchema, urn: undefined };
|
this.metadata = { metadataType: undefined, metadataTypeName: undefined, name: nodeName, schema: nodeSchema, urn: undefined };
|
||||||
|
|||||||
@@ -3,8 +3,6 @@
|
|||||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
import * as should from 'should';
|
import * as should from 'should';
|
||||||
import 'mocha';
|
import 'mocha';
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
'use strict';
|
|
||||||
|
|
||||||
export interface IPackageInfo {
|
export interface IPackageInfo {
|
||||||
name: string;
|
name: string;
|
||||||
@@ -10,7 +9,7 @@ export interface IPackageInfo {
|
|||||||
aiKey: string;
|
aiKey: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getPackageInfo(packageJson: any): IPackageInfo {
|
export function getPackageInfo(packageJson: any): IPackageInfo | undefined {
|
||||||
if (packageJson) {
|
if (packageJson) {
|
||||||
return {
|
return {
|
||||||
name: packageJson.name,
|
name: packageJson.name,
|
||||||
@@ -18,6 +17,7 @@ export function getPackageInfo(packageJson: any): IPackageInfo {
|
|||||||
aiKey: packageJson.aiKey
|
aiKey: packageJson.aiKey
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
return undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -13,9 +13,7 @@
|
|||||||
"experimentalDecorators": true,
|
"experimentalDecorators": true,
|
||||||
"moduleResolution": "node",
|
"moduleResolution": "node",
|
||||||
"strict": false,
|
"strict": false,
|
||||||
"noImplicitAny": false,
|
|
||||||
"noUnusedParameters": false,
|
"noUnusedParameters": false,
|
||||||
"noImplicitReturns": false,
|
|
||||||
},
|
},
|
||||||
"exclude": [
|
"exclude": [
|
||||||
"node_modules"
|
"node_modules"
|
||||||
|
|||||||
@@ -3,8 +3,6 @@
|
|||||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
import * as azdata from 'azdata';
|
import * as azdata from 'azdata';
|
||||||
import { promises as fs } from 'fs';
|
import { promises as fs } from 'fs';
|
||||||
|
|
||||||
@@ -28,7 +26,7 @@ export class AgentUtils {
|
|||||||
return AgentUtils._agentService;
|
return AgentUtils._agentService;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static async getDatabases(ownerUri: string): Promise<string[]> {
|
public static async getDatabases(ownerUri: string): Promise<string[] | undefined> {
|
||||||
if (!AgentUtils._connectionService) {
|
if (!AgentUtils._connectionService) {
|
||||||
let currentConnection = await azdata.connection.getCurrentConnection();
|
let currentConnection = await azdata.connection.getCurrentConnection();
|
||||||
this._connectionService = azdata.dataprotocol.getProvider<azdata.ConnectionProvider>(currentConnection.providerId, azdata.DataProviderType.ConnectionProvider);
|
this._connectionService = azdata.dataprotocol.getProvider<azdata.ConnectionProvider>(currentConnection.providerId, azdata.DataProviderType.ConnectionProvider);
|
||||||
@@ -37,6 +35,7 @@ export class AgentUtils {
|
|||||||
if (result && result.databaseNames && result.databaseNames.length > 0) {
|
if (result && result.databaseNames && result.databaseNames.length > 0) {
|
||||||
return result.databaseNames;
|
return result.databaseNames;
|
||||||
}
|
}
|
||||||
|
return undefined;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
'use strict';
|
|
||||||
|
|
||||||
import * as nls from 'vscode-nls';
|
import * as nls from 'vscode-nls';
|
||||||
import * as vscode from 'vscode';
|
import * as vscode from 'vscode';
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
'use strict';
|
|
||||||
|
|
||||||
import * as nls from 'vscode-nls';
|
import * as nls from 'vscode-nls';
|
||||||
import * as azdata from 'azdata';
|
import * as azdata from 'azdata';
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
'use strict';
|
|
||||||
|
|
||||||
import * as azdata from 'azdata';
|
import * as azdata from 'azdata';
|
||||||
import * as nls from 'vscode-nls';
|
import * as nls from 'vscode-nls';
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
'use strict';
|
|
||||||
|
|
||||||
import * as nls from 'vscode-nls';
|
import * as nls from 'vscode-nls';
|
||||||
import * as azdata from 'azdata';
|
import * as azdata from 'azdata';
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
'use strict';
|
|
||||||
|
|
||||||
import * as azdata from 'azdata';
|
import * as azdata from 'azdata';
|
||||||
import { AgentUtils } from '../agentUtils';
|
import { AgentUtils } from '../agentUtils';
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
'use strict';
|
|
||||||
|
|
||||||
import * as azdata from 'azdata';
|
import * as azdata from 'azdata';
|
||||||
import { AgentUtils } from '../agentUtils';
|
import { AgentUtils } from '../agentUtils';
|
||||||
@@ -21,7 +20,7 @@ export class PickScheduleData implements IAgentDialogData {
|
|||||||
this.jobName = jobName;
|
this.jobName = jobName;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async initialize(): Promise<azdata.AgentJobScheduleInfo[]> {
|
public async initialize(): Promise<azdata.AgentJobScheduleInfo[] | undefined> {
|
||||||
let agentService = await AgentUtils.getAgentService();
|
let agentService = await AgentUtils.getAgentService();
|
||||||
try {
|
try {
|
||||||
let result = await agentService.getJobSchedules(this.ownerUri);
|
let result = await agentService.getJobSchedules(this.ownerUri);
|
||||||
@@ -30,6 +29,7 @@ export class PickScheduleData implements IAgentDialogData {
|
|||||||
this.schedules = result.schedules;
|
this.schedules = result.schedules;
|
||||||
return this.schedules;
|
return this.schedules;
|
||||||
}
|
}
|
||||||
|
return undefined;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
throw error;
|
throw error;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
'use strict';
|
|
||||||
|
|
||||||
import * as nls from 'vscode-nls';
|
import * as nls from 'vscode-nls';
|
||||||
import * as azdata from 'azdata';
|
import * as azdata from 'azdata';
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
'use strict';
|
|
||||||
|
|
||||||
import * as azdata from 'azdata';
|
import * as azdata from 'azdata';
|
||||||
import { AgentUtils } from '../agentUtils';
|
import { AgentUtils } from '../agentUtils';
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
'use strict';
|
|
||||||
|
|
||||||
import * as nls from 'vscode-nls';
|
import * as nls from 'vscode-nls';
|
||||||
import * as azdata from 'azdata';
|
import * as azdata from 'azdata';
|
||||||
@@ -31,9 +30,9 @@ export abstract class AgentDialog<T extends IAgentDialogData> {
|
|||||||
return this.model.dialogMode;
|
return this.model.dialogMode;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected abstract async updateModel();
|
protected abstract async updateModel(): Promise<void>;
|
||||||
|
|
||||||
protected abstract async initializeDialog(dialog: azdata.window.Dialog);
|
protected abstract async initializeDialog(dialog: azdata.window.Dialog): Promise<void>;
|
||||||
|
|
||||||
public async openDialog(dialogName?: string) {
|
public async openDialog(dialogName?: string) {
|
||||||
if (!this._isOpen) {
|
if (!this._isOpen) {
|
||||||
|
|||||||
@@ -3,8 +3,6 @@
|
|||||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
import * as nls from 'vscode-nls';
|
import * as nls from 'vscode-nls';
|
||||||
import * as azdata from 'azdata';
|
import * as azdata from 'azdata';
|
||||||
import { AgentDialog } from './agentDialog';
|
import { AgentDialog } from './agentDialog';
|
||||||
@@ -112,7 +110,6 @@ export class AlertDialog extends AgentDialog<AlertData> {
|
|||||||
private static readonly IncludeErrorInEmailCheckBoxLabel: string = localize('alertDialog.IncludeErrorInEmail', "Include alert error text in e-mail");
|
private static readonly IncludeErrorInEmailCheckBoxLabel: string = localize('alertDialog.IncludeErrorInEmail', "Include alert error text in e-mail");
|
||||||
private static readonly IncludeErrorInPagerCheckBoxLabel: string = localize('alertDialog.IncludeErrorInPager', "Include alert error text in pager");
|
private static readonly IncludeErrorInPagerCheckBoxLabel: string = localize('alertDialog.IncludeErrorInPager', "Include alert error text in pager");
|
||||||
private static readonly AdditionalMessageTextBoxLabel: string = localize('alertDialog.AdditionalNotification', "Additional notification message to send");
|
private static readonly AdditionalMessageTextBoxLabel: string = localize('alertDialog.AdditionalNotification', "Additional notification message to send");
|
||||||
private static readonly DelayBetweenResponsesTextBoxLabel: string = localize('alertDialog.DelayBetweenResponse', "Delay between responses");
|
|
||||||
private static readonly DelayMinutesTextBoxLabel: string = localize('alertDialog.DelayMinutes', "Delay Minutes");
|
private static readonly DelayMinutesTextBoxLabel: string = localize('alertDialog.DelayMinutes', "Delay Minutes");
|
||||||
private static readonly DelaySecondsTextBoxLabel: string = localize('alertDialog.DelaySeconds', "Delay Seconds");
|
private static readonly DelaySecondsTextBoxLabel: string = localize('alertDialog.DelaySeconds', "Delay Seconds");
|
||||||
|
|
||||||
@@ -526,7 +523,7 @@ export class AlertDialog extends AgentDialog<AlertData> {
|
|||||||
return severityNumber;
|
return severityNumber;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected updateModel() {
|
protected async updateModel(): Promise<void> {
|
||||||
this.model.name = this.nameTextBox.value;
|
this.model.name = this.nameTextBox.value;
|
||||||
this.model.isEnabled = this.enabledCheckBox.checked;
|
this.model.isEnabled = this.enabledCheckBox.checked;
|
||||||
this.model.jobId = this.jobId;
|
this.model.jobId = this.jobId;
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
'use strict';
|
|
||||||
import * as nls from 'vscode-nls';
|
import * as nls from 'vscode-nls';
|
||||||
import * as azdata from 'azdata';
|
import * as azdata from 'azdata';
|
||||||
import { JobData } from '../data/jobData';
|
import { JobData } from '../data/jobData';
|
||||||
@@ -59,7 +59,6 @@ export class JobDialog extends AgentDialog<JobData> {
|
|||||||
// Schedules tab strings
|
// Schedules tab strings
|
||||||
private readonly SchedulesTopLabelString: string = localize('jobDialog.schedulesaLabel', "Schedules list");
|
private readonly SchedulesTopLabelString: string = localize('jobDialog.schedulesaLabel', "Schedules list");
|
||||||
private readonly PickScheduleButtonString: string = localize('jobDialog.pickSchedule', "Pick Schedule");
|
private readonly PickScheduleButtonString: string = localize('jobDialog.pickSchedule', "Pick Schedule");
|
||||||
private readonly ScheduleNameLabelString: string = localize('jobDialog.scheduleNameLabel', "Schedule Name");
|
|
||||||
|
|
||||||
// Alerts tab strings
|
// Alerts tab strings
|
||||||
private readonly AlertsTopLabelString: string = localize('jobDialog.alertsList', "Alerts list");
|
private readonly AlertsTopLabelString: string = localize('jobDialog.alertsList', "Alerts list");
|
||||||
@@ -98,7 +97,6 @@ export class JobDialog extends AgentDialog<JobData> {
|
|||||||
private removeScheduleButton: azdata.ButtonComponent;
|
private removeScheduleButton: azdata.ButtonComponent;
|
||||||
|
|
||||||
// Notifications tab controls
|
// Notifications tab controls
|
||||||
private notificationsTabTopLabel: azdata.TextComponent;
|
|
||||||
private emailCheckBox: azdata.CheckBoxComponent;
|
private emailCheckBox: azdata.CheckBoxComponent;
|
||||||
private emailOperatorDropdown: azdata.DropDownComponent;
|
private emailOperatorDropdown: azdata.DropDownComponent;
|
||||||
private emailConditionDropdown: azdata.DropDownComponent;
|
private emailConditionDropdown: azdata.DropDownComponent;
|
||||||
@@ -549,7 +547,6 @@ export class JobDialog extends AgentDialog<JobData> {
|
|||||||
private initializeNotificationsTab() {
|
private initializeNotificationsTab() {
|
||||||
this.notificationsTab.registerContent(async view => {
|
this.notificationsTab.registerContent(async view => {
|
||||||
|
|
||||||
this.notificationsTabTopLabel = view.modelBuilder.text().withProperties({ value: this.NotificationsTabTopLabelString }).component();
|
|
||||||
this.emailCheckBox = view.modelBuilder.checkBox().withProperties({
|
this.emailCheckBox = view.modelBuilder.checkBox().withProperties({
|
||||||
label: this.EmailCheckBoxString,
|
label: this.EmailCheckBoxString,
|
||||||
width: 80
|
width: 80
|
||||||
@@ -652,10 +649,10 @@ export class JobDialog extends AgentDialog<JobData> {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private convertStepsToData(jobSteps: azdata.AgentJobStepInfo[]): any[][] {
|
private convertStepsToData(jobSteps: azdata.AgentJobStepInfo[]): Array<string | number>[] {
|
||||||
let result = [];
|
let result: Array<string | number>[] = [];
|
||||||
jobSteps.forEach(jobStep => {
|
jobSteps.forEach(jobStep => {
|
||||||
let cols = [];
|
let cols: Array<string | number> = [];
|
||||||
cols.push(jobStep.id);
|
cols.push(jobStep.id);
|
||||||
cols.push(jobStep.stepName);
|
cols.push(jobStep.stepName);
|
||||||
cols.push(JobStepData.convertToSubSystemDisplayName(jobStep.subSystem));
|
cols.push(JobStepData.convertToSubSystemDisplayName(jobStep.subSystem));
|
||||||
@@ -666,8 +663,8 @@ export class JobDialog extends AgentDialog<JobData> {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
private convertSchedulesToData(jobSchedules: azdata.AgentJobScheduleInfo[]): any[][] {
|
private convertSchedulesToData(jobSchedules: azdata.AgentJobScheduleInfo[]): Array<string | number>[] {
|
||||||
let result = [];
|
let result: Array<string | number>[] = [];
|
||||||
jobSchedules.forEach(schedule => {
|
jobSchedules.forEach(schedule => {
|
||||||
let cols = [];
|
let cols = [];
|
||||||
cols.push(schedule.id);
|
cols.push(schedule.id);
|
||||||
@@ -678,8 +675,8 @@ export class JobDialog extends AgentDialog<JobData> {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
private convertAlertsToData(alerts: azdata.AgentAlertInfo[]): any[][] {
|
private convertAlertsToData(alerts: azdata.AgentAlertInfo[]): Array<string | boolean>[] {
|
||||||
let result = [];
|
let result: Array<string | boolean>[] = [];
|
||||||
alerts.forEach(alert => {
|
alerts.forEach(alert => {
|
||||||
let cols = [];
|
let cols = [];
|
||||||
cols.push(alert.name);
|
cols.push(alert.name);
|
||||||
@@ -690,7 +687,7 @@ export class JobDialog extends AgentDialog<JobData> {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected updateModel() {
|
protected async updateModel(): Promise<void> {
|
||||||
this.model.name = this.nameTextBox.value;
|
this.model.name = this.nameTextBox.value;
|
||||||
this.model.owner = this.ownerTextBox.value;
|
this.model.owner = this.ownerTextBox.value;
|
||||||
this.model.enabled = this.enabledCheckBox.checked;
|
this.model.enabled = this.enabledCheckBox.checked;
|
||||||
|
|||||||
@@ -2,16 +2,15 @@
|
|||||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
'use strict';
|
|
||||||
import * as nls from 'vscode-nls';
|
import * as nls from 'vscode-nls';
|
||||||
import * as azdata from 'azdata';
|
import * as azdata from 'azdata';
|
||||||
import * as vscode from 'vscode';
|
|
||||||
import { JobStepData } from '../data/jobStepData';
|
import { JobStepData } from '../data/jobStepData';
|
||||||
import { AgentUtils } from '../agentUtils';
|
import { AgentUtils } from '../agentUtils';
|
||||||
import { JobData } from '../data/jobData';
|
import { JobData } from '../data/jobData';
|
||||||
import { AgentDialog } from './agentDialog';
|
import { AgentDialog } from './agentDialog';
|
||||||
import { AgentDialogMode } from '../interfaces';
|
import { AgentDialogMode } from '../interfaces';
|
||||||
const path = require('path');
|
import * as path from 'path';
|
||||||
|
|
||||||
const localize = nls.loadMessageBundle();
|
const localize = nls.loadMessageBundle();
|
||||||
|
|
||||||
@@ -153,7 +152,7 @@ export class JobStepDialog extends AgentDialog<JobStepData> {
|
|||||||
this.dialog.content = [this.generalTab, this.advancedTab];
|
this.dialog.content = [this.generalTab, this.advancedTab];
|
||||||
}
|
}
|
||||||
|
|
||||||
private createCommands(view, queryProvider: azdata.QueryProvider) {
|
private createCommands(view: azdata.ModelView, queryProvider: azdata.QueryProvider) {
|
||||||
this.openButton = view.modelBuilder.button()
|
this.openButton = view.modelBuilder.button()
|
||||||
.withProperties({
|
.withProperties({
|
||||||
label: this.OpenCommandText,
|
label: this.OpenCommandText,
|
||||||
@@ -396,9 +395,9 @@ export class JobStepDialog extends AgentDialog<JobStepData> {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private createRetryCounters(view) {
|
private createRetryCounters(view: azdata.ModelView) {
|
||||||
this.retryAttemptsBox = view.modelBuilder.inputBox()
|
this.retryAttemptsBox = view.modelBuilder.inputBox()
|
||||||
.withValidation(component => component.value >= 0)
|
.withValidation(component => Number(component.value) >= 0)
|
||||||
.withProperties({
|
.withProperties({
|
||||||
inputType: 'number',
|
inputType: 'number',
|
||||||
width: '100%',
|
width: '100%',
|
||||||
@@ -406,7 +405,7 @@ export class JobStepDialog extends AgentDialog<JobStepData> {
|
|||||||
})
|
})
|
||||||
.component();
|
.component();
|
||||||
this.retryIntervalBox = view.modelBuilder.inputBox()
|
this.retryIntervalBox = view.modelBuilder.inputBox()
|
||||||
.withValidation(component => component.value >= 0)
|
.withValidation(component => Number(component.value) >= 0)
|
||||||
.withProperties({
|
.withProperties({
|
||||||
inputType: 'number',
|
inputType: 'number',
|
||||||
width: '100%',
|
width: '100%',
|
||||||
@@ -491,7 +490,7 @@ export class JobStepDialog extends AgentDialog<JobStepData> {
|
|||||||
azdata.window.openDialog(this.fileBrowserDialog);
|
azdata.window.openDialog(this.fileBrowserDialog);
|
||||||
}
|
}
|
||||||
|
|
||||||
private createTSQLOptions(view) {
|
private createTSQLOptions(view: azdata.ModelView) {
|
||||||
this.outputFileBrowserButton = view.modelBuilder.button()
|
this.outputFileBrowserButton = view.modelBuilder.button()
|
||||||
.withProperties({ width: '20px', label: '...' }).component();
|
.withProperties({ width: '20px', label: '...' }).component();
|
||||||
this.outputFileBrowserButton.onDidClick(() => this.openFileBrowserDialog());
|
this.outputFileBrowserButton.onDidClick(() => this.openFileBrowserDialog());
|
||||||
@@ -536,7 +535,7 @@ export class JobStepDialog extends AgentDialog<JobStepData> {
|
|||||||
return outputFileForm;
|
return outputFileForm;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected updateModel() {
|
protected async updateModel(): Promise<void> {
|
||||||
this.model.stepName = this.nameTextBox.value;
|
this.model.stepName = this.nameTextBox.value;
|
||||||
if (!this.model.stepName || this.model.stepName.length === 0) {
|
if (!this.model.stepName || this.model.stepName.length === 0) {
|
||||||
this.dialog.message = this.dialog.message = { text: this.BlankStepNameErrorText };
|
this.dialog.message = this.dialog.message = { text: this.BlankStepNameErrorText };
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
'use strict';
|
|
||||||
import * as nls from 'vscode-nls';
|
import * as nls from 'vscode-nls';
|
||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
import * as azdata from 'azdata';
|
import * as azdata from 'azdata';
|
||||||
@@ -17,7 +17,6 @@ const localize = nls.loadMessageBundle();
|
|||||||
const CreateDialogTitle: string = localize('notebookDialog.newJob', "New Notebook Job");
|
const CreateDialogTitle: string = localize('notebookDialog.newJob', "New Notebook Job");
|
||||||
const EditDialogTitle: string = localize('notebookDialog.editJob', "Edit Notebook Job");
|
const EditDialogTitle: string = localize('notebookDialog.editJob', "Edit Notebook Job");
|
||||||
const GeneralTabText: string = localize('notebookDialog.general', "General");
|
const GeneralTabText: string = localize('notebookDialog.general', "General");
|
||||||
const BlankJobNameErrorText: string = localize('notebookDialog.blankJobNameError', "The name of the job cannot be blank.");
|
|
||||||
|
|
||||||
// Notebook details strings
|
// Notebook details strings
|
||||||
const NotebookDetailsSeparatorTitle: string = localize('notebookDialog.notebookSection', "Notebook Details");
|
const NotebookDetailsSeparatorTitle: string = localize('notebookDialog.notebookSection', "Notebook Details");
|
||||||
@@ -33,7 +32,6 @@ const OwnerTextBoxLabel: string = localize('notebookDialog.owner', "Owner");
|
|||||||
const SchedulesTopLabelString: string = localize('notebookDialog.schedulesaLabel', "Schedules list");
|
const SchedulesTopLabelString: string = localize('notebookDialog.schedulesaLabel', "Schedules list");
|
||||||
const PickScheduleButtonString: string = localize('notebookDialog.pickSchedule', "Pick Schedule");
|
const PickScheduleButtonString: string = localize('notebookDialog.pickSchedule', "Pick Schedule");
|
||||||
const RemoveScheduleButtonString: string = localize('notebookDialog.removeSchedule', "Remove Schedule");
|
const RemoveScheduleButtonString: string = localize('notebookDialog.removeSchedule', "Remove Schedule");
|
||||||
const ScheduleNameLabelString: string = localize('notebookDialog.scheduleNameLabel', "Schedule Name");
|
|
||||||
const DescriptionTextBoxLabel: string = localize('notebookDialog.description', "Description");
|
const DescriptionTextBoxLabel: string = localize('notebookDialog.description', "Description");
|
||||||
|
|
||||||
// Event Name strings
|
// Event Name strings
|
||||||
@@ -69,7 +67,6 @@ export class NotebookDialog extends AgentDialog<NotebookData> {
|
|||||||
private isEdit: boolean = false;
|
private isEdit: boolean = false;
|
||||||
|
|
||||||
// Job objects
|
// Job objects
|
||||||
private steps: azdata.AgentJobStepInfo[];
|
|
||||||
private schedules: azdata.AgentJobScheduleInfo[];
|
private schedules: azdata.AgentJobScheduleInfo[];
|
||||||
|
|
||||||
constructor(ownerUri: string, options: NotebookDialogOptions = undefined) {
|
constructor(ownerUri: string, options: NotebookDialogOptions = undefined) {
|
||||||
@@ -77,7 +74,6 @@ export class NotebookDialog extends AgentDialog<NotebookData> {
|
|||||||
ownerUri,
|
ownerUri,
|
||||||
new NotebookData(ownerUri, options),
|
new NotebookData(ownerUri, options),
|
||||||
options.notebookInfo ? EditDialogTitle : CreateDialogTitle);
|
options.notebookInfo ? EditDialogTitle : CreateDialogTitle);
|
||||||
this.steps = this.model.jobSteps ? this.model.jobSteps : [];
|
|
||||||
this.schedules = this.model.jobSchedules ? this.model.jobSchedules : [];
|
this.schedules = this.model.jobSchedules ? this.model.jobSchedules : [];
|
||||||
this.isEdit = options.notebookInfo ? true : false;
|
this.isEdit = options.notebookInfo ? true : false;
|
||||||
this.dialogName = this.isEdit ? EditJobDialogEvent : NewJobDialogEvent;
|
this.dialogName = this.isEdit ? EditJobDialogEvent : NewJobDialogEvent;
|
||||||
@@ -280,10 +276,6 @@ export class NotebookDialog extends AgentDialog<NotebookData> {
|
|||||||
else {
|
else {
|
||||||
this.templateFilePathBox.required = true;
|
this.templateFilePathBox.required = true;
|
||||||
}
|
}
|
||||||
let idx: number = undefined;
|
|
||||||
if (this.model.category && this.model.category !== '') {
|
|
||||||
idx = this.model.jobCategories.indexOf(this.model.category);
|
|
||||||
}
|
|
||||||
this.descriptionTextBox.value = this.model.description;
|
this.descriptionTextBox.value = this.model.description;
|
||||||
this.openTemplateFileButton.onDidClick(e => {
|
this.openTemplateFileButton.onDidClick(e => {
|
||||||
});
|
});
|
||||||
@@ -298,14 +290,8 @@ export class NotebookDialog extends AgentDialog<NotebookData> {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private createRowContainer(view: azdata.ModelView): azdata.FlexBuilder {
|
private convertSchedulesToData(jobSchedules: azdata.AgentJobScheduleInfo[]): Array<string | number>[] {
|
||||||
return view.modelBuilder.flexContainer().withLayout({
|
let result: Array<string | number>[] = [];
|
||||||
flexFlow: 'row',
|
|
||||||
justifyContent: 'space-between'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
private convertSchedulesToData(jobSchedules: azdata.AgentJobScheduleInfo[]): any[][] {
|
|
||||||
let result = [];
|
|
||||||
jobSchedules.forEach(schedule => {
|
jobSchedules.forEach(schedule => {
|
||||||
let cols = [];
|
let cols = [];
|
||||||
cols.push(schedule.id);
|
cols.push(schedule.id);
|
||||||
@@ -316,7 +302,7 @@ export class NotebookDialog extends AgentDialog<NotebookData> {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected updateModel() {
|
protected async updateModel(): Promise<void> {
|
||||||
this.model.name = this.nameTextBox.value;
|
this.model.name = this.nameTextBox.value;
|
||||||
this.model.owner = this.ownerTextBox.value;
|
this.model.owner = this.ownerTextBox.value;
|
||||||
this.model.description = this.descriptionTextBox.value;
|
this.model.description = this.descriptionTextBox.value;
|
||||||
|
|||||||
@@ -3,10 +3,7 @@
|
|||||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
import * as azdata from 'azdata';
|
import * as azdata from 'azdata';
|
||||||
import * as vscode from 'vscode';
|
|
||||||
import { OperatorData } from '../data/operatorData';
|
import { OperatorData } from '../data/operatorData';
|
||||||
import * as nls from 'vscode-nls';
|
import * as nls from 'vscode-nls';
|
||||||
import { AgentDialog } from './agentDialog';
|
import { AgentDialog } from './agentDialog';
|
||||||
@@ -409,7 +406,7 @@ export class OperatorDialog extends AgentDialog<OperatorData> {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
protected updateModel() {
|
protected async updateModel(): Promise<void> {
|
||||||
this.model.name = this.nameTextBox.value;
|
this.model.name = this.nameTextBox.value;
|
||||||
this.model.enabled = this.enabledCheckBox.checked;
|
this.model.enabled = this.enabledCheckBox.checked;
|
||||||
this.model.emailAddress = this.emailNameTextBox.value;
|
this.model.emailAddress = this.emailNameTextBox.value;
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
'use strict';
|
|
||||||
import * as nls from 'vscode-nls';
|
import * as nls from 'vscode-nls';
|
||||||
import * as azdata from 'azdata';
|
import * as azdata from 'azdata';
|
||||||
import * as vscode from 'vscode';
|
import * as vscode from 'vscode';
|
||||||
|
|||||||
@@ -3,8 +3,6 @@
|
|||||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
import * as nls from 'vscode-nls';
|
import * as nls from 'vscode-nls';
|
||||||
import * as azdata from 'azdata';
|
import * as azdata from 'azdata';
|
||||||
import { AgentDialog } from './agentDialog';
|
import { AgentDialog } from './agentDialog';
|
||||||
@@ -34,7 +32,6 @@ export class ProxyDialog extends AgentDialog<ProxyData> {
|
|||||||
private static readonly SSASCommandLabel: string = localize('createProxy.SSASCommandLabel', "SQL Server Analysis Services Command");
|
private static readonly SSASCommandLabel: string = localize('createProxy.SSASCommandLabel', "SQL Server Analysis Services Command");
|
||||||
private static readonly SSISPackageLabel: string = localize('createProxy.SSISPackage', "SQL Server Integration Services Package");
|
private static readonly SSISPackageLabel: string = localize('createProxy.SSISPackage', "SQL Server Integration Services Package");
|
||||||
private static readonly PowerShellLabel: string = localize('createProxy.PowerShell', "PowerShell");
|
private static readonly PowerShellLabel: string = localize('createProxy.PowerShell', "PowerShell");
|
||||||
private static readonly SubSystemHeadingLabel: string = localize('createProxy.subSystemHeading', "Active to the following subsytems");
|
|
||||||
|
|
||||||
private readonly NewProxyDialog = 'NewProxyDialogOpened';
|
private readonly NewProxyDialog = 'NewProxyDialogOpened';
|
||||||
private readonly EditProxyDialog = 'EditProxyDialogOpened';
|
private readonly EditProxyDialog = 'EditProxyDialogOpened';
|
||||||
@@ -189,7 +186,7 @@ export class ProxyDialog extends AgentDialog<ProxyData> {
|
|||||||
label: ProxyDialog.PowerShellLabel
|
label: ProxyDialog.PowerShellLabel
|
||||||
}).component();
|
}).component();
|
||||||
|
|
||||||
let checkBoxContainer = view.modelBuilder.groupContainer()
|
view.modelBuilder.groupContainer()
|
||||||
.withItems([this.operatingSystemCheckBox, this.replicationSnapshotCheckBox,
|
.withItems([this.operatingSystemCheckBox, this.replicationSnapshotCheckBox,
|
||||||
this.replicationTransactionLogCheckBox, this.replicationDistributorCheckBox, this.replicationMergeCheckbox,
|
this.replicationTransactionLogCheckBox, this.replicationDistributorCheckBox, this.replicationMergeCheckbox,
|
||||||
this.replicationQueueReaderCheckbox, this.sqlQueryCheckBox, this.sqlCommandCheckBox, this.sqlIntegrationServicesPackageCheckbox,
|
this.replicationQueueReaderCheckbox, this.sqlQueryCheckBox, this.sqlCommandCheckBox, this.sqlIntegrationServicesPackageCheckbox,
|
||||||
@@ -217,7 +214,7 @@ export class ProxyDialog extends AgentDialog<ProxyData> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
protected updateModel() {
|
protected async updateModel(): Promise<void> {
|
||||||
this.model.accountName = this.proxyNameTextBox.value;
|
this.model.accountName = this.proxyNameTextBox.value;
|
||||||
this.model.credentialName = this.credentialNameDropDown.value as string;
|
this.model.credentialName = this.credentialNameDropDown.value as string;
|
||||||
this.model.credentialId = this.credentials.find(
|
this.model.credentialId = this.credentials.find(
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
'use strict';
|
|
||||||
import * as nls from 'vscode-nls';
|
import * as nls from 'vscode-nls';
|
||||||
import * as azdata from 'azdata';
|
import * as azdata from 'azdata';
|
||||||
import * as vscode from 'vscode';
|
import * as vscode from 'vscode';
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
'use strict';
|
|
||||||
|
|
||||||
import * as nls from 'vscode-nls';
|
import * as nls from 'vscode-nls';
|
||||||
import * as azdata from 'azdata';
|
import * as azdata from 'azdata';
|
||||||
@@ -36,7 +35,6 @@ export class MainController {
|
|||||||
|
|
||||||
protected _context: vscode.ExtensionContext;
|
protected _context: vscode.ExtensionContext;
|
||||||
private jobDialog: JobDialog;
|
private jobDialog: JobDialog;
|
||||||
private jobStepDialog: JobStepDialog;
|
|
||||||
private alertDialog: AlertDialog;
|
private alertDialog: AlertDialog;
|
||||||
private operatorDialog: OperatorDialog;
|
private operatorDialog: OperatorDialog;
|
||||||
private proxyDialog: ProxyDialog;
|
private proxyDialog: ProxyDialog;
|
||||||
@@ -204,13 +202,6 @@ export class MainController {
|
|||||||
connection = await azdata.connection.openConnectionDialog();
|
connection = await azdata.connection.openConnectionDialog();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
let sqlConnectionsPresent: boolean;
|
|
||||||
for (let i = 0; i < connections.length; i++) {
|
|
||||||
if (connections[i].providerName === 'MSSQL') {
|
|
||||||
sqlConnectionsPresent = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
let connectionNames: azdata.connection.Connection[] = [];
|
let connectionNames: azdata.connection.Connection[] = [];
|
||||||
let connectionDisplayString: string[] = [];
|
let connectionDisplayString: string[] = [];
|
||||||
for (let i = 0; i < connections.length; i++) {
|
for (let i = 0; i < connections.length; i++) {
|
||||||
|
|||||||
@@ -2,16 +2,13 @@
|
|||||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
'use strict';
|
|
||||||
|
|
||||||
import * as should from 'should';
|
import * as should from 'should';
|
||||||
import * as TypeMoq from 'typemoq';
|
import * as TypeMoq from 'typemoq';
|
||||||
import 'mocha';
|
import 'mocha';
|
||||||
import * as azdata from 'azdata';
|
import * as azdata from 'azdata';
|
||||||
import { JobData } from '../../data/jobData';
|
|
||||||
|
|
||||||
const testOwnerUri = 'agent://testuri';
|
const testOwnerUri = 'agent://testuri';
|
||||||
let mockJobData: TypeMoq.IMock<JobData>;
|
|
||||||
let mockAgentService: TypeMoq.IMock<azdata.AgentServicesProvider>;
|
let mockAgentService: TypeMoq.IMock<azdata.AgentServicesProvider>;
|
||||||
|
|
||||||
describe('Agent extension create job objects', function (): void {
|
describe('Agent extension create job objects', function (): void {
|
||||||
@@ -37,7 +34,6 @@ describe('Agent extension create job objects', function (): void {
|
|||||||
should.strictEqual(createJobResult, undefined);
|
should.strictEqual(createJobResult, undefined);
|
||||||
createJobResult = mockAgentService.object.createJob(testOwnerUri, TypeMoq.It.isAny());
|
createJobResult = mockAgentService.object.createJob(testOwnerUri, TypeMoq.It.isAny());
|
||||||
should.notEqual(createJobResult, undefined);
|
should.notEqual(createJobResult, undefined);
|
||||||
mockJobData = TypeMoq.Mock.ofType<JobData>(JobData, TypeMoq.MockBehavior.Loose, false, [TypeMoq.It.isAnyString(), undefined, mockAgentService]);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Create Alert Data', async () => {
|
it('Create Alert Data', async () => {
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
'use strict';
|
|
||||||
|
|
||||||
import 'mocha';
|
import 'mocha';
|
||||||
import * as should from 'should';
|
import * as should from 'should';
|
||||||
|
|||||||
@@ -10,10 +10,7 @@
|
|||||||
"experimentalDecorators": true,
|
"experimentalDecorators": true,
|
||||||
"moduleResolution": "node",
|
"moduleResolution": "node",
|
||||||
"strict": false,
|
"strict": false,
|
||||||
"noImplicitAny": false,
|
"noUnusedParameters": false
|
||||||
"noUnusedParameters": false,
|
|
||||||
"noImplicitReturns": false,
|
|
||||||
"noUnusedLocals": false,
|
|
||||||
},
|
},
|
||||||
"exclude": [
|
"exclude": [
|
||||||
"node_modules"
|
"node_modules"
|
||||||
|
|||||||
@@ -159,6 +159,7 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/kerberos": "^1.1.0",
|
"@types/kerberos": "^1.1.0",
|
||||||
|
"@types/request": "^2.48.3",
|
||||||
"vscode": "^1.1.36"
|
"vscode": "^1.1.36"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,17 +3,15 @@
|
|||||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
import * as azdata from 'azdata';
|
import * as azdata from 'azdata';
|
||||||
import * as vscode from 'vscode';
|
import * as vscode from 'vscode';
|
||||||
import * as nls from 'vscode-nls';
|
import * as nls from 'vscode-nls';
|
||||||
import { ClusterController, ControllerError } from '../controller/clusterControllerApi';
|
import { ClusterController, ControllerError } from '../controller/clusterControllerApi';
|
||||||
import { ControllerTreeDataProvider } from '../tree/controllerTreeDataProvider';
|
import { ControllerTreeDataProvider } from '../tree/controllerTreeDataProvider';
|
||||||
import { TreeNode } from '../tree/treeNode';
|
|
||||||
import { AuthType } from '../constants';
|
import { AuthType } from '../constants';
|
||||||
import { ManageControllerCommand } from '../../extension';
|
import { ManageControllerCommand } from '../../extension';
|
||||||
import { BdcDashboardOptions } from './bdcDashboardModel';
|
import { BdcDashboardOptions } from './bdcDashboardModel';
|
||||||
|
import { ControllerNode } from '../tree/controllerTreeNode';
|
||||||
|
|
||||||
const localize = nls.loadMessageBundle();
|
const localize = nls.loadMessageBundle();
|
||||||
|
|
||||||
@@ -33,7 +31,7 @@ export class AddControllerDialogModel {
|
|||||||
private _authTypes: azdata.CategoryValue[];
|
private _authTypes: azdata.CategoryValue[];
|
||||||
constructor(
|
constructor(
|
||||||
public treeDataProvider: ControllerTreeDataProvider,
|
public treeDataProvider: ControllerTreeDataProvider,
|
||||||
public node?: TreeNode,
|
public node?: ControllerNode,
|
||||||
public prefilledUrl?: string,
|
public prefilledUrl?: string,
|
||||||
public prefilledAuth?: azdata.CategoryValue,
|
public prefilledAuth?: azdata.CategoryValue,
|
||||||
public prefilledUsername?: string,
|
public prefilledUsername?: string,
|
||||||
|
|||||||
@@ -192,7 +192,7 @@ export class BdcDashboard extends BdcDashboardPage {
|
|||||||
* @param serviceName The name of the service to switch to the tab of
|
* @param serviceName The name of the service to switch to the tab of
|
||||||
*/
|
*/
|
||||||
public switchToServiceTab(serviceName: string): void {
|
public switchToServiceTab(serviceName: string): void {
|
||||||
const tabPageMapping = this.serviceTabPageMapping[serviceName];
|
const tabPageMapping = this.serviceTabPageMapping.get(serviceName);
|
||||||
if (!tabPageMapping) {
|
if (!tabPageMapping) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -213,7 +213,7 @@ export class BdcDashboard extends BdcDashboardPage {
|
|||||||
if (services) {
|
if (services) {
|
||||||
// Add a nav item for each service
|
// Add a nav item for each service
|
||||||
services.forEach(s => {
|
services.forEach(s => {
|
||||||
const existingTabPage = this.serviceTabPageMapping[s.serviceName];
|
const existingTabPage = this.serviceTabPageMapping.get(s.serviceName);
|
||||||
if (existingTabPage) {
|
if (existingTabPage) {
|
||||||
// We've already created the tab and page for this service, just update the tab health status dot
|
// We've already created the tab and page for this service, just update the tab health status dot
|
||||||
existingTabPage.navTab.dot.value = getHealthStatusDot(s.healthStatus);
|
existingTabPage.navTab.dot.value = getHealthStatusDot(s.healthStatus);
|
||||||
@@ -221,7 +221,7 @@ export class BdcDashboard extends BdcDashboardPage {
|
|||||||
// New service - create the page and tab
|
// New service - create the page and tab
|
||||||
const navItem = createServiceNavTab(this.modelView.modelBuilder, s);
|
const navItem = createServiceNavTab(this.modelView.modelBuilder, s);
|
||||||
const serviceStatusPage = new BdcServiceStatusPage(s.serviceName, this.model, this.modelView).container;
|
const serviceStatusPage = new BdcServiceStatusPage(s.serviceName, this.model, this.modelView).container;
|
||||||
this.serviceTabPageMapping[s.serviceName] = { navTab: navItem, servicePage: serviceStatusPage };
|
this.serviceTabPageMapping.set(s.serviceName, { navTab: navItem, servicePage: serviceStatusPage });
|
||||||
navItem.div.onDidClick(() => {
|
navItem.div.onDidClick(() => {
|
||||||
this.switchToServiceTab(s.serviceName);
|
this.switchToServiceTab(s.serviceName);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ export class BdcServiceStatusPage extends BdcDashboardPage {
|
|||||||
private createResourceNavTabs(resources: ResourceStatusModel[]) {
|
private createResourceNavTabs(resources: ResourceStatusModel[]) {
|
||||||
let tabIndex = this.createdTabs.size;
|
let tabIndex = this.createdTabs.size;
|
||||||
resources.forEach(resource => {
|
resources.forEach(resource => {
|
||||||
const existingTab: ServiceTab = this.createdTabs[resource.resourceName];
|
const existingTab: ServiceTab = this.createdTabs.get(resource.resourceName);
|
||||||
if (existingTab) {
|
if (existingTab) {
|
||||||
// We already created this tab so just update the status
|
// We already created this tab so just update the status
|
||||||
existingTab.dot.value = getHealthStatusDot(resource.healthStatus);
|
existingTab.dot.value = getHealthStatusDot(resource.healthStatus);
|
||||||
@@ -87,7 +87,7 @@ export class BdcServiceStatusPage extends BdcDashboardPage {
|
|||||||
// New tab - create and add to the end of the container
|
// New tab - create and add to the end of the container
|
||||||
const currentIndex = tabIndex++;
|
const currentIndex = tabIndex++;
|
||||||
const resourceHeaderTab = createResourceHeaderTab(this.modelView.modelBuilder, resource);
|
const resourceHeaderTab = createResourceHeaderTab(this.modelView.modelBuilder, resource);
|
||||||
this.createdTabs[resource.resourceName] = resourceHeaderTab;
|
this.createdTabs.set(resource.resourceName, resourceHeaderTab);
|
||||||
const resourceStatusPage: azdata.FlexContainer = new BdcDashboardResourceStatusPage(this.model, this.modelView, this.serviceName, resource.resourceName).container;
|
const resourceStatusPage: azdata.FlexContainer = new BdcDashboardResourceStatusPage(this.model, this.modelView, this.serviceName, resource.resourceName).container;
|
||||||
resourceHeaderTab.div.onDidClick(() => {
|
resourceHeaderTab.div.onDidClick(() => {
|
||||||
// Don't need to do anything if this is already the currently selected tab
|
// Don't need to do anything if this is already the currently selected tab
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ function convertCredsToJson(creds: string): { credentials: {} } {
|
|||||||
if (!creds) {
|
if (!creds) {
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
let credObj = { 'credentials': {} };
|
let credObj: { 'credentials': { [key: string]: any } } = { 'credentials': {} };
|
||||||
let pairs = creds.split(',');
|
let pairs = creds.split(',');
|
||||||
let validPairs: string[] = [];
|
let validPairs: string[] = [];
|
||||||
for (let i = 0; i < pairs.length; i++) {
|
for (let i = 0; i < pairs.length; i++) {
|
||||||
|
|||||||
@@ -3,8 +3,6 @@
|
|||||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
import * as nls from 'vscode-nls';
|
import * as nls from 'vscode-nls';
|
||||||
import * as azdata from 'azdata';
|
import * as azdata from 'azdata';
|
||||||
import * as vscode from 'vscode';
|
import * as vscode from 'vscode';
|
||||||
|
|||||||
@@ -3,8 +3,6 @@
|
|||||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
import { TreeNode } from './treeNode';
|
import { TreeNode } from './treeNode';
|
||||||
|
|
||||||
export interface IControllerTreeChangeHandler {
|
export interface IControllerTreeChangeHandler {
|
||||||
|
|||||||
@@ -3,8 +3,6 @@
|
|||||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
import * as vscode from 'vscode';
|
import * as vscode from 'vscode';
|
||||||
import * as azdata from 'azdata';
|
import * as azdata from 'azdata';
|
||||||
import { TreeNode } from './treeNode';
|
import { TreeNode } from './treeNode';
|
||||||
@@ -77,7 +75,7 @@ export class ControllerTreeDataProvider implements vscode.TreeDataProvider<TreeN
|
|||||||
this.notifyNodeChanged();
|
this.notifyNodeChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
public deleteController(url: string, auth: AuthType, username: string): ControllerNode {
|
public deleteController(url: string, auth: AuthType, username: string): ControllerNode[] {
|
||||||
let deleted = this.root.deleteControllerNode(url, auth, username);
|
let deleted = this.root.deleteControllerNode(url, auth, username);
|
||||||
if (deleted) {
|
if (deleted) {
|
||||||
this.notifyNodeChanged();
|
this.notifyNodeChanged();
|
||||||
|
|||||||
@@ -3,8 +3,6 @@
|
|||||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
import * as vscode from 'vscode';
|
import * as vscode from 'vscode';
|
||||||
import * as azdata from 'azdata';
|
import * as azdata from 'azdata';
|
||||||
import { IControllerTreeChangeHandler } from './controllerTreeChangeHandler';
|
import { IControllerTreeChangeHandler } from './controllerTreeChangeHandler';
|
||||||
@@ -129,20 +127,20 @@ export class ControllerRootNode extends ControllerTreeNode {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public deleteControllerNode(url: string, auth: AuthType, username: string): ControllerNode {
|
public deleteControllerNode(url: string, auth: AuthType, username: string): ControllerNode[] | undefined {
|
||||||
if (!url || (auth === 'basic' && !username)) {
|
if (!url || (auth === 'basic' && !username)) {
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
let nodes = this.children as ControllerNode[];
|
let nodes = this.children as ControllerNode[];
|
||||||
let index = nodes.findIndex(e => isControllerMatch(e, url, auth, username));
|
let index = nodes.findIndex(e => isControllerMatch(e, url, auth, username));
|
||||||
let deleted = undefined;
|
let deleted: ControllerNode[] | undefined;
|
||||||
if (index >= 0) {
|
if (index >= 0) {
|
||||||
deleted = nodes.splice(index, 1);
|
deleted = nodes.splice(index, 1);
|
||||||
}
|
}
|
||||||
return deleted;
|
return deleted;
|
||||||
}
|
}
|
||||||
|
|
||||||
private getExistingControllerNode(url: string, auth: AuthType, username: string): ControllerNode {
|
private getExistingControllerNode(url: string, auth: AuthType, username: string): ControllerNode | undefined {
|
||||||
if (!url || !username) {
|
if (!url || !username) {
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
@@ -169,7 +167,7 @@ export class ControllerNode extends ControllerTreeNode {
|
|||||||
this.description = description;
|
this.description = description;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async getChildren(): Promise<ControllerTreeNode[]> {
|
public async getChildren(): Promise<ControllerTreeNode[] | undefined> {
|
||||||
if (this.children && this.children.length > 0) {
|
if (this.children && this.children.length > 0) {
|
||||||
this.clearChildren();
|
this.clearChildren();
|
||||||
}
|
}
|
||||||
@@ -178,11 +176,12 @@ export class ControllerNode extends ControllerTreeNode {
|
|||||||
vscode.commands.executeCommand('bigDataClusters.command.addController', this);
|
vscode.commands.executeCommand('bigDataClusters.command.addController', this);
|
||||||
return this.children as ControllerTreeNode[];
|
return this.children as ControllerTreeNode[];
|
||||||
}
|
}
|
||||||
|
return undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static toIpAndPort(url: string): string {
|
public static toIpAndPort(url: string): string | undefined {
|
||||||
if (!url) {
|
if (!url) {
|
||||||
return;
|
return undefined;
|
||||||
}
|
}
|
||||||
return url.trim().replace(/ /g, '').replace(/^.+\:\/\//, '');
|
return url.trim().replace(/ /g, '').replace(/^.+\:\/\//, '');
|
||||||
}
|
}
|
||||||
@@ -245,4 +244,3 @@ export class ControllerNode extends ControllerTreeNode {
|
|||||||
function isControllerMatch(node: ControllerNode, url: string, auth: string, username: string): unknown {
|
function isControllerMatch(node: ControllerNode, url: string, auth: string, username: string): unknown {
|
||||||
return node.url === url && node.auth === auth && node.username === username;
|
return node.url === url && node.auth === auth && node.username === username;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,8 +3,6 @@
|
|||||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
import * as nls from 'vscode-nls';
|
import * as nls from 'vscode-nls';
|
||||||
import * as azdata from 'azdata';
|
import * as azdata from 'azdata';
|
||||||
import * as vscode from 'vscode';
|
import * as vscode from 'vscode';
|
||||||
|
|||||||
@@ -3,8 +3,6 @@
|
|||||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
import * as azdata from 'azdata';
|
import * as azdata from 'azdata';
|
||||||
import * as vscode from 'vscode';
|
import * as vscode from 'vscode';
|
||||||
import { generateGuid } from '../utils';
|
import { generateGuid } from '../utils';
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ export function showErrorMessage(error: any, prefixText?: string): void {
|
|||||||
* Mappings of the different expected state values to their localized friendly names.
|
* Mappings of the different expected state values to their localized friendly names.
|
||||||
* These are defined in aris/projects/controller/src/Microsoft.SqlServer.Controller/StateMachines
|
* These are defined in aris/projects/controller/src/Microsoft.SqlServer.Controller/StateMachines
|
||||||
*/
|
*/
|
||||||
const stateToDisplayTextMap = {
|
const stateToDisplayTextMap: { [key: string]: string } = {
|
||||||
// K8sScaledSetStateMachine
|
// K8sScaledSetStateMachine
|
||||||
'creating': localize('state.creating', "Creating"),
|
'creating': localize('state.creating', "Creating"),
|
||||||
'waiting': localize('state.waiting', "Waiting"),
|
'waiting': localize('state.waiting', "Waiting"),
|
||||||
@@ -287,5 +287,3 @@ export function getIgnoreSslVerificationConfigSetting(): boolean {
|
|||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -3,8 +3,6 @@
|
|||||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
import * as vscode from 'vscode';
|
import * as vscode from 'vscode';
|
||||||
import * as azdata from 'azdata';
|
import * as azdata from 'azdata';
|
||||||
import * as nls from 'vscode-nls';
|
import * as nls from 'vscode-nls';
|
||||||
@@ -156,14 +154,14 @@ async function lookupController(explorerContext?: azdata.ObjectExplorerContext):
|
|||||||
}
|
}
|
||||||
|
|
||||||
function addBdcController(treeDataProvider: ControllerTreeDataProvider, node?: TreeNode): void {
|
function addBdcController(treeDataProvider: ControllerTreeDataProvider, node?: TreeNode): void {
|
||||||
let model = new AddControllerDialogModel(treeDataProvider, node);
|
let model = new AddControllerDialogModel(treeDataProvider, node as ControllerNode);
|
||||||
let dialog = new AddControllerDialog(model);
|
let dialog = new AddControllerDialog(model);
|
||||||
dialog.showDialog();
|
dialog.showDialog();
|
||||||
}
|
}
|
||||||
|
|
||||||
async function deleteBdcController(treeDataProvider: ControllerTreeDataProvider, node: TreeNode): Promise<boolean> {
|
async function deleteBdcController(treeDataProvider: ControllerTreeDataProvider, node: TreeNode): Promise<boolean | undefined> {
|
||||||
if (!node && !(node instanceof ControllerNode)) {
|
if (!node && !(node instanceof ControllerNode)) {
|
||||||
return;
|
return undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
let controllerNode = node as ControllerNode;
|
let controllerNode = node as ControllerNode;
|
||||||
|
|||||||
@@ -15,10 +15,7 @@
|
|||||||
"./node_modules/@types"
|
"./node_modules/@types"
|
||||||
],
|
],
|
||||||
"strict": false,
|
"strict": false,
|
||||||
"noImplicitAny": false,
|
|
||||||
"noUnusedParameters": false,
|
"noUnusedParameters": false,
|
||||||
"noImplicitReturns": false,
|
|
||||||
"noUnusedLocals": false,
|
|
||||||
},
|
},
|
||||||
"exclude": [
|
"exclude": [
|
||||||
"node_modules"
|
"node_modules"
|
||||||
|
|||||||
@@ -2,11 +2,36 @@
|
|||||||
# yarn lockfile v1
|
# yarn lockfile v1
|
||||||
|
|
||||||
|
|
||||||
|
"@types/caseless@*":
|
||||||
|
version "0.12.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/@types/caseless/-/caseless-0.12.2.tgz#f65d3d6389e01eeb458bd54dc8f52b95a9463bc8"
|
||||||
|
integrity sha512-6ckxMjBBD8URvjB6J3NcnuAn5Pkl7t3TizAg+xdlzzQGSPSmBcXf8KoIH0ua/i+tio+ZRUHEXp0HEmvaR4kt0w==
|
||||||
|
|
||||||
"@types/kerberos@^1.1.0":
|
"@types/kerberos@^1.1.0":
|
||||||
version "1.1.0"
|
version "1.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/@types/kerberos/-/kerberos-1.1.0.tgz#fb1e5bc4f7272d152f67714deb100d5de7cb3e48"
|
resolved "https://registry.yarnpkg.com/@types/kerberos/-/kerberos-1.1.0.tgz#fb1e5bc4f7272d152f67714deb100d5de7cb3e48"
|
||||||
integrity sha512-ixpV6PSSMnIVpMNCLQ0gWguC2+pBxc0LeUCv9Ugj54opVSVFXfPNYP6sMa7UHvicYGDXAyHQSAzQC8VYEIgdFQ==
|
integrity sha512-ixpV6PSSMnIVpMNCLQ0gWguC2+pBxc0LeUCv9Ugj54opVSVFXfPNYP6sMa7UHvicYGDXAyHQSAzQC8VYEIgdFQ==
|
||||||
|
|
||||||
|
"@types/node@*":
|
||||||
|
version "12.12.6"
|
||||||
|
resolved "https://registry.yarnpkg.com/@types/node/-/node-12.12.6.tgz#a47240c10d86a9a57bb0c633f0b2e0aea9ce9253"
|
||||||
|
integrity sha512-FjsYUPzEJdGXjwKqSpE0/9QEh6kzhTAeObA54rn6j3rR4C/mzpI9L0KNfoeASSPMMdxIsoJuCLDWcM/rVjIsSA==
|
||||||
|
|
||||||
|
"@types/request@^2.48.3":
|
||||||
|
version "2.48.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/@types/request/-/request-2.48.3.tgz#970b8ed2317568c390361d29c555a95e74bd6135"
|
||||||
|
integrity sha512-3Wo2jNYwqgXcIz/rrq18AdOZUQB8cQ34CXZo+LUwPJNpvRAL86+Kc2wwI8mqpz9Cr1V+enIox5v+WZhy/p3h8w==
|
||||||
|
dependencies:
|
||||||
|
"@types/caseless" "*"
|
||||||
|
"@types/node" "*"
|
||||||
|
"@types/tough-cookie" "*"
|
||||||
|
form-data "^2.5.0"
|
||||||
|
|
||||||
|
"@types/tough-cookie@*":
|
||||||
|
version "2.3.5"
|
||||||
|
resolved "https://registry.yarnpkg.com/@types/tough-cookie/-/tough-cookie-2.3.5.tgz#9da44ed75571999b65c37b60c9b2b88db54c585d"
|
||||||
|
integrity sha512-SCcK7mvGi3+ZNz833RRjFIxrn4gI1PPR3NtuIS+6vMkvmsGjosqTJwRt5bAEFLRz+wtJMWv8+uOnZf2hi2QXTg==
|
||||||
|
|
||||||
agent-base@4, agent-base@^4.3.0:
|
agent-base@4, agent-base@^4.3.0:
|
||||||
version "4.3.0"
|
version "4.3.0"
|
||||||
resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.3.0.tgz#8165f01c436009bccad0b1d122f05ed770efc6ee"
|
resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.3.0.tgz#8165f01c436009bccad0b1d122f05ed770efc6ee"
|
||||||
@@ -285,6 +310,15 @@ forever-agent@~0.6.1:
|
|||||||
resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91"
|
resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91"
|
||||||
integrity sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=
|
integrity sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=
|
||||||
|
|
||||||
|
form-data@^2.5.0:
|
||||||
|
version "2.5.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.5.1.tgz#f2cbec57b5e59e23716e128fe44d4e5dd23895f4"
|
||||||
|
integrity sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA==
|
||||||
|
dependencies:
|
||||||
|
asynckit "^0.4.0"
|
||||||
|
combined-stream "^1.0.6"
|
||||||
|
mime-types "^2.1.12"
|
||||||
|
|
||||||
form-data@~2.3.2:
|
form-data@~2.3.2:
|
||||||
version "2.3.3"
|
version "2.3.3"
|
||||||
resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6"
|
resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6"
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
'use strict';
|
|
||||||
import * as vscode from 'vscode';
|
import * as vscode from 'vscode';
|
||||||
import * as azdata from 'azdata';
|
import * as azdata from 'azdata';
|
||||||
|
|
||||||
@@ -116,7 +115,7 @@ export class ApiWrapper {
|
|||||||
|
|
||||||
public openTextDocument(uri: vscode.Uri): Thenable<vscode.TextDocument>;
|
public openTextDocument(uri: vscode.Uri): Thenable<vscode.TextDocument>;
|
||||||
public openTextDocument(options: { language?: string; content?: string; }): Thenable<vscode.TextDocument>;
|
public openTextDocument(options: { language?: string; content?: string; }): Thenable<vscode.TextDocument>;
|
||||||
public openTextDocument(uriOrOptions): Thenable<vscode.TextDocument> {
|
public openTextDocument(uriOrOptions: any): Thenable<vscode.TextDocument> {
|
||||||
return vscode.workspace.openTextDocument(uriOrOptions);
|
return vscode.workspace.openTextDocument(uriOrOptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
'use strict';
|
|
||||||
import * as nls from 'vscode-nls';
|
import * as nls from 'vscode-nls';
|
||||||
import * as azdata from 'azdata';
|
import * as azdata from 'azdata';
|
||||||
import { AppContext } from '../appContext';
|
import { AppContext } from '../appContext';
|
||||||
@@ -180,4 +179,3 @@ export function refreshCommand(appContext: AppContext, tree: CmsResourceTreeProv
|
|||||||
tree.notifyNodeChanged(node);
|
tree.notifyNodeChanged(node);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
'use strict';
|
|
||||||
import { AppContext } from '../appContext';
|
import { AppContext } from '../appContext';
|
||||||
import { CmsResourceTreeProvider } from './tree/treeProvider';
|
import { CmsResourceTreeProvider } from './tree/treeProvider';
|
||||||
import {
|
import {
|
||||||
|
|||||||
@@ -3,8 +3,6 @@
|
|||||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
export enum CmsResourceItemType {
|
export enum CmsResourceItemType {
|
||||||
cmsMessageNodeContainer = 'cms.resource.itemType.cmsMessageNodeContainer',
|
cmsMessageNodeContainer = 'cms.resource.itemType.cmsMessageNodeContainer',
|
||||||
cmsEmptyNodeContainer = 'cms.resource.itemType.cmsEmptyNodeContainer',
|
cmsEmptyNodeContainer = 'cms.resource.itemType.cmsEmptyNodeContainer',
|
||||||
|
|||||||
@@ -3,8 +3,6 @@
|
|||||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
import { TreeItem, TreeItemCollapsibleState } from 'vscode';
|
import { TreeItem, TreeItemCollapsibleState } from 'vscode';
|
||||||
import { NodeInfo } from 'azdata';
|
import { NodeInfo } from 'azdata';
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
'use strict';
|
|
||||||
import * as azdata from 'azdata';
|
import * as azdata from 'azdata';
|
||||||
import { AppContext } from '../../appContext';
|
import { AppContext } from '../../appContext';
|
||||||
import { TreeNode } from '../treeNode';
|
import { TreeNode } from '../treeNode';
|
||||||
|
|||||||
@@ -3,8 +3,6 @@
|
|||||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
import { TreeItem, TreeItemCollapsibleState } from 'vscode';
|
import { TreeItem, TreeItemCollapsibleState } from 'vscode';
|
||||||
import { NodeInfo } from 'azdata';
|
import { NodeInfo } from 'azdata';
|
||||||
import * as nls from 'vscode-nls';
|
import * as nls from 'vscode-nls';
|
||||||
|
|||||||
@@ -3,10 +3,9 @@
|
|||||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
'use strict';
|
|
||||||
import * as azdata from 'azdata';
|
import * as azdata from 'azdata';
|
||||||
import * as nls from 'vscode-nls';
|
import * as nls from 'vscode-nls';
|
||||||
import { TreeItemCollapsibleState, TreeItem } from 'vscode';
|
import { TreeItemCollapsibleState } from 'vscode';
|
||||||
import { AppContext } from '../../appContext';
|
import { AppContext } from '../../appContext';
|
||||||
import { TreeNode } from '../treeNode';
|
import { TreeNode } from '../treeNode';
|
||||||
import { CmsResourceTreeNodeBase } from './baseTreeNodes';
|
import { CmsResourceTreeNodeBase } from './baseTreeNodes';
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
'use strict';
|
|
||||||
import * as azdata from 'azdata';
|
import * as azdata from 'azdata';
|
||||||
import { TreeItemCollapsibleState } from 'vscode';
|
import { TreeItemCollapsibleState } from 'vscode';
|
||||||
import { TreeNode } from '../treeNode';
|
import { TreeNode } from '../treeNode';
|
||||||
@@ -27,8 +26,8 @@ export class RegisteredServerTreeNode extends CmsResourceTreeNodeBase {
|
|||||||
super(name, description, ownerUri, appContext, treeChangeHandler, parent);
|
super(name, description, ownerUri, appContext, treeChangeHandler, parent);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async getChildren(): Promise<TreeNode[]> {
|
public async getChildren(): Promise<TreeNode[] | undefined> {
|
||||||
return;
|
return undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
public getTreeItem(): azdata.TreeItem | Promise<azdata.TreeItem> {
|
public getTreeItem(): azdata.TreeItem | Promise<azdata.TreeItem> {
|
||||||
@@ -37,8 +36,8 @@ export class RegisteredServerTreeNode extends CmsResourceTreeNodeBase {
|
|||||||
connectionName: this.name ? this.name : this.serverName,
|
connectionName: this.name ? this.name : this.serverName,
|
||||||
serverName: this.serverName,
|
serverName: this.serverName,
|
||||||
databaseName: '',
|
databaseName: '',
|
||||||
userName: undefined,
|
userName: undefined as string,
|
||||||
password: undefined,
|
password: undefined as string,
|
||||||
authenticationType: 'Integrated',
|
authenticationType: 'Integrated',
|
||||||
savePassword: false,
|
savePassword: false,
|
||||||
groupFullName: '',
|
groupFullName: '',
|
||||||
|
|||||||
@@ -3,8 +3,6 @@
|
|||||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
import { TreeItem, TreeItemCollapsibleState } from 'vscode';
|
import { TreeItem, TreeItemCollapsibleState } from 'vscode';
|
||||||
import * as azdata from 'azdata';
|
import * as azdata from 'azdata';
|
||||||
import { TreeNode } from '../treeNode';
|
import { TreeNode } from '../treeNode';
|
||||||
@@ -33,7 +31,7 @@ export class ServerGroupTreeNode extends CmsResourceTreeNodeBase {
|
|||||||
}
|
}
|
||||||
public getChildren(): TreeNode[] | Promise<TreeNode[]> {
|
public getChildren(): TreeNode[] | Promise<TreeNode[]> {
|
||||||
try {
|
try {
|
||||||
let nodes = [];
|
let nodes: TreeNode[] = [];
|
||||||
return this.appContext.cmsUtils.getRegisteredServers(this.ownerUri, this.relativePath).then((result) => {
|
return this.appContext.cmsUtils.getRegisteredServers(this.ownerUri, this.relativePath).then((result) => {
|
||||||
if (result) {
|
if (result) {
|
||||||
if (result.registeredServersList) {
|
if (result.registeredServersList) {
|
||||||
|
|||||||
@@ -3,8 +3,6 @@
|
|||||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
import { TreeNode } from '../treeNode';
|
import { TreeNode } from '../treeNode';
|
||||||
|
|
||||||
export interface ICmsResourceTreeChangeHandler {
|
export interface ICmsResourceTreeChangeHandler {
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
'use strict';
|
|
||||||
import { TreeDataProvider, EventEmitter, Event, TreeItem } from 'vscode';
|
import { TreeDataProvider, EventEmitter, Event, TreeItem } from 'vscode';
|
||||||
import { AppContext } from '../../appContext';
|
import { AppContext } from '../../appContext';
|
||||||
import * as nls from 'vscode-nls';
|
import * as nls from 'vscode-nls';
|
||||||
@@ -14,7 +13,6 @@ import { CmsResourceEmptyTreeNode } from './cmsResourceEmptyTreeNode';
|
|||||||
import { ICmsResourceTreeChangeHandler } from './treeChangeHandler';
|
import { ICmsResourceTreeChangeHandler } from './treeChangeHandler';
|
||||||
import { CmsResourceMessageTreeNode } from '../messageTreeNode';
|
import { CmsResourceMessageTreeNode } from '../messageTreeNode';
|
||||||
import { CmsResourceTreeNode } from './cmsResourceTreeNode';
|
import { CmsResourceTreeNode } from './cmsResourceTreeNode';
|
||||||
import { ICmsResourceNodeInfo } from './baseTreeNodes';
|
|
||||||
|
|
||||||
export class CmsResourceTreeProvider implements TreeDataProvider<TreeNode>, ICmsResourceTreeChangeHandler {
|
export class CmsResourceTreeProvider implements TreeDataProvider<TreeNode>, ICmsResourceTreeChangeHandler {
|
||||||
|
|
||||||
@@ -38,7 +36,7 @@ export class CmsResourceTreeProvider implements TreeDataProvider<TreeNode>, ICms
|
|||||||
// to determine whether the system has been initialized.
|
// to determine whether the system has been initialized.
|
||||||
const cachedServers = this._appContext.cmsUtils.getSavedServers();
|
const cachedServers = this._appContext.cmsUtils.getSavedServers();
|
||||||
if (cachedServers && cachedServers.length > 0) {
|
if (cachedServers && cachedServers.length > 0) {
|
||||||
const servers = [];
|
const servers: CmsResourceTreeNode[] = [];
|
||||||
cachedServers.forEach(async (server) => {
|
cachedServers.forEach(async (server) => {
|
||||||
servers.push(new CmsResourceTreeNode(
|
servers.push(new CmsResourceTreeNode(
|
||||||
server.name,
|
server.name,
|
||||||
|
|||||||
@@ -3,8 +3,6 @@
|
|||||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
import * as azdata from 'azdata';
|
import * as azdata from 'azdata';
|
||||||
import * as vscode from 'vscode';
|
import * as vscode from 'vscode';
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
'use strict';
|
|
||||||
import * as nls from 'vscode-nls';
|
import * as nls from 'vscode-nls';
|
||||||
import * as vscode from 'vscode';
|
import * as vscode from 'vscode';
|
||||||
import * as azdata from 'azdata';
|
import * as azdata from 'azdata';
|
||||||
@@ -89,12 +88,13 @@ export class CmsUtils {
|
|||||||
return this._cmsService;
|
return this._cmsService;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async getRegisteredServers(ownerUri: string, relativePath: string): Promise<mssql.ListRegisteredServersResult> {
|
public async getRegisteredServers(ownerUri: string, relativePath: string): Promise<mssql.ListRegisteredServersResult | undefined> {
|
||||||
const cmsService = await this.getCmsService();
|
const cmsService = await this.getCmsService();
|
||||||
const result = await cmsService.getRegisteredServers(ownerUri, relativePath);
|
const result = await cmsService.getRegisteredServers(ownerUri, relativePath);
|
||||||
if (result && result.registeredServersList && result.registeredServersList) {
|
if (result && result.registeredServersList && result.registeredServersList) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
return undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async createCmsServer(connection: azdata.connection.Connection,
|
public async createCmsServer(connection: azdata.connection.Connection,
|
||||||
@@ -166,7 +166,7 @@ export class CmsUtils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public async addRegisteredServer(relativePath: string, ownerUri: string,
|
public async addRegisteredServer(relativePath: string, ownerUri: string,
|
||||||
parentServerName?: string): Promise<boolean> {
|
parentServerName?: string): Promise<boolean | undefined> {
|
||||||
let provider = await this.getCmsService();
|
let provider = await this.getCmsService();
|
||||||
// Initial profile to disallow SQL Login without
|
// Initial profile to disallow SQL Login without
|
||||||
// changing provider.
|
// changing provider.
|
||||||
@@ -200,6 +200,7 @@ export class CmsUtils {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async removeRegisteredServer(registeredServerName: string, relativePath: string, ownerUri: string): Promise<boolean> {
|
public async removeRegisteredServer(registeredServerName: string, relativePath: string, ownerUri: string): Promise<boolean> {
|
||||||
@@ -232,7 +233,7 @@ export class CmsUtils {
|
|||||||
return this._credentialProvider;
|
return this._credentialProvider;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async makeConnection(initialConnectionProfile?: azdata.IConnectionProfile): Promise<azdata.connection.Connection> {
|
public async makeConnection(initialConnectionProfile?: azdata.IConnectionProfile): Promise<azdata.connection.Connection | undefined> {
|
||||||
if (!initialConnectionProfile) {
|
if (!initialConnectionProfile) {
|
||||||
initialConnectionProfile = {
|
initialConnectionProfile = {
|
||||||
connectionName: undefined,
|
connectionName: undefined,
|
||||||
@@ -261,6 +262,7 @@ export class CmsUtils {
|
|||||||
}
|
}
|
||||||
return connection;
|
return connection;
|
||||||
}
|
}
|
||||||
|
return undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Static Functions
|
// Static Functions
|
||||||
|
|||||||
@@ -3,8 +3,6 @@
|
|||||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
import ControllerBase from './controllerBase';
|
import ControllerBase from './controllerBase';
|
||||||
import { CmsResourceTreeProvider } from '../cmsResource/tree/treeProvider';
|
import { CmsResourceTreeProvider } from '../cmsResource/tree/treeProvider';
|
||||||
import { registerCmsResourceCommands } from '../cmsResource/commands';
|
import { registerCmsResourceCommands } from '../cmsResource/commands';
|
||||||
|
|||||||
@@ -3,8 +3,6 @@
|
|||||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
import * as vscode from 'vscode';
|
import * as vscode from 'vscode';
|
||||||
|
|
||||||
import { AppContext } from '../appContext';
|
import { AppContext } from '../appContext';
|
||||||
@@ -31,4 +29,3 @@ export default abstract class ControllerBase implements vscode.Disposable {
|
|||||||
this.deactivate();
|
this.deactivate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
'use strict';
|
|
||||||
import 'mocha';
|
import 'mocha';
|
||||||
import * as vscode from 'vscode';
|
import * as vscode from 'vscode';
|
||||||
import * as should from 'should';
|
import * as should from 'should';
|
||||||
@@ -13,7 +12,6 @@ import { ApiWrapper } from '../../../apiWrapper';
|
|||||||
import { CmsResourceTreeProvider } from '../../../cmsResource/tree/treeProvider';
|
import { CmsResourceTreeProvider } from '../../../cmsResource/tree/treeProvider';
|
||||||
import { CmsResourceMessageTreeNode } from '../../../cmsResource/messageTreeNode';
|
import { CmsResourceMessageTreeNode } from '../../../cmsResource/messageTreeNode';
|
||||||
import { CmsResourceEmptyTreeNode } from '../../../cmsResource/tree/cmsResourceEmptyTreeNode';
|
import { CmsResourceEmptyTreeNode } from '../../../cmsResource/tree/cmsResourceEmptyTreeNode';
|
||||||
import { CmsResourceTreeNode } from '../../../cmsResource/tree/cmsResourceTreeNode';
|
|
||||||
import { CmsUtils } from '../../../cmsUtils';
|
import { CmsUtils } from '../../../cmsUtils';
|
||||||
|
|
||||||
// Mock services
|
// Mock services
|
||||||
|
|||||||
@@ -15,10 +15,7 @@
|
|||||||
"moduleResolution": "node",
|
"moduleResolution": "node",
|
||||||
"declaration": false,
|
"declaration": false,
|
||||||
"strict": false,
|
"strict": false,
|
||||||
"noImplicitAny": false,
|
|
||||||
"noUnusedParameters": false,
|
"noUnusedParameters": false,
|
||||||
"noImplicitReturns": false,
|
|
||||||
"noUnusedLocals": false,
|
|
||||||
},
|
},
|
||||||
"exclude": [
|
"exclude": [
|
||||||
"node_modules"
|
"node_modules"
|
||||||
|
|||||||
@@ -43,9 +43,9 @@ export abstract class BasePage {
|
|||||||
* Sets up a navigation validator.
|
* Sets up a navigation validator.
|
||||||
* This will be called right before onPageEnter().
|
* This will be called right before onPageEnter().
|
||||||
*/
|
*/
|
||||||
public abstract setupNavigationValidator();
|
public abstract setupNavigationValidator(): void;
|
||||||
|
|
||||||
protected async getServerValues(): Promise<{ connection, displayName, name }[]> {
|
protected async getServerValues(): Promise<{ connection: azdata.connection.ConnectionProfile, displayName: string, name: string }[]> {
|
||||||
let cons = await azdata.connection.getConnections(/* activeConnectionsOnly */ true);
|
let cons = await azdata.connection.getConnections(/* activeConnectionsOnly */ true);
|
||||||
// This user has no active connections ABORT MISSION
|
// This user has no active connections ABORT MISSION
|
||||||
if (!cons || cons.length === 0) {
|
if (!cons || cons.length === 0) {
|
||||||
@@ -105,7 +105,7 @@ export abstract class BasePage {
|
|||||||
return values;
|
return values;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected async getDatabaseValues(): Promise<{ displayName, name }[]> {
|
protected async getDatabaseValues(): Promise<{ displayName: string, name: string }[]> {
|
||||||
let idx = -1;
|
let idx = -1;
|
||||||
let count = -1;
|
let count = -1;
|
||||||
let values = (await azdata.connection.listDatabases(this.model.server.connectionId)).map(db => {
|
let values = (await azdata.connection.listDatabases(this.model.server.connectionId)).map(db => {
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
'use strict';
|
|
||||||
|
|
||||||
import * as azdata from 'azdata';
|
import * as azdata from 'azdata';
|
||||||
import * as nls from 'vscode-nls';
|
import * as nls from 'vscode-nls';
|
||||||
@@ -38,7 +37,7 @@ export abstract class DacFxConfigPage extends BasePage {
|
|||||||
this.view = view;
|
this.view = view;
|
||||||
}
|
}
|
||||||
|
|
||||||
public setupNavigationValidator() {
|
public setupNavigationValidator(): void {
|
||||||
this.instance.registerNavigationValidator(() => {
|
this.instance.registerNavigationValidator(() => {
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
@@ -198,4 +197,3 @@ export abstract class DacFxConfigPage extends BasePage {
|
|||||||
interface ConnectionDropdownValue extends azdata.CategoryValue {
|
interface ConnectionDropdownValue extends azdata.CategoryValue {
|
||||||
connection: azdata.connection.ConnectionProfile;
|
connection: azdata.connection.ConnectionProfile;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
'use strict';
|
|
||||||
import * as vscode from 'vscode';
|
import * as vscode from 'vscode';
|
||||||
import * as nls from 'vscode-nls';
|
import * as nls from 'vscode-nls';
|
||||||
import * as azdata from 'azdata';
|
import * as azdata from 'azdata';
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
'use strict';
|
|
||||||
import * as azdata from 'azdata';
|
import * as azdata from 'azdata';
|
||||||
import * as nls from 'vscode-nls';
|
import * as nls from 'vscode-nls';
|
||||||
import { DacFxDataModel } from '../api/models';
|
import { DacFxDataModel } from '../api/models';
|
||||||
@@ -65,7 +64,7 @@ export class DacFxSummaryPage extends BasePage {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public setupNavigationValidator() {
|
public setupNavigationValidator(): void {
|
||||||
this.instance.registerNavigationValidator(() => {
|
this.instance.registerNavigationValidator(() => {
|
||||||
if (this.loader.loading) {
|
if (this.loader.loading) {
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -3,16 +3,13 @@
|
|||||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
'use strict';
|
|
||||||
import * as azdata from 'azdata';
|
import * as azdata from 'azdata';
|
||||||
import * as nls from 'vscode-nls';
|
import * as nls from 'vscode-nls';
|
||||||
import * as vscode from 'vscode';
|
import * as vscode from 'vscode';
|
||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
import * as os from 'os';
|
|
||||||
import { DacFxDataModel } from '../api/models';
|
import { DacFxDataModel } from '../api/models';
|
||||||
import { DataTierApplicationWizard, DeployOperationPath, Operation, DeployNewOperationPath, PageName } from '../dataTierApplicationWizard';
|
import { DataTierApplicationWizard, DeployOperationPath, Operation, DeployNewOperationPath, PageName } from '../dataTierApplicationWizard';
|
||||||
import { DacFxConfigPage } from '../api/dacFxConfigPage';
|
import { DacFxConfigPage } from '../api/dacFxConfigPage';
|
||||||
import { DacFxSummaryPage } from './dacFxSummaryPage';
|
|
||||||
|
|
||||||
const localize = nls.loadMessageBundle();
|
const localize = nls.loadMessageBundle();
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
'use strict';
|
|
||||||
import * as azdata from 'azdata';
|
import * as azdata from 'azdata';
|
||||||
import * as nls from 'vscode-nls';
|
import * as nls from 'vscode-nls';
|
||||||
import * as vscode from 'vscode';
|
import * as vscode from 'vscode';
|
||||||
@@ -60,7 +59,7 @@ export class ExtractConfigPage extends DacFxConfigPage {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public setupNavigationValidator() {
|
public setupNavigationValidator(): void {
|
||||||
this.instance.registerNavigationValidator(() => {
|
this.instance.registerNavigationValidator(() => {
|
||||||
if (this.databaseLoader.loading) {
|
if (this.databaseLoader.loading) {
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -3,12 +3,10 @@
|
|||||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
'use strict';
|
|
||||||
import * as azdata from 'azdata';
|
import * as azdata from 'azdata';
|
||||||
import * as nls from 'vscode-nls';
|
import * as nls from 'vscode-nls';
|
||||||
import * as vscode from 'vscode';
|
import * as vscode from 'vscode';
|
||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
import * as os from 'os';
|
|
||||||
import { DacFxDataModel } from '../api/models';
|
import { DacFxDataModel } from '../api/models';
|
||||||
import { DataTierApplicationWizard } from '../dataTierApplicationWizard';
|
import { DataTierApplicationWizard } from '../dataTierApplicationWizard';
|
||||||
import { DacFxConfigPage } from '../api/dacFxConfigPage';
|
import { DacFxConfigPage } from '../api/dacFxConfigPage';
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
'use strict';
|
|
||||||
import * as azdata from 'azdata';
|
import * as azdata from 'azdata';
|
||||||
import * as nls from 'vscode-nls';
|
import * as nls from 'vscode-nls';
|
||||||
import { DacFxDataModel } from '../api/models';
|
import { DacFxDataModel } from '../api/models';
|
||||||
@@ -177,7 +176,7 @@ export class SelectOperationPage extends BasePage {
|
|||||||
this.instance.wizard.addPage(summaryPage.wizardPage, index);
|
this.instance.wizard.addPage(summaryPage.wizardPage, index);
|
||||||
}
|
}
|
||||||
|
|
||||||
public setupNavigationValidator() {
|
public setupNavigationValidator(): void {
|
||||||
this.instance.registerNavigationValidator(() => {
|
this.instance.registerNavigationValidator(() => {
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -3,10 +3,6 @@
|
|||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"outDir": "./out",
|
"outDir": "./out",
|
||||||
"strict": false,
|
"strict": false,
|
||||||
"alwaysStrict": false,
|
|
||||||
"noImplicitAny": false,
|
|
||||||
"noImplicitReturns": false,
|
|
||||||
"noUnusedLocals": false,
|
|
||||||
"noUnusedParameters": false
|
"noUnusedParameters": false
|
||||||
},
|
},
|
||||||
"include": [
|
"include": [
|
||||||
|
|||||||
Reference in New Issue
Block a user