ivoryos 0.1.5__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.
- ivoryos/__init__.py +94 -0
- ivoryos/config.py +46 -0
- ivoryos/routes/__init__.py +0 -0
- ivoryos/routes/auth/__init__.py +0 -0
- ivoryos/routes/auth/auth.py +65 -0
- ivoryos/routes/auth/templates/auth/login.html +25 -0
- ivoryos/routes/auth/templates/auth/signup.html +32 -0
- ivoryos/routes/control/__init__.py +0 -0
- ivoryos/routes/control/control.py +233 -0
- ivoryos/routes/control/templates/control/controllers.html +71 -0
- ivoryos/routes/control/templates/control/controllers_home.html +50 -0
- ivoryos/routes/control/templates/control/controllers_new.html +89 -0
- ivoryos/routes/database/__init__.py +0 -0
- ivoryos/routes/database/database.py +122 -0
- ivoryos/routes/database/templates/database/experiment_database.html +72 -0
- ivoryos/routes/design/__init__.py +0 -0
- ivoryos/routes/design/design.py +396 -0
- ivoryos/routes/design/templates/design/experiment_builder.html +413 -0
- ivoryos/routes/design/templates/design/experiment_run.html +325 -0
- ivoryos/routes/main/__init__.py +0 -0
- ivoryos/routes/main/main.py +25 -0
- ivoryos/routes/main/templates/main/help.html +144 -0
- ivoryos/routes/main/templates/main/home.html +68 -0
- ivoryos/static/favicon.ico +0 -0
- ivoryos/static/gui_annotation/Slide1.png +0 -0
- ivoryos/static/gui_annotation/Slide2.PNG +0 -0
- ivoryos/static/js/overlay.js +12 -0
- ivoryos/static/js/socket_handler.js +25 -0
- ivoryos/static/js/sortable_card.js +24 -0
- ivoryos/static/js/sortable_design.js +36 -0
- ivoryos/static/logo.png +0 -0
- ivoryos/static/style.css +202 -0
- ivoryos/templates/base.html +141 -0
- ivoryos/utils/__init__.py +0 -0
- ivoryos/utils/db_models.py +501 -0
- ivoryos/utils/form.py +316 -0
- ivoryos/utils/global_config.py +68 -0
- ivoryos/utils/llm_agent.py +183 -0
- ivoryos/utils/script_runner.py +158 -0
- ivoryos/utils/task_manager.py +80 -0
- ivoryos/utils/utils.py +337 -0
- ivoryos-0.1.5.dist-info/LICENSE +21 -0
- ivoryos-0.1.5.dist-info/METADATA +96 -0
- ivoryos-0.1.5.dist-info/RECORD +46 -0
- ivoryos-0.1.5.dist-info/WHEEL +5 -0
- ivoryos-0.1.5.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
$(function() {
|
|
2
|
+
$("#sortable-grid").sortable({
|
|
3
|
+
items: ".card",
|
|
4
|
+
cursor: "move",
|
|
5
|
+
opacity: 0.7,
|
|
6
|
+
revert: true,
|
|
7
|
+
placeholder: "ui-state-highlight",
|
|
8
|
+
start: function(event, ui) {
|
|
9
|
+
ui.placeholder.height(ui.item.height());
|
|
10
|
+
},
|
|
11
|
+
update: function() {
|
|
12
|
+
const newOrder = $("#sortable-grid").sortable("toArray");
|
|
13
|
+
$.ajax({
|
|
14
|
+
url: saveOrderUrl, // saveOrderUrl should be set dynamically in your HTML template
|
|
15
|
+
method: 'POST',
|
|
16
|
+
contentType: 'application/json',
|
|
17
|
+
data: JSON.stringify({ order: newOrder }),
|
|
18
|
+
success: function() {
|
|
19
|
+
console.log('Order saved');
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
}).disableSelection();
|
|
24
|
+
});
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
$(document).ready(function(){
|
|
2
|
+
function slideout(){
|
|
3
|
+
setTimeout(function(){
|
|
4
|
+
$("#response").slideUp("slow", function () {});
|
|
5
|
+
}, 2000);
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
$("#response").hide();
|
|
9
|
+
|
|
10
|
+
$(function() {
|
|
11
|
+
$("#list ul").sortable({
|
|
12
|
+
cancel: ".unsortable",
|
|
13
|
+
opacity: 0.8,
|
|
14
|
+
cursor: 'move',
|
|
15
|
+
update: function() {
|
|
16
|
+
var item_order = [];
|
|
17
|
+
$('ul.reorder li').each(function() {
|
|
18
|
+
item_order.push($(this).attr("id"));
|
|
19
|
+
});
|
|
20
|
+
var order_string = 'order=' + item_order.join(',');
|
|
21
|
+
|
|
22
|
+
$.ajax({
|
|
23
|
+
method: "POST",
|
|
24
|
+
url: updateListUrl, // updateListUrl should be set dynamically in your HTML template
|
|
25
|
+
data: order_string,
|
|
26
|
+
cache: false,
|
|
27
|
+
success: function(data){
|
|
28
|
+
$("#response").html(data);
|
|
29
|
+
$("#response").slideDown('slow');
|
|
30
|
+
slideout();
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
});
|
ivoryos/static/logo.png
ADDED
|
Binary file
|
ivoryos/static/style.css
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
.login {
|
|
2
|
+
width: 500px;
|
|
3
|
+
padding: 8% 0 0;
|
|
4
|
+
margin: auto;
|
|
5
|
+
align-content: center;
|
|
6
|
+
}
|
|
7
|
+
.card{
|
|
8
|
+
display: flex;
|
|
9
|
+
justify-content: flex-end;
|
|
10
|
+
cursor: move;
|
|
11
|
+
border: none;
|
|
12
|
+
transition: transform 0.3s ease, box-shadow 0.3s ease;
|
|
13
|
+
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.card a {
|
|
17
|
+
text-decoration: none;
|
|
18
|
+
}
|
|
19
|
+
.card-title {
|
|
20
|
+
color: #007bff; /* Bootstrap primary color */
|
|
21
|
+
}
|
|
22
|
+
.grid-container {
|
|
23
|
+
display: grid;
|
|
24
|
+
grid-template-columns: repeat(auto-fit, minmax(350px, 400px));
|
|
25
|
+
gap: 25px;
|
|
26
|
+
padding: 10px;
|
|
27
|
+
}
|
|
28
|
+
.navbar-nav {
|
|
29
|
+
font-size: larger;
|
|
30
|
+
}
|
|
31
|
+
.navbar-nav li{
|
|
32
|
+
margin-right:10px;
|
|
33
|
+
margin-left:10px;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.canvas {
|
|
37
|
+
height: 70vh;
|
|
38
|
+
overflow: hidden;
|
|
39
|
+
overflow-y: scroll;
|
|
40
|
+
background: #e8e8cd;
|
|
41
|
+
background-size: 20px 20px;
|
|
42
|
+
background-image: radial-gradient(circle, cadetblue 1px, rgba(0, 0, 0, 0) 1px);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.canvas content{
|
|
46
|
+
margin-top: 10px;
|
|
47
|
+
}
|
|
48
|
+
body {
|
|
49
|
+
padding-top: 100px;
|
|
50
|
+
background-color: #f8f9fa; /* Light grey background */
|
|
51
|
+
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
|
52
|
+
}
|
|
53
|
+
/*.run-panel-row-height {*/
|
|
54
|
+
/* height: 80vh;*/
|
|
55
|
+
/*}*/
|
|
56
|
+
pre {
|
|
57
|
+
tab-size: 4;
|
|
58
|
+
}
|
|
59
|
+
.scroll-column{
|
|
60
|
+
height: 90vh;
|
|
61
|
+
overflow: hidden;
|
|
62
|
+
overflow-y: scroll;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
label {
|
|
66
|
+
display:block
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.scroll {
|
|
70
|
+
overflow: auto;
|
|
71
|
+
-webkit-overflow-scrolling: touch; /* enables momentum-scrolling on iOS */
|
|
72
|
+
position: absolute;
|
|
73
|
+
top: 0;
|
|
74
|
+
left: 0;
|
|
75
|
+
right: 0;
|
|
76
|
+
bottom: 0;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
/*Remove the scrollbar from Chrome, Safari, Edge and IE*/
|
|
81
|
+
::-webkit-scrollbar {
|
|
82
|
+
background: transparent;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
* {
|
|
86
|
+
-ms-overflow-style: none !important;
|
|
87
|
+
}
|
|
88
|
+
.script-table{
|
|
89
|
+
background: white;
|
|
90
|
+
width: fit-content;
|
|
91
|
+
}
|
|
92
|
+
.script-table td {
|
|
93
|
+
border-bottom: none;
|
|
94
|
+
border-top: cadetblue;
|
|
95
|
+
}
|
|
96
|
+
.script-table th{
|
|
97
|
+
border-top: cadetblue;
|
|
98
|
+
border-bottom: none;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.bottom-button {
|
|
102
|
+
position: absolute;
|
|
103
|
+
bottom: 20px;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
hr.vertical {
|
|
107
|
+
width: 5px;
|
|
108
|
+
height: 100%;
|
|
109
|
+
display: inline-block;
|
|
110
|
+
/* or height in PX */
|
|
111
|
+
}
|
|
112
|
+
.list-group a {
|
|
113
|
+
text-align: left;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.tray input[type="checkbox"]:checked + label{
|
|
117
|
+
background: radial-gradient(circle, white 40%, midnightblue, dodgerblue 43%);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.btn-vial{
|
|
121
|
+
height: 50px;
|
|
122
|
+
width: 50px;
|
|
123
|
+
border-radius: 50%;
|
|
124
|
+
background: lightgray;
|
|
125
|
+
margin-right: 10px;
|
|
126
|
+
margin-top: 10px;
|
|
127
|
+
/*text-align: center;*/
|
|
128
|
+
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.tray {
|
|
132
|
+
width: 70px;
|
|
133
|
+
height: 70px;
|
|
134
|
+
display: inline-block;
|
|
135
|
+
background: darkgrey;
|
|
136
|
+
/*text-align:center;*/
|
|
137
|
+
vertical-align: middle;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.disabled-link {
|
|
141
|
+
pointer-events: none;
|
|
142
|
+
color: currentColor;
|
|
143
|
+
cursor: not-allowed;
|
|
144
|
+
opacity: 0.5;
|
|
145
|
+
text-decoration: none;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
.controller-card a {
|
|
150
|
+
text-decoration: none;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
#logging-panel {
|
|
154
|
+
flex-grow: 1;
|
|
155
|
+
height: 50vh;
|
|
156
|
+
overflow-y: auto;
|
|
157
|
+
background-color: #f5f5f5;
|
|
158
|
+
padding: 10px;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.dropdown:hover .dropdown-menu {
|
|
162
|
+
display: block;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
#reorder {
|
|
166
|
+
overflow-y: scroll;
|
|
167
|
+
-webkit-overflow-scrolling: touch;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.accordion-item.design-control .accordion-button.collapsed {
|
|
171
|
+
background-color:#c1f2f1 !important;
|
|
172
|
+
}
|
|
173
|
+
.accordion-item.design-control .accordion-button {
|
|
174
|
+
background-color:#b3dad9 !important;
|
|
175
|
+
}
|
|
176
|
+
.accordion-item.design-control .accordion-button:hover {
|
|
177
|
+
background-color:#b3dad9 !important;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.accordion-item.text-to-code .accordion-button.collapsed {
|
|
181
|
+
background-color: #cdc1f2 !important;
|
|
182
|
+
}
|
|
183
|
+
.accordion-item.text-to-code .accordion-button {
|
|
184
|
+
background-color: #cdc1f2 !important;
|
|
185
|
+
}
|
|
186
|
+
.accordion-item.text-to-code .accordion-button:hover {
|
|
187
|
+
background-color: #b8afdc !important;
|
|
188
|
+
}
|
|
189
|
+
.overlay {
|
|
190
|
+
position: fixed;
|
|
191
|
+
top: 0;
|
|
192
|
+
left: 0;
|
|
193
|
+
width: 100%;
|
|
194
|
+
height: 100%;
|
|
195
|
+
background-color: rgba(0, 0, 0, 0.5);
|
|
196
|
+
display: none;
|
|
197
|
+
z-index: 1000;
|
|
198
|
+
text-align: center;
|
|
199
|
+
color: white;
|
|
200
|
+
font-size: 24px;
|
|
201
|
+
padding-top: 20%;
|
|
202
|
+
}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
6
|
+
<title>{% block title %}{% endblock %}</title>
|
|
7
|
+
{#bootstrap#}
|
|
8
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha2/dist/css/bootstrap.min.css" integrity="sha384-aFq/bzH65dt+w6FI2ooMVUpc+21e0SRygnTpmBvdBgSdnuTN7QbdgL+OapgHtvPp" crossorigin="anonymous">
|
|
9
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.3/font/bootstrap-icons.css">
|
|
10
|
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js"></script>
|
|
11
|
+
{#static#}
|
|
12
|
+
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
|
|
13
|
+
<link rel="shortcut icon" href="{{ url_for('static', filename='favicon.ico') }}" type="image/x-icon">
|
|
14
|
+
{#for python code displaying#}
|
|
15
|
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/default.min.css">
|
|
16
|
+
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha2/dist/js/bootstrap.bundle.min.js" integrity="sha384-qKXV1j0HvMUeCBQ+QVp7JcfGl760yU08IQ+GpUo5hlbpg51QRiuqHAJz8+BrxE/N" crossorigin="anonymous"></script>
|
|
17
|
+
<script>hljs.highlightAll();</script>
|
|
18
|
+
{#drag design#}
|
|
19
|
+
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.0/jquery.min.js"></script>
|
|
20
|
+
{#drag card#}
|
|
21
|
+
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
|
|
22
|
+
</head>
|
|
23
|
+
<body>
|
|
24
|
+
<nav class="navbar navbar-expand-lg navbar-light bg-light fixed-top">
|
|
25
|
+
<div class= "container">
|
|
26
|
+
|
|
27
|
+
<a class="navbar-brand" href="{{ url_for('main.index') }}">
|
|
28
|
+
<img src="{{url_for('static', filename='logo.png')}}" alt="Logo" height="60" class="d-inline-block align-text-bottom">
|
|
29
|
+
</a>
|
|
30
|
+
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
|
|
31
|
+
<span class="navbar-toggler-icon"></span>
|
|
32
|
+
</button>
|
|
33
|
+
|
|
34
|
+
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
|
35
|
+
<ul class="navbar-nav mr-auto">
|
|
36
|
+
<li class="nav-item">
|
|
37
|
+
<a class="nav-link" href="{{ url_for('database.load_from_database') }}" aria-current="page">Library</a>
|
|
38
|
+
</li>
|
|
39
|
+
<li class="nav-item">
|
|
40
|
+
<a class="nav-link" href="{{ url_for('design.experiment_builder') }}">Design</a>
|
|
41
|
+
</li>
|
|
42
|
+
<li class="nav-item">
|
|
43
|
+
<a class="nav-link" href="{{ url_for('design.experiment_run') }}">Compile/Run</a>
|
|
44
|
+
</li>
|
|
45
|
+
<li class="nav-item">
|
|
46
|
+
<a class="nav-link" href="{{ url_for('control.deck_controllers') }}">Devices</a></li>
|
|
47
|
+
</li>
|
|
48
|
+
<li class="nav-item">
|
|
49
|
+
<a class="nav-link" href="{{ url_for('control.controllers_home') }}">Temp Devices</a></li>
|
|
50
|
+
</li>
|
|
51
|
+
<li class="nav-item">
|
|
52
|
+
<a class="nav-link" href="{{ url_for('main.help_info') }}">About</a>
|
|
53
|
+
</li>
|
|
54
|
+
</ul>
|
|
55
|
+
<ul class="navbar-nav ms-auto">
|
|
56
|
+
|
|
57
|
+
{% if session["user"] %}
|
|
58
|
+
<div class="dropdown">
|
|
59
|
+
<li class="nav-item " aria-expanded="false"><i class="bi bi-person-circle"></i> {{ session["user"] }}</li>
|
|
60
|
+
<ul class="dropdown-menu">
|
|
61
|
+
<li><a class="dropdown-item" href="{{ url_for("auth.logout") }}" role="button" aria-expanded="false">Logout</a></li>
|
|
62
|
+
</ul>
|
|
63
|
+
|
|
64
|
+
</div>
|
|
65
|
+
{% else %}
|
|
66
|
+
<li class="nav-item">
|
|
67
|
+
<a class="nav-link" href="{{ url_for("auth.login") }}">Login</a>
|
|
68
|
+
</li>
|
|
69
|
+
{% endif %}
|
|
70
|
+
{# <li class="nav-item">#}
|
|
71
|
+
{# <a class="nav-link"href="{{ url_for("signup") }}">Signup</a>#}
|
|
72
|
+
{# </li>#}
|
|
73
|
+
</ul>
|
|
74
|
+
</div>
|
|
75
|
+
</div>
|
|
76
|
+
</nav>
|
|
77
|
+
|
|
78
|
+
<div class= "container">
|
|
79
|
+
<div class="flash">
|
|
80
|
+
{% with messages = get_flashed_messages() %}
|
|
81
|
+
{% if messages %}
|
|
82
|
+
<div class="alert alert-warning">
|
|
83
|
+
Message:
|
|
84
|
+
{% for message in messages %}
|
|
85
|
+
<div >
|
|
86
|
+
{{ message|safe }}
|
|
87
|
+
</div>
|
|
88
|
+
{% endfor %}
|
|
89
|
+
</div>
|
|
90
|
+
{% endif %}
|
|
91
|
+
{% endwith %}
|
|
92
|
+
</div>
|
|
93
|
+
{% block body %}{% endblock %}
|
|
94
|
+
</div>
|
|
95
|
+
|
|
96
|
+
<div class="modal fade" id="importModal" tabindex="-1" aria-labelledby="importModal" aria-hidden="true" >
|
|
97
|
+
<div class="modal-dialog">
|
|
98
|
+
<div class="modal-content">
|
|
99
|
+
<div class="modal-header">
|
|
100
|
+
<h1 class="modal-title fs-5" id="importModal">Import deck by file path</h1>
|
|
101
|
+
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
|
102
|
+
</div>
|
|
103
|
+
<form method="POST" action="{{ url_for('control.import_deck') }}" enctype="multipart/form-data">
|
|
104
|
+
<div class="modal-body">
|
|
105
|
+
<h5>from connection history</h5>
|
|
106
|
+
<div class="form-group">
|
|
107
|
+
<select class="form-select" name="filepath">
|
|
108
|
+
<option disabled selected value> -- select an option -- </option>
|
|
109
|
+
{% for connection in history %}
|
|
110
|
+
<option style="overflow-wrap: break-word;" name="filepath" id="filepath" value="{{connection}}">{{connection}}</option>
|
|
111
|
+
{% endfor %}
|
|
112
|
+
{# <option>clear history</option>#}
|
|
113
|
+
</select>
|
|
114
|
+
</div>
|
|
115
|
+
<h5>input manually</h5>
|
|
116
|
+
<div class="input-group mb-3">
|
|
117
|
+
<label class="input-group-text" for="filepath">File Path:</label>
|
|
118
|
+
<input type="text" class="form-control" name="filepath" id="filepath">
|
|
119
|
+
</div>
|
|
120
|
+
<div class="input-group mb-3">
|
|
121
|
+
<div class="form-check">
|
|
122
|
+
<input type="checkbox" class="form-check-input" id="update" name="update" value="update">
|
|
123
|
+
<label class="form-check-label" for="update">Update editor config</label>
|
|
124
|
+
</div>
|
|
125
|
+
</div>
|
|
126
|
+
|
|
127
|
+
<div class="modal-footer">
|
|
128
|
+
<div class="form-check">
|
|
129
|
+
<input type="checkbox" class="form-check-input" id="dismiss" name="dismiss" value="dismiss">
|
|
130
|
+
<label class="form-check-label" for="dismiss">Don't remind me</label>
|
|
131
|
+
</div>
|
|
132
|
+
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal"> Close </button>
|
|
133
|
+
<button type="submit" class="btn btn-primary"> Save </button>
|
|
134
|
+
</div>
|
|
135
|
+
</div>
|
|
136
|
+
</form>
|
|
137
|
+
</div>
|
|
138
|
+
</div>
|
|
139
|
+
</div>
|
|
140
|
+
</body>
|
|
141
|
+
</html>
|
|
File without changes
|