Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
c02dd746
Unverified
Commit
c02dd746
authored
Jun 15, 2018
by
Marcus Efraimsson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cloudwatch: handle invalid time range
parent
4be6ef4a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
pkg/tsdb/cloudwatch/cloudwatch.go
+5
-0
No files found.
pkg/tsdb/cloudwatch/cloudwatch.go
View file @
c02dd746
...
@@ -3,6 +3,7 @@ package cloudwatch
...
@@ -3,6 +3,7 @@ package cloudwatch
import
(
import
(
"context"
"context"
"errors"
"errors"
"fmt"
"regexp"
"regexp"
"sort"
"sort"
"strconv"
"strconv"
...
@@ -144,6 +145,10 @@ func (e *CloudWatchExecutor) executeQuery(ctx context.Context, parameters *simpl
...
@@ -144,6 +145,10 @@ func (e *CloudWatchExecutor) executeQuery(ctx context.Context, parameters *simpl
return
nil
,
err
return
nil
,
err
}
}
if
endTime
.
Before
(
startTime
)
{
return
nil
,
fmt
.
Errorf
(
"Invalid time range: End time can't be before start time"
)
}
params
:=
&
cloudwatch
.
GetMetricStatisticsInput
{
params
:=
&
cloudwatch
.
GetMetricStatisticsInput
{
Namespace
:
aws
.
String
(
query
.
Namespace
),
Namespace
:
aws
.
String
(
query
.
Namespace
),
MetricName
:
aws
.
String
(
query
.
MetricName
),
MetricName
:
aws
.
String
(
query
.
MetricName
),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment