mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Add graph icons to OE and TD (#18808)
* add graph icons to OE and TD * PR comments * change enum type * change sub type to icon and make basic as default * changed icontype to icon * change default logic location * change icon name to be more generic * use right icons
This commit is contained in:
@@ -65,10 +65,6 @@ export enum MssqlClusterItemsSubType {
|
||||
Spark = ':spark:'
|
||||
}
|
||||
|
||||
export enum TableType {
|
||||
Basic = 'basic'
|
||||
}
|
||||
|
||||
// SPARK JOB SUBMISSION //////////////////////////////////////////////////////////
|
||||
export const mssqlClusterNewNotebookTask = 'mssqlCluster.task.newNotebook';
|
||||
export const mssqlClusterOpenNotebookTask = 'mssqlCluster.task.openNotebook';
|
||||
|
||||
@@ -6,21 +6,23 @@
|
||||
import { AppContext } from '../appContext';
|
||||
import * as azdata from 'azdata';
|
||||
import * as vscode from 'vscode';
|
||||
import { sqlProviderName, TableType } from '../constants';
|
||||
import { sqlProviderName } from '../constants';
|
||||
import { generateUuid } from 'vscode-languageclient/lib/utils/uuid';
|
||||
import { ITelemetryEventProperties, Telemetry } from '../telemetry';
|
||||
|
||||
export function registerTableDesignerCommands(appContext: AppContext) {
|
||||
appContext.extensionContext.subscriptions.push(vscode.commands.registerCommand('mssql.newTable', async (context: azdata.ObjectExplorerContext) => {
|
||||
const connectionString = await azdata.connection.getConnectionString(context.connectionProfile.id, true);
|
||||
const telemetryInfo = await getTelemetryInfo(context, TableType.Basic);
|
||||
const tableIcon = context.nodeInfo.nodeSubType as azdata.designers.TableIcon;
|
||||
const telemetryInfo = await getTelemetryInfo(context, tableIcon);
|
||||
await azdata.designers.openTableDesigner(sqlProviderName, {
|
||||
server: context.connectionProfile.serverName,
|
||||
database: context.connectionProfile.databaseName,
|
||||
isNewTable: true,
|
||||
id: generateUuid(),
|
||||
connectionString: connectionString,
|
||||
accessToken: context.connectionProfile.options.azureAccountToken
|
||||
accessToken: context.connectionProfile.options.azureAccountToken,
|
||||
tableIcon: tableIcon
|
||||
}, telemetryInfo);
|
||||
}));
|
||||
|
||||
@@ -30,7 +32,8 @@ export function registerTableDesignerCommands(appContext: AppContext) {
|
||||
const schema = context.nodeInfo.metadata.schema;
|
||||
const name = context.nodeInfo.metadata.name;
|
||||
const connectionString = await azdata.connection.getConnectionString(context.connectionProfile.id, true);
|
||||
const telemetryInfo = await getTelemetryInfo(context, TableType.Basic);
|
||||
const tableIcon = context.nodeInfo.nodeSubType as azdata.designers.TableIcon;
|
||||
const telemetryInfo = await getTelemetryInfo(context, tableIcon);
|
||||
await azdata.designers.openTableDesigner(sqlProviderName, {
|
||||
server: server,
|
||||
database: database,
|
||||
@@ -39,7 +42,8 @@ export function registerTableDesignerCommands(appContext: AppContext) {
|
||||
schema: schema,
|
||||
id: `${sqlProviderName}|${server}|${database}|${schema}|${name}`,
|
||||
connectionString: connectionString,
|
||||
accessToken: context.connectionProfile.options.azureAccountToken
|
||||
accessToken: context.connectionProfile.options.azureAccountToken,
|
||||
tableIcon: tableIcon
|
||||
}, telemetryInfo);
|
||||
}));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user