cnhkmcp 1.3.6__py3-none-any.whl → 1.3.7__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.
- cnhkmcp/__init__.py +1 -1
- cnhkmcp/untracked/APP/.gitignore +32 -0
- cnhkmcp/untracked/APP/MODULAR_STRUCTURE.md +123 -0
- cnhkmcp/untracked/APP/README.md +309 -0
- cnhkmcp/untracked/APP/__pycache__/app.cpython-313.pyc +0 -0
- cnhkmcp/untracked/APP/blueprints/__init__.py +5 -0
- cnhkmcp/untracked/APP/blueprints/__pycache__/__init__.cpython-313.pyc +0 -0
- cnhkmcp/untracked/APP/blueprints/__pycache__/feature_engineering.cpython-313.pyc +0 -0
- cnhkmcp/untracked/APP/blueprints/__pycache__/idea_house.cpython-313.pyc +0 -0
- cnhkmcp/untracked/APP/blueprints/__pycache__/inspiration_house.cpython-313.pyc +0 -0
- cnhkmcp/untracked/APP/blueprints/__pycache__/paper_analysis.cpython-313.pyc +0 -0
- cnhkmcp/untracked/APP/blueprints/__pycache__/simulator.cpython-313.pyc +0 -0
- cnhkmcp/untracked/APP/blueprints/__pycache__/unified_tools.cpython-313.pyc +0 -0
- cnhkmcp/untracked/APP/blueprints/__pycache__/wqb_simulator.cpython-313.pyc +0 -0
- cnhkmcp/untracked/APP/blueprints/feature_engineering.py +347 -0
- cnhkmcp/untracked/APP/blueprints/idea_house.py +221 -0
- cnhkmcp/untracked/APP/blueprints/inspiration_house.py +432 -0
- cnhkmcp/untracked/APP/blueprints/paper_analysis.py +570 -0
- cnhkmcp/untracked/APP/custom_templates/templates.json +4582 -0
- cnhkmcp/untracked/APP/hkSimulator/ace_lib.py +1476 -0
- cnhkmcp/untracked/APP/hkSimulator/autosimulator.py +346 -0
- cnhkmcp/untracked/APP/hkSimulator/helpful_functions.py +180 -0
- cnhkmcp/untracked/APP/mirror_config.txt +20 -0
- cnhkmcp/untracked/APP/operaters.csv +129 -0
- cnhkmcp/untracked/APP/requirements.txt +44 -0
- cnhkmcp/untracked/APP/run_app.bat +28 -0
- cnhkmcp/untracked/APP/run_app.sh +34 -0
- cnhkmcp/untracked/APP/setup_tsinghua.bat +39 -0
- cnhkmcp/untracked/APP/setup_tsinghua.sh +43 -0
- cnhkmcp/untracked/APP/simulator/__pycache__/simulator_wqb.cpython-313.pyc +0 -0
- cnhkmcp/untracked/APP/simulator/alpha_submitter.py +366 -0
- cnhkmcp/untracked/APP/simulator/simulator_wqb.py +602 -0
- cnhkmcp/untracked/APP/ssrn-3332513.pdf +109188 -19
- cnhkmcp/untracked/APP/static/brain.js +478 -0
- cnhkmcp/untracked/APP/static/decoder.js +1275 -0
- cnhkmcp/untracked/APP/static/feature_engineering.js +1729 -0
- cnhkmcp/untracked/APP/static/idea_house.js +937 -0
- cnhkmcp/untracked/APP/static/inspiration_house.js +868 -0
- cnhkmcp/untracked/APP/static/paper_analysis.js +390 -0
- cnhkmcp/untracked/APP/static/script.js +2577 -0
- cnhkmcp/untracked/APP/static/simulator.js +597 -0
- cnhkmcp/untracked/APP/static/styles.css +3099 -0
- cnhkmcp/untracked/APP/templates/feature_engineering.html +959 -0
- cnhkmcp/untracked/APP/templates/idea_house.html +563 -0
- cnhkmcp/untracked/APP/templates/index.html +769 -0
- cnhkmcp/untracked/APP/templates/inspiration_house.html +860 -0
- cnhkmcp/untracked/APP/templates/paper_analysis.html +90 -0
- cnhkmcp/untracked/APP/templates/simulator.html +342 -0
- cnhkmcp/untracked/APP//321/210/342/224/220/320/240/321/210/320/261/320/234/321/206/320/231/320/243/321/205/342/225/235/320/220/321/206/320/230/320/241.py +1489 -0
- {cnhkmcp-1.3.6.dist-info → cnhkmcp-1.3.7.dist-info}/METADATA +1 -1
- cnhkmcp-1.3.7.dist-info/RECORD +67 -0
- cnhkmcp/untracked/APP.zip +0 -0
- cnhkmcp-1.3.6.dist-info/RECORD +0 -20
- {cnhkmcp-1.3.6.dist-info → cnhkmcp-1.3.7.dist-info}/WHEEL +0 -0
- {cnhkmcp-1.3.6.dist-info → cnhkmcp-1.3.7.dist-info}/entry_points.txt +0 -0
- {cnhkmcp-1.3.6.dist-info → cnhkmcp-1.3.7.dist-info}/licenses/LICENSE +0 -0
- {cnhkmcp-1.3.6.dist-info → cnhkmcp-1.3.7.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,769 @@
|
|
|
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.0">
|
|
6
|
+
<title>BRAIN Expression Template Decoder</title>
|
|
7
|
+
<link rel="stylesheet" href="{{ url_for('static', filename='styles.css') }}">
|
|
8
|
+
</head>
|
|
9
|
+
<body>
|
|
10
|
+
<div class="container">
|
|
11
|
+
<header>
|
|
12
|
+
<div class="header-top">
|
|
13
|
+
<div class="header-left">
|
|
14
|
+
<button onclick="openSubmitter()" class="btn btn-submitter">📤 Open Submitter</button>
|
|
15
|
+
<button onclick="openHKSimulator()" class="btn btn-submitter" style="margin-top: 10px; display: block;">🚀 Open Simulator_hk</button>
|
|
16
|
+
</div>
|
|
17
|
+
<div class="header-center">
|
|
18
|
+
<h1>BRAIN Expression Template Decoder</h1>
|
|
19
|
+
<p class="subtitle">Specialized template decoder with grammar checking for expression-like language</p>
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
|
22
|
+
<div class="header-buttons">
|
|
23
|
+
<div class="header-buttons-row">
|
|
24
|
+
<div style="display: flex; gap: 10px; align-items: center;">
|
|
25
|
+
<button id="connectToBrain" class="btn btn-brain">Connect to BRAIN</button>
|
|
26
|
+
<button onclick="runSimulator()" class="btn btn-primary">🚀 Go to Simulator</button>
|
|
27
|
+
</div>
|
|
28
|
+
<a href="{{ url_for('inspiration_house.inspiration_house') }}" class="btn btn-primary">Inspiration House</a>
|
|
29
|
+
<a href="{{ url_for('paper_analysis.paper_analysis') }}" class="btn btn-primary">Paper Analysis</a>
|
|
30
|
+
<a href="{{ url_for('feature_engineering.feature_engineering') }}" class="btn btn-primary">DataField Guide</a>
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
</header>
|
|
36
|
+
|
|
37
|
+
<!-- Unified Templates Section -->
|
|
38
|
+
<div class="templates-section">
|
|
39
|
+
<div class="templates-header">
|
|
40
|
+
<h3>Expression Templates</h3>
|
|
41
|
+
<div class="template-actions">
|
|
42
|
+
<button class="btn btn-small btn-primary" id="toggleTemplateView" onclick="toggleTemplateView()">
|
|
43
|
+
<span id="toggleTemplateViewText">Show User's Only</span>
|
|
44
|
+
</button>
|
|
45
|
+
<button class="btn btn-small btn-outline" onclick="exportCustomTemplates()" title="Export all custom templates">
|
|
46
|
+
<span style="margin-right: 5px;">📤</span>Export User Templates
|
|
47
|
+
</button>
|
|
48
|
+
<button class="btn btn-small btn-outline" onclick="document.getElementById('importTemplatesFile').click()" title="Import templates from file">
|
|
49
|
+
<span style="margin-right: 5px;">📥</span>Import User Templates
|
|
50
|
+
</button>
|
|
51
|
+
<input type="file" id="importTemplatesFile" accept=".json" style="display: none;" onchange="importCustomTemplates(event)">
|
|
52
|
+
</div>
|
|
53
|
+
</div>
|
|
54
|
+
<div class="all-template-buttons">
|
|
55
|
+
<!-- Example Templates -->
|
|
56
|
+
<div id="exampleTemplateButtons">
|
|
57
|
+
<button class="btn btn-template btn-template-example" data-template-type="example" onclick="loadTemplateExample(2)">Vector Data Processing</button>
|
|
58
|
+
<button class="btn btn-template btn-template-example" data-template-type="example" onclick="loadTemplateExample(1)">Nested Feature Digger</button>
|
|
59
|
+
<button class="btn btn-template btn-template-example" data-template-type="example" onclick="loadTemplateExample(3)">Double Neutralization</button>
|
|
60
|
+
<button class="btn btn-template btn-template-example" data-template-type="example" onclick="loadTemplateExample(4)">Group Mean Residual_Matrix Data</button>
|
|
61
|
+
<button class="btn btn-template btn-template-example" data-template-type="example" onclick="loadTemplateExample(5)">Group Mean Residual_Vector Data</button>
|
|
62
|
+
<button class="btn btn-template btn-template-example" data-template-type="example" onclick="loadTemplateExample(6)">TVR Delta Limit</button>
|
|
63
|
+
<button class="btn btn-template btn-template-example" data-template-type="example" onclick="loadTemplateExample(7)">TVR Hump</button>
|
|
64
|
+
</div>
|
|
65
|
+
|
|
66
|
+
<!-- Custom Templates will be loaded here -->
|
|
67
|
+
<div id="customTemplateButtons">
|
|
68
|
+
<!-- Custom templates will be dynamically inserted here -->
|
|
69
|
+
</div>
|
|
70
|
+
</div>
|
|
71
|
+
<div class="custom-template-info" id="noCustomTemplates" style="display: none;">
|
|
72
|
+
<p style="margin-top: 10px; color: #6c757d; font-style: italic;">No custom templates saved yet. Create your expression and click "Save Current" to save it as a template.</p>
|
|
73
|
+
</div>
|
|
74
|
+
</div>
|
|
75
|
+
|
|
76
|
+
<!-- Navigation Tabs -->
|
|
77
|
+
<nav class="page-navigation">
|
|
78
|
+
<button class="nav-tab active" data-page="editor">
|
|
79
|
+
<span class="nav-icon">✏️</span>
|
|
80
|
+
<span class="nav-text">Expression Editor</span>
|
|
81
|
+
</button>
|
|
82
|
+
<button class="nav-tab" data-page="decode">
|
|
83
|
+
<span class="nav-icon">🔄</span>
|
|
84
|
+
<span class="nav-text">Decode Templates</span>
|
|
85
|
+
</button>
|
|
86
|
+
<button class="nav-tab" data-page="results" id="resultsTab" style="display: none;">
|
|
87
|
+
<span class="nav-icon">📊</span>
|
|
88
|
+
<span class="nav-text">Results</span>
|
|
89
|
+
<span class="nav-badge" id="resultsBadge">0</span>
|
|
90
|
+
</button>
|
|
91
|
+
</nav>
|
|
92
|
+
|
|
93
|
+
<!-- Page Content Container -->
|
|
94
|
+
<div class="page-container">
|
|
95
|
+
<!-- Editor Page -->
|
|
96
|
+
<div class="page-content active" id="editorPage">
|
|
97
|
+
<div class="main-content">
|
|
98
|
+
<div class="editor-section">
|
|
99
|
+
<div class="editor-header">
|
|
100
|
+
<h2>Expression Editor</h2>
|
|
101
|
+
<div class="editor-actions">
|
|
102
|
+
<button id="clearEditor" class="btn btn-outline">Clear</button>
|
|
103
|
+
<button class="btn btn-secondary" onclick="saveCurrentTemplate()">
|
|
104
|
+
<span style="margin-right: 5px;">💾</span>Save Current Template
|
|
105
|
+
</button>
|
|
106
|
+
<button class="btn btn-outline" onclick="overwriteExistingTemplate()">
|
|
107
|
+
<span style="margin-right: 5px;">🔄</span>Overwrite Existing
|
|
108
|
+
</button>
|
|
109
|
+
</div>
|
|
110
|
+
</div>
|
|
111
|
+
|
|
112
|
+
<div class="editor-wrapper">
|
|
113
|
+
<div class="line-numbers" id="lineNumbers"></div>
|
|
114
|
+
<div class="editor-container">
|
|
115
|
+
<div id="highlightedText" class="highlighted-text"></div>
|
|
116
|
+
<textarea id="expressionEditor" class="expression-editor" placeholder="Enter your expression here...">
|
|
117
|
+
<time_series_operator/>(sentiment_difference, <days/>)</textarea>
|
|
118
|
+
</div>
|
|
119
|
+
</div>
|
|
120
|
+
|
|
121
|
+
<div id="grammarErrors" class="grammar-errors"></div>
|
|
122
|
+
</div>
|
|
123
|
+
|
|
124
|
+
<div class="info-panel">
|
|
125
|
+
<h3>Detected Templates</h3>
|
|
126
|
+
<div id="templateList" class="template-list"></div>
|
|
127
|
+
|
|
128
|
+
<h3>Grammar Rules</h3>
|
|
129
|
+
<ul class="grammar-rules">
|
|
130
|
+
<li><code>/* */</code> - Block comments for multiple lines</li>
|
|
131
|
+
<li><code>;</code> - Statement separator (not needed for last line)</li>
|
|
132
|
+
<li>Last statement is the Alpha expression for BRAIN simulator</li>
|
|
133
|
+
<li>Alpha expression cannot be assigned to a variable</li>
|
|
134
|
+
<li>No classes, objects, pointers, or functions allowed</li>
|
|
135
|
+
</ul>
|
|
136
|
+
|
|
137
|
+
<div class="next-step-hint">
|
|
138
|
+
<button class="btn btn-primary" onclick="navigateToPage('decode')">
|
|
139
|
+
Next: Decode Templates →
|
|
140
|
+
</button>
|
|
141
|
+
</div>
|
|
142
|
+
</div>
|
|
143
|
+
</div>
|
|
144
|
+
</div>
|
|
145
|
+
|
|
146
|
+
<!-- Decode Page -->
|
|
147
|
+
<div class="page-content" id="decodePage">
|
|
148
|
+
<div class="decode-content">
|
|
149
|
+
<h2>Template Decoding Options</h2>
|
|
150
|
+
<div class="template-status" id="templateStatus">
|
|
151
|
+
<!-- Template configuration status will be shown here -->
|
|
152
|
+
</div>
|
|
153
|
+
|
|
154
|
+
<div class="decode-buttons">
|
|
155
|
+
<button id="decodeTemplates" class="btn btn-primary btn-large">full_iteration</button>
|
|
156
|
+
<div class="random-iteration-container">
|
|
157
|
+
<button id="randomIterationBtn" class="btn btn-primary btn-large">random_iteration</button>
|
|
158
|
+
<input type="number" id="randomCount" class="random-count-input" placeholder="Count" min="1" value="10" title="Number of random expressions to generate">
|
|
159
|
+
</div>
|
|
160
|
+
</div>
|
|
161
|
+
|
|
162
|
+
<div class="decode-info">
|
|
163
|
+
<p><strong>full_iteration:</strong> Generate all possible combinations of configured templates</p>
|
|
164
|
+
<p><strong>random_iteration:</strong> Generate random samples from the possible combinations</p>
|
|
165
|
+
</div>
|
|
166
|
+
|
|
167
|
+
<div class="navigation-buttons">
|
|
168
|
+
<button class="btn btn-outline" onclick="navigateToPage('editor')">
|
|
169
|
+
← Back to Editor
|
|
170
|
+
</button>
|
|
171
|
+
</div>
|
|
172
|
+
</div>
|
|
173
|
+
</div>
|
|
174
|
+
|
|
175
|
+
<!-- Results Page -->
|
|
176
|
+
<div class="page-content" id="resultsPage">
|
|
177
|
+
<div class="results-content">
|
|
178
|
+
<h2>Decoded Expressions</h2>
|
|
179
|
+
<div id="resultsList" class="results-list"></div>
|
|
180
|
+
<div class="results-actions">
|
|
181
|
+
<button id="nextMoveBtn" class="btn btn-secondary btn-small">Append Expression with Settings</button>
|
|
182
|
+
<button id="downloadResults" class="btn btn-primary btn-small" title="Download all generated expressions">Download All Expression in txt</button>
|
|
183
|
+
</div>
|
|
184
|
+
|
|
185
|
+
<div class="navigation-buttons">
|
|
186
|
+
<button class="btn btn-outline" onclick="navigateToPage('decode')">
|
|
187
|
+
← Back to Decode
|
|
188
|
+
</button>
|
|
189
|
+
<button class="btn btn-outline" onclick="navigateToPage('editor')">
|
|
190
|
+
← Back to Editor
|
|
191
|
+
</button>
|
|
192
|
+
</div>
|
|
193
|
+
</div>
|
|
194
|
+
</div>
|
|
195
|
+
</div>
|
|
196
|
+
</div>
|
|
197
|
+
|
|
198
|
+
<!-- Template Variable Input Modal -->
|
|
199
|
+
<div id="templateModal" class="modal">
|
|
200
|
+
<div class="modal-content">
|
|
201
|
+
<div class="modal-header">
|
|
202
|
+
<h3 id="modalTitle">Enter Variables</h3>
|
|
203
|
+
<span class="close" onclick="closeModal()">×</span>
|
|
204
|
+
</div>
|
|
205
|
+
<div class="modal-body">
|
|
206
|
+
<p id="modalDescription">Enter a comma-separated list of variables:</p>
|
|
207
|
+
<textarea id="variableInput" class="variable-input" placeholder="variable1, variable2, variable3"></textarea>
|
|
208
|
+
<div id="brainChooseSection" class="brain-choose-section" style="display: none;">
|
|
209
|
+
<button id="chooseBrainBtn" class="btn btn-secondary btn-small">Choose from BRAIN</button>
|
|
210
|
+
</div>
|
|
211
|
+
</div>
|
|
212
|
+
<div class="modal-footer">
|
|
213
|
+
<button onclick="closeModal()" class="btn btn-outline">Cancel</button>
|
|
214
|
+
<button onclick="applyTemplate()" class="btn btn-primary">Apply</button>
|
|
215
|
+
</div>
|
|
216
|
+
</div>
|
|
217
|
+
</div>
|
|
218
|
+
|
|
219
|
+
<!-- Template Configuration Info Modal -->
|
|
220
|
+
<div id="configInfoModal" class="modal">
|
|
221
|
+
<div class="modal-content">
|
|
222
|
+
<div class="modal-header">
|
|
223
|
+
<h3 id="configInfoTitle">Template Configuration</h3>
|
|
224
|
+
<span class="close" onclick="closeConfigInfoModal()">×</span>
|
|
225
|
+
</div>
|
|
226
|
+
<div class="modal-body">
|
|
227
|
+
<div id="configInfoContent" class="config-info-content">
|
|
228
|
+
<!-- Configuration details will be inserted here -->
|
|
229
|
+
</div>
|
|
230
|
+
</div>
|
|
231
|
+
<div class="modal-footer">
|
|
232
|
+
<button onclick="closeConfigInfoModal()" class="btn btn-primary">Close</button>
|
|
233
|
+
</div>
|
|
234
|
+
</div>
|
|
235
|
+
</div>
|
|
236
|
+
|
|
237
|
+
<!-- BRAIN Login Modal -->
|
|
238
|
+
<div id="brainLoginModal" class="modal">
|
|
239
|
+
<div class="modal-content">
|
|
240
|
+
<div class="modal-header">
|
|
241
|
+
<h3>Connect to WorldQuant BRAIN</h3>
|
|
242
|
+
<span class="close" onclick="closeBrainLoginModal()">×</span>
|
|
243
|
+
</div>
|
|
244
|
+
<div class="modal-body">
|
|
245
|
+
<form id="brainLoginForm" onsubmit="event.preventDefault(); authenticateBrain();">
|
|
246
|
+
<div class="form-group">
|
|
247
|
+
<label for="brainUsername">Username:</label>
|
|
248
|
+
<input type="email" id="brainUsername" class="form-input" placeholder="your.email@domain.com" required>
|
|
249
|
+
</div>
|
|
250
|
+
<div class="form-group">
|
|
251
|
+
<label for="brainPassword">Password:</label>
|
|
252
|
+
<input type="password" id="brainPassword" class="form-input" placeholder="Your password" required>
|
|
253
|
+
</div>
|
|
254
|
+
<div id="brainLoginStatus" class="login-status"></div>
|
|
255
|
+
<div id="loginSpinner" class="login-spinner" style="display: none;">
|
|
256
|
+
<div class="spinner"></div>
|
|
257
|
+
</div>
|
|
258
|
+
</form>
|
|
259
|
+
</div>
|
|
260
|
+
<div class="modal-footer">
|
|
261
|
+
<button onclick="closeBrainLoginModal()" class="btn btn-outline" id="cancelBtn">Cancel</button>
|
|
262
|
+
<button onclick="authenticateBrain()" class="btn btn-primary" id="loginBtn">Connect</button>
|
|
263
|
+
</div>
|
|
264
|
+
</div>
|
|
265
|
+
</div>
|
|
266
|
+
|
|
267
|
+
<!-- BRAIN Operators Selection Modal -->
|
|
268
|
+
<div id="brainOperatorsModal" class="modal">
|
|
269
|
+
<div class="modal-content">
|
|
270
|
+
<div class="modal-header">
|
|
271
|
+
<h3>Choose Operators from BRAIN</h3>
|
|
272
|
+
<span class="close" onclick="closeBrainOperatorsModal()">×</span>
|
|
273
|
+
</div>
|
|
274
|
+
<div class="modal-body">
|
|
275
|
+
<div class="search-section">
|
|
276
|
+
<input type="text" id="operatorSearch" class="form-input" placeholder="Search operators...">
|
|
277
|
+
</div>
|
|
278
|
+
<div class="category-filter">
|
|
279
|
+
<label>Filter by category:</label>
|
|
280
|
+
<select id="categoryFilter" class="form-input">
|
|
281
|
+
<option value="">All Categories</option>
|
|
282
|
+
</select>
|
|
283
|
+
</div>
|
|
284
|
+
<div class="operator-actions">
|
|
285
|
+
<button id="selectAllFilteredOperators" class="btn btn-small btn-secondary">Select All Filtered</button>
|
|
286
|
+
<button id="clearAllOperators" class="btn btn-small btn-outline">Clear All</button>
|
|
287
|
+
</div>
|
|
288
|
+
<div id="operatorsList" class="operators-list">
|
|
289
|
+
<!-- Operators will be populated here -->
|
|
290
|
+
</div>
|
|
291
|
+
<div class="selected-operators">
|
|
292
|
+
<strong>Selected operators:</strong>
|
|
293
|
+
<div id="selectedOperators" class="selected-items"></div>
|
|
294
|
+
</div>
|
|
295
|
+
</div>
|
|
296
|
+
<div class="modal-footer">
|
|
297
|
+
<button onclick="closeBrainOperatorsModal()" class="btn btn-outline">Cancel</button>
|
|
298
|
+
<button onclick="applySelectedOperators()" class="btn btn-primary">Apply Selected</button>
|
|
299
|
+
</div>
|
|
300
|
+
</div>
|
|
301
|
+
</div>
|
|
302
|
+
|
|
303
|
+
<!-- BRAIN Data Fields Selection Modal -->
|
|
304
|
+
<div id="brainDataFieldsModal" class="modal">
|
|
305
|
+
<div class="modal-content">
|
|
306
|
+
<div class="modal-header">
|
|
307
|
+
<h3>Get Data Fields via BRAINAPI</h3>
|
|
308
|
+
<span class="close" onclick="closeBrainDataFieldsModal()">×</span>
|
|
309
|
+
</div>
|
|
310
|
+
<div class="modal-body">
|
|
311
|
+
<div class="data-fields-params">
|
|
312
|
+
<div class="params-row">
|
|
313
|
+
<div class="param-group">
|
|
314
|
+
<label for="regionInput">Region:</label>
|
|
315
|
+
<input type="text" id="regionInput" class="form-input" placeholder="e.g., USA" value="USA">
|
|
316
|
+
</div>
|
|
317
|
+
<div class="param-group">
|
|
318
|
+
<label for="delayInput">Delay:</label>
|
|
319
|
+
<input type="text" id="delayInput" class="form-input" placeholder="e.g., 1" value="1">
|
|
320
|
+
</div>
|
|
321
|
+
<div class="param-group">
|
|
322
|
+
<label for="universeInput">Universe:</label>
|
|
323
|
+
<input type="text" id="universeInput" class="form-input" placeholder="e.g., TOP3000" value="TOP3000">
|
|
324
|
+
</div>
|
|
325
|
+
<div class="param-group">
|
|
326
|
+
<label for="datasetInput">Dataset ID:</label>
|
|
327
|
+
<input type="text" id="datasetInput" class="form-input" placeholder="e.g., fundamental6" value="fundamental6">
|
|
328
|
+
</div>
|
|
329
|
+
<div class="param-group">
|
|
330
|
+
<button id="loadDataFieldsBtn" class="btn btn-secondary">Load Data Fields</button>
|
|
331
|
+
</div>
|
|
332
|
+
</div>
|
|
333
|
+
</div>
|
|
334
|
+
<div id="dataFieldsLoading" class="loading-message" style="display: none;">
|
|
335
|
+
Loading data fields...
|
|
336
|
+
</div>
|
|
337
|
+
<div id="dataFieldsContent" class="data-fields-content" style="display: none;">
|
|
338
|
+
<div class="data-fields-controls">
|
|
339
|
+
<div class="filter-label">
|
|
340
|
+
<span>Sample filtering👉</span>
|
|
341
|
+
</div>
|
|
342
|
+
<div class="filter-options">
|
|
343
|
+
<label>
|
|
344
|
+
<input type="checkbox" id="filterHighCoverage"> High Coverage (>90%)
|
|
345
|
+
</label>
|
|
346
|
+
<label>
|
|
347
|
+
<input type="checkbox" id="filterPopular"> Popular (>1000 users)
|
|
348
|
+
</label>
|
|
349
|
+
<label>
|
|
350
|
+
<input type="checkbox" id="filterMatrixOnly"> Matrix Type Only
|
|
351
|
+
</label>
|
|
352
|
+
</div>
|
|
353
|
+
<div class="filter-actions">
|
|
354
|
+
<button id="selectAllFiltered" class="btn btn-small btn-secondary">Select All Filtered</button>
|
|
355
|
+
<button id="clearAllSelected" class="btn btn-small btn-outline">Clear All</button>
|
|
356
|
+
</div>
|
|
357
|
+
</div>
|
|
358
|
+
<div class="data-fields-stats">
|
|
359
|
+
<span id="dataFieldsCount">0 fields loaded</span> |
|
|
360
|
+
<span id="filteredCount">0 filtered</span> |
|
|
361
|
+
<span id="selectedCount">0 selected</span>
|
|
362
|
+
</div>
|
|
363
|
+
<div class="data-fields-table-container">
|
|
364
|
+
<table class="data-fields-table">
|
|
365
|
+
<thead>
|
|
366
|
+
<tr class="header-row">
|
|
367
|
+
<th style="width: 40px;">
|
|
368
|
+
<input type="checkbox" id="selectAllCheckbox" title="Select/Deselect All">
|
|
369
|
+
</th>
|
|
370
|
+
<th style="width: 200px; min-width: 150px;">
|
|
371
|
+
Field ID
|
|
372
|
+
<button class="sort-btn" data-column="id" data-order="asc">↕</button>
|
|
373
|
+
</th>
|
|
374
|
+
<th style="min-width: 300px;">
|
|
375
|
+
Description
|
|
376
|
+
<button class="sort-btn" data-column="description" data-order="asc">↕</button>
|
|
377
|
+
</th>
|
|
378
|
+
<th style="width: 100px;">
|
|
379
|
+
Type
|
|
380
|
+
<button class="sort-btn" data-column="type" data-order="asc">↕</button>
|
|
381
|
+
</th>
|
|
382
|
+
<th style="width: 150px;">
|
|
383
|
+
Coverage
|
|
384
|
+
<button class="sort-btn" data-column="coverage" data-order="asc">↕</button>
|
|
385
|
+
</th>
|
|
386
|
+
<th style="width: 100px;">
|
|
387
|
+
Users
|
|
388
|
+
<button class="sort-btn" data-column="userCount" data-order="asc">↕</button>
|
|
389
|
+
</th>
|
|
390
|
+
<th style="width: 100px;">
|
|
391
|
+
Alphas
|
|
392
|
+
<button class="sort-btn" data-column="alphaCount" data-order="asc">↕</button>
|
|
393
|
+
</th>
|
|
394
|
+
</tr>
|
|
395
|
+
<tr class="filter-row">
|
|
396
|
+
<th></th>
|
|
397
|
+
<th>
|
|
398
|
+
<input type="text" class="column-filter" data-column="id" placeholder="Filter ID...">
|
|
399
|
+
</th>
|
|
400
|
+
<th>
|
|
401
|
+
<input type="text" class="column-filter" data-column="description" placeholder="Filter description...">
|
|
402
|
+
</th>
|
|
403
|
+
<th>
|
|
404
|
+
<select class="column-filter" data-column="type" id="typeFilter">
|
|
405
|
+
<option value="">All Types</option>
|
|
406
|
+
</select>
|
|
407
|
+
</th>
|
|
408
|
+
<th>
|
|
409
|
+
<div class="range-filter">
|
|
410
|
+
<input type="number" class="column-filter-min" data-column="coverage" placeholder="Min %" min="0" max="100" step="0.1">
|
|
411
|
+
<span>-</span>
|
|
412
|
+
<input type="number" class="column-filter-max" data-column="coverage" placeholder="Max %" min="0" max="100" step="0.1">
|
|
413
|
+
</div>
|
|
414
|
+
</th>
|
|
415
|
+
<th>
|
|
416
|
+
<input type="number" class="column-filter" data-column="userCount" placeholder="Min users" min="0">
|
|
417
|
+
</th>
|
|
418
|
+
<th>
|
|
419
|
+
<input type="number" class="column-filter" data-column="alphaCount" placeholder="Min alphas" min="0">
|
|
420
|
+
</th>
|
|
421
|
+
</tr>
|
|
422
|
+
</thead>
|
|
423
|
+
<tbody id="dataFieldsTableBody">
|
|
424
|
+
<!-- Data fields will be populated here -->
|
|
425
|
+
</tbody>
|
|
426
|
+
</table>
|
|
427
|
+
</div>
|
|
428
|
+
<div class="selected-data-fields">
|
|
429
|
+
<strong>Selected data fields:</strong>
|
|
430
|
+
<div id="selectedDataFields" class="selected-items"></div>
|
|
431
|
+
</div>
|
|
432
|
+
</div>
|
|
433
|
+
</div>
|
|
434
|
+
<div class="modal-footer">
|
|
435
|
+
<button onclick="closeBrainDataFieldsModal()" class="btn btn-outline">Cancel</button>
|
|
436
|
+
<button onclick="applySelectedDataFields()" class="btn btn-primary">Apply Selected</button>
|
|
437
|
+
</div>
|
|
438
|
+
</div>
|
|
439
|
+
</div>
|
|
440
|
+
|
|
441
|
+
<!-- Settings Modal for Next Move -->
|
|
442
|
+
<div id="settingsModal" class="modal settings-modal">
|
|
443
|
+
<div class="modal-content settings-modal-content">
|
|
444
|
+
<div class="modal-header">
|
|
445
|
+
<h3>Expression Settings Configuration</h3>
|
|
446
|
+
<span class="close" onclick="closeSettingsModal()">×</span>
|
|
447
|
+
</div>
|
|
448
|
+
<div class="modal-body settings-modal-body">
|
|
449
|
+
<div class="settings-info">
|
|
450
|
+
<p><strong>Configure settings to append to your decoded expressions</strong></p>
|
|
451
|
+
<p class="settings-note">You can enter multiple comma-separated values for any setting to create iterations</p>
|
|
452
|
+
</div>
|
|
453
|
+
|
|
454
|
+
<div class="settings-container">
|
|
455
|
+
<table class="settings-table">
|
|
456
|
+
<thead>
|
|
457
|
+
<tr>
|
|
458
|
+
<th width="20%">Setting Name</th>
|
|
459
|
+
<th width="50%">Value(s)</th>
|
|
460
|
+
<th width="15%">Type</th>
|
|
461
|
+
<th width="15%">Action</th>
|
|
462
|
+
</tr>
|
|
463
|
+
</thead>
|
|
464
|
+
<tbody id="settingsTableBody">
|
|
465
|
+
<tr>
|
|
466
|
+
<td>instrumentType</td>
|
|
467
|
+
<td><input type="text" class="setting-value-input" data-setting="instrumentType" placeholder="EQUITY" readonly></td>
|
|
468
|
+
<td><select class="setting-type-select" data-setting="instrumentType" disabled><option>string</option></select></td>
|
|
469
|
+
<td></td>
|
|
470
|
+
</tr>
|
|
471
|
+
<tr>
|
|
472
|
+
<td>region</td>
|
|
473
|
+
<td><input type="text" class="setting-value-input" data-setting="region" placeholder="sample: USA (e.g., USA, EUR, ASI)"></td>
|
|
474
|
+
<td><select class="setting-type-select" data-setting="region"><option>string</option><option>number</option></select></td>
|
|
475
|
+
<td></td>
|
|
476
|
+
</tr>
|
|
477
|
+
<tr>
|
|
478
|
+
<td>universe</td>
|
|
479
|
+
<td><input type="text" class="setting-value-input" data-setting="universe" placeholder="sample: TOP3000 (e.g., TOP3000, TOP1000, TOP500)"></td>
|
|
480
|
+
<td><select class="setting-type-select" data-setting="universe"><option>string</option><option>number</option></select></td>
|
|
481
|
+
<td></td>
|
|
482
|
+
</tr>
|
|
483
|
+
<tr>
|
|
484
|
+
<td>delay</td>
|
|
485
|
+
<td>
|
|
486
|
+
<select class="setting-value-input" data-setting="delay">
|
|
487
|
+
<option value="1" selected>1</option>
|
|
488
|
+
<option value="0">0</option>
|
|
489
|
+
</select>
|
|
490
|
+
</td>
|
|
491
|
+
<td><select class="setting-type-select" data-setting="delay"><option>number</option><option>string</option></select></td>
|
|
492
|
+
<td></td>
|
|
493
|
+
</tr>
|
|
494
|
+
<tr>
|
|
495
|
+
<td>decay</td>
|
|
496
|
+
<td><input type="text" class="setting-value-input" data-setting="decay" placeholder="sample: 20 (e.g., 0, 5, 20, 60)"></td>
|
|
497
|
+
<td><select class="setting-type-select" data-setting="decay"><option>number</option><option>string</option></select></td>
|
|
498
|
+
<td></td>
|
|
499
|
+
</tr>
|
|
500
|
+
<tr>
|
|
501
|
+
<td>neutralization</td>
|
|
502
|
+
<td><input type="text" class="setting-value-input" data-setting="neutralization" placeholder="sample: SUBINDUSTRY (e.g., NONE, SECTOR, INDUSTRY, SUBINDUSTRY)"></td>
|
|
503
|
+
<td><select class="setting-type-select" data-setting="neutralization"><option>string</option><option>number</option></select></td>
|
|
504
|
+
<td></td>
|
|
505
|
+
</tr>
|
|
506
|
+
<tr>
|
|
507
|
+
<td>truncation</td>
|
|
508
|
+
<td><input type="text" class="setting-value-input" data-setting="truncation" placeholder="sample: 0.08 (e.g., 0.01, 0.05, 0.08, 0.1)"></td>
|
|
509
|
+
<td><select class="setting-type-select" data-setting="truncation"><option>number</option><option>string</option></select></td>
|
|
510
|
+
<td></td>
|
|
511
|
+
</tr>
|
|
512
|
+
<tr>
|
|
513
|
+
<td>pasteurization</td>
|
|
514
|
+
<td>
|
|
515
|
+
<select class="setting-value-input" data-setting="pasteurization">
|
|
516
|
+
<option value="ON" selected>ON</option>
|
|
517
|
+
<option value="OFF">OFF</option>
|
|
518
|
+
</select>
|
|
519
|
+
</td>
|
|
520
|
+
<td><select class="setting-type-select" data-setting="pasteurization"><option>string</option><option>number</option></select></td>
|
|
521
|
+
<td></td>
|
|
522
|
+
</tr>
|
|
523
|
+
<tr>
|
|
524
|
+
<td>testPeriod</td>
|
|
525
|
+
<td>
|
|
526
|
+
<div style="display: flex; align-items: center; gap: 10px;">
|
|
527
|
+
<input type="range" class="setting-value-input test-period-slider" data-setting="testPeriod"
|
|
528
|
+
min="0" max="60" value="0" step="1"
|
|
529
|
+
style="flex: 1; min-width: 200px; margin: 0; padding: 0;
|
|
530
|
+
-webkit-appearance: none; appearance: none;
|
|
531
|
+
background: #ddd; height: 6px; border-radius: 3px; outline: none;">
|
|
532
|
+
<style>
|
|
533
|
+
.test-period-slider::-webkit-slider-thumb {
|
|
534
|
+
-webkit-appearance: none;
|
|
535
|
+
appearance: none;
|
|
536
|
+
width: 18px;
|
|
537
|
+
height: 18px;
|
|
538
|
+
border-radius: 50%;
|
|
539
|
+
background: #2196F3;
|
|
540
|
+
cursor: pointer;
|
|
541
|
+
border: none;
|
|
542
|
+
}
|
|
543
|
+
.test-period-slider::-moz-range-thumb {
|
|
544
|
+
width: 18px;
|
|
545
|
+
height: 18px;
|
|
546
|
+
border-radius: 50%;
|
|
547
|
+
background: #2196F3;
|
|
548
|
+
cursor: pointer;
|
|
549
|
+
border: none;
|
|
550
|
+
}
|
|
551
|
+
.test-period-slider::-webkit-slider-track {
|
|
552
|
+
background: #ddd;
|
|
553
|
+
height: 6px;
|
|
554
|
+
border-radius: 3px;
|
|
555
|
+
}
|
|
556
|
+
.test-period-slider::-moz-range-track {
|
|
557
|
+
background: #ddd;
|
|
558
|
+
height: 6px;
|
|
559
|
+
border-radius: 3px;
|
|
560
|
+
border: none;
|
|
561
|
+
}
|
|
562
|
+
</style>
|
|
563
|
+
<span id="testPeriodValue" style="min-width: 70px; font-family: monospace; font-size: 12px;">P0Y0M</span>
|
|
564
|
+
</div>
|
|
565
|
+
</td>
|
|
566
|
+
<td><select class="setting-type-select" data-setting="testPeriod"><option>string</option><option>number</option></select></td>
|
|
567
|
+
<td></td>
|
|
568
|
+
</tr>
|
|
569
|
+
<tr>
|
|
570
|
+
<td>unitHandling</td>
|
|
571
|
+
<td><input type="text" class="setting-value-input" data-setting="unitHandling" placeholder="VERIFY" value="VERIFY" readonly></td>
|
|
572
|
+
<td><select class="setting-type-select" data-setting="unitHandling" disabled><option>string</option></select></td>
|
|
573
|
+
<td></td>
|
|
574
|
+
</tr>
|
|
575
|
+
<tr>
|
|
576
|
+
<td>nanHandling</td>
|
|
577
|
+
<td>
|
|
578
|
+
<select class="setting-value-input" data-setting="nanHandling">
|
|
579
|
+
<option value="OFF" selected>OFF</option>
|
|
580
|
+
<option value="ON">ON</option>
|
|
581
|
+
</select>
|
|
582
|
+
</td>
|
|
583
|
+
<td><select class="setting-type-select" data-setting="nanHandling"><option>string</option><option>number</option></select></td>
|
|
584
|
+
<td></td>
|
|
585
|
+
</tr>
|
|
586
|
+
<tr>
|
|
587
|
+
<td>maxTrade</td>
|
|
588
|
+
<td>
|
|
589
|
+
<select class="setting-value-input" data-setting="maxTrade">
|
|
590
|
+
<option value="ON" selected>ON</option>
|
|
591
|
+
<option value="OFF">OFF</option>
|
|
592
|
+
</select>
|
|
593
|
+
</td>
|
|
594
|
+
<td><select class="setting-type-select" data-setting="maxTrade"><option>string</option><option>number</option></select></td>
|
|
595
|
+
<td></td>
|
|
596
|
+
</tr>
|
|
597
|
+
<tr>
|
|
598
|
+
<td>language</td>
|
|
599
|
+
<td><input type="text" class="setting-value-input" data-setting="language" placeholder="FASTEXPR" readonly></td>
|
|
600
|
+
<td><select class="setting-type-select" data-setting="language" disabled><option>string</option></select></td>
|
|
601
|
+
<td></td>
|
|
602
|
+
</tr>
|
|
603
|
+
<tr>
|
|
604
|
+
<td>visualization</td>
|
|
605
|
+
<td>
|
|
606
|
+
<select class="setting-value-input" data-setting="visualization">
|
|
607
|
+
<option value="false" selected>False</option>
|
|
608
|
+
<option value="true">True</option>
|
|
609
|
+
</select>
|
|
610
|
+
</td>
|
|
611
|
+
<td><select class="setting-type-select" data-setting="visualization"><option>boolean</option><option>string</option><option>number</option></select></td>
|
|
612
|
+
<td></td>
|
|
613
|
+
</tr>
|
|
614
|
+
</tbody>
|
|
615
|
+
</table>
|
|
616
|
+
|
|
617
|
+
<div class="add-setting-container">
|
|
618
|
+
<button id="addSettingBtn" class="btn btn-secondary btn-small">+ Add Custom Setting</button>
|
|
619
|
+
</div>
|
|
620
|
+
</div>
|
|
621
|
+
|
|
622
|
+
<div class="settings-preview">
|
|
623
|
+
<div class="preview-header">
|
|
624
|
+
<strong>Preview:</strong>
|
|
625
|
+
<span id="totalCombinations">0</span> total combinations will be generated
|
|
626
|
+
</div>
|
|
627
|
+
</div>
|
|
628
|
+
</div>
|
|
629
|
+
<div class="modal-footer">
|
|
630
|
+
<button onclick="closeSettingsModal()" class="btn btn-outline">Cancel</button>
|
|
631
|
+
<button onclick="confirmAndApplySettings()" class="btn btn-primary" id="generateDownloadBtn">
|
|
632
|
+
<span class="btn-text">Generate & Download</span>
|
|
633
|
+
<div class="btn-progress" style="display: none;">
|
|
634
|
+
<div class="progress-bar">
|
|
635
|
+
<div class="progress-bar-fill" style="width: 0%;"></div>
|
|
636
|
+
</div>
|
|
637
|
+
<span class="progress-text">Generating...</span>
|
|
638
|
+
</div>
|
|
639
|
+
</button>
|
|
640
|
+
<button onclick="generateAndTest()" class="btn btn-primary" style="background-color: #28a745;">Generate & Test</button>
|
|
641
|
+
</div>
|
|
642
|
+
</div>
|
|
643
|
+
</div>
|
|
644
|
+
|
|
645
|
+
<!-- BRAIN Test Results Modal -->
|
|
646
|
+
<div id="brainTestResultsModal" class="modal">
|
|
647
|
+
<div class="modal-content" style="max-width: 800px;">
|
|
648
|
+
<div class="modal-header">
|
|
649
|
+
<h3>BRAIN API Test Results</h3>
|
|
650
|
+
<span class="close" onclick="closeBrainTestResultsModal()">×</span>
|
|
651
|
+
</div>
|
|
652
|
+
<div class="modal-body" style="max-height: 600px; overflow-y: auto;">
|
|
653
|
+
<div id="brainTestProgress" class="test-progress" style="display: none;">
|
|
654
|
+
<div class="progress-bar">
|
|
655
|
+
<div id="progressBarFill" class="progress-bar-fill" style="width: 0%;"></div>
|
|
656
|
+
</div>
|
|
657
|
+
<p id="progressText">Testing expressions...</p>
|
|
658
|
+
</div>
|
|
659
|
+
<div id="brainTestResults" class="test-results">
|
|
660
|
+
<!-- Test results will be displayed here -->
|
|
661
|
+
</div>
|
|
662
|
+
</div>
|
|
663
|
+
<div class="modal-footer">
|
|
664
|
+
<button onclick="closeBrainTestResultsModal()" class="btn btn-primary">Close</button>
|
|
665
|
+
<button onclick="goToSimulator()" class="btn btn-secondary" id="downloadTestResultsBtn" style="display: none;">🚀 Open Simulator_mainland</button>
|
|
666
|
+
<button onclick="confirmAndDownloadExpressionWithSettings()" class="btn btn-secondary" id="downloadExpressionWithSettingsBtn" style="display: none;">
|
|
667
|
+
<span class="btn-text">Download Expression with Settings</span>
|
|
668
|
+
<div class="btn-progress" style="display: none;">
|
|
669
|
+
<div class="progress-bar">
|
|
670
|
+
<div class="progress-bar-fill" style="width: 0%;"></div>
|
|
671
|
+
</div>
|
|
672
|
+
<span class="progress-text">Generating...</span>
|
|
673
|
+
</div>
|
|
674
|
+
</button>
|
|
675
|
+
</div>
|
|
676
|
+
</div>
|
|
677
|
+
</div>
|
|
678
|
+
|
|
679
|
+
<!-- Save Template Modal -->
|
|
680
|
+
<div id="saveTemplateModal" class="modal">
|
|
681
|
+
<div class="modal-content">
|
|
682
|
+
<div class="modal-header">
|
|
683
|
+
<h3>Save Custom Template</h3>
|
|
684
|
+
<span class="close" onclick="closeSaveTemplateModal()">×</span>
|
|
685
|
+
</div>
|
|
686
|
+
<div class="modal-body">
|
|
687
|
+
<div class="form-group">
|
|
688
|
+
<label for="templateName">Template Name:</label>
|
|
689
|
+
<input type="text" id="templateName" class="form-input" placeholder="Enter a name for your template" maxlength="50">
|
|
690
|
+
</div>
|
|
691
|
+
<div class="form-group">
|
|
692
|
+
<label for="templateDescription">Description (optional):</label>
|
|
693
|
+
<textarea id="templateDescription" class="form-input" placeholder="Describe what this template does" rows="3"></textarea>
|
|
694
|
+
</div>
|
|
695
|
+
<div class="template-configurations-info" id="templateConfigurationsInfo" style="display: none;">
|
|
696
|
+
<div style="background-color: #e8f4fd; border: 1px solid #bee5eb; border-radius: 5px; padding: 12px; margin: 10px 0; font-size: 13px;">
|
|
697
|
+
<div style="color: #0c5460; font-weight: 500; margin-bottom: 5px;">
|
|
698
|
+
📊 Template Configurations Detected
|
|
699
|
+
</div>
|
|
700
|
+
<div id="configurationsList" style="color: #0c5460;">
|
|
701
|
+
<!-- Template configurations will be listed here -->
|
|
702
|
+
</div>
|
|
703
|
+
<div style="color: #0c5460; font-size: 12px; margin-top: 5px; font-style: italic;">
|
|
704
|
+
✓ These configurations will be saved with your template
|
|
705
|
+
</div>
|
|
706
|
+
</div>
|
|
707
|
+
</div>
|
|
708
|
+
<div class="template-preview">
|
|
709
|
+
<div class="preview-label">Preview:</div>
|
|
710
|
+
<pre id="templatePreview" style="margin: 0; white-space: pre-wrap; word-wrap: break-word;"></pre>
|
|
711
|
+
</div>
|
|
712
|
+
</div>
|
|
713
|
+
<div class="modal-footer">
|
|
714
|
+
<button onclick="closeSaveTemplateModal()" class="btn btn-outline">Cancel</button>
|
|
715
|
+
<button onclick="confirmSaveTemplate()" class="btn btn-primary">Save Template</button>
|
|
716
|
+
</div>
|
|
717
|
+
</div>
|
|
718
|
+
</div>
|
|
719
|
+
|
|
720
|
+
<!-- Overwrite Template Modal -->
|
|
721
|
+
<div id="overwriteTemplateModal" class="modal">
|
|
722
|
+
<div class="modal-content">
|
|
723
|
+
<div class="modal-header">
|
|
724
|
+
<h3>Overwrite Existing Template</h3>
|
|
725
|
+
<span class="close" onclick="closeOverwriteTemplateModal()">×</span>
|
|
726
|
+
</div>
|
|
727
|
+
<div class="modal-body">
|
|
728
|
+
<div class="form-group">
|
|
729
|
+
<label for="existingTemplateSelect">Select Template to Overwrite:</label>
|
|
730
|
+
<select id="existingTemplateSelect" class="form-input">
|
|
731
|
+
<option value="">Select a template...</option>
|
|
732
|
+
</select>
|
|
733
|
+
</div>
|
|
734
|
+
<div id="selectedTemplateInfo" class="form-group" style="display: none;">
|
|
735
|
+
<label>Current Description:</label>
|
|
736
|
+
<div id="currentTemplateDescription" class="form-input" style="background: #f8f9fa; border: 1px solid #dee2e6; padding: 10px; min-height: 40px; color: #6c757d; font-style: italic;">
|
|
737
|
+
<!-- Current template description will be shown here -->
|
|
738
|
+
</div>
|
|
739
|
+
</div>
|
|
740
|
+
<div class="template-configurations-info" id="overwriteConfigurationsInfo" style="display: none;">
|
|
741
|
+
<div style="background-color: #e8f4fd; border: 1px solid #bee5eb; border-radius: 5px; padding: 12px; margin: 10px 0; font-size: 13px;">
|
|
742
|
+
<div style="color: #0c5460; font-weight: 500; margin-bottom: 5px;">
|
|
743
|
+
📊 Template Configurations Detected
|
|
744
|
+
</div>
|
|
745
|
+
<div id="overwriteConfigurationsList" style="color: #0c5460;">
|
|
746
|
+
<!-- Template configurations will be listed here -->
|
|
747
|
+
</div>
|
|
748
|
+
<div style="color: #0c5460; font-size: 12px; margin-top: 5px; font-style: italic;">
|
|
749
|
+
✓ These configurations will replace the existing template
|
|
750
|
+
</div>
|
|
751
|
+
</div>
|
|
752
|
+
</div>
|
|
753
|
+
<div class="template-preview">
|
|
754
|
+
<div class="preview-label">New Expression Preview:</div>
|
|
755
|
+
<pre id="overwriteTemplatePreview" style="margin: 0; white-space: pre-wrap; word-wrap: break-word;"></pre>
|
|
756
|
+
</div>
|
|
757
|
+
</div>
|
|
758
|
+
<div class="modal-footer">
|
|
759
|
+
<button onclick="closeOverwriteTemplateModal()" class="btn btn-outline">Cancel</button>
|
|
760
|
+
<button onclick="confirmOverwriteTemplate()" class="btn btn-primary" id="overwriteConfirmBtn" disabled>Overwrite Template</button>
|
|
761
|
+
</div>
|
|
762
|
+
</div>
|
|
763
|
+
</div>
|
|
764
|
+
|
|
765
|
+
<script src="{{ url_for('static', filename='brain.js') }}"></script>
|
|
766
|
+
<script src="{{ url_for('static', filename='script.js') }}"></script>
|
|
767
|
+
<script src="{{ url_for('static', filename='decoder.js') }}"></script>
|
|
768
|
+
</body>
|
|
769
|
+
</html>
|