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
fc878bc8
Commit
fc878bc8
authored
Apr 20, 2017
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
build: fixed order
parent
2cb2c407
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
4 deletions
+12
-4
pkg/tsdb/mysql/macros.go
+1
-1
pkg/tsdb/mysql/macros_test.go
+9
-0
public/app/features/panel/panel_directive.ts
+0
-1
public/app/plugins/datasource/mysql/module.ts
+1
-1
tasks/default_task.js
+1
-1
No files found.
pkg/tsdb/mysql/macros.go
View file @
fc878bc8
...
...
@@ -9,7 +9,7 @@ import (
//const rsString = `(?:"([^"]*)")`;
const
rsIdentifier
=
`([_a-zA-Z0-9]+)`
const
sExpr
=
`\$`
+
rsIdentifier
+
`\((
.
*)\)`
const
sExpr
=
`\$`
+
rsIdentifier
+
`\((
[^\)]
*)\)`
type
SqlMacroEngine
interface
{
Interpolate
(
sql
string
)
(
string
,
error
)
...
...
pkg/tsdb/mysql/macros_test.go
View file @
fc878bc8
...
...
@@ -19,6 +19,15 @@ func TestMacroEngine(t *testing.T) {
So
(
sql
,
ShouldEqual
,
"select UNIX_TIMESTAMP(time_column) as time_sec"
)
})
Convey
(
"interpolate __time function wrapped in aggregation"
,
func
()
{
engine
:=
&
MySqlMacroEngine
{}
sql
,
err
:=
engine
.
Interpolate
(
"select min($__time(time_column))"
)
So
(
err
,
ShouldBeNil
)
So
(
sql
,
ShouldEqual
,
"select min(UNIX_TIMESTAMP(time_column)) as time_sec)"
)
})
Convey
(
"interpolate __timeFilter function"
,
func
()
{
engine
:=
&
MySqlMacroEngine
{
TimeRange
:
&
tsdb
.
TimeRange
{
From
:
"5m"
,
To
:
"now"
},
...
...
public/app/features/panel/panel_directive.ts
View file @
fc878bc8
...
...
@@ -144,7 +144,6 @@ module.directive('grafanaPanel', function($rootScope, $document) {
function
updatePanelCornerInfo
()
{
var
cornerMode
=
ctrl
.
getInfoMode
();
console
.
log
(
'update error'
,
cornerMode
);
cornerInfoElem
[
0
].
className
=
'panel-info-corner panel-info-corner--'
+
cornerMode
;
if
(
cornerMode
)
{
...
...
public/app/plugins/datasource/mysql/module.ts
View file @
fc878bc8
...
...
@@ -14,7 +14,7 @@ class MysqlQueryCtrl extends QueryCtrl {
super
(
$scope
,
$injector
);
this
.
target
.
resultFormat
=
'time_series'
;
this
.
target
.
alias
=
"
{{table}}{{col_3}}
"
;
this
.
target
.
alias
=
""
;
this
.
resultFormats
=
[
{
text
:
'Time series'
,
value
:
'time_series'
},
{
text
:
'Table'
,
value
:
'table'
},
...
...
tasks/default_task.js
View file @
fc878bc8
...
...
@@ -14,12 +14,12 @@ module.exports = function(grunt) {
);
grunt
.
registerTask
(
'default'
,
[
'clean:gen'
,
'jscs'
,
'jshint'
,
'copy:node_modules'
,
'copy:public_to_gen'
,
'exec:tslint'
,
'clean:gen'
,
'phantomjs'
,
'css'
,
'exec:tscompile'
...
...
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