Add warning to history view if some backends aren't reporting the same item.

This commit is contained in:
Abdulmhsen B. A. A.
2024-06-07 18:28:04 +03:00
parent 42d0ee6421
commit 561d80f2e5
4 changed files with 193 additions and 43 deletions

View File

@@ -299,7 +299,25 @@ const makeConsoleCommand = (cmd) => {
return `/console?${params.toString()}`
}
const stringToRegex = (str) => new RegExp(str.match(/\/(.+)\/.*/)[1], str.match(/\/.+\/(.*)/)[1]);
const stringToRegex = (str) => new RegExp(str.match(/\/(.+)\/.*/)[1], str.match(/\/.+\/(.*)/)[1])
/**
* Make history search link.
*
* @param {string} type
* @param {string} guid
*
* @returns {string}
*/
const makeSearchLink = (type, guid) => {
const params = new URLSearchParams();
params.append('perpage', 50);
params.append('page', 1);
params.append('q', guid);
params.append('key', type);
return `/history/?${params.toString()}`
}
export {
ag_set,
@@ -312,5 +330,6 @@ export {
formatDuration,
copyText,
stringToRegex,
makeConsoleCommand
makeConsoleCommand,
makeSearchLink
}