mirror of
https://github.com/grafana/grafana.git
synced 2025-09-23 18:52:33 +08:00

* GrafanaUI: add option to close DeleteButton on confirm click * add datasource readOnly info to frontend settings * move isTruthy utility type guard * add generic non-visualization table component * Add correlations settings page * add missing readOnly in mock * Fix typo * avoid reloading correlations after add/remove * use DeepPartial from rhf * validate source data source * fix validation logic * fix navmodel test * add missing readonly property * remove unused styles * handle multiple clicks on elements * better UX for loading states * fix remove handler * add glue icon
82 lines
1.9 KiB
TypeScript
82 lines
1.9 KiB
TypeScript
import { PluginType } from '@grafana/data';
|
|
import { GoogleAuthType } from '@grafana/google-sdk';
|
|
|
|
import CloudMonitoringDatasource from '../datasource';
|
|
|
|
export const metricDescriptors = [
|
|
{
|
|
name: 'projects/grafana-prod/metricDescriptors/agent.googleapis.com/agent/api_request_count',
|
|
labels: [
|
|
{
|
|
key: 'state',
|
|
description: 'Request state',
|
|
},
|
|
],
|
|
metricKind: 'CUMULATIVE',
|
|
valueType: 'INT64',
|
|
unit: '1',
|
|
description: 'API request count',
|
|
displayName: 'API Request Count',
|
|
type: 'agent.googleapis.com/agent/api_request_count',
|
|
metadata: {
|
|
launchStage: 'GA',
|
|
samplePeriod: '60s',
|
|
ingestDelay: '0s',
|
|
},
|
|
},
|
|
{
|
|
name: 'projects/grafana-prod/metricDescriptors/agent.googleapis.com/agent/log_entry_count',
|
|
labels: [
|
|
{
|
|
key: 'response_code',
|
|
description: 'HTTP response code',
|
|
},
|
|
],
|
|
metricKind: 'CUMULATIVE',
|
|
valueType: 'INT64',
|
|
unit: '1',
|
|
description: 'Count of log entry writes',
|
|
displayName: 'Log Entry Count',
|
|
type: 'agent.googleapis.com/agent/log_entry_count',
|
|
metadata: {
|
|
launchStage: 'GA',
|
|
samplePeriod: '60s',
|
|
ingestDelay: '0s',
|
|
},
|
|
},
|
|
];
|
|
|
|
export const newMockDatasource = () =>
|
|
new CloudMonitoringDatasource({
|
|
id: 1,
|
|
uid: 'cm-id',
|
|
type: 'cloud-monitoring-datasource',
|
|
name: 'Cloud Monitoring Data Source',
|
|
jsonData: {
|
|
authenticationType: GoogleAuthType.JWT,
|
|
},
|
|
access: 'proxy',
|
|
meta: {
|
|
id: 'cloud-monitoring-datasource',
|
|
name: 'Cloud Monitoring Data Source',
|
|
type: PluginType.datasource,
|
|
module: '',
|
|
baseUrl: '',
|
|
info: {
|
|
description: '',
|
|
screenshots: [],
|
|
updated: '',
|
|
version: '',
|
|
logos: {
|
|
small: '',
|
|
large: '',
|
|
},
|
|
author: {
|
|
name: '',
|
|
},
|
|
links: [],
|
|
},
|
|
},
|
|
readOnly: false,
|
|
});
|