⚝
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 :
remoteStorageConverter.ts
import { getDataSourceSrv } from '@grafana/runtime'; import { RichHistoryQuery } from '../../types'; import { RichHistoryRemoteStorageDTO } from './RichHistoryRemoteStorage'; export const fromDTO = (dto: RichHistoryRemoteStorageDTO): RichHistoryQuery => { const datasource = getDataSourceSrv().getInstanceSettings({ uid: dto.datasourceUid }); return { id: dto.uid, createdAt: dto.createdAt * 1000, datasourceName: datasource?.name || '', // will be show on the list as coming from a removed data source datasourceUid: dto.datasourceUid, starred: dto.starred, comment: dto.comment, queries: dto.queries, }; }; export const toDTO = (richHistory: RichHistoryQuery): RichHistoryRemoteStorageDTO => { return { uid: richHistory.id, createdAt: Math.floor(richHistory.createdAt / 1000), datasourceUid: richHistory.datasourceUid, starred: richHistory.starred, comment: richHistory.comment, queries: richHistory.queries, }; };