-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into docs_version_switcher
- Loading branch information
Showing
22 changed files
with
215 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { baseUrl, onServerOpen } from '../src/renderer/src/server/globals' | ||
import { isStorybook } from '../src/renderer/src/dependencies/simple' | ||
|
||
const values = { interfaces: {} } | ||
const setReady: any = {} | ||
|
||
const createPromise = (prop: string) => new Promise((resolve) => setReady[prop] = (value) => { | ||
values[prop] = value | ||
resolve(value) | ||
}) | ||
|
||
export const ready = { | ||
interfaces: createPromise("interfaces"), | ||
} | ||
|
||
// Get CPUs | ||
onServerOpen(async () => { | ||
await fetch(`${baseUrl}/neuroconv`).then((res) => res.json()) | ||
.then((interfaces) => setReady.interfaces(interfaces)) | ||
.catch(() => { | ||
if (isStorybook) setReady.interfaces({}) | ||
}); | ||
}); | ||
|
||
export default values |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.