mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -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);
|
||||
}));
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 755 B After Width: | Height: | Size: 755 B |
30
extensions/theme-seti/icons/images/table-graphedge.svg
Normal file
30
extensions/theme-seti/icons/images/table-graphedge.svg
Normal file
@@ -0,0 +1,30 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 25.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 16 16" style="enable-background:new 0 0 16 16;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{fill:#F6F6F6;}
|
||||
.st1{fill:#F6F6F6;fill-opacity:0;}
|
||||
.st2{fill:#424242;}
|
||||
.st3{fill:#F0EFF1;}
|
||||
</style>
|
||||
<path class="st0" d="M16,1H1v12.1c0,0,0,0.1,0,0.1V15h0.8c0.6,0.6,1.4,1,2.2,1c0.3,0,0.5,0,0.8-0.1c0.6-0.2,1.1-0.5,1.5-0.9h1.6
|
||||
c0.6,0.6,1.3,1,2.2,1h0c0.3,0,0.5,0,0.8-0.1c0.6-0.2,1.1-0.5,1.5-0.9H16V1z"/>
|
||||
<path id="canvas" class="st1" d="M16,16H0V0h16V16z"/>
|
||||
<path class="st2" d="M2,2v8.8c0.4-0.3,0.8-0.6,1.2-0.7C3.5,10,3.7,10,4,10H3V8h3v2H4c1.1,0,2.1,0.6,2.6,1.5H7V11h0.8
|
||||
c0.6-0.6,1.3-1,2.2-1H7V8h3v2h0c0.9,0,1.7,0.4,2.2,1H14v2h-1c0,0.3,0,0.7-0.2,1H15V2H2z M6,7H3V5h3V7z M10,7H7V5h3V7z M14,10h-3V8h3
|
||||
V10z M14,7h-3V5h3V7z"/>
|
||||
<path class="st2" d="M10,11c-0.9,0-1.7,0.6-1.9,1.5H5.9c-0.3-1.1-1.4-1.7-2.4-1.4c-1.1,0.3-1.7,1.4-1.4,2.4c0.3,1.1,1.4,1.7,2.4,1.4
|
||||
c0.7-0.2,1.3-0.7,1.4-1.4h2.1c0.3,1.1,1.4,1.7,2.4,1.4c1.1-0.3,1.7-1.4,1.4-2.4C11.7,11.6,10.9,11,10,11z M4,14c-0.6,0-1-0.4-1-1
|
||||
s0.4-1,1-1s1,0.4,1,1S4.6,14,4,14z M10,14c-0.6,0-1-0.4-1-1s0.4-1,1-1c0.6,0,1,0.4,1,1S10.6,14,10,14z"/>
|
||||
<g>
|
||||
<rect x="3" y="5" class="st3" width="3" height="2"/>
|
||||
<rect x="7" y="8" class="st3" width="3" height="2"/>
|
||||
<path class="st3" d="M7.4,11.5c0.1-0.2,0.2-0.3,0.4-0.5H7v0.5H7.4z"/>
|
||||
<rect x="7" y="5" class="st3" width="3" height="2"/>
|
||||
<rect x="11" y="5" class="st3" width="3" height="2"/>
|
||||
<polygon class="st3" points="4,10 4,10 6,10 6,8 3,8 3,10 4,10 "/>
|
||||
<rect x="11" y="8" class="st3" width="3" height="2"/>
|
||||
<path class="st3" d="M12.9,12.2C13,12.5,13,12.8,13,13h1v-2h-1.8C12.6,11.3,12.8,11.8,12.9,12.2z"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.8 KiB |
26
extensions/theme-seti/icons/images/table-graphnode.svg
Normal file
26
extensions/theme-seti/icons/images/table-graphnode.svg
Normal file
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 25.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 16 16" style="enable-background:new 0 0 16 16;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{fill:#F6F6F6;}
|
||||
.st1{fill:#F6F6F6;fill-opacity:0;}
|
||||
.st2{fill:#424242;}
|
||||
.st3{fill:#F0EFF1;}
|
||||
</style>
|
||||
<path class="st0" d="M16,1H1v14h0.8c0.5,0.6,1.3,1,2.2,1s1.7-0.4,2.2-1H16V1z"/>
|
||||
<path id="canvas" class="st1" d="M16,16H0V0h16V16z"/>
|
||||
<path class="st2" d="M2,2v8.8C2.5,10.3,3.2,10,4,10H3V8h3v2H4c1.7,0,3,1.3,3,3v-2h3v2H7c0,0.4-0.1,0.7-0.2,1H15V2H2z M6,7H3V5h3V7z
|
||||
M10,10H7V8h3V10z M10,7H7V5h3V7z M14,13h-3v-2h3V13z M14,10h-3V8h3V10z M14,7h-3V5h3V7z"/>
|
||||
<circle class="st2" cx="4" cy="13" r="2"/>
|
||||
<g>
|
||||
<rect x="7" y="8" class="st3" width="3" height="2"/>
|
||||
<rect x="7" y="11" class="st3" width="3" height="2"/>
|
||||
<rect x="3" y="5" class="st3" width="3" height="2"/>
|
||||
<rect x="3" y="8" class="st3" width="3" height="2"/>
|
||||
<rect x="11" y="8" class="st3" width="3" height="2"/>
|
||||
<rect x="11" y="5" class="st3" width="3" height="2"/>
|
||||
<rect x="7" y="5" class="st3" width="3" height="2"/>
|
||||
<rect x="11" y="11" class="st3" width="3" height="2"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.3 KiB |
15
extensions/theme-seti/icons/images/table-temporal.svg
Normal file
15
extensions/theme-seti/icons/images/table-temporal.svg
Normal file
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
width="16" height="16" viewBox="0 0 64 64" style="enable-background:new 0 0 64 64;" xml:space="preserve">
|
||||
<path style="fill:#F6F6F6;" d="M4,0v56h24.038c3.653,4.847,9.439,8,15.962,8c11.028,0,20-8.972,20-20V0H4z"/>
|
||||
<g>
|
||||
<path style="fill:#424242;" d="M44,28c-8.836,0-16,7.163-16,16s7.164,16,16,16s16-7.163,16-16S52.836,28,44,28z M44,56
|
||||
c-6.62,0-12-5.38-12-12s5.38-12,12-12s12,5.38,12,12S50.62,56,44,56z"/>
|
||||
<polygon style="fill:#424242;" points="44,44 44,36 40,36 40,48 52,48 52,44 "/>
|
||||
<path style="fill:#424242;" d="M8,4v48h17.682c-0.557-1.271-0.985-2.609-1.271-4H12v-8h12.423c0.605-2.931,1.843-5.633,3.577-7.949
|
||||
V28h4.051c3.339-2.5,7.468-4,11.949-4v-8h12v8H44c4.482,0,8.61,1.5,11.949,4H56v0.038c1.517,1.143,2.861,2.493,4,4.013V4H8z M24,36
|
||||
H12v-8h12V36z M24,24H12v-8h12V24z M40,24H28v-8h12V24z"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
@@ -1518,8 +1518,17 @@
|
||||
"scmp_dark": {
|
||||
"iconPath": "./images/scmp_inverse.svg"
|
||||
},
|
||||
"table-designer": {
|
||||
"iconPath": "./images/table.svg"
|
||||
"table-basic": {
|
||||
"iconPath": "./images/table-basic.svg"
|
||||
},
|
||||
"table-temporal": {
|
||||
"iconPath": "./images/table-temporal.svg"
|
||||
},
|
||||
"table-graphnode": {
|
||||
"iconPath": "./images/table-graphnode.svg"
|
||||
},
|
||||
"table-graphedge": {
|
||||
"iconPath": "./images/table-graphedge.svg"
|
||||
}
|
||||
},
|
||||
"file": "_default",
|
||||
@@ -1818,7 +1827,10 @@
|
||||
"dashboard": "_shell",
|
||||
"profiler": "_csv",
|
||||
"Schema Compare": "scmp_dark",
|
||||
"table-designer": "table-designer"
|
||||
"table-basic": "table-basic",
|
||||
"table-temporal": "table-temporal",
|
||||
"table-graphnode": "table-graphnode",
|
||||
"table-graphedge": "table-graphedge"
|
||||
},
|
||||
"languageIds": {
|
||||
"bat": "_windows",
|
||||
|
||||
Reference in New Issue
Block a user