mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2025-02-21 10:01:44 +00:00
Option to open file explorer added
This commit is contained in:
parent
235483dba5
commit
f49cc1960c
@ -264,6 +264,7 @@ import { SystemStatusComponent } from './components/system-status/system-status.
|
||||
import { StatusInfoComponent } from './components/system-status/status-info/status-info.component';
|
||||
import { StatusChartComponent } from './components/system-status/status-chart/status-chart.component';
|
||||
import { NgCircleProgressModule } from 'ng-circle-progress';
|
||||
import { OpenFileExplorerActionComponent } from './components/project-map/context-menu/actions/open-file-explorer/open-file-explorer-action.component';
|
||||
|
||||
if (environment.production) {
|
||||
Raven.config('https://b2b1cfd9b043491eb6b566fd8acee358@sentry.io/842726', {
|
||||
@ -444,7 +445,8 @@ if (environment.production) {
|
||||
DirectLinkComponent,
|
||||
SystemStatusComponent,
|
||||
StatusInfoComponent,
|
||||
StatusChartComponent
|
||||
StatusChartComponent,
|
||||
OpenFileExplorerActionComponent
|
||||
],
|
||||
imports: [
|
||||
BrowserModule,
|
||||
|
@ -0,0 +1,4 @@
|
||||
<button mat-menu-item (click)="open()">
|
||||
<mat-icon>tab</mat-icon>
|
||||
<span>Open file explorer</span>
|
||||
</button>
|
@ -0,0 +1,24 @@
|
||||
import { Component, OnInit, Input } from '@angular/core';
|
||||
import { Node } from '../../../../../cartography/models/node';
|
||||
import { Server } from '../../../../../models/server';
|
||||
import { ElectronService } from 'ngx-electron';
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'app-open-file-explorer-action',
|
||||
templateUrl: './open-file-explorer-action.component.html'
|
||||
})
|
||||
export class OpenFileExplorerActionComponent implements OnInit {
|
||||
@Input() server: Server;
|
||||
@Input() node: Node;
|
||||
|
||||
constructor(
|
||||
private electronService: ElectronService
|
||||
) {}
|
||||
|
||||
ngOnInit() {}
|
||||
|
||||
open() {
|
||||
this.electronService.shell.openItem(this.node.node_directory);
|
||||
}
|
||||
}
|
@ -25,6 +25,11 @@
|
||||
[server]="server"
|
||||
[node]="nodes[0]"
|
||||
></app-console-device-action-browser>
|
||||
<app-open-file-explorer-action
|
||||
*ngIf="!projectService.isReadOnly(project) && nodes.length===1 && isElectronApp"
|
||||
[server]="server"
|
||||
[node]="nodes[0]"
|
||||
></app-open-file-explorer-action>
|
||||
<app-change-symbol-action
|
||||
*ngIf="!projectService.isReadOnly(project) && nodes.length===1"
|
||||
[server]="server"
|
||||
|
Loading…
x
Reference in New Issue
Block a user