Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NodeExplorer: Implements Nodes list #106

Merged
merged 5 commits into from
Jul 18, 2023
Merged

NodeExplorer: Implements Nodes list #106

merged 5 commits into from
Jul 18, 2023

Conversation

tylersmalley
Copy link
Contributor

@tylersmalley tylersmalley commented Jul 17, 2023

This is the start of a Node Explorer, hidden behind a setting.

tylersmalley and others added 3 commits July 17, 2023 16:04
Signed-off-by: Tyler Smalley <tyler@tailscale.com>
Signed-off-by: Tyler Smalley <tyler@tailscale.com>
Logger.info(`hostname: ${hostname}`, 'tsobj-fsp');
Logger.info(`remotePath: ${resourcePath}`, 'tsobj-fsp');

const command = `ssh ${hostname} ls -lA "${resourcePath}"`;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we just run ls -ap here? it wouldn't require skipping lines or anything.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, we can do ls -Ap. A will exclude the . and .. special entries.

const type = isDirectory ? vscode.FileType.Directory : vscode.FileType.File;
files.push([name, type]);
}
resolve(files);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we sort the files so that directories show up first? This is how the regular file explorer sorts the display

vscode.TreeDragAndDropController<PeerBaseTreeItem>,
vscode.FileDecorationProvider
{
dropMimeTypes = ['text/uri-list']; // add 'application/vnd.code.tree.testViewDragAndDrop' when we have file explorer
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this PR is missing this commit: 60dc7fa

At least the TypeScript part (not the Go part, since we're just shelling out to SSH)

This way we can have scp work between peers. We can also do it as a follow up PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, let's do that as a follow up.

Signed-off-by: Tyler Smalley <tyler@tailscale.com>
Signed-off-by: Tyler Smalley <tyler@tailscale.com>
Copy link
Contributor

@marwan-at-work marwan-at-work left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙌🏼

package.json Show resolved Hide resolved
@tylersmalley tylersmalley marked this pull request as ready for review July 18, 2023 18:27
@tylersmalley tylersmalley changed the title Node explorer NodeExplorer: Implements Nodes list Jul 18, 2023
@tylersmalley tylersmalley merged commit 327cc09 into main Jul 18, 2023
2 checks passed
@tylersmalley tylersmalley deleted the node-explorer branch July 18, 2023 23:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants