ivoryos 0.1.8__py3-none-any.whl → 0.1.10__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of ivoryos might be problematic. Click here for more details.

Files changed (37) hide show
  1. ivoryos/__init__.py +118 -99
  2. ivoryos/config.py +47 -47
  3. ivoryos/routes/auth/auth.py +100 -65
  4. ivoryos/routes/auth/templates/auth/login.html +25 -25
  5. ivoryos/routes/auth/templates/auth/signup.html +32 -32
  6. ivoryos/routes/control/control.py +400 -272
  7. ivoryos/routes/control/templates/control/controllers.html +75 -75
  8. ivoryos/routes/control/templates/control/controllers_home.html +50 -50
  9. ivoryos/routes/control/templates/control/controllers_new.html +89 -89
  10. ivoryos/routes/database/database.py +188 -114
  11. ivoryos/routes/database/templates/database/experiment_database.html +72 -72
  12. ivoryos/routes/design/design.py +542 -406
  13. ivoryos/routes/design/templates/design/experiment_builder.html +415 -412
  14. ivoryos/routes/design/templates/design/experiment_run.html +325 -325
  15. ivoryos/routes/main/main.py +42 -25
  16. ivoryos/routes/main/templates/main/help.html +141 -141
  17. ivoryos/routes/main/templates/main/home.html +68 -68
  18. ivoryos/static/.DS_Store +0 -0
  19. ivoryos/static/js/overlay.js +12 -12
  20. ivoryos/static/js/socket_handler.js +34 -34
  21. ivoryos/static/js/sortable_card.js +24 -24
  22. ivoryos/static/js/sortable_design.js +36 -36
  23. ivoryos/static/style.css +201 -201
  24. ivoryos/templates/base.html +143 -143
  25. ivoryos/utils/db_models.py +518 -500
  26. ivoryos/utils/form.py +316 -316
  27. ivoryos/utils/global_config.py +67 -67
  28. ivoryos/utils/llm_agent.py +183 -183
  29. ivoryos/utils/script_runner.py +165 -164
  30. ivoryos/utils/utils.py +425 -422
  31. ivoryos/version.py +1 -0
  32. {ivoryos-0.1.8.dist-info → ivoryos-0.1.10.dist-info}/LICENSE +21 -21
  33. {ivoryos-0.1.8.dist-info → ivoryos-0.1.10.dist-info}/METADATA +170 -166
  34. ivoryos-0.1.10.dist-info/RECORD +47 -0
  35. {ivoryos-0.1.8.dist-info → ivoryos-0.1.10.dist-info}/WHEEL +1 -1
  36. ivoryos-0.1.8.dist-info/RECORD +0 -45
  37. {ivoryos-0.1.8.dist-info → ivoryos-0.1.10.dist-info}/top_level.txt +0 -0
@@ -1,25 +1,42 @@
1
- from flask import Blueprint, render_template, current_app
2
- from flask_login import login_required
3
-
4
- main = Blueprint('main', __name__, template_folder='templates/main')
5
-
6
- @main.route("/")
7
- @login_required
8
- def index():
9
- off_line = current_app.config["OFF_LINE"]
10
- return render_template('home.html', off_line=off_line)
11
-
12
-
13
- @main.route("/help")
14
- def help_info():
15
- sample_deck = """
16
- from vapourtec.sf10 import SF10
17
-
18
- # connect SF10 pump
19
- sf10 = SF10(device_port="com7")
20
-
21
- # start ivoryOS
22
- from ivoryos.app import ivoryos
23
- ivoryos(__name__)
24
- """
25
- return render_template('help.html', sample_deck=sample_deck)
1
+ from flask import Blueprint, render_template, current_app
2
+ from flask_login import login_required
3
+ from ivoryos.version import __version__ as ivoryos_version
4
+
5
+ main = Blueprint('main', __name__, template_folder='templates/main')
6
+
7
+ @main.route("/")
8
+ @login_required
9
+ def index():
10
+ """
11
+ .. :quickref: Home page; ivoryos home page
12
+
13
+ Home page for all available routes
14
+
15
+ .. http:get:: /
16
+
17
+ """
18
+ off_line = current_app.config["OFF_LINE"]
19
+ return render_template('home.html', off_line=off_line, version=ivoryos_version)
20
+
21
+
22
+ @main.route("/help")
23
+ def help_info():
24
+ """
25
+ .. :quickref: Help page; ivoryos info page
26
+
27
+ static information page
28
+
29
+ .. http:get:: /help
30
+
31
+ """
32
+ sample_deck = """
33
+ from vapourtec.sf10 import SF10
34
+
35
+ # connect SF10 pump
36
+ sf10 = SF10(device_port="com7")
37
+
38
+ # start ivoryOS
39
+ from ivoryos.app import ivoryos
40
+ ivoryos(__name__)
41
+ """
42
+ return render_template('help.html', sample_deck=sample_deck)
@@ -1,141 +1,141 @@
1
- {% extends 'base.html' %}
2
- {% block title %}IvoryOS | Documentation {% endblock %}
3
-
4
- {% block body %}
5
- <h2>Documentations:</h2>
6
- <div class="accordion accordion-flush" id="helpPage" >
7
- <div class="accordion-item">
8
- <h2 class="accordion-header">
9
- <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#overall" aria-expanded="false" aria-controls="helpPageControl">
10
- General information - What is ivoryOS?
11
- </button>
12
- </h2>
13
- <div id="overall" class="accordion-collapse collapse" data-bs-parent="#helpPage">
14
- <div class="accordion-body">
15
- <p>
16
- This web app aims to ease up the control of any Python-based self-driving labs (SDLs) by extracting and displaying functions and parameters for initialized modules dynamically.
17
- The modules can be hardware API, high-level functions, or experiment workflow. This can potentially be used for general visual programming purposes.
18
- </p>
19
- {# <p>Controller: single instrument mode and multi-instrument interface.</p>#}
20
- {# <p>Workflow editor: automation workflow editor#}
21
- </div>
22
- </div>
23
- </div>
24
- {# <p>In the Controller tab, you can connect any instrument or instruments from a complete automation deck. The GUI will parse and show available functions and prompt user to the input argument values if need.</p>#}
25
- {# <p>In the Build Workflow tab, you can edit your own automation workflow from scratch or from the workflow library, where stores the ongoing projects and some basic example workflows.</p>#}
26
-
27
- <div class="accordion-item">
28
- <h2 class="accordion-header">
29
- <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#connect-device" aria-expanded="false" aria-controls="helpPageControl">
30
- General information - start ivoryOS from script
31
- </button>
32
- </h2>
33
- <div id="connect-device" class="accordion-collapse collapse" data-bs-parent="#helpPage">
34
- <div class="accordion-body">
35
- <pre ><code class="python" >{{ sample_deck }}</code></pre>
36
- </div>
37
- </div>
38
- </div>
39
- <div class="accordion-item">
40
- <h2 class="accordion-header">
41
- <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#library" aria-expanded="false" aria-controls="helpPageControl">
42
- Script Editor - Library
43
- </button>
44
- </h2>
45
- <div id="library" class="accordion-collapse collapse" data-bs-parent="#helpPage">
46
- <div class="accordion-body">
47
- <p>In "Library" Tab, the interactive database displays all workflow information</p>
48
- <p>On top of the library page, you can click filter to choose your desired deck out of other automation platforms. You can also search for experiment keyword on the right</p>
49
- <p>Note that you can edit/delete your own workflow anytime, but in case you would like to adapt other author's workflow, you need to save as your own in a different file name.</p>
50
- </div>
51
- </div>
52
- </div>
53
- <div class="accordion-item">
54
- <h2 class="accordion-header">
55
- <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#editor" aria-expanded="false" aria-controls="helpPageControl">
56
- Script Editor - How to use script editor?
57
- </button>
58
- </h2>
59
- <div id="editor" class="accordion-collapse collapse" data-bs-parent="#helpPage">
60
- <div class="accordion-body">
61
- <p>You can browse and load other's workflow in "Library" Tab or go to "Build Workflow" Tab to build from scratch.</p>
62
- <p>On the workflow canvas, there are three coding blocks: Prep, Experiment and Clean up. As the names indicated, the Prep and Clean up are steps taken prior and after to the main experiment, they cannot be repeated. On the other hand, the Experiment section can be repeated by a designated times or <a href="#config">a .csv configuration file</a></p>
63
- <p>On the left panel, you can choose the deck profile on the top, and browse deck action and builtin python functions. Click to input your argument and add to the canvas, then drag the action to change their order.</p>
64
- <img src="{{url_for('static', filename='gui_annotation/Slide1.PNG')}}">
65
- </div>
66
- </div>
67
- </div>
68
- <div class="accordion-item">
69
- <h2 class="accordion-header">
70
- <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#editor-advanced" aria-expanded="false" aria-controls="helpPageControl">
71
- Script Editor - How to save data and configure reaction?
72
- </button>
73
- </h2>
74
- <div id="editor-advanced" class="accordion-collapse collapse" data-bs-parent="#helpPage">
75
- <div class="accordion-body">
76
-
77
- <img src="{{url_for('static', filename='gui_annotation/Slide2.PNG')}}">
78
- </div>
79
- </div>
80
- </div>
81
- <div class="accordion-item">
82
- <h2 class="accordion-header">
83
- <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#config" aria-expanded="false" aria-controls="helpPageControl">
84
- Run my script - How to execute my workflow?
85
- </button>
86
- </h2>
87
- <div id="config" class="accordion-collapse collapse" data-bs-parent="#helpPage">
88
- <div class="accordion-body">
89
- <p>For workflow with no parameters, simply input repeat times to run.</p>
90
- <p>To configure your workflow, if there are less or equal than 5 parameters, one can use the web form or import a csv file.
91
- For workflow with more than 5 parameters, web form is not available.</p>
92
- <p>If there is any output, Bayesian Optimization will be available for adaptive experimentation. Note that the outputs need to be numeric values. </p>
93
- {# <img src="{{url_for('static', filename='gui_annotation/Slide3.PNG')}}">#}
94
- </div>
95
- </div>
96
- </div>
97
-
98
-
99
-
100
- <div class="accordion-item">
101
- <h2 class="accordion-header">
102
- <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#controller" aria-expanded="false" aria-controls="helpPageControl">
103
- Control - How to use device interface?
104
- </button>
105
- </h2>
106
- <div id="controller" class="accordion-collapse collapse" data-bs-parent="#helpPage">
107
- <div class="accordion-body">
108
- <p>The function cards are draggable for customized layout. The hidden icon is to remove functions from the interface. </p>
109
- {# <p>(1) Import a python script where devices are connected using Deck Deice tab (e.g. applied to a complete automation deck with a deck.py file).</p>#}
110
- {# <p>(2) Connect devices in the web app using New Deice tab. There are builtin instruments, but you can always import your own API.</p>#}
111
- </div>
112
- </div>
113
- </div>
114
- <div class="accordion-item">
115
- <h2 class="accordion-header">
116
- <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#deck" aria-expanded="false" aria-controls="helpPageControl">
117
- Control - Connect new devices
118
- </button>
119
- </h2>
120
- <div id="deck" class="accordion-collapse collapse" data-bs-parent="#helpPage">
121
- <div class="accordion-body">
122
- <p>When temporarily connecting instruments, New device -> New connection -> Import API. Use absolute path of your Python API file.
123
- Then enter required info (e.g. COM port) to connect a device.</p>
124
- </div>
125
- </div>
126
- </div>
127
- <div class="accordion-item">
128
- <h2 class="accordion-header">
129
- <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#install" aria-expanded="false" aria-controls="helpPageControl">
130
- Supports
131
- </button>
132
- </h2>
133
- <div id="install" class="accordion-collapse collapse" data-bs-parent="#helpPage">
134
- <div class="accordion-body">
135
- This is project is a work in progress. In case of any bugs or suggestions, reach out to Ivory: ivoryzhang@chem.ubc.ca or create an issue on GitLab:
136
- <a href="https://gitlab.com/heingroup/ivoryos">https://gitlab.com/heingroup/ivoryos</a>.
137
- </div>
138
- </div>
139
- </div>
140
- </div>
141
- {% endblock %}
1
+ {% extends 'base.html' %}
2
+ {% block title %}IvoryOS | Documentation {% endblock %}
3
+
4
+ {% block body %}
5
+ <h2>Documentations:</h2>
6
+ <div class="accordion accordion-flush" id="helpPage" >
7
+ <div class="accordion-item">
8
+ <h2 class="accordion-header">
9
+ <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#overall" aria-expanded="false" aria-controls="helpPageControl">
10
+ General information - What is ivoryOS?
11
+ </button>
12
+ </h2>
13
+ <div id="overall" class="accordion-collapse collapse" data-bs-parent="#helpPage">
14
+ <div class="accordion-body">
15
+ <p>
16
+ This web app aims to ease up the control of any Python-based self-driving labs (SDLs) by extracting and displaying functions and parameters for initialized modules dynamically.
17
+ The modules can be hardware API, high-level functions, or experiment workflow. This can potentially be used for general visual programming purposes.
18
+ </p>
19
+ {# <p>Controller: single instrument mode and multi-instrument interface.</p>#}
20
+ {# <p>Workflow editor: automation workflow editor#}
21
+ </div>
22
+ </div>
23
+ </div>
24
+ {# <p>In the Controller tab, you can connect any instrument or instruments from a complete automation deck. The GUI will parse and show available functions and prompt user to the input argument values if need.</p>#}
25
+ {# <p>In the Build Workflow tab, you can edit your own automation workflow from scratch or from the workflow library, where stores the ongoing projects and some basic example workflows.</p>#}
26
+
27
+ <div class="accordion-item">
28
+ <h2 class="accordion-header">
29
+ <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#connect-device" aria-expanded="false" aria-controls="helpPageControl">
30
+ General information - start ivoryOS from script
31
+ </button>
32
+ </h2>
33
+ <div id="connect-device" class="accordion-collapse collapse" data-bs-parent="#helpPage">
34
+ <div class="accordion-body">
35
+ <pre ><code class="python" >{{ sample_deck }}</code></pre>
36
+ </div>
37
+ </div>
38
+ </div>
39
+ <div class="accordion-item">
40
+ <h2 class="accordion-header">
41
+ <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#library" aria-expanded="false" aria-controls="helpPageControl">
42
+ Script Editor - Library
43
+ </button>
44
+ </h2>
45
+ <div id="library" class="accordion-collapse collapse" data-bs-parent="#helpPage">
46
+ <div class="accordion-body">
47
+ <p>In "Library" Tab, the interactive database displays all workflow information</p>
48
+ <p>On top of the library page, you can click filter to choose your desired deck out of other automation platforms. You can also search for experiment keyword on the right</p>
49
+ <p>Note that you can edit/delete your own workflow anytime, but in case you would like to adapt other author's workflow, you need to save as your own in a different file name.</p>
50
+ </div>
51
+ </div>
52
+ </div>
53
+ <div class="accordion-item">
54
+ <h2 class="accordion-header">
55
+ <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#editor" aria-expanded="false" aria-controls="helpPageControl">
56
+ Script Editor - How to use script editor?
57
+ </button>
58
+ </h2>
59
+ <div id="editor" class="accordion-collapse collapse" data-bs-parent="#helpPage">
60
+ <div class="accordion-body">
61
+ <p>You can browse and load other's workflow in "Library" Tab or go to "Build Workflow" Tab to build from scratch.</p>
62
+ <p>On the workflow canvas, there are three coding blocks: Prep, Experiment and Clean up. As the names indicated, the Prep and Clean up are steps taken prior and after to the main experiment, they cannot be repeated. On the other hand, the Experiment section can be repeated by a designated times or <a href="#config">a .csv configuration file</a></p>
63
+ <p>On the left panel, you can choose the deck profile on the top, and browse deck action and builtin python functions. Click to input your argument and add to the canvas, then drag the action to change their order.</p>
64
+ <img src="{{url_for('static', filename='gui_annotation/Slide1.PNG')}}">
65
+ </div>
66
+ </div>
67
+ </div>
68
+ <div class="accordion-item">
69
+ <h2 class="accordion-header">
70
+ <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#editor-advanced" aria-expanded="false" aria-controls="helpPageControl">
71
+ Script Editor - How to save data and configure reaction?
72
+ </button>
73
+ </h2>
74
+ <div id="editor-advanced" class="accordion-collapse collapse" data-bs-parent="#helpPage">
75
+ <div class="accordion-body">
76
+
77
+ <img src="{{url_for('static', filename='gui_annotation/Slide2.PNG')}}">
78
+ </div>
79
+ </div>
80
+ </div>
81
+ <div class="accordion-item">
82
+ <h2 class="accordion-header">
83
+ <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#config" aria-expanded="false" aria-controls="helpPageControl">
84
+ Run my script - How to execute my workflow?
85
+ </button>
86
+ </h2>
87
+ <div id="config" class="accordion-collapse collapse" data-bs-parent="#helpPage">
88
+ <div class="accordion-body">
89
+ <p>For workflow with no parameters, simply input repeat times to run.</p>
90
+ <p>To configure your workflow, if there are less or equal than 5 parameters, one can use the web form or import a csv file.
91
+ For workflow with more than 5 parameters, web form is not available.</p>
92
+ <p>If there is any output, Bayesian Optimization will be available for adaptive experimentation. Note that the outputs need to be numeric values. </p>
93
+ {# <img src="{{url_for('static', filename='gui_annotation/Slide3.PNG')}}">#}
94
+ </div>
95
+ </div>
96
+ </div>
97
+
98
+
99
+
100
+ <div class="accordion-item">
101
+ <h2 class="accordion-header">
102
+ <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#controller" aria-expanded="false" aria-controls="helpPageControl">
103
+ Control - How to use device interface?
104
+ </button>
105
+ </h2>
106
+ <div id="controller" class="accordion-collapse collapse" data-bs-parent="#helpPage">
107
+ <div class="accordion-body">
108
+ <p>The function cards are draggable for customized layout. The hidden icon is to remove functions from the interface. </p>
109
+ {# <p>(1) Import a python script where devices are connected using Deck Deice tab (e.g. applied to a complete automation deck with a deck.py file).</p>#}
110
+ {# <p>(2) Connect devices in the web app using New Deice tab. There are builtin instruments, but you can always import your own API.</p>#}
111
+ </div>
112
+ </div>
113
+ </div>
114
+ <div class="accordion-item">
115
+ <h2 class="accordion-header">
116
+ <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#deck" aria-expanded="false" aria-controls="helpPageControl">
117
+ Control - Connect new devices
118
+ </button>
119
+ </h2>
120
+ <div id="deck" class="accordion-collapse collapse" data-bs-parent="#helpPage">
121
+ <div class="accordion-body">
122
+ <p>When temporarily connecting instruments, New device -> New connection -> Import API. Use absolute path of your Python API file.
123
+ Then enter required info (e.g. COM port) to connect a device.</p>
124
+ </div>
125
+ </div>
126
+ </div>
127
+ <div class="accordion-item">
128
+ <h2 class="accordion-header">
129
+ <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#install" aria-expanded="false" aria-controls="helpPageControl">
130
+ Supports
131
+ </button>
132
+ </h2>
133
+ <div id="install" class="accordion-collapse collapse" data-bs-parent="#helpPage">
134
+ <div class="accordion-body">
135
+ This is project is a work in progress. In case of any bugs or suggestions, reach out to Ivory: ivoryzhang@chem.ubc.ca or create an issue on GitLab:
136
+ <a href="https://gitlab.com/heingroup/ivoryos">https://gitlab.com/heingroup/ivoryos</a>.
137
+ </div>
138
+ </div>
139
+ </div>
140
+ </div>
141
+ {% endblock %}
@@ -1,68 +1,68 @@
1
- {% extends 'base.html' %}
2
- {% block title %}IvoryOS | Welcome{% endblock %}
3
-
4
-
5
- {% block body %}
6
- <h1 style=" font-size: 3rem;font-weight: bold;color: #343a40;margin-bottom: 40px;">
7
- Welcome
8
- </h1>
9
-
10
- <div class="p-4" >
11
- <div class="row">
12
-
13
- <div class="col-lg-6 mb-4 d-flex align-items-stretch">
14
- <div class="card rounded shadow-sm flex-fill">
15
- <div class="card-body">
16
- <h5 class="card-title">Browse designs</h5>
17
- <p class="card-text">Browse all workflows saved in the database.</p>
18
- <a href="{{ url_for('database.load_from_database') }}" class="stretched-link"></a>
19
- </div>
20
- </div>
21
- </div>
22
- <div class="col-lg-6 mb-4 d-flex align-items-stretch">
23
- <div class="card rounded shadow-sm flex-fill">
24
- <div class="card-body">
25
- <h5 class="card-title">Edit designs</h5>
26
- <p class="card-text">Build your workflow from current deck functions.</p>
27
- <a href="{{ url_for('design.experiment_builder') }}" class="stretched-link"></a>
28
- </div>
29
- </div>
30
- </div>
31
- </div>
32
-
33
- <br><br><br>
34
- {% if not off_line %}
35
- {# <h5>Only available in online mode</h5>#}
36
- {# <hr>#}
37
- <div class="row">
38
- <div class="col-lg-6 mb-4 d-flex align-items-stretch">
39
- <div class="card rounded shadow-sm flex-fill">
40
- <div class="card-body">
41
- <h5 class="card-title">Run experiment</h5>
42
- <p class="card-text">Execute workflows with repeat times or variable configs. </p>
43
- <a href="{{ url_for('design.experiment_run') }}" class="stretched-link"></a>
44
- </div>
45
- </div>
46
- </div>
47
- <div class="col-lg-6 mb-4 d-flex align-items-stretch">
48
- <div class="card rounded shadow-sm flex-fill">
49
- <div class="card-body">
50
- <h5 class="card-title">Control device</h5>
51
- <p class="card-text">Browse and control instruments of current platform</p>
52
- <a href="{{ url_for('control.deck_controllers') }}" class="stretched-link"></a>
53
- </div>
54
- </div>
55
- </div>
56
- <div class="col-lg-6 mb-4 d-flex align-items-stretch">
57
- <div class="card rounded shadow-sm flex-fill">
58
- <div class="card-body">
59
- <h5 class="card-title">Connect new device</h5>
60
- <p class="card-text">Connect new hardware: for simple/temporary configurations.</p>
61
- <a href="{{ url_for('control.controllers_home') }}" class="stretched-link"></a>
62
- </div>
63
- </div>
64
- </div>
65
- </div>
66
- {% endif %}
67
- </div>
68
- {% endblock %}
1
+ {% extends 'base.html' %}
2
+ {% block title %}IvoryOS | Welcome {% endblock %}
3
+
4
+
5
+ {% block body %}
6
+ <div class="p-4" >
7
+ <h1 style=" font-size: 3rem;font-weight: bold;color: #343a40;margin-bottom: 40px;">
8
+ Welcome
9
+ </h1>
10
+ <p>Version: {{ version }}</p>
11
+ <div class="row">
12
+
13
+ <div class="col-lg-6 mb-4 d-flex align-items-stretch">
14
+ <div class="card rounded shadow-sm flex-fill">
15
+ <div class="card-body">
16
+ <h5 class="card-title">Browse designs</h5>
17
+ <p class="card-text">Browse all workflows saved in the database.</p>
18
+ <a href="{{ url_for('database.load_from_database') }}" class="stretched-link"></a>
19
+ </div>
20
+ </div>
21
+ </div>
22
+ <div class="col-lg-6 mb-4 d-flex align-items-stretch">
23
+ <div class="card rounded shadow-sm flex-fill">
24
+ <div class="card-body">
25
+ <h5 class="card-title">Edit designs</h5>
26
+ <p class="card-text">Build your workflow from current deck functions.</p>
27
+ <a href="{{ url_for('design.experiment_builder') }}" class="stretched-link"></a>
28
+ </div>
29
+ </div>
30
+ </div>
31
+ </div>
32
+
33
+ <br><br><br>
34
+ {% if not off_line %}
35
+ {# <h5>Only available in online mode</h5>#}
36
+ {# <hr>#}
37
+ <div class="row">
38
+ <div class="col-lg-6 mb-4 d-flex align-items-stretch">
39
+ <div class="card rounded shadow-sm flex-fill">
40
+ <div class="card-body">
41
+ <h5 class="card-title">Run experiment</h5>
42
+ <p class="card-text">Execute workflows with repeat times or variable configs. </p>
43
+ <a href="{{ url_for('design.experiment_run') }}" class="stretched-link"></a>
44
+ </div>
45
+ </div>
46
+ </div>
47
+ <div class="col-lg-6 mb-4 d-flex align-items-stretch">
48
+ <div class="card rounded shadow-sm flex-fill">
49
+ <div class="card-body">
50
+ <h5 class="card-title">Control device</h5>
51
+ <p class="card-text">Browse and control instruments of current platform</p>
52
+ <a href="{{ url_for('control.deck_controllers') }}" class="stretched-link"></a>
53
+ </div>
54
+ </div>
55
+ </div>
56
+ <div class="col-lg-6 mb-4 d-flex align-items-stretch">
57
+ <div class="card rounded shadow-sm flex-fill">
58
+ <div class="card-body">
59
+ <h5 class="card-title">Connect new device</h5>
60
+ <p class="card-text">Connect new hardware: for simple/temporary configurations.</p>
61
+ <a href="{{ url_for('control.controllers_home') }}" class="stretched-link"></a>
62
+ </div>
63
+ </div>
64
+ </div>
65
+ </div>
66
+ {% endif %}
67
+ </div>
68
+ {% endblock %}
Binary file
@@ -1,12 +1,12 @@
1
- function addOverlayToButtons(buttonIds) {
2
- buttonIds.forEach(function(buttonId) {
3
- document.getElementById(buttonId).addEventListener('submit', function() {
4
- // Display the overlay
5
- document.getElementById('overlay').style.display = 'block';
6
- document.getElementById('overlay-text').innerText = `Processing ${buttonId}...`;
7
- });
8
- });
9
- }
10
-
11
- // buttonIds should be set dynamically in your HTML template
12
- addOverlayToButtons(buttonIds);
1
+ function addOverlayToButtons(buttonIds) {
2
+ buttonIds.forEach(function(buttonId) {
3
+ document.getElementById(buttonId).addEventListener('submit', function() {
4
+ // Display the overlay
5
+ document.getElementById('overlay').style.display = 'block';
6
+ document.getElementById('overlay-text').innerText = `Processing ${buttonId}...`;
7
+ });
8
+ });
9
+ }
10
+
11
+ // buttonIds should be set dynamically in your HTML template
12
+ addOverlayToButtons(buttonIds);
@@ -1,34 +1,34 @@
1
- document.addEventListener("DOMContentLoaded", function() {
2
- var socket = io.connect('http://' + document.domain + ':' + location.port);
3
- socket.on('connect', function() {
4
- console.log('Connected');
5
- });
6
- socket.on('progress', function(data) {
7
- var progress = data.progress;
8
- console.log(progress);
9
- // Update the progress bar's width and appearance
10
- var progressBar = document.getElementById('progress-bar-inner');
11
- progressBar.style.width = progress + '%';
12
- progressBar.setAttribute('aria-valuenow', progress);
13
-
14
- if (progress === 100) {
15
- // Remove animation and set green color when 100% is reached
16
- progressBar.classList.remove('progress-bar-animated');
17
- progressBar.classList.add('bg-success'); // Bootstrap class for green color
18
- }
19
- });
20
- socket.on('log', function(data) {
21
- var logMessage = data.message;
22
- console.log(logMessage);
23
- $('#logging-panel').append(logMessage + "<br>");
24
- $('#logging-panel').scrollTop($('#logging-panel')[0].scrollHeight);
25
- });
26
-
27
- document.getElementById('abort').addEventListener('click', function() {
28
- var confirmation = confirm("Are you sure you want to abort pending actions?");
29
- if (confirmation) {
30
- socket.emit('abort_action');
31
- console.log('Abort action sent to server.');
32
- }
33
- });
34
- });
1
+ document.addEventListener("DOMContentLoaded", function() {
2
+ var socket = io.connect('http://' + document.domain + ':' + location.port);
3
+ socket.on('connect', function() {
4
+ console.log('Connected');
5
+ });
6
+ socket.on('progress', function(data) {
7
+ var progress = data.progress;
8
+ console.log(progress);
9
+ // Update the progress bar's width and appearance
10
+ var progressBar = document.getElementById('progress-bar-inner');
11
+ progressBar.style.width = progress + '%';
12
+ progressBar.setAttribute('aria-valuenow', progress);
13
+
14
+ if (progress === 100) {
15
+ // Remove animation and set green color when 100% is reached
16
+ progressBar.classList.remove('progress-bar-animated');
17
+ progressBar.classList.add('bg-success'); // Bootstrap class for green color
18
+ }
19
+ });
20
+ socket.on('log', function(data) {
21
+ var logMessage = data.message;
22
+ console.log(logMessage);
23
+ $('#logging-panel').append(logMessage + "<br>");
24
+ $('#logging-panel').scrollTop($('#logging-panel')[0].scrollHeight);
25
+ });
26
+
27
+ document.getElementById('abort').addEventListener('click', function() {
28
+ var confirmation = confirm("Are you sure you want to abort pending actions?");
29
+ if (confirmation) {
30
+ socket.emit('abort_action');
31
+ console.log('Abort action sent to server.');
32
+ }
33
+ });
34
+ });