Skip to content

Commit

Permalink
fixing UI multi-tasking bug
Browse files Browse the repository at this point in the history
updated callbacks table with new table when experimental setting flipped
  • Loading branch information
its-a-feature committed Feb 15, 2024
1 parent 76c929d commit c9c2aac
Show file tree
Hide file tree
Showing 12 changed files with 303 additions and 57 deletions.
7 changes: 7 additions & 0 deletions MythicReactUI/CHANGELOG.MD
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.1.68] - 2024-02-14

### Changed

- Fixed an issue with the task multiple dialog not issuing multiple back-to-back tasks
- Updated the active callbacks table with the new table when the experimental feature is set

## [0.1.67] - 2024-02-14

### Changed
Expand Down
2 changes: 1 addition & 1 deletion MythicReactUI/src/components/pages/Callbacks/Callbacks.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const StyledSpeedDial = styled(SpeedDial)(({theme}) => ({
top: theme.spacing(2),
right: theme.spacing(2),
},
zIndex: 2,
zIndex: 4,
},

[`& .${classes.speedDialAction}`]: {
Expand Down
318 changes: 275 additions & 43 deletions MythicReactUI/src/components/pages/Callbacks/CallbacksTable.js

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ export function CallbacksTabsTaskMultipleDialog({onClose, callback, me}) {
}
const onTasked = ({tasked, variables}) => {
//onClose();
setOpenTaskingButton(false);
}
const onSubmitCommandLine = (message, cmd, parsed, force_parsed_popup, cmdGroupNames, previousTaskingLocation) => {
//console.log(message, cmd, parsed);
Expand Down
12 changes: 9 additions & 3 deletions MythicReactUI/src/components/pages/Callbacks/CallbacksTop.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import React, {createContext} from 'react';
import {useSubscription, gql } from '@apollo/client';
import {CallbacksTable} from './CallbacksTable';
import {CallbacksTable, CallbacksTableMaterialReactTable} from './CallbacksTable';
import {CallbacksGraph} from './CallbacksGraph';
import {useMythicSetting} from "../../MythicComponents/MythicSavedUserSetting";
export const CallbackGraphEdgesContext = createContext([]);
export const OnOpenTabContext = createContext( () => {});
export const CallbacksContext = createContext([]);
Expand Down Expand Up @@ -155,18 +156,23 @@ export function CallbacksTop(props){
mountedRef.current = false;
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [])
}, []);
const initialNewBrowserScriptTable = useMythicSetting({setting_name: "experiment-browserscripttable", default_value: "false"});
return (
<div style={{height: "100%", width: "100%"}}>
<CallbackGraphEdgesContext.Provider value={callbackEdges}>
<OnOpenTabContext.Provider value={onOpenTabLocal}>
<CallbacksContext.Provider value={callbacks}>
{props.topDisplay === "graph" ? (
<CallbacksGraph maxHeight={"100%"} />
) : initialNewBrowserScriptTable ? (
<CallbacksTableMaterialReactTable onOpenTab={onOpenTabLocal}
parentMountedRef={mountedRef} me={me}/>
) : (
<CallbacksTable onOpenTab={onOpenTabLocal}
parentMountedRef={mountedRef} me={me}/>
)}
)
}
</CallbacksContext.Provider>
</OnOpenTabContext.Provider>
</CallbackGraphEdgesContext.Provider>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,7 @@ export const ResponseDisplayMaterialReactTable = ({table, callback_id, expand, t
//enableColumnOrdering: true,
//columnResizeMode: 'onEnd',
defaultDisplayColumn: { enableResizing: true },
muiTableContainerProps: { sx: { } },
muiTableContainerProps: { sx: { alignItems: "flex-start" } },
mrtTheme: (theme) => ({
baseBackgroundColor: theme.palette.background.default, //change default background color
}),
Expand Down
2 changes: 1 addition & 1 deletion MythicReactUI/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import jwt_decode from 'jwt-decode';
import {meState} from './cache';

export const mythicVersion = "3.2.18-rc4";
export const mythicUIVersion = "0.1.67";
export const mythicUIVersion = "0.1.68";

let fetchingNewToken = false;

Expand Down
6 changes: 3 additions & 3 deletions mythic-react-docker/mythic/public/asset-manifest.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"files": {
"main.css": "/new/static/css/main.00d51b79.css",
"main.js": "/new/static/js/main.a3ff9006.js",
"main.js": "/new/static/js/main.db4b1fd5.js",
"static/media/[email protected]": "/new/static/media/[email protected]",
"static/media/mythic_red_small.svg": "/new/static/media/mythic_red_small.793b41cc7135cdede246661ec232976b.svg",
"index.html": "/new/index.html",
"main.00d51b79.css.map": "/new/static/css/main.00d51b79.css.map",
"main.a3ff9006.js.map": "/new/static/js/main.a3ff9006.js.map"
"main.db4b1fd5.js.map": "/new/static/js/main.db4b1fd5.js.map"
},
"entrypoints": [
"static/css/main.00d51b79.css",
"static/js/main.a3ff9006.js"
"static/js/main.db4b1fd5.js"
]
}
2 changes: 1 addition & 1 deletion mythic-react-docker/mythic/public/index.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/new/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><link rel="apple-touch-icon" href="/new/logo192.png"/><link rel="manifest" href="/new/manifest.json"/><title>Mythic</title><script defer="defer" src="/new/static/js/main.a3ff9006.js"></script><link href="/new/static/css/main.00d51b79.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/new/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><link rel="apple-touch-icon" href="/new/logo192.png"/><link rel="manifest" href="/new/manifest.json"/><title>Mythic</title><script defer="defer" src="/new/static/js/main.db4b1fd5.js"></script><link href="/new/static/css/main.00d51b79.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>

Large diffs are not rendered by default.

Large diffs are not rendered by default.

0 comments on commit c9c2aac

Please sign in to comment.