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
e2fc334b
Commit
e2fc334b
authored
Mar 13, 2013
by
Rashid Khan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
moved default dashboard, turned spy on by default, added file loader
parent
2cf20f8c
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
22 additions
and
13 deletions
+22
-13
dashboards/default
+0
-0
panels/dashcontrol/module.js
+17
-11
panels/dashcontrol/save.html
+2
-2
panels/histogram/module.js
+1
-0
panels/map/module.js
+1
-0
panels/table/module.js
+1
-0
No files found.
d
efault.json
→
d
ashboards/default
View file @
e2fc334b
File moved
panels/dashcontrol/module.js
View file @
e2fc334b
...
@@ -23,7 +23,6 @@ angular.module('kibana.dashcontrol', [])
...
@@ -23,7 +23,6 @@ angular.module('kibana.dashcontrol', [])
}
}
_
.
defaults
(
$scope
.
panel
,
_d
);
_
.
defaults
(
$scope
.
panel
,
_d
);
$scope
.
init
=
function
()
{
// A hash of defaults for the dashboard object
// A hash of defaults for the dashboard object
var
_dash
=
{
var
_dash
=
{
title
:
""
,
title
:
""
,
...
@@ -31,6 +30,7 @@ angular.module('kibana.dashcontrol', [])
...
@@ -31,6 +30,7 @@ angular.module('kibana.dashcontrol', [])
rows
:
[],
rows
:
[],
}
}
$scope
.
init
=
function
()
{
// Long ugly if statement for figuring out which dashboard to load on init
// Long ugly if statement for figuring out which dashboard to load on init
// If there is no dashboard defined, find one
// If there is no dashboard defined, find one
if
(
_
.
isUndefined
(
$scope
.
dashboards
))
{
if
(
_
.
isUndefined
(
$scope
.
dashboards
))
{
...
@@ -43,6 +43,8 @@ angular.module('kibana.dashcontrol', [])
...
@@ -43,6 +43,8 @@ angular.module('kibana.dashcontrol', [])
$scope
.
elasticsearch_load
(
'dashboard'
,
_id
)
$scope
.
elasticsearch_load
(
'dashboard'
,
_id
)
if
(
_type
===
'temp'
)
if
(
_type
===
'temp'
)
$scope
.
elasticsearch_load
(
'temp'
,
_id
)
$scope
.
elasticsearch_load
(
'temp'
,
_id
)
if
(
_type
===
'file'
)
$scope
.
file_load
(
_id
)
// No dashboard in the URL
// No dashboard in the URL
}
else
{
}
else
{
...
@@ -56,16 +58,7 @@ angular.module('kibana.dashcontrol', [])
...
@@ -56,16 +58,7 @@ angular.module('kibana.dashcontrol', [])
$scope
.
dash_load
(
JSON
.
stringify
(
dashboard
))
$scope
.
dash_load
(
JSON
.
stringify
(
dashboard
))
// No? Ok, grab default.json, its all we have now
// No? Ok, grab default.json, its all we have now
}
else
{
}
else
{
$http
({
$scope
.
file_load
(
'default'
)
url
:
"default.json"
,
method
:
"GET"
,
}).
success
(
function
(
data
,
status
,
headers
,
config
)
{
var
dashboard
=
data
_
.
defaults
(
dashboard
,
_dash
);
$scope
.
dash_load
(
JSON
.
stringify
(
dashboard
))
}).
error
(
function
(
data
,
status
,
headers
,
config
)
{
$scope
.
alert
(
'Default dashboard missing!'
,
'Could not locate default.json'
,
'error'
)
});
}
}
}
}
...
@@ -117,6 +110,19 @@ angular.module('kibana.dashcontrol', [])
...
@@ -117,6 +110,19 @@ angular.module('kibana.dashcontrol', [])
}
}
}
}
$scope
.
file_load
=
function
(
file
)
{
$http
({
url
:
"dashboards/default"
,
method
:
"GET"
,
}).
success
(
function
(
data
,
status
,
headers
,
config
)
{
var
dashboard
=
data
_
.
defaults
(
dashboard
,
_dash
);
$scope
.
dash_load
(
JSON
.
stringify
(
dashboard
))
}).
error
(
function
(
data
,
status
,
headers
,
config
)
{
$scope
.
alert
(
'Default dashboard missing!'
,
'Could not locate dashboards/'
+
file
,
'error'
)
});
}
$scope
.
elasticsearch_save
=
function
(
type
)
{
$scope
.
elasticsearch_save
=
function
(
type
)
{
// Clone object so we can modify it without influencing the existing obejct
// Clone object so we can modify it without influencing the existing obejct
if
(
$scope
.
panel
.
hide_control
)
{
if
(
$scope
.
panel
.
hide_control
)
{
...
...
panels/dashcontrol/save.html
View file @
e2fc334b
...
@@ -7,8 +7,8 @@
...
@@ -7,8 +7,8 @@
<form>
<form>
<ul
class=
"nav nav-list"
>
<ul
class=
"nav nav-list"
>
<li><a
ng-show=
"panel.save.local"
ng-click=
"export()"
><i
class=
"icon-download"
></i>
Export to File
</a></li>
<li><a
ng-show=
"panel.save.local"
ng-click=
"export()"
><i
class=
"icon-download"
></i>
Export to File
</a></li>
<li><a
ng-show=
"panel.save.default"
ng-click=
"default()"
><i
class=
"icon-bookmark"
></i>
Set as Default
</a></li>
<li><a
ng-show=
"panel.save.default"
ng-click=
"default()"
><i
class=
"icon-bookmark"
></i>
Set as
My
Default
</a></li>
<li><a
ng-show=
"panel.save.default"
ng-click=
"purge()"
><i
class=
"icon-ban-circle"
></i>
Clear Default
</a></li>
<li><a
ng-show=
"panel.save.default"
ng-click=
"purge()"
><i
class=
"icon-ban-circle"
></i>
Clear
My
Default
</a></li>
</ul>
</ul>
</form>
</form>
</div>
</div>
...
...
panels/histogram/module.js
View file @
e2fc334b
...
@@ -8,6 +8,7 @@ angular.module('kibana.histogram', [])
...
@@ -8,6 +8,7 @@ angular.module('kibana.histogram', [])
show
:
[
'bars'
,
'y-axis'
,
'x-axis'
,
'legend'
],
show
:
[
'bars'
,
'y-axis'
,
'x-axis'
,
'legend'
],
fill
:
3
,
fill
:
3
,
timezone
:
'browser'
,
// browser, utc or a standard timezone
timezone
:
'browser'
,
// browser, utc or a standard timezone
spyable
:
true
,
group
:
"default"
,
group
:
"default"
,
}
}
_
.
defaults
(
$scope
.
panel
,
_d
)
_
.
defaults
(
$scope
.
panel
,
_d
)
...
...
panels/map/module.js
View file @
e2fc334b
...
@@ -8,6 +8,7 @@ angular.module('kibana.map', [])
...
@@ -8,6 +8,7 @@ angular.module('kibana.map', [])
colors
:
[
'#C8EEFF'
,
'#0071A4'
],
colors
:
[
'#C8EEFF'
,
'#0071A4'
],
size
:
100
,
size
:
100
,
exclude
:
[],
exclude
:
[],
spyable
:
true
,
group
:
"default"
,
group
:
"default"
,
}
}
_
.
defaults
(
$scope
.
panel
,
_d
)
_
.
defaults
(
$scope
.
panel
,
_d
)
...
...
panels/table/module.js
View file @
e2fc334b
...
@@ -10,6 +10,7 @@ angular.module('kibana.table', [])
...
@@ -10,6 +10,7 @@ angular.module('kibana.table', [])
group
:
"default"
,
group
:
"default"
,
style
:
{},
style
:
{},
fields
:
[],
fields
:
[],
spyable
:
true
,
}
}
_
.
defaults
(
$scope
.
panel
,
_d
)
_
.
defaults
(
$scope
.
panel
,
_d
)
...
...
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