Command filter: two presets, and a "Selected: N" summary (v2.7.2)
- the 'Proactive + events' preset is gone: the proactive one (FETCH, TERMINAL PROFILE and the SW 91xx initiators) plus the individual ENVELOPE entry cover it, and its Russian key is removed with it - with several entries checked the filter button now reads "Selected: N" («Выбрано: N») instead of "N commands"; a single entry keeps showing its name and an empty selection stays "All commands" - tests: the removed preset's case is replaced by an absence pin in the menu test, and the summary case follows the new wording; 527 Python + 72 Node tests - README/README_RUS list two presets; PWA_VERSION/pyproject/version.py 2.7.2, SW cache simtrace-analyser-v82
This commit is contained in:
1 parent
024527ada4
commit
bc6fcc02c2
8 files changed
+14
-28
No files matched your search
+3
-9
@@ -2353,11 +2353,6 @@ const FILTER_PRESETS = [
|
||||
labels: ['FETCH', 'TERMINAL PROFILE'],
|
||||
test: m => _sw1(m) === 0x91,
|
||||
},
|
||||
{
|
||||
id: 'preset:proactive-events', name: 'Proactive + events',
|
||||
labels: ['FETCH', 'TERMINAL PROFILE', 'ENVELOPE'],
|
||||
test: m => _sw1(m) === 0x91,
|
||||
},
|
||||
{
|
||||
id: 'preset:files', name: 'File operations',
|
||||
labels: ['SELECT', 'READ BINARY', 'READ RECORD', 'UPDATE BINARY',
|
||||
@@ -2383,7 +2378,7 @@ function filterEntryName(entry) {
|
||||
function filterSummary() {
|
||||
if (!STATE.filter.size) return t('All commands');
|
||||
if (STATE.filter.size === 1) return filterEntryName([...STATE.filter][0]);
|
||||
return t('{n} commands').replace('{n}', STATE.filter.size);
|
||||
return t('Selected: {n}').replace('{n}', STATE.filter.size);
|
||||
}
|
||||
|
||||
let _filterMenuSig = null;
|
||||
@@ -3346,7 +3341,7 @@ function onSearchChange() {
|
||||
}
|
||||
|
||||
// ──────────────────── Versioning ────────────────────
|
||||
const PWA_VERSION = '2.7.1';
|
||||
const PWA_VERSION = '2.7.2';
|
||||
const MIN_SERVER_VERSION = '2.3.0';
|
||||
|
||||
function parseVersion(v) {
|
||||
@@ -3384,9 +3379,8 @@ const LANG_RU = {
|
||||
'Presets': 'Пресеты',
|
||||
'Commands': 'Команды',
|
||||
'Proactive sessions': 'Проактивные сессии',
|
||||
'Proactive + events': 'Проактивные + события',
|
||||
'File operations': 'Файловые операции',
|
||||
'{n} commands': 'команд: {n}',
|
||||
'Selected: {n}': 'Выбрано: {n}',
|
||||
'Filter': 'Фильтр',
|
||||
'Start Capture': 'Начать захват',
|
||||
'Stop Capture': 'Остановить захват',
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
const CACHE = 'simtrace-analyser-v81';
|
||||
const CACHE = 'simtrace-analyser-v82';
|
||||
|
||||
const PRECACHE = [
|
||||
'index.html',
|
||||
|
||||
@@ -100,13 +100,6 @@ test('FETCH and TERMINAL RESPONSE are separate commands now', () => {
|
||||
assert.equal(matchesFilter(gr, 1, set), true);
|
||||
});
|
||||
|
||||
test('the proactive+events preset adds ENVELOPE', () => {
|
||||
const set = new Set(['preset:proactive-events']);
|
||||
assert.equal(matchesFilter(msg('ENVELOPE'), 0, set), true);
|
||||
assert.equal(matchesFilter(msg('FETCH'), 0, set), true);
|
||||
assert.equal(matchesFilter(msg('SELECT'), 0, set), false);
|
||||
});
|
||||
|
||||
test('the file-operations preset covers the five commands and their replies', () => {
|
||||
const set = new Set(['preset:files']);
|
||||
for (const name of ['SELECT', 'READ BINARY', 'READ RECORD', 'UPDATE BINARY',
|
||||
@@ -137,7 +130,7 @@ test('the summary follows the selection', () => {
|
||||
STATE.filter.add('preset:files');
|
||||
assert.equal(filterSummary(), 'File operations');
|
||||
STATE.filter.add('cmd:FETCH');
|
||||
assert.equal(filterSummary(), '2 commands');
|
||||
assert.equal(filterSummary(), 'Selected: 2');
|
||||
});
|
||||
|
||||
test('the menu lists the presets and the commands with their counts', () => {
|
||||
@@ -150,8 +143,8 @@ test('the menu lists the presets and the commands with their counts', () => {
|
||||
el = id => (id === 'filter-menu' ? menu : btn);
|
||||
renderFilterMenu(true);
|
||||
assert.match(menu.innerHTML, /data-filter="preset:proactive"/);
|
||||
assert.match(menu.innerHTML, /data-filter="preset:proactive-events"/);
|
||||
assert.match(menu.innerHTML, /data-filter="preset:files"/);
|
||||
assert.doesNotMatch(menu.innerHTML, /preset:proactive-events/);
|
||||
assert.match(menu.innerHTML, /data-filter="cmd:SELECT"/);
|
||||
assert.match(menu.innerHTML, /<span class="filter-count">2<\/span>/);
|
||||
assert.match(menu.innerHTML, /data-filter="all" checked>/);
|
||||
@@ -171,7 +164,7 @@ test('the filter strings carry Russian translations', () => {
|
||||
keys.add(m[1].replace(/\\(['\\])/g, '$1'));
|
||||
}
|
||||
for (const s of ['All commands', 'Presets', 'Commands', 'Proactive sessions',
|
||||
'Proactive + events', 'File operations', '{n} commands']) {
|
||||
'File operations', 'Selected: {n}']) {
|
||||
assert.ok(keys.has(s), 'no LANG_RU entry for: ' + s);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user