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
4b322470
Commit
4b322470
authored
Mar 13, 2015
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed asset revving issue with css files
parent
ab307ec7
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
46 additions
and
168 deletions
+46
-168
Gruntfile.js
+0
-1
src/app/components/config.js
+1
-1
src/config.sample.js
+0
-105
src/index.html
+0
-51
src/test/test-main.js
+1
-1
src/views/index.html
+1
-1
tasks/build_task.js
+20
-0
tasks/options/clean.js
+2
-4
tasks/options/usemin.js
+21
-3
tasks/options/useminPrepare.js
+0
-1
No files found.
Gruntfile.js
View file @
4b322470
...
...
@@ -8,7 +8,6 @@ module.exports = function (grunt) {
srcDir
:
'src'
,
destDir
:
'dist'
,
tempDir
:
'tmp'
,
docsDir
:
'docs/'
,
arch
:
grunt
.
option
(
'arch'
)
||
'x86_64'
,
};
...
...
src/app/components/config.js
View file @
4b322470
...
...
@@ -4,7 +4,7 @@ define([
function
(
Settings
)
{
"use strict"
;
var
bootData
=
window
.
grafanaBootData
;
var
bootData
=
window
.
grafanaBootData
||
{
settings
:
{}
}
;
var
options
=
bootData
.
settings
;
return
new
Settings
(
options
);
...
...
src/config.sample.js
deleted
100644 → 0
View file @
ab307ec7
// == Configuration
// config.js is where you will find the core Grafana configuration. This file contains parameter that
// must be set before Grafana is run for the first time.
define
([
'settings'
],
function
(
Settings
)
{
"use strict"
;
return
new
Settings
({
/* Data sources
* ========================================================
* Datasources are used to fetch metrics, annotations, and serve as dashboard storage
* - You can have multiple of the same type.
* - grafanaDB: true marks it for use for dashboard storage
* - default: true marks the datasource as the default metric source (if you have multiple)
* - basic authentication: use url syntax http://username:password@domain:port
*/
// InfluxDB example setup (the InfluxDB databases specified need to exist)
/*
datasources: {
influxdb: {
type: 'influxdb',
url: "http://my_influxdb_server:8086/db/database_name",
username: 'admin',
password: 'admin',
},
grafana: {
type: 'influxdb',
url: "http://my_influxdb_server:8086/db/grafana",
username: 'admin',
password: 'admin',
grafanaDB: true
},
},
*/
// Graphite & Elasticsearch example setup
/*
datasources: {
graphite: {
type: 'graphite',
url: "http://my.graphite.server.com:8080",
},
elasticsearch: {
type: 'elasticsearch',
url: "http://my.elastic.server.com:9200",
index: 'grafana-dash',
grafanaDB: true,
}
},
*/
// OpenTSDB & Elasticsearch example setup
/*
datasources: {
opentsdb: {
type: 'opentsdb',
url: "http://opentsdb.server:4242",
},
elasticsearch: {
type: 'elasticsearch',
url: "http://my.elastic.server.com:9200",
index: 'grafana-dash',
grafanaDB: true,
}
},
*/
/* Global configuration options
* ========================================================
*/
// specify the limit for dashboard search results
search
:
{
max_results
:
100
},
// default home dashboard
default_route
:
'dashboard/file/default.json'
,
// set to false to disable unsaved changes warning
unsaved_changes_warning
:
true
,
// set the default timespan for the playlist feature
// Example: "1m", "1h"
playlist_timespan
:
"1m"
,
// Change window title prefix from 'Grafana - <dashboard title>'
window_title_prefix
:
'Grafana - '
,
// Add your own custom panels
plugins
:
{
// list of plugin panels
panels
:
[],
// requirejs modules in plugins folder that should be loaded
// for example custom datasources
dependencies
:
[],
}
});
});
src/index.html
deleted
100644 → 0
View file @
ab307ec7
<!DOCTYPE html>
<!--[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=
"viewport"
content=
"width=device-width"
>
<meta
name=
"google"
value=
"notranslate"
>
<title>
Grafana
</title>
<link
rel=
"stylesheet"
href=
"css/grafana.dark.min.css"
title=
"Dark"
>
<link
rel=
"icon"
type=
"image/png"
href=
"img/fav32.png"
>
<!-- build:js app/app.js -->
<script
src=
"vendor/require/require.js"
></script>
<script
src=
"app/components/require.standalone.js"
></script>
<!-- endbuild -->
</head>
<body
ng-cloak
ng-controller=
"GrafanaCtrl"
>
<link
rel=
"stylesheet"
href=
"css/grafana.light.min.css"
ng-if=
"grafana.style === 'light'"
>
<div
class=
"page-alert-list"
>
<div
ng-repeat=
'alert in dashAlerts.list'
class=
"alert-{{alert.severity}} alert"
>
<button
type=
"button"
class=
"alert-close"
ng-click=
"dashAlerts.clear(alert)"
>
<i
class=
"fa fa-times-circle"
></i>
</button>
<div
class=
"alert-title"
>
{{alert.title}}
</div>
<div
ng-bind-html=
'alert.text'
></div>
</div>
</div>
<div
ng-view
></div>
</body>
<script>
window
.
grafanaBackend
=
false
;
window
.
grafanaBootData
=
{
user
:
{},
settings
:
{},
};
require
([
'app'
],
function
(
app
)
{
app
.
boot
();
})
</script>
</html>
src/test/test-main.js
View file @
4b322470
...
...
@@ -5,7 +5,7 @@ require.config({
specs
:
'../test/specs'
,
mocks
:
'../test/mocks'
,
helpers
:
'../test/specs/helpers'
,
config
:
[
'../config'
,
'../config.sample'
]
,
config
:
'components/config'
,
kbn
:
'components/kbn'
,
store
:
'components/store'
,
...
...
src/views/index.html
View file @
4b322470
...
...
@@ -20,7 +20,7 @@
window
.
grafanaBackend
=
true
;
</script>
<!-- build:js app/app.js -->
<!-- build:js
[[.AppSubUrl]]/
app/app.js -->
<script
src=
"[[.AppSubUrl]]/public/vendor/require/require.js"
></script>
<script
src=
"[[.AppSubUrl]]/public/app/components/require.config.js"
></script>
<!-- endbuild -->
...
...
tasks/build_task.js
View file @
4b322470
...
...
@@ -19,11 +19,31 @@ module.exports = function(grunt) {
'requirejs:build'
,
'concat:js'
,
'filerev'
,
'remapFilerev'
,
'usemin'
,
'clean:temp'
,
'uglify:dest'
]);
// task to add [[.AppSubUrl]] to reved path
grunt
.
registerTask
(
'remapFilerev'
,
function
(){
var
root
=
grunt
.
config
().
destDir
;
var
summary
=
grunt
.
filerev
.
summary
;
var
fixed
=
{};
for
(
var
key
in
summary
){
if
(
summary
.
hasOwnProperty
(
key
)){
var
orig
=
key
.
replace
(
root
,
root
+
'/[[.AppSubUrl]]'
);
var
revved
=
summary
[
key
].
replace
(
root
,
root
+
'/[[.AppSubUrl]]'
);
fixed
[
orig
]
=
revved
;
}
}
grunt
.
filerev
.
summary
=
fixed
;
});
grunt
.
registerTask
(
'build-post-process'
,
function
()
{
grunt
.
config
(
'copy.dist_to_tmp'
,
{
expand
:
true
,
...
...
tasks/options/clean.js
View file @
4b322470
module
.
exports
=
function
(
config
)
{
return
{
on_start
:
[
'<%= destDir %>'
,
'<%= tempDir %>'
],
temp
:
[
'<%= tempDir %>'
],
docs
:
[
'<%= docsDir %>'
]
temp
:
[
'<%= tempDir %>'
]
};
};
\ No newline at end of file
};
tasks/options/usemin.js
View file @
4b322470
module
.
exports
=
function
(
config
)
{
module
.
exports
=
function
()
{
'use strict'
;
return
{
html
:
[
'<%= destDir %>/views/index.html'
,
'<%= destDir %>/index.html'
,
],
options
:
{
assetsDirs
:
[
'<%= destDir %>'
]
assetsDirs
:
[
'<%= destDir %>'
],
patterns
:
{
css
:
[
[
/
(\.
css
)
/
,
'Replacing reference to image.png'
]
]
}
// blockReplacements: {
// css: function (block) {
// console.log('aaaaaaaaaaaaa', block);
// return '<link rel="stylesheet" href="aaaa' + block.dest + '">';
// }
// }
// css: [
// [/(grafana\.light\.min\.css)/, 'Replacing reference to light css', function(asd) {
// console.log("Match", asd);
// return 'css/grafana.light.min.css';
// }]
// ]
}
};
};
tasks/options/useminPrepare.js
View file @
4b322470
...
...
@@ -2,7 +2,6 @@ module.exports = function(config) {
return
{
html
:
[
'tmp/index.html'
,
'tmp/views/index.html'
,
]
};
};
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