mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2024-12-30 09:48:53 +00:00
Basic definition of installed software
This commit is contained in:
parent
71129e28cf
commit
25e137a488
@ -7,11 +7,22 @@ import { ElectronService } from 'ngx-electron';
|
|||||||
export class InstalledSoftwareService {
|
export class InstalledSoftwareService {
|
||||||
private software = [{
|
private software = [{
|
||||||
name: 'ls',
|
name: 'ls',
|
||||||
commands: ['ls']
|
commands: ['ls'],
|
||||||
|
installed: false
|
||||||
}, {
|
}, {
|
||||||
name: 'telnet',
|
name: 'telnet',
|
||||||
commands: ['telnet']
|
commands: ['telnet'],
|
||||||
}]
|
installed: false
|
||||||
|
}, {
|
||||||
|
name: 'SolarPuTTY',
|
||||||
|
commands: [
|
||||||
|
'SolarPuTTY.exe'
|
||||||
|
],
|
||||||
|
type: 'web',
|
||||||
|
resource: 'exe',
|
||||||
|
binary: 'SolarPuTTY.exe',
|
||||||
|
installed: false
|
||||||
|
}];
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private electronService: ElectronService
|
private electronService: ElectronService
|
||||||
@ -22,10 +33,8 @@ export class InstalledSoftwareService {
|
|||||||
.getInstalledSoftware(this.software);
|
.getInstalledSoftware(this.software);
|
||||||
|
|
||||||
return this.software.map((software) => {
|
return this.software.map((software) => {
|
||||||
return {
|
software.installed = installedSoftware[software.name].length > 0;
|
||||||
name: software.name,
|
return software;
|
||||||
installed: installedSoftware[software.name].length > 0
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user