mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
more lint
This commit is contained in:
parent
b25e735c02
commit
a984a4e4f9
@ -1,7 +1,6 @@
|
||||
package dashboards
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
@ -48,7 +47,7 @@ func TestIntegrationDashboardsApp(t *testing.T) {
|
||||
|
||||
t.Run("Check discovery client", func(t *testing.T) {
|
||||
disco := helper.GetGroupVersionInfoJSON("dashboard.grafana.app")
|
||||
fmt.Printf("%s", string(disco))
|
||||
// fmt.Printf("%s", disco)
|
||||
|
||||
require.JSONEq(t, `[
|
||||
{
|
||||
|
@ -42,7 +42,7 @@ func TestIntegrationTestDatasource(t *testing.T) {
|
||||
|
||||
t.Run("Check discovery client", func(t *testing.T) {
|
||||
disco := helper.GetGroupVersionInfoJSON("testdata.datasource.grafana.app")
|
||||
// fmt.Printf("%s", string(disco))
|
||||
// fmt.Printf("%s", disco)
|
||||
|
||||
require.JSONEq(t, `[
|
||||
{
|
||||
|
@ -47,7 +47,7 @@ func TestIntegrationPlaylist(t *testing.T) {
|
||||
|
||||
// The accepted verbs will change when dual write is enabled
|
||||
disco := h.GetGroupVersionInfoJSON("playlist.grafana.app")
|
||||
// fmt.Printf("%s", string(disco))
|
||||
// fmt.Printf("%s", disco)
|
||||
require.JSONEq(t, `[
|
||||
{
|
||||
"version": "v0alpha1",
|
||||
|
@ -356,7 +356,7 @@ export class DashboardScene extends SceneObjectBase<DashboardSceneState> {
|
||||
|
||||
public onRestore = async (version: DecoratedRevisionModel): Promise<boolean> => {
|
||||
const versionRsp = await getHistorySrv().restoreDashboard(version.uid, version.version);
|
||||
|
||||
|
||||
const rev = (versionRsp as SaveDashboardResponseDTO).version;
|
||||
if (!Number.isInteger(version)) {
|
||||
return false;
|
||||
|
@ -21,10 +21,9 @@ export type DecoratedRevisionModel = VersionModel & {
|
||||
checked: boolean;
|
||||
createdDateString: string;
|
||||
ageString: string;
|
||||
data?: Dashboard
|
||||
data?: Dashboard;
|
||||
};
|
||||
|
||||
|
||||
export interface HistorySrv {
|
||||
getHistoryList(dashboardUID: string, options: HistoryListOpts): Promise<VersionModel[]>;
|
||||
getDashboardVersion(dashboardUID: string, version: number | string): Promise<Dashboard | {}>; // Just the spec (for now)
|
||||
|
@ -3,11 +3,12 @@ import * as React from 'react';
|
||||
|
||||
import { Spinner, HorizontalGroup } from '@grafana/ui';
|
||||
import { Page } from 'app/core/components/Page/Page';
|
||||
import { VersionHistoryHeader, VersionsHistoryButtons } from 'app/features/dashboard-scene/settings/version-history';
|
||||
import {
|
||||
VersionHistoryHeader,
|
||||
VersionsHistoryButtons,
|
||||
} from 'app/features/dashboard-scene/settings/version-history';
|
||||
import { DecoratedRevisionModel, VersionModel, getHistorySrv } from 'app/features/dashboard-scene/settings/version-history/HistorySrv';
|
||||
DecoratedRevisionModel,
|
||||
VersionModel,
|
||||
getHistorySrv,
|
||||
} from 'app/features/dashboard-scene/settings/version-history/HistorySrv';
|
||||
|
||||
import { VersionHistoryComparison } from '../VersionHistory/VersionHistoryComparison';
|
||||
import { VersionHistoryTable } from '../VersionHistory/VersionHistoryTable';
|
||||
|
Loading…
Reference in New Issue
Block a user