This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/app/assets/javascripts
Martin Brennan 098ab29d41
FEATURE: Add plugin API to register About stat group (#17442)
This commit introduces a new plugin API to register
a group of stats that will be included in about.json
and also conditionally in the site about UI at /about.

The usage is like this:

```ruby
register_about_stat_group("chat_messages", show_in_ui: true) do
  {
    last_day: 1,
    "7_days" => 10,
    "30_days" => 100,
    count: 1000,
    previous_30_days: 120
  }
end
```

In reality the stats will be generated any way the implementer
chooses within the plugin. The `last_day`, `7_days`, `30_days,` and `count`
keys must be present but apart from that additional stats may be added.
Only those core 4 stat keys will be shown in the UI, but everything will be shown
in about.json.

The stat group name is used to prefix the stats in about.json like so:

```json
"chat_messages_last_day": 2322,
"chat_messages_7_days": 2322,
"chat_messages_30_days": 2322,
"chat_messages_count": 2322,
```

The `show_in_ui` option (default false) is used to determine whether the
group of stats is shown on the site About page in the Site Statistics
table. Some stats may be needed purely for reporting purposes and thus
do not need to be shown in the UI to admins/users. An extension to the Site
serializer, `displayed_about_plugin_stat_groups`, has been added so this
can be inspected on the client-side.
2022-07-15 13:16:00 +10:00
..
admin DEV: Fix submit-on-enter and de-jQ two components (#17484) 2022-07-14 08:59:33 +08:00
confirm-new-email DEV: Update linting setup and fix issues (#17345) 2022-07-06 10:37:54 +02:00
discourse FEATURE: Add plugin API to register About stat group (#17442) 2022-07-15 13:16:00 +10:00
discourse-common DEV: Update ember-resolver (#17432) 2022-07-11 22:52:01 +02:00
discourse-hbr DEV: Update ember-resolver (#17432) 2022-07-11 22:52:01 +02:00
discourse-widget-hbs DEV: Update ember-resolver (#17432) 2022-07-11 22:52:01 +02:00
docs DEV: enforces eslint’s curly rule to the codebase (#10720) 2020-09-22 16:28:28 +02:00
ember-addons DEV: Remove ember-addons (#9559) 2020-04-28 10:14:49 -04:00
locales FEATURE: Add Croatian language (#17130) 2022-06-18 00:18:22 +02:00
pretty-text DEV: Update ember-resolver (#17432) 2022-07-11 22:52:01 +02:00
select-kit FIX: fixes few regressions in select-kit (#17453) 2022-07-12 21:38:17 +02:00
truth-helpers DEV: Update ember-resolver (#17432) 2022-07-11 22:52:01 +02:00
wizard DEV: Update ember-resolver (#17432) 2022-07-11 22:52:01 +02:00
.licensee.json DEV: Add Ember CLI workspace license checks (#16603) 2022-05-03 13:06:19 -04:00
.npmrc DEV: Prevent npm usage (#13945) 2021-08-04 22:04:58 +02:00
admin-plugins.js.erb FIX: When using Ember CLI, plugin admin code was not being loaded in tests (#16239) 2022-03-21 15:46:41 -04:00
handlebars-shim.js FIX: It seems sometimes shims are evaluated by older JS engines (#11813) 2021-01-22 10:41:01 -05:00
markdown-it-bundle.js REFACTOR: Do not rely on module order for discourse-markdown loading 2020-09-18 13:31:55 -04:00
mini-loader.js DEV: Remove obsolete parts of our custom loader (#17157) 2022-06-20 18:40:25 +02:00
package.json DEV: Make wizard an ember addon (#17027) 2022-06-17 14:50:21 +02:00
polyfills.js DEV: Add polyfill for String.prototype.replaceAll (#16301) 2022-03-28 17:18:56 +01:00
pretty-text-bundle.js DEV: Update xss.js (#17216) 2022-06-24 10:28:05 +08:00
service-worker.js.erb FIX: Disable service worker proxying in chrome 97-97.0.4692 (#15638) 2022-01-18 19:41:25 +00:00
yarn.lock Revert "DEV: Update @popperjs/core (#17437)" (#17448) 2022-07-12 15:27:52 +02:00