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
65558294
Commit
65558294
authored
May 23, 2013
by
Rashid Khan
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #109 from rashidkpc/master
Fixes for trend panel
parents
0dd0cfeb
eb965c4c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
46 additions
and
47 deletions
+46
-47
index.html
+41
-40
panels/trends/editor.html
+1
-4
panels/trends/module.js
+4
-3
No files found.
index.html
View file @
65558294
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en" id="ng-app"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang="en" id="ng-app"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9" lang="en"> <![endif]-->
<!--[if gt IE 8]><!-->
<html
class=
"no-js"
lang=
"en"
>
<!--<![endif]-->
<head>
<meta
charset=
"utf-8"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge,chrome=1"
>
<meta
name=
"description"
content=
"Search based application built using ElasticSearch, elastic.js, and Angular.js"
>
<meta
name=
"viewport"
content=
"width=device-width"
>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en" id="ng-app"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang="en" id="ng-app"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9" lang="en"> <![endif]-->
<!--[if gt IE 8]><!-->
<html
class=
"no-js"
lang=
"en"
>
<!--<![endif]-->
<head>
<meta
charset=
"utf-8"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge,chrome=1"
>
<meta
name=
"description"
content=
"Search based application built using ElasticSearch, elastic.js, and Angular.js"
>
<meta
name=
"viewport"
content=
"width=device-width"
>
<title>
Kibana 3
</title>
<title>
Kibana 3
</title>
<link
rel=
"stylesheet"
href=
"common/css/normalize.min.css"
>
<link
rel=
"stylesheet"
href=
"common/css/bootstrap.dark.min.css"
>
<link
rel=
"stylesheet"
href=
"common/css/animate.min.css"
>
<link
rel=
"stylesheet"
href=
"common/css/bootstrap-responsive.min.css"
>
<link
rel=
"stylesheet"
href=
"common/css/font-awesome.min.css"
>
<link
rel=
"stylesheet"
href=
"common/css/main.css"
>
<link
rel=
"stylesheet"
href=
"common/css/elasticjs.css"
>
<link
rel=
"stylesheet"
href=
"common/css/timepicker.css"
>
<link
rel=
"stylesheet"
href=
"common/css/normalize.min.css"
>
<link
rel=
"stylesheet"
href=
"common/css/bootstrap.dark.min.css"
>
<link
rel=
"stylesheet"
href=
"common/css/animate.min.css"
>
<link
rel=
"stylesheet"
href=
"common/css/bootstrap-responsive.min.css"
>
<link
rel=
"stylesheet"
href=
"common/css/font-awesome.min.css"
>
<link
rel=
"stylesheet"
href=
"common/css/main.css"
>
<link
rel=
"stylesheet"
href=
"common/css/elasticjs.css"
>
<link
rel=
"stylesheet"
href=
"common/css/timepicker.css"
>
</head>
<body
ng-controller=
"DashCtrl"
ng-cloak
>
<div
ng-repeat=
'alert in global_alert'
class=
"alert alert-{{alert.severity}} span12"
style=
"position: fixed;top:2px;opacity:0.9;z-index:8000"
>
<button
type=
"button"
class=
"close"
ng-click=
"clear_alert(alert)"
>
×
</button>
<strong>
{{alert.title}}
</strong>
<span
ng-bind-html-unsafe=
'alert.text'
></span>
<div
class=
'pull-right small'
>
{{$index + 1}} alert(s)
</div>
</div>
<div
class=
"navbar navbar-static-top"
>
<div
class=
"navbar-inner"
>
<div
class=
"container-fluid"
>
<p
class=
"navbar-text pull-right"
><small><strong>
Kibana 3
</strong>
<small>
milestone 2
</small></small></p>
<span
class=
"brand"
>
{{dashboards.title}}
</span>
<div
class=
"brand"
><i
class=
'icon-edit pointer'
ng-show=
'dashboards.editable'
bs-modal=
"'partials/dasheditor.html'"
></i></div>
</div>
</div>
</div>
<div
class=
"container-fluid main"
>
<div
class=
"row-fluid"
>
<div
ng-view
></div>
</div>
</div>
</body>
<!-- project dependency libs -->
<script
src=
"common/lib/LAB.min.js"
></script>
...
...
@@ -27,26 +50,4 @@
<script
src=
"config.js"
></script>
<script
src=
"js/app.js"
></script>
</head>
<body
ng-controller=
"DashCtrl"
ng-cloak
>
<div
ng-repeat=
'alert in global_alert'
class=
"alert alert-{{alert.severity}} span12"
style=
"position: fixed;top:2px;opacity:0.9;z-index:8000"
>
<button
type=
"button"
class=
"close"
ng-click=
"clear_alert(alert)"
>
×
</button>
<strong>
{{alert.title}}
</strong>
<span
ng-bind-html-unsafe=
'alert.text'
></span>
<div
class=
'pull-right small'
>
{{$index + 1}} alert(s)
</div>
</div>
<div
class=
"navbar navbar-static-top"
>
<div
class=
"navbar-inner"
>
<div
class=
"container-fluid"
>
<p
class=
"navbar-text pull-right"
><small><strong>
Kibana 3
</strong>
<small>
milestone 2
</small></small></p>
<span
class=
"brand"
>
{{dashboards.title}}
</span>
<div
class=
"brand"
><i
class=
'icon-edit pointer'
ng-show=
'dashboards.editable'
bs-modal=
"'partials/dasheditor.html'"
></i></div>
</div>
</div>
</div>
<div
class=
"container-fluid main"
>
<div
class=
"row-fluid"
>
<div
ng-view
></div>
</div>
</div>
</body>
</html>
panels/trends/editor.html
View file @
65558294
...
...
@@ -15,7 +15,7 @@
</div>
<div
class=
"span3"
>
<label
class=
"small"
>
Time Ago
</label>
<input
type=
"text"
class=
"input-small"
ng-model=
"panel.ago"
>
<input
type=
"text"
class=
"input-small"
ng-model=
"panel.ago"
ng-change=
"set_refresh(true)"
>
</div>
<div
class=
"span2"
>
<label
class=
"small"
>
Font Size
</label>
...
...
@@ -52,10 +52,7 @@
</form>
</div>
<div
class=
"span8"
>
<form
class=
"input-append"
style=
"margin-bottom: 0px"
>
<input
type=
"text"
style=
"width:80%"
ng-model=
"q.query"
ng-change=
"set_refresh(true)"
>
<button
class=
"btn"
ng-click=
"get_data()"
><i
class=
"icon-search"
></i></button>
</form>
</div>
<div
class=
"span1"
>
<i
class=
"icon-remove pointer"
ng-click=
"remove_query(q)"
></i>
...
...
panels/trends/module.js
View file @
65558294
...
...
@@ -147,7 +147,8 @@ angular.module('kibana.trends', [])
$scope
.
hits
.
new
+=
n
;
$scope
.
hits
.
old
+=
o
;
var
percent
=
Math
.
round
(
percentage
(
hits
.
old
,
hits
.
new
)
*
100
)
/
100
var
percent
=
percentage
(
hits
.
old
,
hits
.
new
)
==
null
?
'?'
:
Math
.
round
(
percentage
(
hits
.
old
,
hits
.
new
)
*
100
)
/
100
// Create series
$scope
.
data
[
i
]
=
{
label
:
$scope
.
panel
.
query
[
i
].
label
||
"query"
+
(
parseInt
(
i
)
+
1
),
...
...
@@ -155,7 +156,7 @@ angular.module('kibana.trends', [])
new
:
hits
.
new
,
old
:
hits
.
old
},
percent
:
_
.
isNull
(
percent
)
?
0
:
percent
percent
:
percent
};
i
++
;
...
...
@@ -171,7 +172,7 @@ angular.module('kibana.trends', [])
}
function
percentage
(
x
,
y
)
{
return
100
*
(
y
-
x
)
/
x
return
x
==
0
?
null
:
100
*
(
y
-
x
)
/
x
}
$scope
.
remove_query
=
function
(
q
)
{
...
...
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