hedgequantx 2.6.79 → 2.6.80
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/package.json +1 -1
- package/src/pages/algo/one-account.js +2 -2
- package/src/pages/algo/ui.js +11 -13
package/package.json
CHANGED
|
@@ -981,8 +981,8 @@ const launchAlgo = async (service, account, contract, config) => {
|
|
|
981
981
|
};
|
|
982
982
|
|
|
983
983
|
// Start polling and UI refresh
|
|
984
|
-
// UI refreshes every
|
|
985
|
-
const refreshInterval = setInterval(() => { if (running) ui.render(stats); },
|
|
984
|
+
// UI refreshes every 1000ms (reduced to prevent flicker on VPS/SSH), P&L polling every 10s
|
|
985
|
+
const refreshInterval = setInterval(() => { if (running) ui.render(stats); }, 1000);
|
|
986
986
|
const pnlInterval = setInterval(() => { if (running) pollPnL(); }, 10000);
|
|
987
987
|
pollPnL(); // Initial poll
|
|
988
988
|
|
package/src/pages/algo/ui.js
CHANGED
|
@@ -329,19 +329,17 @@ class AlgoUI {
|
|
|
329
329
|
_drawLogs() {
|
|
330
330
|
const { W, logs, maxLogs } = this;
|
|
331
331
|
|
|
332
|
-
// Activity header - HF style
|
|
333
|
-
//
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
this.
|
|
337
|
-
this.lastSpinnerUpdate = now;
|
|
332
|
+
// Activity header - HF style (NO SPINNER/TIME - causes flicker on VPS/SSH)
|
|
333
|
+
// Date is cached on first draw to prevent changes
|
|
334
|
+
if (!this.cachedDate) {
|
|
335
|
+
const nowDate = new Date();
|
|
336
|
+
this.cachedDate = nowDate.toLocaleDateString('en-US', { month: 'short', day: 'numeric', year: 'numeric' }).toUpperCase();
|
|
338
337
|
}
|
|
339
|
-
const
|
|
340
|
-
const nowDate = new Date();
|
|
341
|
-
const timeStr = nowDate.toLocaleTimeString('en-US', { hour12: false });
|
|
342
|
-
const dateStr = nowDate.toLocaleDateString('en-US', { month: 'short', day: 'numeric', year: 'numeric' });
|
|
338
|
+
const dateStr = this.cachedDate;
|
|
343
339
|
|
|
344
|
-
|
|
340
|
+
// Static indicator instead of spinner
|
|
341
|
+
const indicator = '●';
|
|
342
|
+
const leftText = ` EXECUTION LOG ${indicator}`;
|
|
345
343
|
const rightText = `[X] STOP `;
|
|
346
344
|
|
|
347
345
|
const totalFixed = leftText.length + rightText.length;
|
|
@@ -349,8 +347,8 @@ class AlgoUI {
|
|
|
349
347
|
const centerPadLeft = Math.floor((centerSpace - dateStr.length) / 2);
|
|
350
348
|
const centerPadRight = centerSpace - dateStr.length - centerPadLeft;
|
|
351
349
|
|
|
352
|
-
const left = ` ${chalk.bold('EXECUTION LOG')} ${chalk.
|
|
353
|
-
const center = ' '.repeat(Math.max(0, centerPadLeft)) + chalk.white.bold(dateStr
|
|
350
|
+
const left = ` ${chalk.bold('EXECUTION LOG')} ${chalk.green(indicator)}`;
|
|
351
|
+
const center = ' '.repeat(Math.max(0, centerPadLeft)) + chalk.white.bold(dateStr) + ' '.repeat(Math.max(0, centerPadRight));
|
|
354
352
|
const right = chalk.yellow.bold('[X] STOP') + ' ';
|
|
355
353
|
|
|
356
354
|
this._line(chalk.cyan(BOX.V) + chalk.white(left) + center + right + chalk.cyan(BOX.V));
|