⚝
One Hat Cyber Team
⚝
Your IP:
216.73.217.4
Server IP:
41.128.143.86
Server:
Linux host.raqmix.cloud 6.8.0-1025-azure #30~22.04.1-Ubuntu SMP Wed Mar 12 15:28:20 UTC 2025 x86_64
Server Software:
Apache
PHP Version:
8.3.23
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
share
/
grafana
/
public
/
app
/
core
/
history
/
View File Name :
richHistoryStorageProvider.ts
import { config } from '@grafana/runtime'; import { contextSrv } from 'app/core/core'; import { SortOrder } from '../utils/richHistoryTypes'; import RichHistoryLocalStorage from './RichHistoryLocalStorage'; import RichHistoryRemoteStorage from './RichHistoryRemoteStorage'; import RichHistoryStorage from './RichHistoryStorage'; const richHistoryLocalStorage = new RichHistoryLocalStorage(); const richHistoryRemoteStorage = new RichHistoryRemoteStorage(); export const getRichHistoryStorage = (): RichHistoryStorage => { return config.queryHistoryEnabled ? richHistoryRemoteStorage : richHistoryLocalStorage; }; interface RichHistorySupportedFeatures { availableFilters: SortOrder[]; lastUsedDataSourcesAvailable: boolean; clearHistory: boolean; onlyActiveDataSource: boolean; changeRetention: boolean; queryHistoryAvailable: boolean; } export const supportedFeatures = (): RichHistorySupportedFeatures => { return config.queryHistoryEnabled ? { availableFilters: [SortOrder.Descending, SortOrder.Ascending], lastUsedDataSourcesAvailable: false, clearHistory: false, onlyActiveDataSource: false, changeRetention: false, queryHistoryAvailable: contextSrv.isSignedIn, } : { availableFilters: [SortOrder.Descending, SortOrder.Ascending, SortOrder.DatasourceAZ, SortOrder.DatasourceZA], lastUsedDataSourcesAvailable: true, clearHistory: true, onlyActiveDataSource: true, changeRetention: true, queryHistoryAvailable: true, }; };