5 Commits

Author SHA1 Message Date
5ad1f744d2 ## 1.123.0 2025-04-24 18:55:12 -07:00
47d3a22371 ## 1.122.0 2025-04-14 08:34:03 -07:00
71219673e5 ## 1.121.0 2025-04-11 13:37:44 -07:00
70674c616d ## 1.120.0 2025-04-11 12:59:25 -07:00
07b932e913 ## 1.115.0 2025-04-10 20:03:31 -07:00
11 changed files with 171 additions and 54 deletions

View File

@ -221,8 +221,33 @@ None
- Close active after opening Sub-Kanban when directory found - Close active after opening Sub-Kanban when directory found
## 1.118.0 1741303103654 = 638768999036540000 = 2025-0.Winter = Thu Mar 06 2025 16:18:23 GMT-0700 (Mountain Standard Time) ## 1.118.0 1741303103654 = 638768999036540000 = 2025-0.Winter = Thu Mar 06 2025 16:18:23 GMT-0700 (Mountain Standard Time)
----------------------------------------------------------------------------------------------------------- -----------------------------------------------------------------------------------------------------------
- Add search page for Backlog - Add search page for Backlog
## 1.119.0 1744337196592 = 638799339965920000 = 2025-1.Spring = Thu Apr 10 2025 19:06:36 GMT-0700 (Mountain Standard Time)
-----------------------------------------------------------------------------------------------------------
- Changed ADO Priority servers
## 1.120.0 1744401374311 = 638799981743110000 = 2025-1.Spring = Fri Apr 11 2025 12:56:13 GMT-0700 (Mountain Standard Time)
-----------------------------------------------------------------------------------------------------------
- Sidebar button for view command pallete images
## 1.121.0 1744403802837 = 638800006028370000 = 2025-1.Spring = Fri Apr 11 2025 13:36:42 GMT-0700 (Mountain Standard Time)
-----------------------------------------------------------------------------------------------------------
- Extension logo
## 1.122.0 1744403802837 = 638800006028370000 = 2025-1.Spring = Fri Apr 11 2025 13:36:42 GMT-0700 (Mountain Standard Time)
-----------------------------------------------------------------------------------------------------------
- Extension to javascript communication
- cod-1-122-0.js
## 1.123.0 1745545527205 = 638811423272050000 = 2025-1.Spring = Thu Apr 24 2025 18:45:26 GMT-0700 (Mountain Standard Time)
-----------------------------------------------------------------------------------------------------------
- Enable find within Cost of Delay (CoD)

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

View File

@ -2,13 +2,14 @@ $(document).ready(function () {
const fromHtml = true; const fromHtml = true;
const username = _webviewUsername; const username = _webviewUsername;
const machineId = _webviewMachineId; const machineId = _webviewMachineId;
const windowLocationHRef = window.location.href + '?site=' + _webviewSite + 'view=' + _webviewView;
const baseUri = 'https://eaf-dev.mes.infineon.com'; const baseUri = 'https://eaf-dev.mes.infineon.com';
const apiUrl = 'https://oi-metrology-viewer-prod.mes.infineon.com:4438/api/v1/ado/'; const apiUrl = 'https://eaf-dev.mes.infineon.com/api/v1/ado/';
const windowLocationHRef = window.location.href + '?site=' + _webviewSite + 'view=' + _webviewView;
const signalRUrl = baseUri + '/signalr'; const signalRUrl = baseUri + '/signalr';
const workItems = { const workItems = {
a: baseUri + '/markdown/bugs-features-with-parents.json?v=2025-01-22-10-49', a: baseUri + '/markdown/bugs-features-with-parents.json?v=2025-04-10-15-59',
b: baseUri + '/markdown/{[]}.json?v=2025-01-22-10-49' b: baseUri + '/markdown/{[]}.json?v=2025-04-10-15-59',
timeout: 3000,
}; };
const b = { const b = {
page: 'business', page: 'business',

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

View File

@ -274,6 +274,26 @@
}, },
"title": "Cost of Delay Helper Configuration", "title": "Cost of Delay Helper Configuration",
"type": "object" "type": "object"
},
"views": {
"view-command-pallete-webview-view-provider-view": [
{
"contextualTitle": "Infineon Technologies Americas Corp.",
"icon": "media/lowres-LOGO_Black.png.png",
"id": "view-command-pallete-webview-view-provider",
"name": "Infineon",
"type": "webview"
}
]
},
"viewsContainers": {
"activitybar": [
{
"icon": "media/lowres-LOGO_Black.png.png",
"id": "view-command-pallete-webview-view-provider-view",
"title": "Infineon Technologies Americas Corp."
}
]
} }
}, },
"dependencies": { "dependencies": {
@ -307,6 +327,7 @@
"engines": { "engines": {
"vscode": "^1.79.0" "vscode": "^1.79.0"
}, },
"icon": "media/LOGO_RGB.png",
"keywords": [ "keywords": [
"Backlog", "Backlog",
"CoD", "CoD",
@ -326,12 +347,12 @@
"scripts": { "scripts": {
"tsc-build": "tsc", "tsc-build": "tsc",
"tsc-clean": "tsc --build --clean", "tsc-clean": "tsc --build --clean",
"vscode:package": "node node_modules/@vscode/vsce/vsce package",
"vscode:login": "node node_modules/@vscode/vsce/vsce login Infineon-Technologies-AG-Mesa-FI", "vscode:login": "node node_modules/@vscode/vsce/vsce login Infineon-Technologies-AG-Mesa-FI",
"vscode:ls-publishers": "node node_modules/@vscode/vsce/vsce ls-publishers", "vscode:ls-publishers": "node node_modules/@vscode/vsce/vsce ls-publishers",
"vscode:package": "node node_modules/@vscode/vsce/vsce package",
"vscode:publish": "node node_modules/@vscode/vsce/vsce publish", "vscode:publish": "node node_modules/@vscode/vsce/vsce publish",
"watch": "concurrently \"rollup -c -w\" \"webpack --watch --config ./build/node-extension.webpack.config.js\"", "watch": "concurrently \"rollup -c -w\" \"webpack --watch --config ./build/node-extension.webpack.config.js\"",
"webpack": "webpack --config ./build/node-extension.webpack.config.js" "webpack": "webpack --config ./build/node-extension.webpack.config.js"
}, },
"version": "1.118.0" "version": "1.123.0"
} }

View File

@ -0,0 +1,65 @@
import * as vscode from "vscode";
import { getNonce } from "./getNonce";
export class ViewCommandPalleteWebviewViewProvider implements vscode.WebviewViewProvider {
_webviewView?: vscode.WebviewView;
constructor(private readonly _extensionContext: vscode.ExtensionContext) {
}
public revive(webviewView: vscode.WebviewView) {
this._webviewView = webviewView;
}
public resolveWebviewView(webviewView: vscode.WebviewView) {
this._webviewView = webviewView;
webviewView.webview.options = {
// Allow scripts in the webview
enableScripts: true,
localResourceRoots: [this._extensionContext.extensionUri],
};
webviewView.webview.html = this._getHtmlForWebview(webviewView.webview);
}
private _getHtmlForWebview(webview: vscode.Webview) {
const imageA = webview.asWebviewUri(
vscode.Uri.joinPath(this._extensionContext.extensionUri, "media", "Screenshot 2025-04-11 125031.png")
);
const imageB = webview.asWebviewUri(
vscode.Uri.joinPath(this._extensionContext.extensionUri, "media", "Screenshot 2025-04-11 125350.png")
);
// Use a nonce to only allow a specific script to be run.
const nonce = getNonce();
return `<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<!--
Use a content security policy to only allow loading images from https or from our extension directory,
and only allow scripts that have a specific nonce.
-->
<meta http-equiv="Content-Security-Policy"
content="img-src https: data:;
style-src 'unsafe-inline' ${webview.cspSource};
script-src 'nonce-${nonce}';">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<h1>Infineon Technologies Americas Corp.</h1>
<ul>
<li>View</li>
<li>Command Pallete... Ctrl+Shift+P</li>
<li>Type Mesa or Leominster</li>
<li>Select item</li>
</ul>
<img src="${imageA}" alt="Screenshot 2025-04-11 125031.png" width="75%" height="75%">
<img src="${imageB}" alt="Screenshot 2025-04-11 125350" width="75%" height="75%">
</body>
</html>`;
}
}

View File

@ -1,8 +1,6 @@
import * as vscode from "vscode"; import * as vscode from "vscode";
import { getNonce } from "./getNonce"; import { getNonce } from "./getNonce";
import { apiBaseUrl } from "./constants"; import { apiBaseUrl } from "./constants";
import { PostMessage } from "./PostMessage";
import { title } from "process";
export class WebviewPanelCostOfDelay { export class WebviewPanelCostOfDelay {
/** /**
@ -48,6 +46,7 @@ export class WebviewPanelCostOfDelay {
{ {
// Enable javascript in the webview // Enable javascript in the webview
enableScripts: true, enableScripts: true,
enableFindWidget: true,
// And restrict the webview to only loading content from our extension's `media` directory. // And restrict the webview to only loading content from our extension's `media` directory.
localResourceRoots: [ localResourceRoots: [
@ -78,18 +77,21 @@ export class WebviewPanelCostOfDelay {
// This happens when the user closes the panel or when the panel is closed programmatically // This happens when the user closes the panel or when the panel is closed programmatically
this._panel.onDidDispose(() => this.dispose(), null, this._disposables); this._panel.onDidDispose(() => this.dispose(), null, this._disposables);
// // Handle messages from the webview // Handle messages from the webview
// this._panel.webview.onDidReceiveMessage( this._panel.webview.onDidReceiveMessage(
// (message) => { (message) => {
// switch (message.command) { switch (message.command) {
// case "alert": case "alert":
// vscode.window.showErrorMessage(message.text); vscode.window.showErrorMessage(message.text);
// return; return;
// } default:
// }, vscode.window.showErrorMessage(message.text);
// null, break;
// this._disposables }
// ); },
null,
this._disposables
);
} }
public dispose() { public dispose() {
@ -108,29 +110,18 @@ export class WebviewPanelCostOfDelay {
private async _update(site: string, title: string, view: string) { private async _update(site: string, title: string, view: string) {
const webview = this._panel.webview; const webview = this._panel.webview;
this._panel.webview.html = this._getHtmlForWebview(site, title, view, webview); this._panel.webview.html = this._getHtmlForWebview(site, title, view, webview);
webview.onDidReceiveMessage(async (postMessage: PostMessage) => { webview.onDidReceiveMessage(async (message: string) => {
switch (postMessage.type) { vscode.window.showErrorMessage(message);
case "on-info":
if (!postMessage.value)
return;
vscode.window.showInformationMessage(postMessage.value);
break;
case "on-error":
if (!postMessage.value)
return;
vscode.window.showErrorMessage(postMessage.value);
break;
default:
vscode.window.showErrorMessage(postMessage.type);
break;
}
}); });
} }
private _getHtmlForWebview(site: string, title: string, view: string, webview: vscode.Webview) { private _getHtmlForWebview(site: string, title: string, view: string, webview: vscode.Webview) {
const baseUri = 'https://eaf-dev.mes.infineon.com'; const baseUri = 'https://eaf-dev.mes.infineon.com';
const scriptUri = 'cod-1-123-0.js?v=2025-04-14-08-10';
// Use a nonce to only allow a specific script to be run.
const nonce = getNonce();
if (view === 'HTML') { if (view === 'HTML') {
return `<!DOCTYPE html> return `<!DOCTYPE html>
@ -163,9 +154,6 @@ export class WebviewPanelCostOfDelay {
vscode.Uri.joinPath(this._extensionContext.extensionUri, "media", "cost-of-delay.js") vscode.Uri.joinPath(this._extensionContext.extensionUri, "media", "cost-of-delay.js")
); );
// Use a nonce to only allow a specific script to be run.
const nonce = getNonce();
return `<!DOCTYPE html> return `<!DOCTYPE html>
<html lang="en"> <html lang="en">
@ -177,8 +165,7 @@ export class WebviewPanelCostOfDelay {
<link href="${styleCostOfDelayUri}" rel="stylesheet" /> <link href="${styleCostOfDelayUri}" rel="stylesheet" />
<script nonce="${nonce}" src="${scriptJQueryUri}"></script> <script nonce="${nonce}" src="${scriptJQueryUri}"></script>
<script nonce="${nonce}" src="${scriptSignalRUri}"></script> <script nonce="${nonce}" src="${scriptSignalRUri}"></script>
<script nonce="${nonce}" src="${baseUri}/signalr/hubs"></script> <script nonce="${nonce}" src="${baseUri}/js/${scriptUri}" type="text/javascript"></script>
<script nonce="${nonce}" src="${baseUri}/js/cod-b.js?v=2025-01-22-10-49" type="text/javascript"></script>
<script nonce="${nonce}"> <script nonce="${nonce}">
const _webviewSite = '${site}'; const _webviewSite = '${site}';
const _webviewView = '${view}'; const _webviewView = '${view}';

View File

@ -38,6 +38,7 @@ export class WebviewPanelExample {
{ {
// Enable javascript in the webview // Enable javascript in the webview
enableScripts: true, enableScripts: true,
enableFindWidget: true,
// And restrict the webview to only loading content from our extension's `media` directory. // And restrict the webview to only loading content from our extension's `media` directory.
localResourceRoots: [ localResourceRoots: [

View File

@ -11,19 +11,14 @@ import * as replaceLinesHelper from './replaceLinesHelper';
import * as readOnlyLinesHelper from './readOnlyLinesHelper'; import * as readOnlyLinesHelper from './readOnlyLinesHelper';
import * as WebviewPanelExample from './WebviewPanelExample'; import * as WebviewPanelExample from './WebviewPanelExample';
import * as WebviewPanelCostOfDelay from './WebviewPanelCostOfDelay'; import * as WebviewPanelCostOfDelay from './WebviewPanelCostOfDelay';
import * as ColumnsToCardsWebviewViewProvider from './ColumnsToCardsWebviewViewProvider'; import { ViewCommandPalleteWebviewViewProvider } from "./ViewCommandPalleteWebviewViewProvider";
// This method is called when your extension is activated // This method is called when your extension is activated
// Your extension is activated the very first time the command is executed // Your extension is activated the very first time the command is executed
export async function activate(extensionContext: vscode.ExtensionContext) { export async function activate(extensionContext: vscode.ExtensionContext) {
const columnsToCardsWebviewViewProvider = new ColumnsToCardsWebviewViewProvider.ColumnsToCardsWebviewViewProvider(extensionContext); const viewCommandPalleteWebviewViewProvider = new ViewCommandPalleteWebviewViewProvider(extensionContext);
extensionContext.subscriptions.push(vscode.window.registerWebviewViewProvider("view-command-pallete-webview-view-provider", viewCommandPalleteWebviewViewProvider));
const item = vscode.window.createStatusBarItem(vscode.StatusBarAlignment.Right);
item.text = "$(beaker) Show Kanban";
// item.command = "kanban.show";
item.show();
extensionContext.subscriptions.push(vscode.window.registerWebviewViewProvider("columns-to-cards-webview-view-provider", columnsToCardsWebviewViewProvider));
const config = vscode.workspace.getConfiguration('calc'); const config = vscode.workspace.getConfiguration('calc');
const outputChannel = vscode.window.createOutputChannel('calc'); const outputChannel = vscode.window.createOutputChannel('calc');
@ -49,6 +44,30 @@ export async function activate(extensionContext: vscode.ExtensionContext) {
}), }),
); );
function getWebviewView(title: string) {
const column = vscode.window.activeTextEditor
? vscode.window.activeTextEditor.viewColumn
: undefined;
// Otherwise, create a new panel.
const webviewView = vscode.window.createWebviewPanel(
"web-view-panel",
title,
column || vscode.ViewColumn.One,
{
// Enable javascript in the webview
enableScripts: true,
// And restrict the webview to only loading content from our extension's `media` directory.
localResourceRoots: [
vscode.Uri.joinPath(extensionContext.extensionUri, "media"),
vscode.Uri.joinPath(extensionContext.extensionUri, "out/compiled"),
],
}
);
return webviewView;
}
async function replaceResultsWithPositions( async function replaceResultsWithPositions(
editor: vscode.TextEditor, editor: vscode.TextEditor,
positionsAndExpressions: [vscode.Position, string][], positionsAndExpressions: [vscode.Position, string][],
@ -130,8 +149,6 @@ export async function activate(extensionContext: vscode.ExtensionContext) {
const commands = [ const commands = [
vscode.commands.registerCommand("copyHelper.copySyntaxInLight", copyHelper.copySyntaxInLight), vscode.commands.registerCommand("copyHelper.copySyntaxInLight", copyHelper.copySyntaxInLight),
vscode.commands.registerCommand("extension.rotateExplorerSortOrder", settingsHelper.rotateExplorerSortOrder), vscode.commands.registerCommand("extension.rotateExplorerSortOrder", settingsHelper.rotateExplorerSortOrder),
vscode.commands.registerCommand("kanban.refreshBoth", () => { kanbanHelper.refreshBoth(extensionContext); }),
vscode.commands.registerCommand("kanban.refreshSidebar", ColumnsToCardsWebviewViewProvider.refreshSidebar),
vscode.commands.registerCommand("kanban.openWithTextEditor", kanbanHelper.openWithTextEditor), vscode.commands.registerCommand("kanban.openWithTextEditor", kanbanHelper.openWithTextEditor),
vscode.commands.registerCommand("kanban.openInNewWindow", kanbanHelper.openInNewWindow), vscode.commands.registerCommand("kanban.openInNewWindow", kanbanHelper.openInNewWindow),
vscode.commands.registerCommand("markdown.newMarkdownFile", markdownHelper.newMarkdownFile), vscode.commands.registerCommand("markdown.newMarkdownFile", markdownHelper.newMarkdownFile),