Skip to content

Commit

Permalink
Merge pull request #46 from siemens/feature/multi-nic-capture
Browse files Browse the repository at this point in the history
Feature/multi nic capture
  • Loading branch information
thediveo authored Feb 13, 2024
2 parents e9e5713 + d9a303c commit 9bc9e39
Show file tree
Hide file tree
Showing 22 changed files with 636 additions and 82 deletions.
1 change: 1 addition & 0 deletions webui/.env.development
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
VITE_APP_ENABLE_MONOLITH=true
50 changes: 29 additions & 21 deletions webui/icons/Capture.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
69 changes: 69 additions & 0 deletions webui/icons/CaptureCheck.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
69 changes: 69 additions & 0 deletions webui/icons/CaptureMulti.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
69 changes: 69 additions & 0 deletions webui/icons/CaptureMultiOn.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions webui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@
"vite-tsconfig-paths": "^4.2.3"
},
"scripts": {
"start": "REACT_APP_GIT_VERSION=${GIT_VERSION:-$(git describe)} REACT_APP_ENABLE_MONOLITH=true vite --port 3300",
"unstrict": "REACT_APP_GIT_VERSION=${GIT_VERSION:-$(git describe)} REACT_APP_UNSTRICT=true REACT_APP_ENABLE_MONOLITH=true vite --port 3300",
"start": "REACT_APP_GIT_VERSION=${GIT_VERSION:-$(git describe)} vite --port 3300",
"unstrict": "REACT_APP_GIT_VERSION=${GIT_VERSION:-$(git describe)} VITE_VITE_APP_UNSTRICT=true VITE_APP_ENABLE_MONOLITH=true vite --port 3300",
"build": "REACT_APP_GIT_VERSION=${GIT_VERSION:-$(git describe)} vite build",
"imagebuild": "REACT_APP_GIT_VERSION=${GIT_VERSION:-$(git describe)} vite build",
"icons": "node genicons",
Expand Down
8 changes: 6 additions & 2 deletions webui/src/components/containeebadge/ContaineeBadge.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import React from 'react'
import clsx from 'clsx'

import { Button, styled, Tooltip } from '@mui/material'
import { Box, Button, styled, Tooltip } from '@mui/material'

import { containeeDescription, containeeState, ContainerState, containerStateString, Containee, containeeFullName, isPrivilegedContainer, isElevatedContainer, isContainer, GHOSTWIRE_LABEL_ROOT } from 'models/gw'
import { ContaineeIcon } from 'utils/containeeicon'
Expand Down Expand Up @@ -161,6 +161,7 @@ export interface ContaineeBadgeProps {
notooltip?: boolean
/** show an additional capture button? */
capture?: boolean
hideCapture?: boolean
}

/**
Expand Down Expand Up @@ -203,6 +204,7 @@ export const ContaineeBadge = ({
endIcon,
notooltip,
capture,
hideCapture,
onClick
}: ContaineeBadgeProps) => {
const privileged = isPrivilegedContainer(containee)
Expand All @@ -220,7 +222,9 @@ export const ContaineeBadge = ({

const CeeIcon = ContaineeIcon(containee)

const shark = capture && <CaptureButton target={containee} />
const shark = capture && (!hideCapture
? <CaptureButton target={containee} />
: <Box sx={{width: '30px', display:'inline-block'}} />)

const kingOfBoxIcon = privileged
? <PrivilegedIcon className="kinginthebox" />
Expand Down
Loading

0 comments on commit 9bc9e39

Please sign in to comment.