mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-12 07:04:52 +09:00
* .jsx to .tsx * controller: tsc --build before webpack-cli * Type Annotation * disabled move into the <Input/> and <Checkbox/> * cleanup debug left over * documentation * default ModPack * modPackUpdateHandlers no undefined * PluginInfo changes proposition * PluginInfo changes proposition miss * ModRecord & ModInfo feedback loop at const mods = [ ? * ["connect", "drop", "resume", "close"] as const * .tsx to .ts when possible
26 lines
828 B
TypeScript
26 lines
828 B
TypeScript
import * as lib from "@clusterio/lib";
|
|
|
|
class InstanceConfigGroup extends lib.PluginConfigGroup {}
|
|
InstanceConfigGroup.defaultAccess = ["controller", "host", "control"];
|
|
InstanceConfigGroup.groupName = "statistics_exporter";
|
|
InstanceConfigGroup.define({
|
|
name: "command_timeout",
|
|
title: "Command Timeout",
|
|
description: "Timeout in seconds of the metrics command before returning results from the previous invocation.",
|
|
type: "number",
|
|
initial_value: 1,
|
|
});
|
|
InstanceConfigGroup.finalize();
|
|
|
|
const info: lib.PluginDeclaration = {
|
|
name: "statistics_exporter",
|
|
title: "Statistics Exporter",
|
|
description:
|
|
"Provides in-game item/fluid production, builds, kills, and pollution "+
|
|
"statistics to the cluster's Prometheus endpoint.",
|
|
instanceEntrypoint: "dist/plugin/instance",
|
|
InstanceConfigGroup,
|
|
};
|
|
|
|
export default info;
|