Skip to content

1207 convert cca wizard to react #1216

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 29 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
4356194
Test ruleset
Mletter1 Apr 9, 2025
28bf9c3
start porting cca to reactjs
Mletter1 Jan 31, 2025
2a70150
adding child content modal body
Mletter1 Jan 31, 2025
605d29b
moving footer to its own component
Mletter1 Jan 31, 2025
f1aff50
start building the content
Mletter1 Jan 31, 2025
7e095f1
Create SlycatLocalBrowser.tsx
Mletter1 Feb 5, 2025
251ec7a
adding nav items
Mletter1 Feb 6, 2025
4ed5089
building redux store for the wizard
Mletter1 Mar 27, 2025
ee8bff9
adding redux step state for cca wizard model
Mletter1 Mar 28, 2025
911d8c7
adding model creation and cleanup
Mletter1 Apr 4, 2025
58e9303
cleanup logic for wizard setup
Mletter1 Apr 4, 2025
c4fd7c4
adding file uploader
Mletter1 Apr 7, 2025
e6b3685
add upload status and completion to local browser
Mletter1 Apr 22, 2025
7a8b5fc
adding logic for back and continue after file selection
Mletter1 Apr 22, 2025
fd94119
adding table ingestion
Mletter1 May 15, 2025
d12e86f
Update CCSLocalBrowserTab.tsx
Mletter1 May 19, 2025
531924a
adding breadcrumb
Mletter1 May 28, 2025
a6028c8
adding final step
Mletter1 Jun 4, 2025
68f9f18
adding in descriptor setting functions
Mletter1 Jun 27, 2025
5e52036
added model creation step to local model creation path
Mletter1 Jul 1, 2025
1be9535
add location for the remote browser tab and update continue and back …
Mletter1 Jul 18, 2025
27c984d
adding authentication
Mletter1 Jul 25, 2025
a332709
Cleaning up authentication and loading ux
Mletter1 Jul 31, 2025
5cdc36e
handle enter keydown on form
Mletter1 Jul 31, 2025
ce2e1b6
cleanup and styling
Mletter1 Jul 31, 2025
2bbdc5a
adding in parser selection
Mletter1 Aug 1, 2025
fc59699
session bug fix for remote auth
Mletter1 Aug 1, 2025
4a86c1e
add remote file selection
Mletter1 Aug 6, 2025
a2140b2
cleanup from rebase
Mletter1 Aug 7, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docker/compose/slycat-compose/slycat-web-server/DockerFile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ RUN pip install --trusted-host files.pythonhosted.org --trusted-host pypi.org --
RUN pip install --trusted-host files.pythonhosted.org --trusted-host pypi.org --trusted-host pypi.python.org --no-cache-dir -r requirements.txt

RUN git config --global http.sslVerify false
RUN git config --global http.postBuffer 524288000
RUN git clone --depth 1 https://github.com/sandialabs/slycat.git
RUN mkdir -p /var/lib/slycat/data-store
WORKDIR /usr/src/slycat/slycat
Expand Down
4 changes: 2 additions & 2 deletions docker/compose/slycat-compose/sshd/DockerFile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ LABEL maintainer="Matthew Letter <mletter@sandia.gov>"

ENV DEBIAN_FRONTEND noninteractive

RUN apt-get update && \
apt-get --yes install openssh-server rsync git && \
RUN apt-get update
RUN apt-get --yes install openssh-server rsync git && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* && \
mkdir -vp /var/run/sshd && \
Expand Down
9 changes: 7 additions & 2 deletions packages/slycat/web/server/remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -705,8 +705,11 @@ def browse(self, path, file_reject, file_allow, directory_reject, directory_allo
return response
except Exception as e:
cherrypy.log.error(
"Exception reading remote file %s: %s %s" % (path, type(e), str(e))
"Exception reading remote file %s: %s, %s" % (path, type(e), str(e))
)
if str(e) == "Socket is closed" or str(e) == "Server connection dropped: ":
delete_session(self._sid)
raise cherrypy.HTTPError("400 Socket closed")

if str(e) == "Garbage packet received":
cherrypy.response.headers["x-slycat-message"] = (
Expand Down Expand Up @@ -939,7 +942,9 @@ def get_file(self, path, **kwargs):
cherrypy.log.error(
"Exception reading remote file %s: %s %s" % (path, type(e), str(e))
)

if str(e) == "Socket is closed":
delete_session(self._sid)
raise cherrypy.HTTPError("400 Socket closed")
if "Garbage packet received" in str(e):
cherrypy.response.headers["x-slycat-message"] = (
"Remote access failed: %s" % str(e)
Expand Down
4 changes: 2 additions & 2 deletions web-server/components/FileBrowser/RemoteFileBrowser.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export interface RemoteFileBrowserProps {
hostname: string;
persistenceId?: string;
onSelectFileCallBack: Function;
onSelectParserCallBack: Function;
onSelectParserCallBack?: Function;
onReauthCallBack: Function;
selectedOption?: string;
showSelector?: boolean;
Expand Down Expand Up @@ -188,7 +188,7 @@ export default function RemoteFileBrowser(props: RemoteFileBrowserProps) {
onDoubleClick={handleFileNavigation}
/>

{props.showSelector !== false && props.selectedOption && (
{props.showSelector !== false && props.onSelectParserCallBack && props.selectedOption && (
<SlycatSelector
onSelectCallBack={props.onSelectParserCallBack}
label={"Filetype"}
Expand Down
15 changes: 11 additions & 4 deletions web-server/components/SlycatRemoteControls.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default class SlycatRemoteControls extends Component {
remote_hosts: [],
hostname: display.hostname ? display.hostname : null,
username: display.username ? display.username : null,
session_exists: null,
session_exists: this.props.sessionExists ? this.props.sessionExists : false,
password: "",
hostnames: [],
loadingData: this.props.loadingData,
Expand Down Expand Up @@ -68,7 +68,14 @@ export default class SlycatRemoteControls extends Component {
this.setState({ hostnames: json });
});
};

componentDidUpdate() {
if (this.props.sessionExists !== this.state.session_exists) {
this.setState({ session_exists: this.props.sessionExists });
}
if (this.props.loadingData !== this.state.loadingData) {
this.setState({ loadingData: this.props.loadingData });
}
}
async componentDidMount() {
await this.checkRemoteStatus(this.state.hostname);
await this.getRemoteHosts();
Expand Down Expand Up @@ -153,7 +160,7 @@ export default class SlycatRemoteControls extends Component {
*/
handleKeyDown = (e) => {
if (e.key === "Enter") {
document.getElementById("connect-button")?.click();
document.getElementById("connect-button")?.click();
}
};

Expand All @@ -163,7 +170,7 @@ export default class SlycatRemoteControls extends Component {
if (elementExists !== null) {
document.getElementById("continue-button")?.click();
}
}
};

/**
* creates JSX form input if a session does not already exist for the given hostname
Expand Down
2 changes: 1 addition & 1 deletion web-server/js/slycat-dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export function ajax_error(message)
{
dialog(
{
message: message + " " + reason_phrase
message: message + " " + (reason_phrase ?? '')
});
}
}
Loading