Remove sql/common (#4990)

* remove sql/common/

* formatting

* fix cyclic dependency
This commit is contained in:
Anthony Dresser
2019-04-12 12:47:48 -07:00
committed by GitHub
parent 51851efda5
commit 9e56187c16
40 changed files with 282 additions and 280 deletions

View File

@@ -20,8 +20,8 @@ import { Registry } from 'vs/platform/registry/common/platform';
/* Telemetry */
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
import * as TelemetryUtils from 'sql/common/telemetryUtilities';
import * as TelemetryKeys from 'sql/common/telemetryKeys';
import * as TelemetryUtils from 'sql/platform/telemetry/telemetryUtilities';
import * as TelemetryKeys from 'sql/platform/telemetry/telemetryKeys';
/* Services */
import { BreadcrumbService } from 'sql/workbench/parts/dashboard/services/breadcrumb.service';

View File

@@ -6,8 +6,8 @@
import { Component, Input, Inject, ChangeDetectorRef, forwardRef, ElementRef, ViewChild } from '@angular/core';
import { BaseChartDirective } from 'ng2-charts';
import * as TelemetryKeys from 'sql/common/telemetryKeys';
import * as TelemetryUtils from 'sql/common/telemetryUtilities';
import * as TelemetryKeys from 'sql/platform/telemetry/telemetryKeys';
import * as TelemetryUtils from 'sql/platform/telemetry/telemetryUtilities';
import { IInsightsView, IInsightData } from 'sql/workbench/parts/dashboard/widgets/insights/interfaces';
import { memoize, unmemoize } from 'sql/base/common/decorators';
import { mixin } from 'sql/base/common/objects';

View File

@@ -20,7 +20,6 @@ import { ICellModelOptions, IModelFactory, FutureInternal, CellExecutionState }
import { IConnectionManagementService } from 'sql/platform/connection/common/connectionManagement';
import { IConnectionProfile } from 'sql/platform/connection/common/interfaces';
import { INotificationService, Severity } from 'vs/platform/notification/common/notification';
import { MssqlProviderId } from 'sql/common/constants';
import { Schemas } from 'vs/base/common/network';
let modelId = 0;
@@ -390,8 +389,8 @@ export class CellModel implements ICellModel {
let endpoint = this.getKnoxEndpoint(model.activeConnection);
let host = endpoint && endpoint.ipAddress ? endpoint.ipAddress : model.activeConnection.serverName;
let html = result.data['text/html'];
html =this.rewriteUrlUsingRegex(/(https?:\/\/mssql-master.*\/proxy)(.*)/g, html, host);
html =this.rewriteUrlUsingRegex(/(https?:\/\/master.*master-svc.*\/proxy)(.*)/g, html, host);
html = this.rewriteUrlUsingRegex(/(https?:\/\/mssql-master.*\/proxy)(.*)/g, html, host);
html = this.rewriteUrlUsingRegex(/(https?:\/\/master.*master-svc.*\/proxy)(.*)/g, html, host);
(<nb.IDisplayResult>output).data['text/html'] = html;
}
}
@@ -485,7 +484,7 @@ export class CellModel implements ICellModel {
// TODO: this will be refactored out into the notebooks extension as a contribution point
private getKnoxEndpoint(activeConnection: IConnectionProfile): notebookUtils.IEndpoint {
let endpoint;
if (this._connectionManagementService && activeConnection && activeConnection.providerName === MssqlProviderId) {
if (this._connectionManagementService && activeConnection && activeConnection.providerName === 'mssql') {
let serverInfo: ServerInfo = this._connectionManagementService.getServerInfo(activeConnection.id);
if (serverInfo && serverInfo.options && serverInfo.options['clusterEndpoints']) {
let endpoints: notebookUtils.IEndpoint[] = serverInfo.options['clusterEndpoints'];

View File

@@ -8,7 +8,7 @@
import 'vs/css!sql/media/icons/common-icons';
import { Button } from 'sql/base/browser/ui/button/button';
import { Modal } from 'sql/workbench/browser/modal/modal';
import * as TelemetryKeys from 'sql/common/telemetryKeys';
import * as TelemetryKeys from 'sql/platform/telemetry/telemetryKeys';
import { attachButtonStyler, attachModalDialogStyler } from 'sql/platform/theme/common/styler';
import { IThemeService } from 'vs/platform/theme/common/themeService';
import { Event, Emitter } from 'vs/base/common/event';