mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Added revision constant for future use
This commit is contained in:
@@ -26,7 +26,8 @@ function (angular, $, _, appLevelRequire) {
|
|||||||
// features if we define them after boot time
|
// features if we define them after boot time
|
||||||
register_fns = {};
|
register_fns = {};
|
||||||
|
|
||||||
app.constant('version',"3.0.0pre5");
|
// This stores the Kibana revision number, @REV@ is replaced by grunt.
|
||||||
|
app.constant('kbnVersion',"@REV@");
|
||||||
|
|
||||||
// Use this for cache busting partials
|
// Use this for cache busting partials
|
||||||
app.constant('cacheBust',"cache-bust="+Date.now());
|
app.constant('cacheBust',"cache-bust="+Date.now());
|
||||||
|
|||||||
@@ -215,9 +215,13 @@ function (angular, $, kbn, _, config, moment, Modernizr) {
|
|||||||
self.set_interval(dashboard.refresh);
|
self.set_interval(dashboard.refresh);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Set the available panels for the "Add Panel" drop down
|
||||||
self.availablePanels = _.difference(config.panel_names,
|
self.availablePanels = _.difference(config.panel_names,
|
||||||
_.pluck(_.union(self.current.nav,self.current.pulldowns),'type'));
|
_.pluck(_.union(self.current.nav,self.current.pulldowns),'type'));
|
||||||
|
|
||||||
|
// Take out any that we're not allowed to add from the gui.
|
||||||
|
self.availablePanels = _.difference(self.availablePanels,config.hidden_panels);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -19,13 +19,19 @@ module.exports = function(grunt) {
|
|||||||
grunt.registerTask('build:write_revision', function() {
|
grunt.registerTask('build:write_revision', function() {
|
||||||
grunt.event.once('git-describe', function (desc) {
|
grunt.event.once('git-describe', function (desc) {
|
||||||
grunt.config('string-replace.config', {
|
grunt.config('string-replace.config', {
|
||||||
src: '<%= destDir %>/app/components/require.config.js',
|
files: {
|
||||||
dest: '<%= destDir %>/app/components/require.config.js',
|
'<%= destDir %>/app/components/require.config.js': '<%= destDir %>/app/components/require.config.js',
|
||||||
|
'<%= destDir %>/app/app.js': '<%= destDir %>/app/app.js'
|
||||||
|
},
|
||||||
options: {
|
options: {
|
||||||
replacements: [
|
replacements: [
|
||||||
{
|
{
|
||||||
pattern: /(?:^|\/\/)(.*)@REV@/,
|
pattern: /(?:^|\/\/)(.*)@REV@/,
|
||||||
replacement: '$1'+desc.object
|
replacement: '$1'+desc.object
|
||||||
|
},
|
||||||
|
{
|
||||||
|
pattern: /@REV@/,
|
||||||
|
replacement: desc.object
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -34,4 +40,4 @@ module.exports = function(grunt) {
|
|||||||
});
|
});
|
||||||
grunt.task.run('git-describe');
|
grunt.task.run('git-describe');
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
Reference in New Issue
Block a user