Skip to content

Commit

Permalink
0.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
kaganrua committed Sep 6, 2024
1 parent f82f3c9 commit 463d054
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 98 deletions.
87 changes: 0 additions & 87 deletions frontend/server2/entrypoint.py

This file was deleted.

18 changes: 8 additions & 10 deletions frontend/src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ export default function App() {
const [currentConfig] = useAtom(activeConfigurationAtom);
const [logViewerOpen, SystemLogViewerOpen] = useState(false);


useEffect(() => {
async function initialLaunch() {
let isPackaged = false;
Expand All @@ -51,7 +50,6 @@ export default function App() {
if (isPackaged) {
const canPing = await ping(currentConfig);
if (!canPing) {

try {
const kubeResponse = await axios.get(
`${serverAddress}/get-kube-contexts`,
Expand All @@ -72,19 +70,19 @@ export default function App() {
);
const data = anvilRes.data;
if (data.has_config) {
console.log("HERE ON SECOND RUN")
console.log("HERE ON SECOND RUN");
const config = data.config;
const bucketPort = config.Local.BucketPort;
const driver = config.Local.Driver;
const serverPort = config.ServerPort;
const context = config.KubeContext;
//check this, in case user might've manually changed something, which could potentially cause bugs
console.log(currentConfig)
console.log(serverPort.toString())
console.log(currentConfig);
console.log(serverPort.toString());
const openConfig =
currentConfig?.anvil?.port === serverPort.toString()
currentConfig?.anvil?.port === serverPort.toString();
if (config.IsLocal === true && openConfig === true) {
console.log("MUST REACH HERE")
console.log("MUST REACH HERE");
setConfirmationIsOpen(true);
const configText = [
"Are you sure you want to run anvil locally with the following configurations?",
Expand All @@ -96,7 +94,7 @@ export default function App() {
];
setConfirmationText(configText);
} else {
setConfigOpen(true)
setConfigOpen(true);
}
} else {
setConfigOpen(true);
Expand Down Expand Up @@ -128,9 +126,9 @@ export default function App() {
setConfigOpen(false);
setIsLoading(false);
} catch (err) {
setConfirmationIsOpen(false)
setConfirmationIsOpen(false);
setIsLoading(false);
setConfigOpen(true)
setConfigOpen(true);
}
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ export default function AnvilConfigurationsModal(props) {
const serverAddress = import.meta.env.VITE_EXPRESS;
const res = await axios.post(`${serverAddress}/launch-anvil`, body);
setIsLoading(false);

} catch (err) {
// handled in system logs
setIsLoading(false);
Expand Down

0 comments on commit 463d054

Please sign in to comment.