Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
b44f9dd
[OGUI-1453] State and model base
isaachilly May 15, 2026
791ce46
[OGUI-1453] Context menu component + styles
isaachilly May 15, 2026
f054754
[OGUI-1453] Connect table cells
isaachilly May 15, 2026
f59d674
[OGUI-1543] Added test cases for context menu functionality
isaachilly May 20, 2026
15c5eb5
Merge branch 'dev' into feature/ILG/OGUI-1453/Double-click-on-value-t…
isaachilly May 20, 2026
dfc98a6
[OGUI-1453] Fix failing CI/CD test due to slow render
isaachilly May 20, 2026
0351a7e
[OGUI-1453] improve context menu component
isaachilly May 20, 2026
f07c082
[OGUI-1453] Improve context menu testing
isaachilly May 20, 2026
f495da5
[OGUI-1453] Export not as default
isaachilly May 21, 2026
5bee914
[OGUI-1453] JSDoc fixes
isaachilly May 21, 2026
a2a9965
[OGUI-1453] Add openInspector action
isaachilly May 21, 2026
ba74104
[OGUI-1453] Refactor tableRows in tableLogsContent
isaachilly May 21, 2026
cd81418
[OGUI-1453] Add actions for severity and level
isaachilly May 21, 2026
91e00a0
[OGUI-1453] Add tests for severity, level and "Clear Filter" disablement
isaachilly May 21, 2026
0feda58
[OGUI-1453] Select row on right-click and add test
isaachilly May 21, 2026
026cc97
[OGUI-1453] Fix JSDoc warning missing param
isaachilly May 21, 2026
ea5ca59
[OGUI-1453] Extract context menu into its own model
isaachilly May 21, 2026
7084979
Merge branch 'dev' into feature/ILG/OGUI-1453/Double-click-on-value-t…
isaachilly May 21, 2026
9a73d89
[OGUI-1453] Make action labels title case
isaachilly May 21, 2026
a441103
Merge branch 'feature/ILG/OGUI-1453/Double-click-on-value-to-filter-w…
isaachilly May 21, 2026
ad5e88e
[OGUI-1453] Simplify test helpers having consolidated timeout into op…
isaachilly May 21, 2026
8642faf
[OGUI-1453] Remove unused render helpers
isaachilly May 21, 2026
819fb5d
[OGUI-1453] Add simpler action label tests
isaachilly May 21, 2026
ea1681e
[OGUI-1453] Fix message cell border
isaachilly May 22, 2026
f44868f
[OGUI-1216] - Add context menu hint button to hovered cells
isaachilly May 22, 2026
91e68e4
[OGUI-1453] Fix context menu positioning for bottom of the screen ope…
isaachilly May 22, 2026
d4d2960
[OGUI-1453] Add tests for context hint button and empty cell behaviour
isaachilly May 22, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions InfoLogger/public/Model.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ export default class Model extends Observable {
// Enter
if ((code === 13 && !this.messageFocused || code === 13 && e.metaKey) && !this.log.isLiveModeEnabled()) {
this.log.query();
this.log.contextMenu.hide();
}
if (!this.messageFocused) {
// don't listen to keys when it comes from an input (they transform into letters)
Expand All @@ -223,6 +224,7 @@ export default class Model extends Observable {
case 27: // escape
this.log.removeLogDownloadContent();
this.accountMenuEnabled = false;
this.log.contextMenu.hide();
break;
case 37: // left
if (e.altKey) {
Expand Down
110 changes: 109 additions & 1 deletion InfoLogger/public/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,15 @@
td,
th { max-width: 0; /* allow ellipsis on tables */ vertical-align: top; }

.cell { line-height: 1rem; font-size: 1rem; padding: 0rem 0.2rem; font-weight: 100; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 18px; /* must be sync with rowHeight constant in view */ }
.cell { line-height: 1rem; font-size: 1rem; padding: 0rem 0.2rem; font-weight: 100; line-height: 18px; /* must be sync with rowHeight constant in view */ }
.cell-bordered { border-left: 1px solid rgb(170, 170, 170); }
.cell-content { display: flex; justify-content: space-between; align-items: center; max-width: 100%; }
.cell-text {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
width: 100%;
}

.cell-xs { width: 2rem; }
.cell-s { width: 4rem; }
Expand All @@ -56,6 +63,25 @@ th { max-width: 0; /* allow ellipsis on tables */ vertical-align: top; }
.row-hover:hover { background-color: rgba(0, 0, 0, .075); }
.row-selected, .row-selected:hover { background-color: #007bff; color: white; }

/* context menu hint */
.cell-context-menu-hint {
display: none;
font-size: 0.80rem;
font-weight: bold;
color: var(--color-black);
background-color: #e0e0e0;
border-radius: 3px;
padding: 0 3px;
line-height: 1;
cursor: pointer;
}
.cell:hover .cell-context-menu-hint { display: block; }
.cell-context-menu-hint:hover { background-color: rgba(0, 0, 0, .15); }

/* invert colors for selected rows */
.row-selected .cell-context-menu-hint { color: var(--color-white); background-color: rgba(255, 255, 255, .15); }
.row-selected .cell-context-menu-hint:hover { background-color: rgba(255, 255, 255, .3); }

.table-max { width: 100%; }

.pull-right { float: right; }
Expand Down Expand Up @@ -95,3 +121,85 @@ footer { border-top: 1px solid var(--color-gray); }

.text-area-for-message:focus { width: 50%; height: 10rem !important; right: 0; position: absolute; }
a.disabled { pointer-events: none; cursor: default; }

.cell-context-menu-overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 1100;
}

.cell-context-menu {
position: fixed;
z-index: 1101;
display: flex;
flex-direction: column;
background-color: #fff;
border: 1px solid rgba(0,0,0,.15);
border-radius: .25rem;
min-width: 220px;
max-width: 220px;
overflow: hidden;
box-shadow: 0 2px 8px rgba(0,0,0,.1);
}

.cell-context-menu-item {
cursor: pointer;
text-decoration: none;
padding: 0.55rem 0.75rem;
line-height: 1em;
color: var(--color-gray-darker);
font-weight: 100;
display: flex;
flex-direction: row;
user-select: none;
}

.cell-context-menu-item + .cell-context-menu-item {
border-top: 1px solid var(--color-gray-light);
}

.cell-context-menu:first-child {
border-radius: 0.25em 0.25em 0 0;
}

.cell-context-menu-item:last-child {
border-radius: 0 0 0.25em 0.25em;
}

.cell-context-menu-item:hover {
text-decoration: none;
background-color: var(--color-gray-dark);
color: var(--color-gray-lighter);
}

.cell-context-menu-item:active {
background-color: var(--color-gray-dark);
color: var(--color-black);
}

.cell-context-menu-item.selected {
background-color: var(--color-primary);
color: var(--color-white);
}

.cell-context-menu-item.disabled,
.cell-context-menu-item.disabled:hover,
.cell-context-menu-item.disabled:active {
cursor: not-allowed;
opacity: 0.4;
}

.cell-context-menu-header {
padding: 0.4rem 0.75rem;
color: var(--color-gray-darker);
background-color: var(--color-gray-light);
border-bottom: 1px solid rgba(0,0,0,.1);
border-radius: 0.25rem 0.25rem 0 0;
user-select: none;
display: flex;
flex-direction: column;
gap: 0.25rem;
}
54 changes: 54 additions & 0 deletions InfoLogger/public/log/ContextMenu.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
/**
* @license
* Copyright 2019-2020 CERN and copyright holders of ALICE O2.
* See http://alice-o2.web.cern.ch/copyright for details of the copyright holders.
* All rights not expressly granted are reserved.
*
* This software is distributed under the terms of the GNU General Public
* License v3 (GPL Version 3), copied verbatim in the file "COPYING".
*
* In applying this license CERN does not waive the privileges and immunities
* granted to it by virtue of its status as an Intergovernmental Organization
* or submit itself to any jurisdiction.
*/

import { Observable } from '/js/src/index.js';

/**
* Model for the log table cell context menu state.
*/
export default class ContextMenu extends Observable {
constructor() {
super();

this.isOpen = false;
this.field = null;
this.value = null;
this.x = 0;
this.y = 0;
}

/**
* Open the context menu at the given position for a specific field/value.
* @param {string} field - the log field (e.g. 'hostname', 'severity', 'timestamp')
* @param {string} value - the cell value
* @param {number} x - mouse x position
* @param {number} y - mouse y position
*/
show(field, value, x, y) {
this.isOpen = true;
this.field = field;
this.value = value;
this.x = x;
this.y = y;
this.notify();
}

/**
* Close the context menu.
*/
hide() {
this.isOpen = false;
this.notify();
}
}
4 changes: 4 additions & 0 deletions InfoLogger/public/log/Log.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

import { Observable, RemoteData } from '/js/src/index.js';
import LogFilter from '../logFilter/LogFilter.js';
import ContextMenu from './ContextMenu.js';
import { MODE } from '../constants/mode.const.js';
import { TIME_MS } from '../common/Timezone.js';
import { ROW_HEIGHT } from '../constants/visual.const.js';
Expand Down Expand Up @@ -70,6 +71,9 @@ export default class Log extends Observable {
this.dom = {
table: '',
};

this.contextMenu = new ContextMenu();
this.contextMenu.bubbleTo(this);
}

/**
Expand Down
Loading
Loading