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
04565d49
Unverified
Commit
04565d49
authored
Nov 02, 2020
by
Hugo Häggmark
Committed by
GitHub
Nov 02, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Templating: Speeds up certain variable queries for Postgres, MySql and MSSql (#28686)
parent
5b1dbe0b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
15 deletions
+12
-15
public/app/plugins/datasource/mssql/response_parser.ts
+4
-5
public/app/plugins/datasource/mysql/response_parser.ts
+4
-5
public/app/plugins/datasource/postgres/response_parser.ts
+4
-5
No files found.
public/app/plugins/datasource/mssql/response_parser.ts
View file @
04565d49
...
@@ -69,14 +69,13 @@ export default class ResponseParser {
...
@@ -69,14 +69,13 @@ export default class ResponseParser {
for
(
let
i
=
0
;
i
<
rows
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
rows
.
length
;
i
++
)
{
for
(
let
j
=
0
;
j
<
rows
[
i
].
length
;
j
++
)
{
for
(
let
j
=
0
;
j
<
rows
[
i
].
length
;
j
++
)
{
const
value
=
rows
[
i
][
j
];
res
.
push
(
rows
[
i
][
j
]);
if
(
res
.
indexOf
(
value
)
===
-
1
)
{
res
.
push
(
value
);
}
}
}
}
}
return
_
.
map
(
res
,
value
=>
{
const
unique
=
Array
.
from
(
new
Set
(
res
));
return
_
.
map
(
unique
,
value
=>
{
return
{
text
:
value
};
return
{
text
:
value
};
});
});
}
}
...
...
public/app/plugins/datasource/mysql/response_parser.ts
View file @
04565d49
...
@@ -90,14 +90,13 @@ export default class ResponseParser {
...
@@ -90,14 +90,13 @@ export default class ResponseParser {
for
(
let
i
=
0
;
i
<
rows
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
rows
.
length
;
i
++
)
{
for
(
let
j
=
0
;
j
<
rows
[
i
].
length
;
j
++
)
{
for
(
let
j
=
0
;
j
<
rows
[
i
].
length
;
j
++
)
{
const
value
=
rows
[
i
][
j
];
res
.
push
(
rows
[
i
][
j
]);
if
(
res
.
indexOf
(
value
)
===
-
1
)
{
res
.
push
(
value
);
}
}
}
}
}
return
_
.
map
(
res
,
value
=>
{
const
unique
=
Array
.
from
(
new
Set
(
res
));
return
_
.
map
(
unique
,
value
=>
{
return
{
text
:
value
};
return
{
text
:
value
};
});
});
}
}
...
...
public/app/plugins/datasource/postgres/response_parser.ts
View file @
04565d49
...
@@ -72,14 +72,13 @@ export default class ResponseParser {
...
@@ -72,14 +72,13 @@ export default class ResponseParser {
for
(
let
i
=
0
;
i
<
rows
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
rows
.
length
;
i
++
)
{
for
(
let
j
=
0
;
j
<
rows
[
i
].
length
;
j
++
)
{
for
(
let
j
=
0
;
j
<
rows
[
i
].
length
;
j
++
)
{
const
value
=
rows
[
i
][
j
];
res
.
push
(
rows
[
i
][
j
]);
if
(
res
.
indexOf
(
value
)
===
-
1
)
{
res
.
push
(
value
);
}
}
}
}
}
return
_
.
map
(
res
,
value
=>
{
const
unique
=
Array
.
from
(
new
Set
(
res
));
return
_
.
map
(
unique
,
value
=>
{
return
{
text
:
value
};
return
{
text
:
value
};
});
});
}
}
...
...
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