Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing SetDashboardParams #117

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

krya-kryak
Copy link
Collaborator

Add missing fields message and refresh for POST /api/dashboards/db call.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.1%) to 47.679% when pulling 150b4db on feature/set-dashboard-fields into ad428f9 on master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage increased (+0.1%) to 47.679% when pulling 150b4db on feature/set-dashboard-fields into ad428f9 on master.

Copy link
Collaborator

@GiedriusS GiedriusS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good but one suggestion. Sorry for the late response. I think we should help our users by using a more strict type. Let me know what do you think.

@@ -244,6 +248,8 @@ func (r *Client) SetDashboard(ctx context.Context, board Board, params SetDashbo
newBoard.Dashboard = board
newBoard.FolderID = params.FolderID
newBoard.Overwrite = params.Overwrite
newBoard.Message = params.Message
newBoard.Refresh = params.Refresh
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then do:

Suggested change
newBoard.Refresh = params.Refresh
newBoard.Refresh = params.Refresh.Round(time.Second).String()

@@ -215,6 +215,8 @@ func (r *Client) Search(ctx context.Context, params ...SearchParam) ([]FoundBoar
type SetDashboardParams struct {
FolderID int
Overwrite bool
Message string
Refresh string
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's do:

Suggested change
Refresh string
Refresh time.Duration

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants