ivoryos 1.2.0b1__py3-none-any.whl → 1.2.2__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 (82) hide show
  1. ivoryos/__init__.py +22 -1
  2. ivoryos/config.py +1 -0
  3. ivoryos/optimizer/ax_optimizer.py +164 -0
  4. ivoryos/optimizer/base_optimizer.py +65 -0
  5. ivoryos/optimizer/baybe_optimizer.py +183 -0
  6. ivoryos/optimizer/registry.py +9 -0
  7. ivoryos/routes/auth/auth.py +3 -1
  8. ivoryos/routes/data/data.py +2 -0
  9. ivoryos/routes/design/design.py +4 -4
  10. ivoryos/routes/library/library.py +4 -4
  11. ivoryos/utils/script_runner.py +1 -1
  12. ivoryos/utils/serilize.py +4 -6
  13. ivoryos/utils/utils.py +2 -1
  14. ivoryos/version.py +1 -1
  15. {ivoryos-1.2.0b1.dist-info → ivoryos-1.2.2.dist-info}/METADATA +60 -35
  16. ivoryos-1.2.2.dist-info/RECORD +47 -0
  17. {ivoryos-1.2.0b1.dist-info → ivoryos-1.2.2.dist-info}/WHEEL +1 -1
  18. {ivoryos-1.2.0b1.dist-info → ivoryos-1.2.2.dist-info}/top_level.txt +0 -1
  19. ivoryos/routes/auth/templates/login.html +0 -25
  20. ivoryos/routes/auth/templates/signup.html +0 -32
  21. ivoryos/routes/control/templates/controllers.html +0 -166
  22. ivoryos/routes/control/templates/controllers_new.html +0 -112
  23. ivoryos/routes/data/templates/components/step_card.html +0 -13
  24. ivoryos/routes/data/templates/workflow_database.html +0 -109
  25. ivoryos/routes/data/templates/workflow_view.html +0 -130
  26. ivoryos/routes/design/templates/components/action_form.html +0 -53
  27. ivoryos/routes/design/templates/components/actions_panel.html +0 -25
  28. ivoryos/routes/design/templates/components/autofill_toggle.html +0 -10
  29. ivoryos/routes/design/templates/components/canvas.html +0 -5
  30. ivoryos/routes/design/templates/components/canvas_footer.html +0 -9
  31. ivoryos/routes/design/templates/components/canvas_header.html +0 -75
  32. ivoryos/routes/design/templates/components/canvas_main.html +0 -34
  33. ivoryos/routes/design/templates/components/deck_selector.html +0 -10
  34. ivoryos/routes/design/templates/components/edit_action_form.html +0 -38
  35. ivoryos/routes/design/templates/components/instruments_panel.html +0 -66
  36. ivoryos/routes/design/templates/components/modals/drop_modal.html +0 -17
  37. ivoryos/routes/design/templates/components/modals/json_modal.html +0 -22
  38. ivoryos/routes/design/templates/components/modals/new_script_modal.html +0 -17
  39. ivoryos/routes/design/templates/components/modals/rename_modal.html +0 -23
  40. ivoryos/routes/design/templates/components/modals/saveas_modal.html +0 -27
  41. ivoryos/routes/design/templates/components/modals.html +0 -6
  42. ivoryos/routes/design/templates/components/python_code_overlay.html +0 -39
  43. ivoryos/routes/design/templates/components/sidebar.html +0 -15
  44. ivoryos/routes/design/templates/components/text_to_code_panel.html +0 -20
  45. ivoryos/routes/design/templates/experiment_builder.html +0 -41
  46. ivoryos/routes/execute/templates/components/error_modal.html +0 -20
  47. ivoryos/routes/execute/templates/components/logging_panel.html +0 -31
  48. ivoryos/routes/execute/templates/components/progress_panel.html +0 -27
  49. ivoryos/routes/execute/templates/components/run_panel.html +0 -9
  50. ivoryos/routes/execute/templates/components/run_tabs.html +0 -17
  51. ivoryos/routes/execute/templates/components/tab_bayesian.html +0 -399
  52. ivoryos/routes/execute/templates/components/tab_configuration.html +0 -98
  53. ivoryos/routes/execute/templates/components/tab_repeat.html +0 -14
  54. ivoryos/routes/execute/templates/experiment_run.html +0 -294
  55. ivoryos/routes/library/templates/library.html +0 -91
  56. ivoryos/routes/main/templates/help.html +0 -141
  57. ivoryos/routes/main/templates/home.html +0 -103
  58. ivoryos/static/favicon.ico +0 -0
  59. ivoryos/static/gui_annotation/Slide1.png +0 -0
  60. ivoryos/static/gui_annotation/Slide2.PNG +0 -0
  61. ivoryos/static/js/action_handlers.js +0 -213
  62. ivoryos/static/js/db_delete.js +0 -23
  63. ivoryos/static/js/overlay.js +0 -12
  64. ivoryos/static/js/script_metadata.js +0 -39
  65. ivoryos/static/js/socket_handler.js +0 -125
  66. ivoryos/static/js/sortable_card.js +0 -24
  67. ivoryos/static/js/sortable_design.js +0 -138
  68. ivoryos/static/js/ui_state.js +0 -113
  69. ivoryos/static/logo.webp +0 -0
  70. ivoryos/static/style.css +0 -211
  71. ivoryos/templates/base.html +0 -157
  72. ivoryos-1.2.0b1.dist-info/RECORD +0 -105
  73. tests/__init__.py +0 -0
  74. tests/conftest.py +0 -133
  75. tests/integration/__init__.py +0 -0
  76. tests/integration/test_route_auth.py +0 -80
  77. tests/integration/test_route_control.py +0 -94
  78. tests/integration/test_route_database.py +0 -61
  79. tests/integration/test_route_design.py +0 -36
  80. tests/integration/test_route_main.py +0 -35
  81. tests/integration/test_sockets.py +0 -26
  82. {ivoryos-1.2.0b1.dist-info → ivoryos-1.2.2.dist-info/licenses}/LICENSE +0 -0
@@ -1,109 +0,0 @@
1
- {% extends 'base.html' %}
2
-
3
- {% block title %}IvoryOS | Design Database{% endblock %}
4
- {% block body %}
5
- <div class="div">
6
- <form id="search" style="display: inline-block;float: right;" action="{{url_for('data.list_workflows',deck_name=deck_name)}}" method="GET">
7
- <div class="input-group">
8
- <div class="form-outline">
9
- <input type="search" name="keyword" id="keyword" class="form-control" placeholder="Search workflows...">
10
- </div>
11
- <button type="submit" class="btn btn-primary">
12
- <i class="bi bi-search"></i>
13
- </button>
14
- </div>
15
- </form>
16
- </div>
17
-
18
- <table class="table table-hover" id="workflowResultLibrary">
19
- <thead>
20
- <tr>
21
- <th scope="col">Workflow name</th>
22
- <th scope="col">Workflow ID</th>
23
- <th scope="col">Start time</th>
24
- <th scope="col">End time</th>
25
- <th scope="col">Data</th>
26
- </tr>
27
- </thead>
28
- <tbody>
29
- {% for workflow in workflows %}
30
- <tr>
31
- <td><a href="{{ url_for('data.workflow_logs', workflow_id=workflow.id) }}">{{ workflow.name }}</a></td>
32
- <td>{{ workflow.id }}</td>
33
- <td>{{ workflow.start_time.strftime("%Y-%m-%d %H:%M:%S") if workflow.start_time else '' }}</td>
34
- <td>{{ workflow.end_time.strftime("%Y-%m-%d %H:%M:%S") if workflow.end_time else '' }}</td>
35
-
36
- <td>
37
- {% if workflow.data_path %}
38
- <a href="{{ url_for('data.download_results', filename=workflow.data_path) }}">{{ workflow.data_path }}</a>
39
- {% endif %}
40
- </td>
41
- <td>
42
- {% if session['user'] == 'admin' or session['user'] == workflow.author %}
43
- {# <a href="{{ url_for('data.delete_workflow_data', workflow_id=workflow.id) }}">delete</a>#}
44
- <a href="#"
45
- class="text-danger"
46
- data-delete-url="{{ url_for('data.delete_workflow_record', workflow_id=workflow.id) }}"
47
- onclick="deleteWorkflow(this); return false;">
48
- Delete
49
- </a>
50
- {% else %}
51
- <a class="disabled-link">delete</a>
52
- {% endif %}
53
- </td>
54
- </tr>
55
- {% endfor %}
56
- </tbody>
57
- </table>
58
-
59
- {# paging#}
60
- <div class="pagination justify-content-center">
61
- <div class="page-item {{ 'disabled' if not workflows.has_prev else '' }}">
62
- <a class="page-link" href="{{ url_for('data.list_workflows', page=workflows.prev_num) }}">Previous</a>
63
- </div>
64
-
65
- {% for num in workflows.iter_pages() %}
66
- {% if num %}
67
- <div class="page-item {{ 'active' if num == workflows.page else '' }}">
68
- <a class="page-link" href="{{ url_for('data.list_workflows', page=num) }}">{{ num }}</a>
69
- </div>
70
- {% else %}
71
- <div class="page-item disabled">
72
- <span class="page-link">…</span>
73
- </div>
74
- {% endif %}
75
- {% endfor %}
76
-
77
- <div class="page-item {{ 'disabled' if not workflows.has_next else '' }}">
78
- <a class="page-link" href="{{ url_for('data.list_workflows', page=workflows.next_num) }}">Next</a>
79
- </div>
80
- </div>
81
-
82
- <div id="steps-container"></div>
83
-
84
- <script>
85
- function showSteps(workflowId) {
86
- fetch(`/workflow_steps/${workflowId}`)
87
- .then(response => response.json())
88
- .then(data => {
89
- const container = document.getElementById('steps-container');
90
- container.innerHTML = ''; // Clear previous content
91
- const stepsList = document.createElement('ul');
92
-
93
- data.steps.forEach(step => {
94
- const li = document.createElement('li');
95
- li.innerHTML = `
96
- <strong>Step: </strong> ${step.method_name} <br>
97
- <strong>Start Time:</strong> ${step.start_time} <br>
98
- <strong>End Time:</strong> ${step.end_time} <br>
99
- <strong>Human Intervention:</strong> ${step.run_error ? 'Yes' : 'No'}
100
- `;
101
- stepsList.appendChild(li);
102
- });
103
-
104
- container.appendChild(stepsList);
105
- });
106
- }
107
- </script>
108
- <script src="{{ url_for('static', filename='js/db_delete.js') }}"></script>
109
- {% endblock %}
@@ -1,130 +0,0 @@
1
- {% extends 'base.html' %}
2
-
3
- {% block title %}IvoryOS | Experiment Results{% endblock %}
4
-
5
- {% block body %}
6
- <style>
7
- .vis-time-axis .vis-text.vis-minor,
8
- .vis-time-axis .vis-text.vis-major {
9
- color: #666;
10
- }
11
- .vis-item.stop {
12
- background-color: red;
13
- color: white;
14
- border: none;
15
- font-weight: bold;
16
- }
17
- </style>
18
-
19
- <div id="timeline"></div>
20
-
21
- <script src="https://unpkg.com/vis-timeline@latest/standalone/umd/vis-timeline-graph2d.min.js"></script>
22
- <link href="https://unpkg.com/vis-timeline@latest/styles/vis-timeline-graph2d.min.css" rel="stylesheet"/>
23
-
24
- <h1>Experiment Step View</h1>
25
-
26
- <div id="visualization"></div>
27
-
28
- <script type="text/javascript">
29
- var container = document.getElementById('visualization');
30
-
31
- const items = [
32
- {% if grouped.prep %}
33
- {
34
- id: 'prep',
35
- content: 'Prep Phase',
36
- start: '{{ grouped.prep[0].start_time }}',
37
- end: '{{ grouped.prep[-1].end_time }}',
38
- className: 'prep',
39
- group: 'prep'
40
- },
41
- {% endif %}
42
-
43
- {% for repeat_index, step_list in grouped.script.items()|sort %}
44
- {
45
- id: 'iter{{ repeat_index }}',
46
- content: 'Iteration {{ repeat_index }}',
47
- start: '{{ step_list[0].start_time }}',
48
- end: '{{ step_list[-1].end_time }}',
49
- className: 'script',
50
- group: 'iter{{ repeat_index }}'
51
- },
52
- {% for step in step_list %}
53
- {% if step.method_name == "stop" %}
54
- {
55
- id: 'stop-{{ step.id }}',
56
- content: '🛑 Stop',
57
- start: '{{ step.start_time }}',
58
- type: 'point',
59
- className: 'stop',
60
- group: 'iter{{ repeat_index }}'
61
- },
62
- {% endif %}
63
- {% endfor %}
64
- {% endfor %}
65
-
66
- {% if grouped.cleanup %}
67
- {
68
- id: 'cleanup',
69
- content: 'Cleanup Phase',
70
- start: '{{ grouped.cleanup[0].start_time }}',
71
- end: '{{ grouped.cleanup[-1].end_time }}',
72
- className: 'cleanup',
73
- group: 'cleanup'
74
-
75
- },
76
- {% endif %}
77
- ];
78
-
79
- const groups = [
80
- {% if grouped.prep %}{ id: 'prep', content: 'Prep' },{% endif %}
81
- {% for repeat_index in grouped.script.keys()|sort %}{ id: 'iter{{ repeat_index }}', content: 'Iteration {{ repeat_index }}' },{% endfor %}
82
- {% if grouped.cleanup %}{ id: 'cleanup', content: 'Cleanup' },{% endif %}
83
- ];
84
-
85
- var options = {
86
- clickToUse: true,
87
- stack: false, // important to keep point within group row
88
- horizontalScroll: true,
89
- zoomKey: 'ctrlKey'
90
- };
91
-
92
- // Initialize your timeline with the sorted groups
93
- const timeline = new vis.Timeline(container, items, groups, options);
94
-
95
- timeline.on('select', function (props) {
96
- const id = props.items[0];
97
- if (id && id.startsWith('iter')) {
98
- const card = document.getElementById('card-' + id);
99
- if (card) {
100
- const yOffset = -80;
101
- const y = card.getBoundingClientRect().top + window.pageYOffset + yOffset;
102
- window.scrollTo({ top: y, behavior: 'smooth' });
103
- }
104
- }
105
- });
106
- </script>
107
-
108
- <h2>Workflow: {{ workflow.name }}</h2>
109
-
110
- {% if grouped.prep %}
111
- <h4 class="mt-4">Prep Phase</h4>
112
- {% for step in grouped.prep %}
113
- {% include "components/step_card.html" %}
114
- {% endfor %}
115
- {% endif %}
116
-
117
- {% for repeat_index, step_list in grouped.script.items()|sort %}
118
- <h4 class="mt-4" id="card-iter{{ repeat_index }}">Iteration {{ repeat_index }}</h4>
119
- {% for step in step_list %}
120
- {% include "components/step_card.html" %}
121
- {% endfor %}
122
- {% endfor %}
123
-
124
- {% if grouped.cleanup %}
125
- <h4 class="mt-4">Cleanup Phase</h4>
126
- {% for step in grouped.cleanup %}
127
- {% include "components/step_card.html" %}
128
- {% endfor %}
129
- {% endif %}
130
- {% endblock %}
@@ -1,53 +0,0 @@
1
- {# Action form component #}
2
- <div class="accordion-item design-control" draggable="true">
3
- <h2 class="accordion-header">
4
- <button class="accordion-button collapsed draggable-action"
5
- type="button" data-bs-toggle="collapse"
6
- data-bs-target="#{{name}}" aria-expanded="false"
7
- aria-controls="collapseExample"
8
- data-action="{{ name }}">
9
- {{ name | format_name }}
10
- </button>
11
- </h2>
12
- <div id="{{name}}" class="accordion-collapse collapse" data-bs-parent="#accordionActions">
13
- <div class="accordion-body">
14
- <form role="form" method='POST' action="{{ url_for('design.methods_handler', instrument=instrument) }}"
15
- name="add" id="add-{{name}}" onsubmit="addMethodToDesign(event, this); return false;">
16
- <div class="form-group">
17
- {{ form.hidden_tag() }}
18
- {% for field in form %}
19
- {% if field.type not in ['CSRFTokenField', 'HiddenField'] %}
20
- <div class="input-group mb-3">
21
- <label class="input-group-text">{{ field.label.text | format_name }}</label>
22
- {% if field.type == "SubmitField" %}
23
- {{ field(class="btn btn-dark") }}
24
- {% elif field.type == "BooleanField" %}
25
- {{ field(class="form-check-input") }}
26
- {% elif field.type == "FlexibleEnumField" %}
27
- <input type="text" id="{{ field.id }}" name="{{ field.name }}" value="{{ field.data }}"
28
- list="{{ field.id }}_options" placeholder="{{ field.render_kw.placeholder if field.render_kw and field.render_kw.placeholder }}"
29
- class="form-control">
30
- <datalist id="{{ field.id }}_options">
31
- {% for key in field.choices %}
32
- <option value="{{ key }}">{{ key }}</option>
33
- {% endfor %}
34
- </datalist>
35
- {% else %}
36
- {{ field(class="form-control") }}
37
- {% endif %}
38
- </div>
39
- {% endif %}
40
- {% endfor %}
41
- </div>
42
- <button type="submit" class="btn btn-dark">Add</button>
43
- {% if 'hidden_name' in form %}
44
- <i class="bi bi-info-circle ms-2" data-bs-toggle="tooltip" data-bs-placement="top"
45
- title='{{ form.hidden_name.description or "Docstring is not available" }}'>
46
- </i>
47
- {% else %}
48
- <!-- handle info tooltip for flow control / workflows -->
49
- {% endif %}
50
- </form>
51
- </div>
52
- </div>
53
- </div>
@@ -1,25 +0,0 @@
1
- {# Instrument panel component #}
2
- <div>
3
- <div class="d-flex justify-content-between align-items-center " style="margin-bottom: 1vh;margin-top: 1vh;">
4
- {# <a class="btn btn-primary" role="button" type="button" href="{{url_for('design.experiment_builder')}}"><i class="bi bi-arrow-return-left"></i></a>#}
5
- <a type="button"
6
- data-get-url="{{ url_for('design.get_operation_sidebar') }}"
7
- onclick="updateInstrumentPanel(this)">
8
- <i class="bi bi-arrow-return-left"></i>
9
- </a>
10
- {{ instrument | format_name }}
11
- </div>
12
-
13
- {% if script.editing_type == "script" %}
14
- {# Auto Fill Toggle #}
15
- {% include 'components/autofill_toggle.html' %}
16
- {% endif %}
17
-
18
- {# accordion for instrument #}
19
- <div class="accordion accordion-flush" id="accordionActions" >
20
-
21
- {% for name, form in forms.items() %}
22
- {% include 'components/action_form.html' %}
23
- {% endfor %}
24
- </div>
25
- </div>
@@ -1,10 +0,0 @@
1
- {# Autofill toggle component #}
2
- <div class="d-flex justify-content-between align-items-center " style="margin-bottom: 1vh;margin-top: 1vh;">
3
- <div class="form-check form-switch" data-instrument="{{ instrument }}">
4
- {# <input type="hidden" id="autofill" name="autofill" value="temp_value">#}
5
- <input class="form-check-input" type="checkbox" id="autoFillCheck" name="autoFillCheck" onchange="toggleAutoFill()"
6
- value="temp_value"
7
- {{ "checked" if session["autofill"] else "" }}>
8
- <label class="form-check-label" for="autoFillCheck">Auto fill</label>
9
- </div>
10
- </div>
@@ -1,5 +0,0 @@
1
- {% include 'components/canvas_header.html' %}
2
- <div class="canvas canvas-action-wrapper position-relative" id="canvas-action-wrapper" droppable="true">
3
- {% include 'components/canvas_main.html' %}
4
- </div>
5
- {% include 'components/canvas_footer.html' %}
@@ -1,9 +0,0 @@
1
- {# Canvas footer component #}
2
- <div>
3
- <a class="btn btn-dark {{ 'disabled' if not script.name or script.status == "finalized" else '' }}"
4
- href="#" data-post-url="{{ url_for('library.workflow_script', script_name=script.name or 'untitled') }}"
5
- onclick="saveWorkflow(this); return false;">
6
- Quick Save
7
- </a>
8
- <a class="btn btn-dark " href="{{ url_for('execute.experiment_run') }}">Compile and Run</a>
9
- </div>
@@ -1,75 +0,0 @@
1
- {# Canvas header component #}
2
- <div class="d-flex align-items-center justify-content-between">
3
- <!-- Left: Script Info -->
4
- <div>
5
- <span class="fw-bold">{{ script.name or "Untitled Script" }}</span>
6
- <span class="badge bg-secondary">{{ script.status }}</span>
7
- </div>
8
-
9
- <!-- Center: Main Actions -->
10
- <div class="btn-toolbar" role="toolbar">
11
- <button class="btn btn-primary btn-sm me-1" data-bs-toggle="modal" data-bs-target="#newScriptModal">New</button>
12
- <button class="btn btn-secondary btn-sm me-1" data-bs-toggle="modal" data-bs-target="#jsonModal">Import</button>
13
- <a class="btn btn-secondary btn-sm me-1" href="{{url_for('design.design_files.download_json', filetype='script')}}">Export</a>
14
- <button class="btn btn-secondary btn-sm me-1" data-bs-toggle="modal" data-bs-target="#saveasModal">Save as</button>
15
- <div class="btn-group">
16
- <button class="btn btn-outline-secondary btn-sm dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">More</button>
17
- <ul class="dropdown-menu">
18
- <li>
19
- <button class="dropdown-item" data-bs-toggle="modal" data-bs-target="#renameModal">Rename</button>
20
- </li>
21
- {% if script.name %}
22
- <li>
23
- <a class="dropdown-item {{ 'disabled' if not script.name or script.status == "finalized" else '' }}"
24
- href="#" data-post-url="{{ url_for('library.workflow_script', script_name=script.name) }}"
25
- onclick="saveWorkflow(this); return false;">
26
- Save
27
- </a>
28
- </li>
29
- {% endif %}
30
- {% if not script.status == 'finalized' %}
31
- <li>
32
- <a class="dropdown-item" onclick="lockScriptEditing()">Disable editing</a>
33
- </li>
34
- {% endif %}
35
- </ul>
36
- </div>
37
- </div>
38
- </div>
39
-
40
- <!-- Tabs for Info/Prep/Experiment/Cleanup below header -->
41
- <div class="d-flex align-items-center mt-2 justify-content-between">
42
- <ul class="nav nav-tabs mb-0">
43
- <li class="nav-item">
44
- <a class="nav-link {{ 'active' if script.editing_type == 'prep' else '' }}"
45
- href="#" onclick="setScriptPhase('prep')">
46
- Prep
47
- </a>
48
- </li>
49
- <li class="nav-item">
50
- <a class="nav-link {{ 'active' if script.editing_type == 'script' else '' }}"
51
- href="#" onclick="setScriptPhase('script')">
52
- Experiment
53
- </a>
54
- </li>
55
- <li class="nav-item">
56
- <a class="nav-link {{ 'active' if script.editing_type == 'cleanup' else '' }}"
57
- href="#" onclick="setScriptPhase('cleanup')">
58
- Clean up
59
- </a>
60
- </li>
61
- </ul>
62
-
63
- <div class="d-flex align-items-center ms-auto">
64
- <div class="form-check form-switch">
65
- <input class="form-check-input" type="checkbox" id="showPythonCodeSwitch" name="show_code"
66
- onchange="toggleCodeOverlay()" {% if session.get('show_code') %}checked{% endif %}>
67
- <label class="form-check-label" for="showPythonCodeSwitch">Preview code</label>
68
- </div>
69
- {# <div class="form-check form-switch">#}
70
- {# <input class="form-check-input" type="checkbox" id="toggleLineNumbers"#}
71
- {# onchange="toggleLineNumbers()">#}
72
- {# <label class="form-check-label" for="toggleLineNumbers">Show Line Numbers</label>#}
73
- {# </div>#}
74
- </div>
75
- </div>
@@ -1,34 +0,0 @@
1
- {# Action list component #}
2
-
3
- <!-- partials/canvas_content.html -->
4
-
5
-
6
- <div class="list-group" id="list" style="margin-top: 20px">
7
- <ul class="reorder">
8
-
9
- {% if script.editing_type == "prep" %}
10
- {% set buttons = buttons_dict["prep"] or [] %}
11
- {% elif script.editing_type == "script" %}
12
- {% set buttons = buttons_dict["script"] or [] %}
13
- {% elif script.editing_type == "cleanup" %}
14
- {% set buttons = buttons_dict["cleanup"] or [] %}
15
- {% endif %}
16
-
17
- {% for button in buttons %}
18
- <li id="{{ button['id'] }}" style="list-style-type: none;">
19
- <span class="line-number d-none">{{ button['id'] }}.</span>
20
- <a href="#" onclick="editAction('{{ button['uuid'] }}'); return false;" type="button" class="btn btn-light" style="{{ button['style'] }}">{{ button['label'] }}</a>
21
- {% if not button["instrument"] in ["if","while","repeat"] %}
22
- <button onclick="duplicateAction('{{ button['id'] }}')" type="button" class="btn btn-light"><span class="bi bi-copy"></span></button>
23
-
24
- {% endif %}
25
- <button onclick="deleteAction('{{ button['id'] }}')" type="button" class="btn btn-light">
26
- <span class="bi bi-trash"></span>
27
- </button>
28
- </li>
29
- {% endfor %}
30
- </ul>
31
- </div>
32
- <div class="python-code-wrapper" id="python-code-wrapper">
33
- {% include 'components/python_code_overlay.html' %}
34
- </div>
@@ -1,10 +0,0 @@
1
- {# Deck selector component #}
2
- <div class="input-group mb-3">
3
- <select class="form-select" name="deck_name" id="deck_name" required onchange="changeDeck(this.value);">
4
- <option {{ '' if 'pseudo_deck' in session else 'selected' }} disabled hidden style="overflow-wrap: break-word;" name="deck_name" id="deck_name" value=""> -- choose deck --</option>
5
- {% for connection in history %}
6
- <option {{ 'selected' if session['pseudo_deck']==connection else '' }} style="overflow-wrap: break-word;" name="deck_name" id="deck_name" value="{{connection}}">{{connection.split('.')[0]}}</option>
7
- {% endfor %}
8
- </select>
9
- </div>
10
- <hr>
@@ -1,38 +0,0 @@
1
- {# Edit action form component #}
2
- <div style="margin-bottom: 1vh;margin-top: 1vh;">
3
- <a type="button"
4
- data-get-url="{{ url_for('design.get_operation_sidebar') }}"
5
- onclick="updateInstrumentPanel(this)">
6
- <i class="bi bi-arrow-return-left"></i>
7
- </a>
8
- </div>
9
- <h5> {{ action['action'] | format_name }} </h5>
10
- <form role="form" method='POST' name="{{instrument}}"
11
- action="{{ url_for('design.design_steps.get_step', uuid=action['uuid']) }}"
12
- onsubmit="submitEditForm(event); return false;">
13
- {% if not action['args'] == None %}
14
- <div class="form-group">
15
- {% if not action['args'].__class__.__name__ == 'dict' %}
16
- <div class="input-group mb-3">
17
- <label class="input-group-text">{{ action['action'] }}</label>
18
- <input class="form-control" type="text" id="arg" name="arg"
19
- placeholder="{{ action['arg_types']}}" value="{{ action['args'] }}"
20
- aria-labelledby="variableHelpBlock">
21
- </div>
22
- {% else %}
23
- {{ forms.hidden_tag() }}
24
- {% for field in forms %}
25
- {% if field.type not in ['CSRFTokenField'] %}
26
- <div class="input-group mb-3">
27
- <label class="input-group-text">{{ field.label.text }}</label>
28
- {{ field(class="form-control") }}
29
- <div class="form-text">{{ field.description }} </div>
30
- </div>
31
- {% endif %}
32
- {% endfor %}
33
- {% endif %}
34
- </div>
35
- {% endif %}
36
- <button type="submit" class="btn btn-primary">Save</button>
37
- <button type="button" class="btn btn-primary" id="back">Back</button>
38
- </form>
@@ -1,66 +0,0 @@
1
- {# Operations panel component #}
2
- <div style="margin-bottom: 4vh;"></div>
3
- <div class="accordion accordion-flush">
4
- <div class="accordion-item design-control">
5
- <h5 class="accordion-header">
6
- <button class="accordion-button" data-bs-toggle="collapse" data-bs-target="#flow" role="button" aria-expanded="false" aria-controls="collapseExample">
7
- Flow control
8
- </button>
9
- </h5>
10
- <div class="accordion-collapse collapse show" id="flow">
11
- <ul class="list-group">
12
- <button class="list-group-item list-group-item-action"
13
- type="button"
14
- name="device"
15
- value="flow_control"
16
- data-get-url="{{ url_for('design.get_operation_sidebar', instrument='flow_control') }}"
17
- onclick="updateInstrumentPanel(this)">
18
- Flow control
19
- </button>
20
- </ul>
21
- </div>
22
- <h5 class="accordion-header">
23
- <button class="accordion-button" data-bs-toggle="collapse" data-bs-target="#deck" role="button" aria-expanded="false" aria-controls="collapseExample">
24
- Instruments
25
- </button>
26
- </h5>
27
- <div class="accordion-collapse collapse show" id="deck">
28
- <ul class="list-group">
29
- {% for instrument in defined_variables %}
30
- <button class="list-group-item list-group-item-action"
31
- type="button"
32
- name="device"
33
- value="{{instrument}}"
34
- data-get-url="{{ url_for('design.get_operation_sidebar', instrument=instrument) }}"
35
- onclick="updateInstrumentPanel(this)">
36
- {{ instrument | format_name }}
37
- </button>
38
- {% endfor %}
39
- </ul>
40
- </div>
41
- </div>
42
-
43
- {% if local_variables %}
44
- <div class="accordion-item design-control">
45
- <h5 class="accordion-header">
46
- <button class="accordion-button" data-bs-toggle="collapse" data-bs-target="#local" role="button" aria-expanded="false" aria-controls="collapseExample">
47
- Temp instruments
48
- </button>
49
- </h5>
50
- <div class="accordion-collapse collapse show" id="local">
51
- <ul class="list-group">
52
- {% for instrument in local_variables %}
53
- <button class="list-group-item list-group-item-action"
54
- type="button"
55
- name="device"
56
- value="{{instrument}}"
57
- data-get-url="{{ url_for('design.get_operation_sidebar', instrument=instrument) }}"
58
- onclick="updateInstrumentPanel(this)">
59
- {{instrument}}
60
- </button>
61
- {% endfor%}
62
- </ul>
63
- </div>
64
- </div>
65
- {% endif %}
66
- </div>
@@ -1,17 +0,0 @@
1
- <div class="modal fade" id="dropModal" tabindex="-1" role="dialog">
2
- <div class="modal-dialog" role="document">
3
- <div class="modal-content">
4
- <div class="modal-header">
5
- <h5 class="modal-title" id="dropModalLabel">Configure Action</h5>
6
- <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
7
- </div>
8
- <div class="modal-body">
9
- <p>Drop Position ID: <strong id="modalDropTarget"></strong></p>
10
- <div id="modalFormFields"></div>
11
- </div>
12
- <div class="modal-footer">
13
- <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Cancel</button>
14
- </div>
15
- </div>
16
- </div>
17
- </div>
@@ -1,22 +0,0 @@
1
- {# JSON import modal component #}
2
- <div class="modal fade" id="jsonModal" tabindex="-1" aria-labelledby="jsonModal" aria-hidden="true" >
3
- <div class="modal-dialog">
4
- <div class="modal-content">
5
- <div class="modal-header">
6
- <h1 class="modal-title fs-5" id="jsonModal">Import from JSON</h1>
7
- <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
8
- </div>
9
- <form method="POST" action="{{ url_for('design.design_files.load_json') }}" enctype="multipart/form-data">
10
- <div class="modal-body">
11
- <div class="input-group mb-3">
12
- <input class="form-control" type="file" name="file" required="required">
13
- </div>
14
- </div>
15
- <div class="modal-footer">
16
- <button type="button" class="btn btn-secondary" data-bs-dismiss="modal"> Close </button>
17
- <button type="submit" class="btn btn-primary"> Upload </button>
18
- </div>
19
- </form>
20
- </div>
21
- </div>
22
- </div>
@@ -1,17 +0,0 @@
1
- {# New script modal component #}
2
- <div class="modal fade" id="newScriptModal" tabindex="-1" aria-labelledby="newScriptModalLabel" aria-hidden="true">
3
- <div class="modal-dialog">
4
- <div class="modal-content">
5
- <div class="modal-header">
6
- <h1 class="modal-title fs-5" id="newScriptModalLabel">Save your current editing!</h1>
7
- <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
8
- </div>
9
- <div class="modal-body">
10
- The current editing won't be saved. Are you sure you want to proceed?
11
- </div>
12
- <div class="modal-footer">
13
- <button type="button" class="btn btn-secondary" data-bs-dismiss="modal"> Continue editing </button>
14
- <button class="btn btn-danger" onclick="clearDraft()">Already saved, clear all</button> </div>
15
- </div>
16
- </div>
17
- </div>