File size: 14,474 Bytes
d5bfab8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>ARC testing interface</title>

    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
    <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
    <link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"

        integrity="sha384-gH2yIJqKdNHPEq0n4Mqa/HGKIhSkIHeL5AyhkYV8i59U5AR6csBvApHHNl/vI1Bx" crossorigin="anonymous">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css">
    <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"

        integrity="sha384-A3rJD856KowSb7dwlZdYEkO39Gagi7vIsF0jrRAoQmDKKtQBHUuLZ9AsSv4jD4Xa"

        crossorigin="anonymous"></script>
    <script src="{{ url_for('static', filename='js/common.js') }}"></script>
    <script src="{{ url_for('static', filename='js/testset_interface.js') }}"></script>

    <link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='css/testset_common.css') }}">
    <link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='css/testset_interface.css') }}">

    <link href="https://fonts.googleapis.com/css?family=Open+Sans&display=swap" rel="stylesheet">

</head>

<div class="toast-container position-fixed bottom-0 end-0 p-3">
    <div id="successful_submit" class="toast" role="alert" aria-live="assertive" aria-atomic="true">
        <div class="toast-header">
            <strong class="me-auto"><i class="bi bi-check-lg"></i>Submitted Successfully</strong>
            <button type="button" class="btn-close" data-bs-dismiss="toast" aria-label="Close"></button>
        </div>
        <div class="toast-body">
            Your Test set has been successfully saved.
        </div>
    </div>

    <div id="unsuccessful_submit" class="toast" role="alert" aria-live="assertive" aria-atomic="true">
        <div class="toast-header">
            <strong class="me-auto text-danger"><i class="bi bi-exclamation-lg"></i>Error</strong>
            <button type="button" class="btn-close" data-bs-dismiss="toast" aria-label="Close"></button>
        </div>
        <div class="toast-body">
            Please check if you filled out your name and task description.
        </div>
    </div>

    <div id="delete_fail" class="toast" role="alert" aria-live="assertive" aria-atomic="true">
        <div class="toast-header">
            <strong class="me-auto text-danger"><i class="bi bi-exclamation-lg"></i>Error</strong>
            <button type="button" class="btn-close" data-bs-dismiss="toast" aria-label="Close"></button>
        </div>
        <div class="toast-body">
            There must be at least one example.
        </div>
    </div>
</div>

<div id="submission_modal" class="modal fade" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1"

    aria-labelledby="staticBackdropLabel" aria-hidden="true">
    <div class="modal-dialog modal-dialog-centered modal-dialog-scrollable">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title" id="staticBackdropLabel">Submit Task?</h5>
                <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
            </div>
            <div class="modal-body">
                <label>Participant Name</label>
                <br>
                <input id="user_id">
                <p></p>
                <label>Task Description</label>
                <br>
                <input id="task_description">
                <hr>
                <div id="example_panel">
                    <p></p>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
                <button type="button" class="btn btn-danger" data-bs-dismiss="modal"

                    onclick="submitFinalTestSet()">Submit</button>
            </div>
        </div>
    </div>
</div>

<body>
    <div id="workspace" class="container-fluid">
        <div id="editor" class="row justify-content-center gx-3">
            <div id="evaluation_output_editor" class="col col-sm-8 container border bg-light">
                <div id="edition_view" class="col_container bg-light">
                    <div class="text">
                        <h3 class="h4">Create your task</h3>
                    </div>
                    <div id="editor_grid_control_btns">
                        <!-- <label for="output_grid_size">Grid size: 5x5 </label> -->
                        <div class="btn-group" role="group">
                            <button type="button" class="btn btn-secondary" onclick="resetInputGrid()">Reset Input
                                grid</button>
                            <button type="button" class="btn btn-secondary" onclick="resetOutputGrid()">Reset Output
                                grid</button>
                            <button type="button" class="btn btn-secondary" id="tool_clear_selection">Clear
                                Selection</button>
                        </div>
                        <button type="button" class="btn btn-outline-success" data-bs-toggle="modal"

                            data-bs-target="#submission_modal" id="submit_final_btn">Submit final</button>
                        <button type="button" class="btn btn-outline-dark" onclick="viewpage('/testset/list')"><i class="bi bi-hourglass-split"></i> Under Review</button>
                        <button type="button" class="btn btn-outline-dark" onclick="viewpage('/testset/approved')"><i class="bi bi-puzzle"></i> Approved </button>
                    </div>

                    <div class="row justify-content-center">

                        <div id="input_grid" class="col-auto">
                            <div class="input_edition edition_grid selectable_grid">
                                <div class="row">
                                    <div class="cell" symbol="0" x="0" y="0"></div>
                                    <div class="cell" symbol="0" x="0" y="1"></div>
                                    <div class="cell" symbol="0" x="0" y="2"></div>
                                    <div class="cell" symbol="0" x="0" y="3"></div>
                                    <div class="cell" symbol="0" x="0" y="4"></div>
                                </div>
                                <div class="row">
                                    <div class="cell" symbol="0" x="1" y="0"></div>
                                    <div class="cell" symbol="0" x="1" y="1"></div>
                                    <div class="cell" symbol="0" x="1" y="2"></div>
                                    <div class="cell" symbol="0" x="1" y="3"></div>
                                    <div class="cell" symbol="0" x="1" y="4"></div>
                                </div>
                                <div class="row">
                                    <div class="cell" symbol="0" x="2" y="0"></div>
                                    <div class="cell" symbol="0" x="2" y="1"></div>
                                    <div class="cell" symbol="0" x="2" y="2"></div>
                                    <div class="cell" symbol="0" x="2" y="3"></div>
                                    <div class="cell" symbol="0" x="2" y="4"></div>
                                </div>
                                <div class="row">
                                    <div class="cell" symbol="0" x="3" y="0"></div>
                                    <div class="cell" symbol="0" x="3" y="1"></div>
                                    <div class="cell" symbol="0" x="3" y="2"></div>
                                    <div class="cell" symbol="0" x="3" y="3"></div>
                                    <div class="cell" symbol="0" x="3" y="4"></div>
                                </div>
                                <div class="row">
                                    <div class="cell" symbol="0" x="4" y="0"></div>
                                    <div class="cell" symbol="0" x="4" y="1"></div>
                                    <div class="cell" symbol="0" x="4" y="2"></div>
                                    <div class="cell" symbol="0" x="4" y="3"></div>
                                    <div class="cell" symbol="0" x="4" y="4"></div>
                                </div>
                            </div>

                        </div>

                        <div id="arrow_grid" class="col-1">
                            <h1>&#8594;</h1>
                        </div>

                        <div id="output_grid" class="col-auto">
                            <div class="output_edition edition_grid selectable_grid">
                                <div class="row">
                                    <div class="cell" symbol="0" x="0" y="0"></div>
                                    <div class="cell" symbol="0" x="0" y="1"></div>
                                    <div class="cell" symbol="0" x="0" y="2"></div>
                                    <div class="cell" symbol="0" x="0" y="3"></div>
                                    <div class="cell" symbol="0" x="0" y="4"></div>
                                </div>
                                <div class="row">
                                    <div class="cell" symbol="0" x="1" y="0"></div>
                                    <div class="cell" symbol="0" x="1" y="1"></div>
                                    <div class="cell" symbol="0" x="1" y="2"></div>
                                    <div class="cell" symbol="0" x="1" y="3"></div>
                                    <div class="cell" symbol="0" x="1" y="4"></div>
                                </div>
                                <div class="row">
                                    <div class="cell" symbol="0" x="2" y="0"></div>
                                    <div class="cell" symbol="0" x="2" y="1"></div>
                                    <div class="cell" symbol="0" x="2" y="2"></div>
                                    <div class="cell" symbol="0" x="2" y="3"></div>
                                    <div class="cell" symbol="0" x="2" y="4"></div>
                                </div>
                                <div class="row">
                                    <div class="cell" symbol="0" x="3" y="0"></div>
                                    <div class="cell" symbol="0" x="3" y="1"></div>
                                    <div class="cell" symbol="0" x="3" y="2"></div>
                                    <div class="cell" symbol="0" x="3" y="3"></div>
                                    <div class="cell" symbol="0" x="3" y="4"></div>
                                </div>
                                <div class="row">
                                    <div class="cell" symbol="0" x="4" y="0"></div>
                                    <div class="cell" symbol="0" x="4" y="1"></div>
                                    <div class="cell" symbol="0" x="4" y="2"></div>
                                    <div class="cell" symbol="0" x="4" y="3"></div>
                                    <div class="cell" symbol="0" x="4" y="4"></div>
                                </div>
                            </div>
                        </div>
                    </div>


                    <div id="toolbar">
                        <div>
                            <input type="radio" id="tool_edit" name="tool_switching" value="edit" checked>
                            <label for="tool_edit">Edit</label>

                            <input type="radio" id="tool_select" name="tool_switching" value="select">
                            <label for="tool_select">Select</label>

                            <input type="radio" id="tool_floodfill" name="tool_switching" value="floodfill">
                            <label for="tool_floodfill">Flood fill</label>
                        </div>
                    </div>

                    <div id="symbol_picker">
                        <div class="symbol_preview symbol_0 selected-symbol-preview" symbol="0"></div>
                        <div class="symbol_preview symbol_1" symbol="1"></div>
                        <div class="symbol_preview symbol_2" symbol="2"></div>
                        <div class="symbol_preview symbol_3" symbol="3"></div>
                        <div class="symbol_preview symbol_4" symbol="4"></div>
                        <div class="symbol_preview symbol_5" symbol="5"></div>
                        <div class="symbol_preview symbol_6" symbol="6"></div>
                        <div class="symbol_preview symbol_7" symbol="7"></div>
                        <div class="symbol_preview symbol_8" symbol="8"></div>
                        <div class="symbol_preview symbol_9" symbol="9"></div>
                    </div>
                </div>

                <div id="error_display"></div>
                <div id="info_display"></div>
            </div>

            <div id="finished_pairs" class="col-sm-4">
                <div id="layer_panel_view" class="col_container p-3 border bg-light">
                    <button type="button" class="btn btn-outline-dark" onclick="newExample()" id="new_example_btn"><i class="bi bi-plus-circle"></i> New Pair</button>
                    <button type="button" class="btn btn-outline-danger" onclick="deleteExample()" id="delete_example_btn"><i class="bi bi-trash3"></i> Delete Pair</button>
                    <p></p>
                    <div id="layer_panel">
                        {% if id %}
                        <p>edit {{id}}</p>
                        <script>

                            (function() {

                                reloadExample();

                            })();

                            </script>
                        {% endif %}
                    </div>
                </div>
            </div>
        </div>
    </div>
</body>

</html>