mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2025-02-22 10:20:48 +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 { StatusInfoComponent } from './components/system-status/status-info/status-info.component';
|
||||||
import { StatusChartComponent } from './components/system-status/status-chart/status-chart.component';
|
import { StatusChartComponent } from './components/system-status/status-chart/status-chart.component';
|
||||||
import { NgCircleProgressModule } from 'ng-circle-progress';
|
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) {
|
if (environment.production) {
|
||||||
Raven.config('https://b2b1cfd9b043491eb6b566fd8acee358@sentry.io/842726', {
|
Raven.config('https://b2b1cfd9b043491eb6b566fd8acee358@sentry.io/842726', {
|
||||||
@ -444,7 +445,8 @@ if (environment.production) {
|
|||||||
DirectLinkComponent,
|
DirectLinkComponent,
|
||||||
SystemStatusComponent,
|
SystemStatusComponent,
|
||||||
StatusInfoComponent,
|
StatusInfoComponent,
|
||||||
StatusChartComponent
|
StatusChartComponent,
|
||||||
|
OpenFileExplorerActionComponent
|
||||||
],
|
],
|
||||||
imports: [
|
imports: [
|
||||||
BrowserModule,
|
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"
|
[server]="server"
|
||||||
[node]="nodes[0]"
|
[node]="nodes[0]"
|
||||||
></app-console-device-action-browser>
|
></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
|
<app-change-symbol-action
|
||||||
*ngIf="!projectService.isReadOnly(project) && nodes.length===1"
|
*ngIf="!projectService.isReadOnly(project) && nodes.length===1"
|
||||||
[server]="server"
|
[server]="server"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user