-
Notifications
You must be signed in to change notification settings - Fork 21
[O2B-643] Run duration accept format HH:MM:SS #1464
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
xsalonx
wants to merge
56
commits into
main
Choose a base branch
from
xsalonx/misc/O2B-643/run-duration-should-accept-format
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 20 commits
Commits
Show all changes
56 commits
Select commit
Hold shift + click to select a range
355ddac
works
xsalonx 9702196
works
xsalonx 4b87ce8
refactor
xsalonx d436308
add model
xsalonx eda937b
nEPS filter works
xsalonx 8c18794
filters work
xsalonx 15b5dac
filter works
xsalonx c3b2f86
pol
xsalonx e9e7420
pol
xsalonx 5e98f04
linter
xsalonx 3cbb87f
add default
xsalonx 1a61b69
docs
xsalonx 2d1731a
conf min max
xsalonx 2475d19
docs
xsalonx b37573a
value
xsalonx 78950b5
change default
xsalonx 7f03dff
test WIP
xsalonx 58d31e5
Test
xsalonx 191d434
Merge branch 'main' into xsalonx/misc/O2B-643/run-duration-should-acc…
xsalonx fbdefc0
Merge branch 'main' into xsalonx/misc/O2B-643/run-duration-should-acc…
xsalonx 3661588
remove override
xsalonx a06640d
refactor
xsalonx 21c1cf4
use SelectionMode
xsalonx 0ab6860
rename
xsalonx 144317c
rename
xsalonx 40b70e2
bug
xsalonx 68a01d7
simp
xsalonx ff0da59
cherry-picked
xsalonx 7d57685
cherry -pick
xsalonx 71cb30d
rm
xsalonx 14fc5a8
cleanup
xsalonx 6dda2bc
cl
xsalonx e639db8
revoke
xsalonx 1d5e0c7
remove
xsalonx cd9d679
ref
xsalonx c4c9fc7
ch
xsalonx b59e0d2
add model
xsalonx a4933f2
ref WIP
xsalonx 5d6c941
ref
xsalonx fe67005
fix
xsalonx f165e23
fix
xsalonx 52e7bf6
merge main
xsalonx 318d0a5
cleanup
xsalonx 7d05396
test WIP
xsalonx a4843f3
merge main
xsalonx 6b013dd
fix
xsalonx c353f54
fix
xsalonx 73425be
fix
xsalonx c4c70dd
Merge branch 'main' into xsalonx/misc/O2B-643/run-duration-should-acc…
xsalonx 2507a4a
simp
xsalonx e6763c6
merge main
xsalonx a908084
Merge branch 'main' into xsalonx/misc/O2B-643/run-duration-should-acc…
xsalonx bf412c4
add method
xsalonx 2ea7b4a
merge main
xsalonx 76905be
Merge branch 'main' into xsalonx/misc/O2B-643/run-duration-should-acc…
xsalonx eb7ae9f
merg main
xsalonx File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
40 changes: 40 additions & 0 deletions
40
lib/public/components/Filters/common/filters/NumericComparisonOperatorSelectionModel.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| /** | ||
| * @license | ||
| * Copyright CERN and copyright holders of ALICE O2. This software is | ||
| * distributed under the terms of the GNU General Public License v3 (GPL | ||
| * Version 3), copied verbatim in the file "COPYING". | ||
| * | ||
| * See http://alice-o2.web.cern.ch/license for full licensing information. | ||
| * | ||
| * 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 { SelectionDropdownModel } from '../../../common/selection/dropdown/SelectionDropdownModel.js'; | ||
|
|
||
| /** | ||
| * Model storing state of a selection of predfined numerical comparison operators | ||
| */ | ||
| export class NumericComparisonOperatorSelectionModel extends SelectionDropdownModel { | ||
martinboulais marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| /** | ||
| * Constructor | ||
| * @param {string} [defaultOperator = '='] one of ['<', '<=', '=', '>=', '>'] operators | ||
| */ | ||
| constructor(defaultOperator = '=') { | ||
| super({ | ||
| availableOptions: ['<', '<=', '=', '>=', '>'].map((op) => ({ value: op })), | ||
martinboulais marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| multiple: false, | ||
| allowEmpty: false, | ||
| defaultSelection: [{ value: defaultOperator }], | ||
| }); | ||
| } | ||
|
|
||
| // eslint-disable-next-line valid-jsdoc | ||
| /** | ||
| * @inheritDoc | ||
| */ | ||
| get selected() { | ||
| return super.selected[0]; | ||
martinboulais marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| } | ||
| } | ||
89 changes: 89 additions & 0 deletions
89
lib/public/components/Filters/common/filters/NumericFilterModel.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,89 @@ | ||
| /** | ||
| * @license | ||
| * Copyright CERN and copyright holders of ALICE O2. This software is | ||
| * distributed under the terms of the GNU General Public License v3 (GPL | ||
| * Version 3), copied verbatim in the file "COPYING". | ||
| * | ||
| * See http://alice-o2.web.cern.ch/license for full licensing information. | ||
| * | ||
| * 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 { NumericComparisonOperatorSelectionModel } from './NumericComparisonOperatorSelectionModel.js'; | ||
| import { Observable } from '/js/src/index.js'; | ||
|
|
||
| /** | ||
| * Model storing state of a expected value of something with respect of comprison operator | ||
| */ | ||
| export class NumericFilterModel extends Observable { | ||
martinboulais marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| /** | ||
| * Constructor | ||
| * @param {object} configuration configration | ||
| * @param {number} [configration.minValue] minimal value allowed in model | ||
| * @param {number} [configration.maxValue] maximum value allowed in model | ||
| * @param {number} [configration.defaultOperator] defaultOperator one of ['<', '<=', '=', '>=', '>'] operators | ||
| */ | ||
| constructor({ min, max, defaultOperator }) { | ||
| super(); | ||
|
|
||
| this._minValue = min; | ||
| this._maxValue = max; | ||
|
|
||
| this._operatorSelectionModel = new NumericComparisonOperatorSelectionModel(defaultOperator); | ||
| this._operatorSelectionModel.observe(() => { | ||
| if (this._value !== null) { | ||
| this.notify(); | ||
| } | ||
| }); | ||
|
|
||
| this._value = null; | ||
| } | ||
|
|
||
| /** | ||
| * Get minimum allowed value | ||
| */ | ||
| get minValue() { | ||
| return this._minValue; | ||
| } | ||
|
|
||
| /** | ||
| * Get maximum allowed value | ||
| */ | ||
| get maxValue() { | ||
| return this._maxValue; | ||
| } | ||
|
|
||
| /** | ||
| * Reset to default | ||
| * @return {void} | ||
| */ | ||
| reset() { | ||
| this._value = null; | ||
| this._operatorSelectionModel.reset(); | ||
| } | ||
|
|
||
| /** | ||
| * Get value - operand to comparison | ||
| */ | ||
| get value() { | ||
| return this._value; | ||
| } | ||
|
|
||
| /** | ||
| * Set current value of operand | ||
| * @param {number} value value | ||
| */ | ||
| set value(value) { | ||
| this._value = value; | ||
| this.notify(); | ||
| } | ||
|
|
||
| /** | ||
| * Get operator selection model | ||
| */ | ||
| get operatorSelectionModel() { | ||
| return this._operatorSelectionModel; | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.