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
a8673a2e
Commit
a8673a2e
authored
May 20, 2017
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: metrics tab
parent
4a2c405a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
11 deletions
+24
-11
public/app/features/panel/partials/metrics_tab.html
+1
-1
public/app/features/panel/query_troubleshooter.ts
+13
-2
public/sass/components/_collapse_box.scss
+10
-8
No files found.
public/app/features/panel/partials/metrics_tab.html
View file @
a8673a2e
...
...
@@ -27,7 +27,7 @@
<query-troubleshooter
panel-ctrl=
"ctrl.panelCtrl"
></query-troubleshooter>
<collapse-box
title=
"Data Source
Options
"
>
<collapse-box
title=
"Data Source
: {{ctrl.dsSegment.value}}
"
>
<collapse-box-body>
<div
class=
"gf-form-group"
>
...
...
public/app/features/panel/query_troubleshooter.ts
View file @
a8673a2e
...
...
@@ -17,6 +17,7 @@ const template = `
<a class="pointer" clipboard-button="ctrl.getClipboardText()"><i class="fa fa-clipboard"></i> Copy to Clipboard</a>
</collapse-box-actions>
<collapse-box-body>
<i class="fa fa-spinner fa-spin" ng-show="ctrl.isLoading"></i>
<div class="query-troubleshooter-json"></div>
</collapse-box-body>
</collapse-box>
...
...
@@ -24,6 +25,7 @@ const template = `
export
class
QueryTroubleshooterCtrl
{
isOpen
:
any
;
isLoading
:
boolean
;
showResponse
:
boolean
;
panelCtrl
:
any
;
renderJsonExplorer
:
(
data
)
=>
void
;
...
...
@@ -57,8 +59,7 @@ export class QueryTroubleshooterCtrl {
if
(
this
.
isOpen
)
{
appEvents
.
on
(
'ds-request-response'
,
this
.
onRequestResponseEventListener
);
this
.
panelCtrl
.
refresh
();
}
else
{
this
.
hasError
=
false
;
this
.
isLoading
=
true
;
}
}
...
...
@@ -69,6 +70,7 @@ export class QueryTroubleshooterCtrl {
}
onRequestResponse
(
data
)
{
this
.
isLoading
=
false
;
data
=
_
.
cloneDeep
(
data
);
if
(
data
.
headers
)
{
...
...
@@ -92,6 +94,15 @@ export class QueryTroubleshooterCtrl {
if
(
data
.
data
)
{
data
.
response
=
data
.
data
;
if
(
data
.
status
===
200
)
{
// if we are in error state, assume we automatically opened
// and auto close it again
if
(
this
.
hasError
)
{
this
.
hasError
=
false
;
this
.
isOpen
=
false
;
}
}
delete
data
.
data
;
delete
data
.
status
;
delete
data
.
statusText
;
...
...
public/sass/components/_collapse_box.scss
View file @
a8673a2e
.collapse-box
{
margin-bottom
:
$spacer
;
&
--error
{
.collapse-box__header
{
border-color
:
$collapse-box-body-error-border
;
}
.collapse-box__body
{
border-color
:
$collapse-box-body-error-border
;
}
}
}
.collapse-box__header
{
...
...
@@ -12,10 +22,6 @@
margin-right
:
$gf-form-margin
;
border
:
$input-btn-border-width
solid
$collapse-box-body-border
;
@include
border-radius
(
$label-border-radius-sm
);
&
--error
{
border-color
:
$collapse-box-body-error-border
;
}
}
.collapse-box__header-title
{
...
...
@@ -29,10 +35,6 @@
border
:
$input-btn-border-width
solid
$collapse-box-body-border
;
border-top
:
none
;
@include
border-radius
(
$label-border-radius-sm
);
&
--error
{
border-color
:
$collapse-box-body-error-border
;
}
}
.collapse-box__header-actions
{
...
...
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