mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Added scratchy tasks and config.js docs
This commit is contained in:
parent
e73ea4823d
commit
22993c46a5
@ -8,6 +8,7 @@ module.exports = function (grunt) {
|
|||||||
srcDir: 'src',
|
srcDir: 'src',
|
||||||
destDir: 'dist',
|
destDir: 'dist',
|
||||||
tempDir: 'tmp',
|
tempDir: 'tmp',
|
||||||
|
docsDir: 'docs'
|
||||||
};
|
};
|
||||||
|
|
||||||
// load plugins
|
// load plugins
|
||||||
|
24
docs/configuration/config.js.asciidoc
Normal file
24
docs/configuration/config.js.asciidoc
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
= Config.js =
|
||||||
|
config.js is where you will find the core Kibana configuration. This file contains parameter that
|
||||||
|
must be set before kibana is run for the first time.
|
||||||
|
== Parameters ==
|
||||||
|
|
||||||
|
=== elasticsearch ===
|
||||||
|
|
||||||
|
The URL to your elasticsearch server. You almost certainly don't
|
||||||
|
want 'http://localhost:9200' here. Even if Kibana and Elasticsearch are on
|
||||||
|
the same host
|
||||||
|
|
||||||
|
By default this will attempt to reach ES at the same host you have
|
||||||
|
elasticsearch installed on. You probably want to set it to the FQDN of your
|
||||||
|
elasticsearch host
|
||||||
|
|
||||||
|
=== kibana-int ===
|
||||||
|
|
||||||
|
The default ES index to use for storing Kibana specific object
|
||||||
|
such as stored dashboards
|
||||||
|
|
||||||
|
=== panel_name ===
|
||||||
|
|
||||||
|
An array of panel modules available. Panels will only be loaded when they are defined in the
|
||||||
|
dashboard, but this list is used in the "add panel" interface.
|
@ -29,7 +29,8 @@
|
|||||||
"grunt-contrib-uglify": "~0.2.4",
|
"grunt-contrib-uglify": "~0.2.4",
|
||||||
"load-grunt-tasks": "~0.2.0",
|
"load-grunt-tasks": "~0.2.0",
|
||||||
"glob": "~3.2.7",
|
"glob": "~3.2.7",
|
||||||
"grunt-contrib-connect": "~0.5.0"
|
"grunt-contrib-connect": "~0.5.0",
|
||||||
|
"grunt-scratchy": "git://github.com/rashidkpc/grunt-scratchy.git"
|
||||||
},
|
},
|
||||||
"license": "Apache License"
|
"license": "Apache License"
|
||||||
}
|
}
|
||||||
|
@ -1,36 +1,46 @@
|
|||||||
/**
|
/** @scratch /configuration/config.js/1
|
||||||
* These is the app's configuration, If you need to configure
|
* = Config.js =
|
||||||
* the default dashboard, please see dashboards/default
|
* config.js is where you will find the core Kibana configuration. This file contains parameter that
|
||||||
|
* must be set before kibana is run for the first time.
|
||||||
*/
|
*/
|
||||||
define(['settings'],
|
define(['settings'],
|
||||||
function (Settings) {
|
function (Settings) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
|
/** @scratch /configuration/config.js/2
|
||||||
|
* == Parameters ==
|
||||||
|
*/
|
||||||
return new Settings({
|
return new Settings({
|
||||||
|
|
||||||
/**
|
/** @scratch /configuration/config.js/5
|
||||||
* URL to your elasticsearch server. You almost certainly don't
|
*
|
||||||
* want 'http://localhost:9200' here. Even if Kibana and ES are on
|
* === elasticsearch ===
|
||||||
|
*
|
||||||
|
* The URL to your elasticsearch server. You almost certainly don't
|
||||||
|
* want 'http://localhost:9200' here. Even if Kibana and Elasticsearch are on
|
||||||
* the same host
|
* the same host
|
||||||
*
|
*
|
||||||
* By default this will attempt to reach ES at the same host you have
|
* By default this will attempt to reach ES at the same host you have
|
||||||
* elasticsearch installed on. You probably want to set it to the FQDN of your
|
* elasticsearch installed on. You probably want to set it to the FQDN of your
|
||||||
* elasticsearch host
|
* elasticsearch host
|
||||||
* @type {String}
|
|
||||||
*/
|
*/
|
||||||
elasticsearch: "http://"+window.location.hostname+":9200",
|
elasticsearch: "http://"+window.location.hostname+":9200",
|
||||||
|
|
||||||
/**
|
/** @scratch /configuration/config.js/5
|
||||||
|
*
|
||||||
|
* === kibana-int ===
|
||||||
|
*
|
||||||
* The default ES index to use for storing Kibana specific object
|
* The default ES index to use for storing Kibana specific object
|
||||||
* such as stored dashboards
|
* such as stored dashboards
|
||||||
* @type {String}
|
|
||||||
*/
|
*/
|
||||||
kibana_index: "kibana-int",
|
kibana_index: "kibana-int",
|
||||||
|
|
||||||
/**
|
/** @scratch /configuration/config.js/5
|
||||||
* Panel modules available. Panels will only be loaded when they are defined in the
|
*
|
||||||
|
* === panel_name ===
|
||||||
|
*
|
||||||
|
* An array of panel modules available. Panels will only be loaded when they are defined in the
|
||||||
* dashboard, but this list is used in the "add panel" interface.
|
* dashboard, but this list is used in the "add panel" interface.
|
||||||
* @type {Array}
|
|
||||||
*/
|
*/
|
||||||
panel_names: [
|
panel_names: [
|
||||||
'histogram',
|
'histogram',
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Lint and build CSS
|
// Lint and build CSS
|
||||||
module.exports = function(grunt) {
|
module.exports = function(grunt) {
|
||||||
grunt.registerTask('default', ['jshint:source', 'less:src']);
|
grunt.registerTask('default', ['jshint:source', 'less:src', 'docs']);
|
||||||
};
|
};
|
4
tasks/docs_task.js
Normal file
4
tasks/docs_task.js
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
// Lint and build CSS
|
||||||
|
module.exports = function(grunt) {
|
||||||
|
grunt.registerTask('docs', ['clean:docs', 'scratchy:docs']);
|
||||||
|
};
|
@ -2,5 +2,6 @@ module.exports = function(config) {
|
|||||||
return {
|
return {
|
||||||
on_start: ['<%= destDir %>', '<%= tempDir %>'],
|
on_start: ['<%= destDir %>', '<%= tempDir %>'],
|
||||||
temp: ['<%= tempDir %>'],
|
temp: ['<%= tempDir %>'],
|
||||||
|
docs: ['<%= docsDir %>']
|
||||||
};
|
};
|
||||||
};
|
};
|
12
tasks/options/scratchy.js
Normal file
12
tasks/options/scratchy.js
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
module.exports = function(config) {
|
||||||
|
return {
|
||||||
|
docs: {
|
||||||
|
src: ['src/app/**/*.js','src/config.js'],
|
||||||
|
dest: config.docsDir,
|
||||||
|
options: {
|
||||||
|
unslash: true,
|
||||||
|
extension: '.asciidoc'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
Loading…
Reference in New Issue
Block a user