Skip to content

Commit

Permalink
Merge pull request #2 from QXIP/develop
Browse files Browse the repository at this point in the history
fix: Feature Request: Hide Files #1
  • Loading branch information
RFbkak37y3kIY authored Nov 17, 2023
2 parents 1317f55 + c17f5c7 commit f1c82f8
Show file tree
Hide file tree
Showing 8 changed files with 41 additions and 18 deletions.
33 changes: 23 additions & 10 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,26 @@
],
"outputHashing": "all"
},
"development": {
"buildOptimizer": false,
"optimization": false,
"vendorChunk": true,
"extractLicenses": false,
"sourceMap": true,
"namedChunks": true
"kiosk": {
"budgets": [
{
"type": "initial",
"maximumWarning": "5500kb",
"maximumError": "10mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "20kb",
"maximumError": "100kb"
}
],
"outputHashing": "all",
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.kiosk.ts"
}
]
}
},
"defaultConfiguration": "production"
Expand All @@ -74,11 +87,11 @@
"production": {
"browserTarget": "webshark:build:production"
},
"development": {
"browserTarget": "webshark:build:development"
"kiosk": {
"browserTarget": "webshark:build:kiosk"
}
},
"defaultConfiguration": "development"
"defaultConfiguration": "production"
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
"scripts": {
"ng": "ng",
"start": "ng serve --proxy-config src/proxy.conf.json --host=0.0.0.0 --port=8003 --disable-host-check",
"start:kiosk": "ng serve --proxy-config src/proxy.conf.json --configuration kiosk --host=0.0.0.0 --port=8003 --disable-host-check",
"demo": "ng serve --proxy-config src/proxy.demo.json --host=0.0.0.0 --port=8004 --disable-host-check",
"build": "ng build --configuration production",
"build:kiosk": "ng build --configuration kiosk",
"watch": "ng build --watch --configuration development",
"test": "ng test"
},
Expand Down
7 changes: 3 additions & 4 deletions src/app/components/controls/webshark/webshark.component.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<div *ngIf="!(dataTree.length > 0) && !(detailsTable.length > 0)">
<div style="padding: 2rem">
<div style="height: 100px; min-width: 200px; margin-bottom: 1rem">
<div style="min-width: 200px; margin-bottom: 1rem" [style.height]="isKIOSK ? '60vh' : '100px'">
<pcap-uploader></pcap-uploader>
</div>
<mat-list>
<mat-list *ngIf="!isKIOSK">
<h1 mat-subheader>Files</h1>
<div
*ngFor="let note of fileList"
Expand All @@ -22,8 +22,7 @@ <h1 mat-subheader>Files</h1>
font-size: 40px;
width: 40px;
height: 40px;
"
>note</mat-icon
">note</mat-icon
>
<div mat-line>
<strong>{{ note.name }}</strong>
Expand Down
2 changes: 2 additions & 0 deletions src/app/components/controls/webshark/webshark.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
import { HighlightService } from '@app/services/hightlight.service';
import { AlertService } from '../alert/alert.service';
import { CustomTableComponent } from '../custom-table/custom-table.component';
import { environment } from './../../../../environments/environment';

@Component({
selector: 'app-webshark',
Expand All @@ -34,6 +35,7 @@ export class WebsharkComponent implements OnInit, AfterViewInit {
highlight: any;
sizeUp: boolean = false;
selectedHexArray: any[] = [];
isKIOSK = !!environment.kiosk;
@Input() fileList: any = [];
@Input() framePosition: any = ['horizontal', 'vertical'];
@Input() set range(val: any) {
Expand Down
5 changes: 5 additions & 0 deletions src/environments/environment.kiosk.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export const environment = {
production: true,
apiUrl: '/webshark/',
kiosk: true
};
3 changes: 2 additions & 1 deletion src/environments/environment.prod.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export const environment = {
production: true,
apiUrl:'/webshark/',
apiUrl: '/webshark/',
kiosk: false
};
3 changes: 2 additions & 1 deletion src/environments/environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@

export const environment = {
production: false,
apiUrl:'/webshark/',
apiUrl: '/webshark/',
kiosk: false
};

/*
Expand Down
4 changes: 2 additions & 2 deletions src/proxy.conf.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"/webshark/json*": {
"target": "http://de4.sipcapture.io:8085/",
"/webshark/*": {
"target": "http://localhost:8085/",
"secure": false,
"logLevel": "debug",
"changeOrigin": true
Expand Down

0 comments on commit f1c82f8

Please sign in to comment.