diff --git a/README.md b/README.md index 654d618..a5b0d32 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ project located [here](https://github.com/netbootxyz/docker-netbootxyz). Uses the docker-netbootxyz repo for source files to avoid duplication of configs: ```bash -git clone https://github.com/netbootxyz/webapp +git clone https://github.com/Adambis1/webapp cd webapp git clone https://github.com/netbootxyz/docker-netbootxyz docker build . -t netbootxyz-webapp @@ -53,3 +53,87 @@ docker run -d \ --restart unless-stopped \ ghcr.io/netbootxyz/webapp-dev:latest ``` + + +## Why this fork was created ? +I wanted to be able to hide the directory and its contents from the webapp so modified as i see fit. +It's not the greatest thing there but it works and it's all i need + +Making it possible to hide directories from netbootxyz webapp with creating a file named 'disable-tracking-netbootxyz' in the folder, making it invisible in gui +In my case i have WinPE and extracted isos in WinPE folder +``` +assets +├───asset-mirror +│ └───releases +│ └───download +├───debian-core-10 +│ └───releases +│ └───download +├───debian-core-11 +│ └───releases +│ └───download +├───debian-core-12 +│ └───releases +│ └───download +├───debian-squash +│ └───releases +│ └───download +├───fedora-assets +│ └───releases +│ └───download +├───manjaro-squash +│ └───releases +│ └───download +├───ssh +├───ubuntu-squash +│ └───releases +│ └───download +└───WinPE <- want to hide this folder and its contents + ├───disable-tracking-netbootxyz (create file) + ├───configs + │ ├───Windows_10 + │ └───Windows_11 + ├───iso + │ ├───Windows_10 + │ │ │ + │ │ [...] + │ └───Windows_11 + │ │ │ + │ │ [...] + ├───x64 + │ │ + │ [...] + └───x86 + │ + [...] +``` +Resulting with following folders visible to webapp +``` +assets +├───asset-mirror +│ └───releases +│ └───download +├───debian-core-10 +│ └───releases +│ └───download +├───debian-core-11 +│ └───releases +│ └───download +├───debian-core-12 +│ └───releases +│ └───download +├───debian-squash +│ └───releases +│ └───download +├───fedora-assets +│ └───releases +│ └───download +├───manjaro-squash +│ └───releases +│ └───download +├───ssh +└────ubuntu-squash + └───releases + └───download +``` + diff --git a/public/netbootxyz-web.ejs b/public/netbootxyz-web.ejs index 7021741..a46d6f5 100644 --- a/public/netbootxyz-web.ejs +++ b/public/netbootxyz-web.ejs @@ -401,6 +401,7 @@ socket.on('renderlocal', function(endpoints,localfiles,remotemenuversion){ var remotetable = $('#remoteassets').DataTable(tableoptions); localtable.clear(); remotetable.clear(); + disabled_folders = []; $.each(endpoints.endpoints, function(index,value){ $.each(value.files, function( arrindex, file ) { if (localfiles.includes(value.path + file)){ @@ -427,8 +428,9 @@ socket.on('renderlocal', function(endpoints,localfiles,remotemenuversion){ }); if (localfiles.length != 0){ var untrackedtable = $('#untrackedassets').DataTable(tableoptions); + (localfiles.filter(str => str.includes("disable-tracking-netbootxyz"))).forEach(element => {disabled_folders.push((element.substring(0,element.lastIndexOf("/")+1)))}); $.each(localfiles, function( arrindex, file ) { - if (!file.endsWith('.part2')) { + if (!file.endsWith('.part2') && disabled_folders.filter(str => str.includes(file.substring(0,str.length))).length==0 ) { untrackedtable.row.add( [ '/assets' + file,