|
|
|
|
@ -62,7 +62,7 @@ func TestGetAllLibraryElements(t *testing.T) { |
|
|
|
|
{ |
|
|
|
|
ID: 1, |
|
|
|
|
OrgID: 1, |
|
|
|
|
FolderID: 1, |
|
|
|
|
FolderID: 1, // nolint:staticcheck
|
|
|
|
|
UID: result.Result.Elements[0].UID, |
|
|
|
|
Name: "Text - Library Panel", |
|
|
|
|
Kind: int64(model.PanelElement), |
|
|
|
|
@ -128,7 +128,7 @@ func TestGetAllLibraryElements(t *testing.T) { |
|
|
|
|
{ |
|
|
|
|
ID: 2, |
|
|
|
|
OrgID: 1, |
|
|
|
|
FolderID: 1, |
|
|
|
|
FolderID: 1, // nolint:staticcheck
|
|
|
|
|
UID: result.Result.Elements[0].UID, |
|
|
|
|
Name: "query0", |
|
|
|
|
Kind: int64(model.VariableElement), |
|
|
|
|
@ -189,7 +189,7 @@ func TestGetAllLibraryElements(t *testing.T) { |
|
|
|
|
{ |
|
|
|
|
ID: 1, |
|
|
|
|
OrgID: 1, |
|
|
|
|
FolderID: 1, |
|
|
|
|
FolderID: 1, // nolint:staticcheck
|
|
|
|
|
UID: result.Result.Elements[0].UID, |
|
|
|
|
Name: "Text - Library Panel", |
|
|
|
|
Kind: int64(model.PanelElement), |
|
|
|
|
@ -224,7 +224,7 @@ func TestGetAllLibraryElements(t *testing.T) { |
|
|
|
|
{ |
|
|
|
|
ID: 2, |
|
|
|
|
OrgID: 1, |
|
|
|
|
FolderID: 1, |
|
|
|
|
FolderID: 1, // nolint:staticcheck
|
|
|
|
|
UID: result.Result.Elements[1].UID, |
|
|
|
|
Name: "Text - Library Panel2", |
|
|
|
|
Kind: int64(model.PanelElement), |
|
|
|
|
@ -289,7 +289,7 @@ func TestGetAllLibraryElements(t *testing.T) { |
|
|
|
|
{ |
|
|
|
|
ID: 2, |
|
|
|
|
OrgID: 1, |
|
|
|
|
FolderID: 1, |
|
|
|
|
FolderID: 1, // nolint:staticcheck
|
|
|
|
|
UID: result.Result.Elements[0].UID, |
|
|
|
|
Name: "Text - Library Panel2", |
|
|
|
|
Kind: int64(model.PanelElement), |
|
|
|
|
@ -324,7 +324,7 @@ func TestGetAllLibraryElements(t *testing.T) { |
|
|
|
|
{ |
|
|
|
|
ID: 1, |
|
|
|
|
OrgID: 1, |
|
|
|
|
FolderID: 1, |
|
|
|
|
FolderID: 1, // nolint:staticcheck
|
|
|
|
|
UID: result.Result.Elements[1].UID, |
|
|
|
|
Name: "Text - Library Panel", |
|
|
|
|
Kind: int64(model.PanelElement), |
|
|
|
|
@ -410,7 +410,7 @@ func TestGetAllLibraryElements(t *testing.T) { |
|
|
|
|
{ |
|
|
|
|
ID: 3, |
|
|
|
|
OrgID: 1, |
|
|
|
|
FolderID: 1, |
|
|
|
|
FolderID: 1, // nolint:staticcheck
|
|
|
|
|
UID: result.Result.Elements[0].UID, |
|
|
|
|
Name: "BarGauge - Library Panel", |
|
|
|
|
Kind: int64(model.PanelElement), |
|
|
|
|
@ -445,7 +445,7 @@ func TestGetAllLibraryElements(t *testing.T) { |
|
|
|
|
{ |
|
|
|
|
ID: 2, |
|
|
|
|
OrgID: 1, |
|
|
|
|
FolderID: 1, |
|
|
|
|
FolderID: 1, // nolint:staticcheck
|
|
|
|
|
UID: result.Result.Elements[1].UID, |
|
|
|
|
Name: "Gauge - Library Panel", |
|
|
|
|
Kind: int64(model.PanelElement), |
|
|
|
|
@ -549,7 +549,7 @@ func TestGetAllLibraryElements(t *testing.T) { |
|
|
|
|
{ |
|
|
|
|
ID: 2, |
|
|
|
|
OrgID: 1, |
|
|
|
|
FolderID: newFolder.ID, |
|
|
|
|
FolderID: newFolder.ID, // nolint:staticcheck
|
|
|
|
|
UID: result.Result.Elements[0].UID, |
|
|
|
|
Name: "Text - Library Panel2", |
|
|
|
|
Kind: int64(model.PanelElement), |
|
|
|
|
@ -646,7 +646,7 @@ func TestGetAllLibraryElements(t *testing.T) { |
|
|
|
|
{ |
|
|
|
|
ID: 1, |
|
|
|
|
OrgID: 1, |
|
|
|
|
FolderID: 1, |
|
|
|
|
FolderID: 1, // nolint:staticcheck
|
|
|
|
|
UID: result.Result.Elements[0].UID, |
|
|
|
|
Name: "Text - Library Panel", |
|
|
|
|
Kind: int64(model.PanelElement), |
|
|
|
|
@ -681,7 +681,7 @@ func TestGetAllLibraryElements(t *testing.T) { |
|
|
|
|
{ |
|
|
|
|
ID: 2, |
|
|
|
|
OrgID: 1, |
|
|
|
|
FolderID: 1, |
|
|
|
|
FolderID: 1, // nolint:staticcheck
|
|
|
|
|
UID: result.Result.Elements[1].UID, |
|
|
|
|
Name: "Text - Library Panel2", |
|
|
|
|
Kind: int64(model.PanelElement), |
|
|
|
|
@ -746,7 +746,7 @@ func TestGetAllLibraryElements(t *testing.T) { |
|
|
|
|
{ |
|
|
|
|
ID: 2, |
|
|
|
|
OrgID: 1, |
|
|
|
|
FolderID: 1, |
|
|
|
|
FolderID: 1, // nolint:staticcheck
|
|
|
|
|
UID: result.Result.Elements[0].UID, |
|
|
|
|
Name: "Text - Library Panel2", |
|
|
|
|
Kind: int64(model.PanelElement), |
|
|
|
|
@ -811,7 +811,7 @@ func TestGetAllLibraryElements(t *testing.T) { |
|
|
|
|
{ |
|
|
|
|
ID: 1, |
|
|
|
|
OrgID: 1, |
|
|
|
|
FolderID: 1, |
|
|
|
|
FolderID: 1, // nolint:staticcheck
|
|
|
|
|
UID: result.Result.Elements[0].UID, |
|
|
|
|
Name: "Text - Library Panel", |
|
|
|
|
Kind: int64(model.PanelElement), |
|
|
|
|
@ -877,7 +877,7 @@ func TestGetAllLibraryElements(t *testing.T) { |
|
|
|
|
{ |
|
|
|
|
ID: 2, |
|
|
|
|
OrgID: 1, |
|
|
|
|
FolderID: 1, |
|
|
|
|
FolderID: 1, // nolint:staticcheck
|
|
|
|
|
UID: result.Result.Elements[0].UID, |
|
|
|
|
Name: "Text - Library Panel2", |
|
|
|
|
Kind: int64(model.PanelElement), |
|
|
|
|
@ -952,7 +952,7 @@ func TestGetAllLibraryElements(t *testing.T) { |
|
|
|
|
{ |
|
|
|
|
ID: 1, |
|
|
|
|
OrgID: 1, |
|
|
|
|
FolderID: 1, |
|
|
|
|
FolderID: 1, // nolint:staticcheck
|
|
|
|
|
UID: result.Result.Elements[0].UID, |
|
|
|
|
Name: "Text - Library Panel", |
|
|
|
|
Kind: int64(model.PanelElement), |
|
|
|
|
@ -1025,7 +1025,7 @@ func TestGetAllLibraryElements(t *testing.T) { |
|
|
|
|
{ |
|
|
|
|
ID: 2, |
|
|
|
|
OrgID: 1, |
|
|
|
|
FolderID: 1, |
|
|
|
|
FolderID: 1, // nolint:staticcheck
|
|
|
|
|
UID: result.Result.Elements[0].UID, |
|
|
|
|
Name: "Some Other", |
|
|
|
|
Kind: int64(model.PanelElement), |
|
|
|
|
@ -1060,7 +1060,7 @@ func TestGetAllLibraryElements(t *testing.T) { |
|
|
|
|
{ |
|
|
|
|
ID: 1, |
|
|
|
|
OrgID: 1, |
|
|
|
|
FolderID: 1, |
|
|
|
|
FolderID: 1, // nolint:staticcheck
|
|
|
|
|
UID: result.Result.Elements[1].UID, |
|
|
|
|
Name: "Text - Library Panel", |
|
|
|
|
Kind: int64(model.PanelElement), |
|
|
|
|
@ -1127,7 +1127,7 @@ func TestGetAllLibraryElements(t *testing.T) { |
|
|
|
|
{ |
|
|
|
|
ID: 2, |
|
|
|
|
OrgID: 1, |
|
|
|
|
FolderID: 1, |
|
|
|
|
FolderID: 1, // nolint:staticcheck
|
|
|
|
|
UID: result.Result.Elements[0].UID, |
|
|
|
|
Name: "Text - Library Panel2", |
|
|
|
|
Kind: int64(model.PanelElement), |
|
|
|
|
@ -1238,6 +1238,7 @@ func TestGetAllLibraryElements(t *testing.T) { |
|
|
|
|
err := json.Unmarshal(resp.Body(), &result) |
|
|
|
|
require.NoError(t, err) |
|
|
|
|
require.Equal(t, 1, len(result.Result.Elements)) |
|
|
|
|
// nolint:staticcheck
|
|
|
|
|
require.Equal(t, int64(1), result.Result.Elements[0].FolderID) |
|
|
|
|
require.Equal(t, "Text - Library Panel", result.Result.Elements[0].Name) |
|
|
|
|
|
|
|
|
|
|