linny-r 1.1.8 → 1.1.9
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.
- package/README.md +6 -2
- package/package.json +1 -1
- package/server.js +12 -5
- package/static/index.html +17 -4
- package/static/linny-r.css +8 -7
- package/static/scripts/linny-r-gui.js +1 -1
package/README.md
CHANGED
@@ -168,7 +168,7 @@ Open the Command Line Interface (CLI) of your computer, change to your `WORKING_
|
|
168
168
|
This response should be something similar to:
|
169
169
|
|
170
170
|
<pre>
|
171
|
-
Node.js server for Linny-R version 1.1.
|
171
|
+
Node.js server for Linny-R version 1.1.9
|
172
172
|
Node.js version: v18.10.0
|
173
173
|
... etc.
|
174
174
|
</pre>
|
@@ -212,6 +212,7 @@ Solve block 1 a
|
|
212
212
|
The user workspace is created when the server is run for the first time.
|
213
213
|
The sub-directories of this directory `user` are used by Linny-R to store files.
|
214
214
|
|
215
|
+
* `autosave` will contain models that have been _auto-saved_
|
215
216
|
* `channel` and `callback` will be used to interact with Linny-R via its _Receiver_
|
216
217
|
* `diagrams` will be used to render Scalable Vector Graphics (SVG) files as
|
217
218
|
Portable Network Graphics (PNG) using Inkscape (if installed)
|
@@ -219,7 +220,10 @@ The sub-directories of this directory `user` are used by Linny-R to store files.
|
|
219
220
|
* `solver` will contain the files that are exchanged with the Mixed Integer Linear Programming (MILP) solver
|
220
221
|
(the names of the files that will appear in this directory may vary, depending on the MILP-solver you use)
|
221
222
|
|
222
|
-
|
223
|
+
By default, the `user` directory is created in your `WORKING_DIRECTORY`.
|
224
|
+
You can overrule this by specifying the path to another directory when you start the server.
|
225
|
+
Note that doing this will create a new, empty workspace (the directories listed above)
|
226
|
+
in the specified path. It will **not** affect or duplicate information from existing workspaces.
|
223
227
|
|
224
228
|
#### Command line options
|
225
229
|
|
package/package.json
CHANGED
package/server.js
CHANGED
@@ -197,24 +197,30 @@ const SHUTDOWN_MESSAGE = `<!DOCTYPE html>
|
|
197
197
|
font-family: sans-serif;
|
198
198
|
font-size: 15px;
|
199
199
|
}
|
200
|
+
code {
|
201
|
+
background-color: black;
|
202
|
+
color: white;
|
203
|
+
padding: 2px;
|
204
|
+
border-radius: 5px;
|
205
|
+
}
|
200
206
|
</style>
|
201
207
|
</head>
|
202
208
|
<body>
|
203
209
|
<h3>Linny-R server (127.0.0.1) is shutting down</h3>
|
204
|
-
<p>To restart Linny-R, switch to your
|
210
|
+
<p>To restart Linny-R, switch to your <em>${SETTINGS.cli_name}</em> window
|
205
211
|
and there at the prompt` +
|
206
212
|
(VERSION_INFO.up_to_date ? '' : `
|
207
213
|
first type:</p>
|
208
|
-
<p
|
214
|
+
<p><code>npm update linny-r</code><p>
|
209
215
|
to upgrade to Linny-R version ${VERSION_INFO.latest}, and then`) +
|
210
216
|
` type:</p>
|
211
|
-
<p
|
217
|
+
<p><code>node node_modules\\linny-r\\server</code></p>
|
212
218
|
<p>
|
213
|
-
Then switch back to this window, and click
|
219
|
+
Then switch back to this window, and click this
|
214
220
|
<button type="button"
|
215
221
|
onclick="window.location.href = 'http://127.0.0.1:${SETTINGS.port}';">
|
216
222
|
Restart
|
217
|
-
</button>
|
223
|
+
</button> button.
|
218
224
|
</p>
|
219
225
|
</body>
|
220
226
|
</html>`;
|
@@ -1389,6 +1395,7 @@ function createWorkspace() {
|
|
1389
1395
|
}
|
1390
1396
|
// Define the sub-directory paths
|
1391
1397
|
const ws = {
|
1398
|
+
autosave: path.join(SETTINGS.user_dir, 'autosave'),
|
1392
1399
|
channel: path.join(SETTINGS.user_dir, 'channel'),
|
1393
1400
|
callback: path.join(SETTINGS.user_dir, 'callback'),
|
1394
1401
|
diagrams: path.join(SETTINGS.user_dir, 'diagrams'),
|
package/static/index.html
CHANGED
@@ -58,9 +58,10 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
58
58
|
var
|
59
59
|
// NODE = false indicates that modules need not export their properties
|
60
60
|
NODE = false,
|
61
|
-
// Version number
|
61
|
+
// Version number
|
62
62
|
LINNY_R_VERSION = '0',
|
63
|
-
|
63
|
+
// GitHub repository
|
64
|
+
GITHUB_REPOSITORY = 'https://github.com/pwgbots/linny-r',
|
64
65
|
// Linny-R server hosting public channels
|
65
66
|
PUBLIC_LINNY_R_URL = 'https://sysmod.tbm.tudelft.nl/linny-r',
|
66
67
|
// Create the XML parser
|
@@ -151,16 +152,28 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
151
152
|
const info = data.split('|');
|
152
153
|
if(info.length > 1) {
|
153
154
|
LINNY_R_VERSION = info[0];
|
155
|
+
const v = 'Version ' + LINNY_R_VERSION;
|
156
|
+
// Update the "home page" of the documentation manager
|
157
|
+
DOCUMENTATION_MANAGER.about_linny_r =
|
158
|
+
DOCUMENTATION_MANAGER.about_linny_r.replace(
|
159
|
+
'[LINNY_R_VERSION]', v);
|
160
|
+
// Update the version number in the browser's upper left corner
|
161
|
+
document.getElementById('linny-r-version-number').innerHTML = v;
|
154
162
|
if(info[1] !== 'up-to-date') {
|
163
|
+
// Inform user that newer version exists
|
155
164
|
UI.check_update_modal.element('msg').innerHTML = [
|
156
|
-
'<a href="
|
165
|
+
'<a href="', GITHUB_REPOSITORY,
|
166
|
+
'/wiki/Linny-R-version-history" ',
|
167
|
+
'title="Click to view version release notes" ',
|
157
168
|
'target="_blank">Version <strong>',
|
158
|
-
info[1], '</strong></a> released on ',
|
169
|
+
info[1], '</strong></a> released on ',
|
170
|
+
info[2].substring(0, 21),
|
159
171
|
' can be installed.'].join('');
|
160
172
|
UI.check_update_modal.show();
|
161
173
|
UI.check_update_modal.element('buttons').style.display = 'block';
|
162
174
|
}
|
163
175
|
} else {
|
176
|
+
// Invalid server response (should not occur, but just in case)
|
164
177
|
UI.warn('Version check failed: "' + data + '"');
|
165
178
|
}
|
166
179
|
})
|
package/static/linny-r.css
CHANGED
@@ -4319,8 +4319,8 @@ div.call-stack-expr {
|
|
4319
4319
|
|
4320
4320
|
/* the CHECK UPDATE modal asks for permission to update the software */
|
4321
4321
|
#check-update-dlg {
|
4322
|
-
width:
|
4323
|
-
height:
|
4322
|
+
width: 500px;
|
4323
|
+
height: min-content;
|
4324
4324
|
}
|
4325
4325
|
|
4326
4326
|
#confirm-delete-from-repo-msg,
|
@@ -4334,20 +4334,21 @@ div.call-stack-expr {
|
|
4334
4334
|
#confirm-move-buttons,
|
4335
4335
|
#confirm-delete-from-repo-buttons,
|
4336
4336
|
#check-update-buttons {
|
4337
|
-
width:
|
4337
|
+
width: 100%;
|
4338
4338
|
height: 23px;
|
4339
|
-
|
4339
|
+
padding-top: 3px;
|
4340
|
+
font-size: 14px;
|
4341
|
+
white-space: nowrap;
|
4340
4342
|
}
|
4341
4343
|
|
4342
4344
|
#confirm-move-buttons > img,
|
4343
4345
|
#confirm-delete-from-repo-buttons > img,
|
4344
|
-
#check-update-buttons > img
|
4345
|
-
#check-update-restart-btn > img,
|
4346
|
-
#check-update-reload-btn > img {
|
4346
|
+
#check-update-buttons > img {
|
4347
4347
|
float: none;
|
4348
4348
|
height: 23px;
|
4349
4349
|
width: 23px;
|
4350
4350
|
vertical-align: middle;
|
4351
|
+
padding-bottom: 3px;
|
4351
4352
|
}
|
4352
4353
|
|
4353
4354
|
/* Linny-R logo icon animation in 60 frames */
|
@@ -12873,7 +12873,7 @@ class DocumentationManager {
|
|
12873
12873
|
<img src="images/logo.png" style="height:25px; margin-right: 8px">
|
12874
12874
|
<div style="display: inline-block; min-height: 20px;
|
12875
12875
|
vertical-align: top; padding-top: 8px">
|
12876
|
-
|
12876
|
+
[LINNY_R_VERSION]
|
12877
12877
|
</div>
|
12878
12878
|
</div>
|
12879
12879
|
<div style="font-family: serif; font-size: 12px">
|