mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-10 16:05:49 +01:00
Plugin metrics (#7626)
* feat: add enable/disable checkbox for plugin usage * feat: submit plugin data to packages.nodebb.org only submit in production mode submit once every 24 hours dont submit for plugins that have "private": true in plugin.json enabled on new installs disabled on existing installs * fix: hash not working after first send fix statusCode * fix: remove url * feat: show compatibilty * feat: add install question for submit plugin usage
This commit is contained in:
committed by
GitHub
parent
3f4f8aface
commit
5fa5e999f8
@@ -28,6 +28,11 @@ questions.main = [
|
||||
description: 'Please enter a NodeBB secret',
|
||||
default: nconf.get('secret') || utils.generateUUID(),
|
||||
},
|
||||
{
|
||||
name: 'submitPluginUsage',
|
||||
description: 'Would you like to submit anonymous plugin usage to nbbpm?',
|
||||
default: 'yes',
|
||||
},
|
||||
{
|
||||
name: 'database',
|
||||
description: 'Which database to use',
|
||||
@@ -198,6 +203,14 @@ function completeConfigSetup(config, next) {
|
||||
// ref: https://github.com/indexzero/nconf/issues/300
|
||||
delete config.type;
|
||||
|
||||
var meta = require('./meta');
|
||||
meta.configs.set('submitPluginUsage', config.submitPluginUsage === 'yes' ? 1 : 0, function (err) {
|
||||
next(err, config);
|
||||
});
|
||||
},
|
||||
function (config, next) {
|
||||
delete config.submitPluginUsage;
|
||||
|
||||
install.save(config, next);
|
||||
},
|
||||
], next);
|
||||
|
||||
Reference in New Issue
Block a user