_report_viewer
create_server_script(directory, port)
Creates a script to start the server.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
directory
|
Path
|
Directory to serve |
required |
port
|
int
|
Port number to use |
required |
Returns:
Name | Type | Description |
---|---|---|
Path |
Path
|
Path to the created server script |
Raises:
Type | Description |
---|---|
Exception
|
If script creation fails |
Source code in libs\cafex_core\src\cafex_core\reporting_\_report_viewer\_server_scripts\_server_generator.py
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
|
launch_server_and_browser(script_file, port)
Launches the server and opens the browser.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
script_file
|
Path
|
Path to the server script to execute |
required |
port
|
int
|
Port number the server will use |
required |
Raises:
Type | Description |
---|---|
Exception
|
If server launch fails |
Source code in libs\cafex_core\src\cafex_core\reporting_\_report_viewer\_server_scripts\_server_launcher.py
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 |
|
stop_server(directory)
Stop any running server for the given directory.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
directory
|
Path
|
Directory whose server should be stopped |
required |
Source code in libs\cafex_core\src\cafex_core\reporting_\_report_viewer\_server_scripts\_server_launcher.py
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
|