Windows

The section of the package is responsible for controlling how and when a window is opened.

Index

Contents

ModelSelectionGUI.create_applicationMethod
create_application()

Create a new Electron application.

This function creates a new Electron application by closing any existing Electron application and initializing a new Application object.

Example

create_application()
source
ModelSelectionGUI.open_windowMethod
open_window(; path::Union{String, Nothing} = nothing)

Open a window with the specified path of the server. The server host and port are taken from the SERVER_HOST and SERVER_PORT global variable.

  • path: Optional string specifying the path on the server to open in the window. If nothing, the root path of the server is opened.

Example

open_window(path = "/docs")
source
ModelSelectionGUI.open_windowMethod
open_window(url::String)

Open a window with the specified url.

  • url: String specifying the url to open in the window. If nothing.

Example

open_window("http://localhost:8000")
source
ModelSelectionGUI.close_windowsMethod
close_windows()

Open a window with the specified url.

  • url: String specifying the url to open in the window. If nothing.

Example

close_windows(path = "/docs", port = 8080)
source
ModelSelectionGUI.get_url_from_pathFunction
get_url_from_path(path::Union{String,Nothing} = nothing)

Generates a URL string based on the provided path and global settings SERVER_HOST, SERVER_PORT, and SSL_ENABLED.

Parameters

  • path::Union{String,Nothing}: an optional argument which denotes the specific path to be appended to the base URL. If not provided, the function generates a base URL only.

Returns

  • String: The URL as a string.

Example

url = get_url_from_path("/api/data")
source