Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions extensions/vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,12 @@
"icon": "$(link-external)",
"category": "Posit Publisher"
},
{
"command": "posit.publisher.logs.viewJobLog",
"title": "View Full Job Error Log",
"icon": "$(output)",
"category": "Posit Publisher"
},
{
"command": "posit.publisher.homeView.navigateToDeployment.Server",
"title": "Browse Deployment Server",
Expand Down Expand Up @@ -349,6 +355,10 @@
"command": "posit.publisher.logs.visit",
"when": "false"
},
{
"command": "posit.publisher.logs.viewJobLog",
"when": "false"
},
{
"command": "posit.publisher.homeView.edit.Configuration",
"when": "false"
Expand Down
1 change: 1 addition & 0 deletions extensions/vscode/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ const baseContexts = {

const logsCommands = {
Visit: "posit.publisher.logs.visit",
ViewJobLog: "posit.publisher.logs.viewJobLog",
// Added automatically by VSCode with view registration
Fileview: "posit.publisher.logs.fileview",
Copy: "posit.publisher.logs.copy",
Expand Down
17 changes: 16 additions & 1 deletion extensions/vscode/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import { Commands } from "src/constants";
import { DocumentTracker } from "./entrypointTracker";
import { getXDGConfigProperty } from "src/utils/config";
import { PublisherState } from "./state";
import { normalizeURL } from "src/utils/url";
import { PublisherAuthProvider } from "./authProvider";
import { logger } from "./logging";
import { copySystemInfoCommand } from "src/commands";
Expand Down Expand Up @@ -129,7 +130,21 @@ async function initializeExtension(context: ExtensionContext) {
const projectTreeDataProvider = new ProjectTreeDataProvider(context);

// Logs tree view
const logsTreeDataProvider = new LogsTreeDataProvider(context, stream);
const logsTreeDataProvider = new LogsTreeDataProvider(
context,
stream,
(serverUrl: string) => {
const credential = state.credentials.find(
(c) =>
normalizeURL(c.url).toLowerCase() ===
normalizeURL(serverUrl).toLowerCase(),
);
if (credential) {
return { url: credential.url, apiKey: credential.apiKey };
}
return undefined;
},
);

const homeViewProvider = new HomeViewProvider(context, stream, state);
context.subscriptions.push(homeViewProvider);
Expand Down
Loading
Loading