From 8ed6fb07355682bed65c55adbb2477a3edbaaf19 Mon Sep 17 00:00:00 2001
From: Thomas Smyth The Message SquadJS will send to players warning them they will be kicked Message to send to players when they are kicked How often in Seconds should we warn the player about being unassigned? How long in Seconds to wait before a unassigned player is kicked Player count required for AutoKick to start kicking players, set to -1 to disable Time delay in Seconds from start of the round before AutoKick starts kicking againConnectors
-
-## Connector Configuration
-
-Connectors allow SquadJS to communicate with external resources.
- ```json
- "connectors": {
- "discord": "Discord Login Token",
- },
- ```
-Connectors should be named, for example the above is named `discord`, and should have the associated config against it. Configs can be specified by name in plugin options. Should a connector not be needed by any plugin then the default values can be left or you can remove it from your config file.
-
-See below for more details on connectors and their associated config.
-
-##### Discord
-Connects to Discord via `discord.js`.
- ```json
- "discord": "Discord Login Token",
- ```
-Requires a Discord bot login token.
-
-
-##### Databases
-SquadJS uses [Sequelize](https://sequelize.org/) to connect and use a wide range of SQL databases.
-
-The connector should be configured using any of Sequelize's single argument configuration options.
-
-For example:
- ```json
- "mysql": "mysql://user:pass@example.com:5432/dbname"
- ```
-
-or:
- ```json
- "sqlite": {
- "dialect": "sqlite",
- "storage": "path/to/database.sqlite"
- }
- ```
-
-See [Sequelize's documentation](https://sequelize.org/master/manual/getting-started.html#connecting-to-a-database) for more details.
-
- ---
-Plugins
-
-## Plugin Configuration
-
-The `plugins` section in your config file lists all plugins built into SquadJS
- ```json
- "plugins": [
- {
- "plugin": "auto-tk-warn",
- "disabled": false,
- "message": "Please apologise for ALL TKs in ALL chat!"
- }
- ]
- ```
-
-The `disabled` field can be toggled between `true`/ `false` to enabled/disable the plugin.
-
-Plugin options are also specified. A full list of plugin options can be seen below.
-
- ---
-Verboseness
@@ -204,707 +134,9 @@ The larger the number set in the `verboseness` section for a specified module th
## **Plugins**
The following is a list of plugins built into SquadJS, you can click their title for more information:
-Interested in creating your own plugin? [See more here](./squad-server/plugins/readme.md)
-
-AutoKickUnassigned
- AutoKickUnassigned
- AutoKickUnassigned
plugin will automatically kick players that are not in a squad after a specified ammount of time.Options
- warningMessage
- Description
- Default
- Join a squad, you are unassigned and will be kicked
kickMessage
- Description
- Default
- Unassigned - automatically removed
frequencyOfWarnings
- Description
- Default
- 30
unassignedTimer
- Description
- Default
- 360
playerThreshold
- Description
- Default
- 93
roundStartDelay
- Description
- Default
- 900
ignoreAdmins
- Description
- true
: Admins will NOT be kickedfalse
: Admins WILL be kicked
false
-true
: Reserve slot players will NOT be kickedfalse
: Reserve slot players WILL be kickedfalse
The AutoTkWarn
plugin will automatically warn players with a message when they teamkill.
The message to warn attacking players with.
-Please apologise for ALL TKs in ALL chat!
The message that will be sent to the victim.
-null
The CBLInfo
plugin alerts admins when a harmful player is detected joining their server based on data from the Community Ban List.
Discord connector name.
-discord
The ID of the channel to alert admins through.
-
667741905228136459
-Admins will be alerted when a player has this or more reputation points. For more information on reputation points, see the Community Ban List's FAQ
-6
The ChatCommands
plugin can be configured to make chat commands that broadcast or warn the caller with present messages.
An array of objects containing the following properties:
command
- The command that initiates the message.type
- Either warn
or broadcast
.response
- The message to respond with.ignoreChats
- A list of chats to ignore the commands in. Use this to limit it to admins.[
- {
- "command": "squadjs",
- "type": "warn",
- "response": "This server is powered by SquadJS.",
- "ignoreChats": []
- }
-]
The mysql-log
plugin will log various server statistics and events to a database. This is great for server performance monitoring and/or player stat tracking.
-
-Grafana:
-
SquadJS
.The Sequelize connector to log server information to.
-mysql
A overridden server ID.
-null
The DiscordAdminBroadcast
plugin will send a copy of admin broadcasts made in game to a Discord channel.
Discord connector name.
-discord
The ID of the channel to log admin broadcasts to.
-
667741905228136459
-The color of the embed.
-16761867
The DiscordAdminCamLogs
plugin will log in game admin camera usage to a Discord channel.
Discord connector name.
-discord
The ID of the channel to log admin camera usage to.
-
667741905228136459
-The color of the embed.
-16761867
The DiscordAdminRequest
plugin will ping admins in a Discord channel when a player requests an admin via the !admin
command in in-game chat.
Discord connector name.
-discord
The ID of the channel to log admin broadcasts to.
-
667741905228136459
-A list of chat names to ignore.
-[]
[
- "ChatSquad"
-]
-A list of phrases to ignore.
-[]
[
- "switch"
-]
-The command that calls an admin.
-admin
A list of Discord role IDs to ping.
-[]
[
- "500455137626554379"
-]
-Ping @here. Great if Admin Requests are posted to a Squad Admin ONLY channel, allows pinging only Online Admins.
-false
Cooldown for pings in milliseconds.
-60000
The color of the embed.
-16761867
Should in-game admins be warned after a players uses the command and should we tell how much admins are active in-game right now.
-false
Should players know how much in-game admins there are active/online?
-true
The DiscordChat
plugin will log in-game chat to a Discord channel.
Discord connector name.
-discord
The ID of the channel to log admin broadcasts to.
-
667741905228136459
-The color of the embed for each chat.
-{}
{
- "ChatAll": 16761867
-}
-The color of the embed.
-16761867
A list of chat names to ignore.
-[
- "ChatSquad"
-]
The DiscordDebug
plugin can be used to help debug SquadJS by dumping SquadJS events to a Discord channel.
Discord connector name.
-discord
The ID of the channel to log events to.
-
667741905228136459
-A list of events to dump.
-[]
[
- "PLAYER_DIED"
-]
- The DiscordFOBHABExplosionDamage
plugin logs damage done to FOBs and HABs by explosions to help identify engineers blowing up friendly FOBs and HABs.
Discord connector name.
-discord
The ID of the channel to log FOB/HAB explosion damage to.
-
667741905228136459
-The color of the embeds.
-16761867
The DiscordKillFeed
plugin logs all wounds and related information to a Discord channel for admins to review.
Discord connector name.
-discord
The ID of the channel to log teamkills to.
-
667741905228136459
-The color of the embeds.
-16761867
Disable Community Ban List information.
-false
The DiscordPlaceholder
plugin allows you to make your bot create placeholder messages that can be used when configuring other plugins.
Discord connector name.
-discord
Command to create Discord placeholder.
-!placeholder
The bot will only answer with a placeholder on this channel
-
The DiscordRcon
plugin allows a specified Discord channel to be used as a RCON console to run RCON commands.
Discord connector name.
-discord
ID of channel to turn into RCON console.
-
667741905228136459
-{}
) permissions will be disabled{}
{
- "123456789123456789": [
- "AdminBroadcast",
- "AdminForceTeamChange",
- "AdminDemoteCommander"
- ]
-}
-Prepend admin names when making announcements.
-false
The DiscordRoundWinner
plugin will send the round winner to a Discord channel.
Discord connector name.
-discord
The ID of the channel to log admin broadcasts to.
-
667741905228136459
-The color of the embed.
-16761867
The DiscordRoundEnded
plugin will send the round winner to a Discord channel.
Discord connector name.
-discord
The ID of the channel to log round end events to.
-
667741905228136459
-The color of the embed.
-16761867
The DiscordServerStatus
plugin can be used to get the server status in Discord.
Discord connector name.
-discord
Sequelize connector name.
-sqlite
Command name to get message.
-!status
Whether to allow messages to be subscribed to automatic updates.
-false
How frequently to update the time in Discord.
-60000
Whether to update the bot's status with server information.
-true
The SquadCreated
plugin will log Squad Creation events to a Discord channel.
Discord connector name.
-discord
The ID of the channel to log Squad Creation events to.
-
667741905228136459
-The color of the embed.
-16761867
Send message as Embed
-true
The DiscordSubSystemRestarter
plugin allows you to manually restart SquadJS subsystems in case an issues arises with them.
!squadjs restartsubsystem rcon
!squadjs restartsubsystem logparser
Discord connector name.
-discord
ID of role required to run the sub system restart commands.
-
667741905228136459
- The DiscordTeamkill
plugin logs teamkills and related information to a Discord channel for admins to review.
Discord connector name.
-discord
The ID of the channel to log teamkills to.
-
667741905228136459
-The color of the embeds.
-16761867
Disable Community Ban List information.
-false
The FogOfWar
plugin can be used to automate setting fog of war mode.
Fog of war mode to set.
-1
Delay before setting fog of war mode.
-10000
The IntervalledBroadcasts
plugin allows you to set broadcasts, which will be broadcasted at preset intervals
Messages to broadcast.
-[]
[
- "This server is powered by SquadJS."
-]
-Frequency of the broadcasts in milliseconds.
-300000
The SeedingMode
plugin broadcasts seeding rule messages to players at regular intervals when the server is below a specified player count. It can also be configured to display "Live" messages when the server goes live.
Frequency of seeding messages in milliseconds.
-150000
Player count required for server not to be in seeding mode.
-50
Seeding message to display.
-Seeding Rules Active! Fight only over the middle flags! No FOB Hunting!
Enable "Live" messages for when the server goes live.
-true
Player count required for "Live" messages to not bee displayed.
-52
"Live" message to display.
-Live!
Should the plugin wait to be executed on NEW_GAME event.
-true
The time to wait before check player counts in seconds.
-30
The SocketIOAPI
plugin allows remote access to a SquadJS instance via Socket.IO
As a client example you can use this to connect to the socket.io server;
- const socket = io.connect('ws://IP:PORT', {
- auth: {
- token: "MySecretPassword"
- }
- })
-
If you need more documentation about socket.io please go ahead and read the following;The port for the websocket.
-
3000
-Your secret token/password for connecting.
-
MySecretPassword
- The TeamRandomizer
can be used to randomize teams. It's great for destroying clan stacks or for social events. It can be run by typing, by default, !randomize
into in-game admin chat
The command used to randomize the teams.
-randomize
${option.description}
-${
- typeof option.default === 'object'
- ? JSON.stringify(option.default, null, 2)
- : option.default
- }
${
- typeof option.example === 'object'
- ? JSON.stringify(option.example, null, 2)
- : option.example
- }
`;
-
- options.push(optionInfo);
- }
+ // Make the config path relevant to root directory.
+ configPath = path.resolve(__dirname, '../', configPath);
- pluginInfo.push(
- `${Plugin.description}
-AutoKickUnassigned
plugin will automatically kick players that are not in a squad after a ' +
- 'specified ammount of time.'
- );
- }
-
- static get defaultEnabled() {
- return true;
- }
-
- static get optionsSpecification() {
- return {
- warningMessage: {
- required: false,
- description: 'Message SquadJS will send to players warning them they will be kicked',
- default: 'Join a squad, you are unassigned and will be kicked'
- },
- kickMessage: {
- required: false,
- description: 'Message to send to players when they are kicked',
- default: 'Unassigned - automatically removed'
- },
- frequencyOfWarnings: {
- required: false,
- description:
- 'How often in Seconds should we warn the player about being unassigned?',
- default: 30
- },
- unassignedTimer: {
- required: false,
- description: 'How long in Seconds to wait before a unassigned player is kicked',
- default: 360
- },
- playerThreshold: {
- required: false,
- description:
- 'Player count required for AutoKick to start kicking players, set to -1 to disable',
- default: 93
- },
- roundStartDelay: {
- required: false,
- description:
- 'Time delay in Seconds from start of the round before AutoKick starts kicking again',
- default: 900
- },
- ignoreAdmins: {
- required: false,
- description:
- 'true
: Admins will NOT be kickedfalse
: Admins WILL be kickedtrue
: Reserve slot players will NOT be kickedfalse
: Reserve slot players WILL be kickedAutoTkWarn
plugin will automatically warn players with a message when they teamkill.';
- }
-
- static get defaultEnabled() {
- return true;
- }
-
- static get optionsSpecification() {
- return {
- attackerMessage: {
- required: false,
- description: 'The message to warn attacking players with.',
- default: 'Please apologise for ALL TKs in ALL chat!'
- },
- victimMessage: {
- required: false,
- description: 'The message that will be sent to the victim.',
- default: null // 'You were killed by your own team.'
- }
- };
- }
-
- constructor(server, options, connectors) {
- super(server, options, connectors);
-
- this.onTeamkill = this.onTeamkill.bind(this);
- }
-
- async mount() {
- this.server.on('TEAMKILL', this.onTeamkill);
- }
-
- async unmount() {
- this.server.removeEventListener('TEAMKILL', this.onTeamkill);
- }
-
- async onTeamkill(info) {
- if (info.attacker && this.options.attackerMessage) {
- this.server.rcon.warn(info.attacker.eosID, this.options.attackerMessage);
- }
- if (info.victim && this.options.victimMessage) {
- this.server.rcon.warn(info.victim.eosID, this.options.victimMessage);
- }
- }
-}
diff --git a/squad-server/plugins/base-plugin.js b/squad-server/plugins/base-plugin.js
deleted file mode 100644
index 4a8e58c6f..000000000
--- a/squad-server/plugins/base-plugin.js
+++ /dev/null
@@ -1,51 +0,0 @@
-import Logger from 'core/logger';
-
-export default class BasePlugin {
- constructor(server, options, connectors) {
- this.server = server;
- this.options = {};
- this.rawOptions = options;
-
- for (const [optionName, option] of Object.entries(this.constructor.optionsSpecification)) {
- if (option.connector) {
- this.options[optionName] = connectors[this.rawOptions[optionName]];
- } else {
- if (option.required) {
- if (!(optionName in this.rawOptions))
- throw new Error(`${this.constructor.name}: ${optionName} is required but missing.`);
- if (option.default === this.rawOptions[optionName])
- throw new Error(
- `${this.constructor.name}: ${optionName} is required but is the default value.`
- );
- }
-
- this.options[optionName] =
- typeof this.rawOptions[optionName] !== 'undefined'
- ? this.rawOptions[optionName]
- : option.default;
- }
- }
- }
-
- async prepareToMount() {}
-
- async mount() {}
-
- async unmount() {}
-
- static get description() {
- throw new Error('Plugin missing "static get description()" method.');
- }
-
- static get defaultEnabled() {
- throw new Error('Plugin missing "static get defaultEnabled()" method.');
- }
-
- static get optionsSpecification() {
- throw new Error('Plugin missing "static get optionSpecification()" method.');
- }
-
- verbose(...args) {
- Logger.verbose(this.constructor.name, ...args);
- }
-}
diff --git a/squad-server/plugins/cbl-info.js b/squad-server/plugins/cbl-info.js
deleted file mode 100644
index 1818ef951..000000000
--- a/squad-server/plugins/cbl-info.js
+++ /dev/null
@@ -1,163 +0,0 @@
-import GraphQLRequest from 'graphql-request';
-
-import DiscordBasePlugin from './discord-base-plugin.js';
-
-const { request, gql } = GraphQLRequest;
-
-export default class CBLInfo extends DiscordBasePlugin {
- static get description() {
- return (
- 'The CBLInfo
plugin alerts admins when a harmful player is detected joining their server based ' +
- 'on data from the Community Ban List.'
- );
- }
-
- static get defaultEnabled() {
- return true;
- }
-
- static get optionsSpecification() {
- return {
- ...DiscordBasePlugin.optionsSpecification,
- channelID: {
- required: true,
- description: 'The ID of the channel to alert admins through.',
- default: '',
- example: '667741905228136459'
- },
- threshold: {
- required: false,
- description:
- 'Admins will be alerted when a player has this or more reputation points. For more information on ' +
- 'reputation points, see the ' +
- 'Community Ban List\'s FAQ',
- default: 6
- }
- };
- }
-
- constructor(server, options, connectors) {
- super(server, options, connectors);
-
- this.onPlayerConnected = this.onPlayerConnected.bind(this);
- }
-
- async mount() {
- this.server.on('PLAYER_CONNECTED', this.onPlayerConnected);
- }
-
- async unmount() {
- this.server.removeEventListener('PLAYER_CONNECTED', this.onPlayerConnected);
- }
-
- async onPlayerConnected(info) {
- try {
- const data = await request(
- 'https://communitybanlist.com/graphql',
- gql`
- query Search($id: String!) {
- steamUser(id: $id) {
- id
- name
- avatarFull
- reputationPoints
- riskRating
- reputationRank
- lastRefreshedInfo
- lastRefreshedReputationPoints
- lastRefreshedReputationRank
- activeBans: bans(orderBy: "created", orderDirection: DESC, expired: false) {
- edges {
- cursor
- node {
- id
- }
- }
- }
- expiredBans: bans(orderBy: "created", orderDirection: DESC, expired: true) {
- edges {
- cursor
- node {
- id
- }
- }
- }
- }
- }
- `,
- { id: info.player.steamID }
- );
-
- if (!data.steamUser) {
- this.verbose(
- 2,
- `Player ${info.player.name} (Steam ID: ${info.player.steamID}) is not listed in the Community Ban List.`
- );
- return;
- }
-
- if (data.steamUser.reputationPoints < this.options.threshold) {
- this.verbose(
- 2,
- `Player ${info.player.name} (Steam ID: ${info.player.steamID}) has a reputation below the threshold.`
- );
- return;
- }
-
- await this.sendDiscordMessage({
- embed: {
- title: `${info.player.name} is a potentially harmful player!`,
- author: {
- name: 'Community Ban List',
- url: 'https://communitybanlist.com/',
- icon_url: 'https://communitybanlist.com/static/media/cbl-logo.caf6584e.png'
- },
- thumbnail: {
- url: data.steamUser.avatarFull
- },
- description: `[${info.player.name}](https://communitybanlist.com/search/${info.player.steamID}) has ${data.steamUser.reputationPoints} reputation points on the Community Ban List and is therefore a potentially harmful player.`,
- fields: [
- {
- name: 'Reputation Points',
- value: `${data.steamUser.reputationPoints} (${
- data.steamUser.reputationPointsMonthChange || 0
- } from this month)`,
- inline: true
- },
- {
- name: 'Risk Rating',
- value: `${data.steamUser.riskRating} / 10`,
- inline: true
- },
- {
- name: 'Reputation Rank',
- value: `#${data.steamUser.reputationRank}`,
- inline: true
- },
- {
- name: 'Active Bans',
- value: `${data.steamUser.activeBans.edges.length}`,
- inline: true
- },
- {
- name: 'Expired Bans',
- value: `${data.steamUser.expiredBans.edges.length}`,
- inline: true
- }
- ],
- color: '#ffc40b',
- timestamp: info.time.toISOString(),
- footer: {
- text: 'Powered by SquadJS and the Community Ban List'
- }
- }
- });
- } catch (err) {
- this.verbose(
- 1,
- `Failed to fetch Community Ban List data for player ${info.name} (Steam ID: ${info.steamID}): `,
- err
- );
- }
- }
-}
diff --git a/squad-server/plugins/chat-commands.js b/squad-server/plugins/chat-commands.js
deleted file mode 100644
index bb94bb545..000000000
--- a/squad-server/plugins/chat-commands.js
+++ /dev/null
@@ -1,52 +0,0 @@
-import BasePlugin from './base-plugin.js';
-
-export default class ChatCommands extends BasePlugin {
- static get description() {
- return (
- 'The ChatCommands
plugin can be configured to make chat commands that broadcast or warn the ' +
- 'caller with present messages.'
- );
- }
-
- static get defaultEnabled() {
- return true;
- }
-
- static get optionsSpecification() {
- return {
- commands: {
- required: false,
- description:
- 'An array of objects containing the following properties: ' +
- 'command
- The command that initiates the message.type
- Either warn
or broadcast
.response
- The message to respond with.ignoreChats
- A list of chats to ignore the commands in. Use this to limit it to admins.mysql-log
plugin will log various server statistics and events to a database. This is great ' +
- 'for server performance monitoring and/or player stat tracking.' +
- '\n\n' +
- 'Grafana:\n' +
- 'SquadJS
.DiscordAdminBroadcast
plugin will send a copy of admin broadcasts made in game to a Discord ' +
- 'channel.'
- );
- }
-
- static get defaultEnabled() {
- return false;
- }
-
- static get optionsSpecification() {
- return {
- ...DiscordBasePlugin.optionsSpecification,
- channelID: {
- required: true,
- description: 'The ID of the channel to log admin broadcasts to.',
- default: '',
- example: '667741905228136459'
- },
- color: {
- required: false,
- description: 'The color of the embed.',
- default: 16761867
- }
- };
- }
-
- constructor(server, options, connectors) {
- super(server, options, connectors);
-
- this.onAdminBroadcast = this.onAdminBroadcast.bind(this);
- }
-
- async mount() {
- this.server.on('ADMIN_BROADCAST', this.onAdminBroadcast);
- }
-
- async unmount() {
- this.server.removeEventListener('ADMIN_BROADCAST', this.onAdminBroadcast);
- }
-
- async onAdminBroadcast(info) {
- await this.sendDiscordMessage({
- embed: {
- title: 'Admin Broadcast',
- color: this.options.color,
- fields: [
- {
- name: 'Message',
- value: `${info.message}`
- }
- ],
- timestamp: info.time.toISOString()
- }
- });
- }
-}
diff --git a/squad-server/plugins/discord-admin-cam-logs.js b/squad-server/plugins/discord-admin-cam-logs.js
deleted file mode 100644
index 4bba3e238..000000000
--- a/squad-server/plugins/discord-admin-cam-logs.js
+++ /dev/null
@@ -1,105 +0,0 @@
-import DiscordBasePlugin from './discord-base-plugin.js';
-
-export default class DiscordAdminCamLogs extends DiscordBasePlugin {
- static get description() {
- return 'The DiscordAdminCamLogs
plugin will log in game admin camera usage to a Discord channel.';
- }
-
- static get defaultEnabled() {
- return false;
- }
-
- static get optionsSpecification() {
- return {
- ...DiscordBasePlugin.optionsSpecification,
- channelID: {
- required: true,
- description: 'The ID of the channel to log admin camera usage to.',
- default: '',
- example: '667741905228136459'
- },
- color: {
- required: false,
- description: 'The color of the embed.',
- default: 16761867
- }
- };
- }
-
- constructor(server, options, connectors) {
- super(server, options, connectors);
-
- this.adminsInCam = {};
-
- this.onEntry = this.onEntry.bind(this);
- this.onExit = this.onExit.bind(this);
- }
-
- async mount() {
- this.server.on('POSSESSED_ADMIN_CAMERA', this.onEntry);
- this.server.on('UNPOSSESSED_ADMIN_CAMERA', this.onExit);
- }
-
- async unmount() {
- this.server.removeEventListener('POSSESSED_ADMIN_CAMERA', this.onEntry);
- this.server.removeEventListener('UNPOSSESSED_ADMIN_CAMERA', this.onExit);
- }
-
- async onEntry(info) {
- await this.sendDiscordMessage({
- embed: {
- title: `Admin Entered Admin Camera`,
- color: this.options.color,
- fields: [
- {
- name: "Admin's Name",
- value: info.player.name,
- inline: true
- },
- {
- name: "Admin's SteamID",
- value: `[${info.player.steamID}](https://steamcommunity.com/profiles/${info.player.steamID})`,
- inline: true
- },
- {
- name: "Admin's EosID",
- value: info.player.eosID,
- inline: true
- }
- ],
- timestamp: info.time.toISOString()
- }
- });
- }
-
- async onExit(info) {
- await this.sendDiscordMessage({
- embed: {
- title: `Admin Left Admin Camera`,
- color: this.options.color,
- fields: [
- {
- name: "Admin's Name",
- value: info.player.name,
- inline: true
- },
- {
- name: "Admin's SteamID",
- value: `[${info.player.steamID}](https://steamcommunity.com/profiles/${info.player.steamID})`,
- inline: true
- },
- {
- name: "Admin's EosID",
- value: info.player.eosID,
- inline: true
- },
- {
- name: 'Time in Admin Camera',
- value: `${Math.round(info.duration / 60000)} mins`
- }
- ],
- timestamp: info.time.toISOString()
- }
- });
- }
-}
diff --git a/squad-server/plugins/discord-admin-request.js b/squad-server/plugins/discord-admin-request.js
deleted file mode 100644
index 00a56ce6f..000000000
--- a/squad-server/plugins/discord-admin-request.js
+++ /dev/null
@@ -1,191 +0,0 @@
-import DiscordBasePlugin from './discord-base-plugin.js';
-
-export default class DiscordAdminRequest extends DiscordBasePlugin {
- static get description() {
- return (
- 'The DiscordAdminRequest
plugin will ping admins in a Discord channel when a player requests ' +
- 'an admin via the !admin
command in in-game chat.'
- );
- }
-
- static get defaultEnabled() {
- return true;
- }
-
- static get optionsSpecification() {
- return {
- ...DiscordBasePlugin.optionsSpecification,
- channelID: {
- required: true,
- description: 'The ID of the channel to log admin broadcasts to.',
- default: '',
- example: '667741905228136459'
- },
- ignoreChats: {
- required: false,
- description: 'A list of chat names to ignore.',
- default: [],
- example: ['ChatSquad']
- },
- ignorePhrases: {
- required: false,
- description: 'A list of phrases to ignore.',
- default: [],
- example: ['switch']
- },
- command: {
- required: false,
- description: 'The command that calls an admin.',
- default: 'admin'
- },
- pingGroups: {
- required: false,
- description: 'A list of Discord role IDs to ping.',
- default: [],
- example: ['500455137626554379']
- },
- pingHere: {
- required: false,
- description:
- 'Ping @here. Great if Admin Requests are posted to a Squad Admin ONLY channel, allows pinging only Online Admins.',
- default: false
- },
- pingDelay: {
- required: false,
- description: 'Cooldown for pings in milliseconds.',
- default: 60 * 1000
- },
- color: {
- required: false,
- description: 'The color of the embed.',
- default: 16761867
- },
- warnInGameAdmins: {
- required: false,
- description:
- 'Should in-game admins be warned after a players uses the command and should we tell how much admins are active in-game right now.',
- default: false
- },
- showInGameAdmins: {
- required: false,
- description: 'Should players know how much in-game admins there are active/online?',
- default: true
- }
- };
- }
-
- constructor(server, options, connectors) {
- super(server, options, connectors);
-
- this.lastPing = Date.now() - this.options.pingDelay;
-
- this.onChatCommand = this.onChatCommand.bind(this);
- }
-
- async mount() {
- this.server.on(`CHAT_COMMAND:${this.options.command}`, this.onChatCommand);
- }
-
- async unmount() {
- this.server.removeEventListener(`CHAT_COMMAND:${this.options.command}`, this.onChatCommand);
- }
-
- async onChatCommand(info) {
- if (this.options.ignoreChats.includes(info.chat)) return;
-
- for (const ignorePhrase of this.options.ignorePhrases) {
- if (info.message.includes(ignorePhrase)) return;
- }
-
- if (info.message.length === 0) {
- await this.server.rcon.warn(
- info.player.eosID,
- `Please specify what you would like help with when requesting an admin.`
- );
- return;
- }
-
- const admins = this.server.getAdminsWithPermission('canseeadminchat', 'eosID');
- let amountAdmins = 0;
- for (const player of this.server.players) {
- if (!admins.includes(player.eosID)) continue;
- amountAdmins++;
- if (this.options.warnInGameAdmins)
- await this.server.rcon.warn(player.eosID, `[${info.player.name}] - ${info.message}`);
- }
-
- const message = {
- embed: {
- title: `${info.player.name} has requested admin support!`,
- color: this.options.color,
- fields: [
- {
- name: 'Player',
- value: info.player.name,
- inline: true
- },
- {
- name: 'SteamID',
- value: `[${info.player.steamID}](https://steamcommunity.com/profiles/${info.player.steamID})`,
- inline: true
- },
- {
- name: "Player's EosID",
- value: info.player.eosID,
- inline: true
- },
- {
- name: 'Team & Squad',
- value: `Team: ${info.player.teamID}, Squad: ${info.player.squadID || 'Unassigned'}`
- },
- {
- name: 'Message',
- value: info.message
- },
- {
- name: 'Admins Online',
- value: amountAdmins
- }
- ],
- timestamp: info.time.toISOString()
- }
- };
-
- if (this.options.pingGroups.length > 0 && Date.now() - this.options.pingDelay > this.lastPing) {
- if (this.options.pingHere === true && this.options.pingGroups.length === 0) {
- message.content = `@here - Admin Requested in ${this.server.serverName}`;
- } else if (this.options.pingHere === true && this.options.pingGroups.length > 0) {
- message.content = `@here - Admin Requested in ${
- this.server.serverName
- } - ${this.options.pingGroups.map((groupID) => `<@&${groupID}>`).join(' ')}`;
- } else if (this.options.pingHere === false && this.options.pingGroups.length === 0) {
- message.content = `Admin Requested in ${this.server.serverName}`;
- } else if (this.options.pingHere === false && this.options.pingGroups.length > 0) {
- message.content = `Admin Requested in ${this.server.serverName} - ${this.options.pingGroups
- .map((groupID) => `<@&${groupID}>`)
- .join(' ')}`;
- }
- this.lastPing = Date.now();
- }
-
- await this.sendDiscordMessage(message);
-
- if (amountAdmins === 0 && this.options.showInGameAdmins)
- await this.server.rcon.warn(
- info.player.eosID,
- `There are no in-game admins, however, an admin has been notified via Discord. Please wait for us to get back to you.`
- );
- else if (this.options.showInGameAdmins)
- await this.server.rcon.warn(
- info.player.eosID,
- `There ${amountAdmins > 1 ? 'are' : 'is'} ${amountAdmins} in-game admin${
- amountAdmins > 1 ? 's' : ''
- }. Please wait for us to get back to you.`
- );
- else
- await this.server.rcon.warn(
- info.player.eosID,
- `An admin has been notified. Please wait for us to get back to you.`
- );
- }
-}
diff --git a/squad-server/plugins/discord-base-message-updater.js b/squad-server/plugins/discord-base-message-updater.js
deleted file mode 100644
index 66376a62d..000000000
--- a/squad-server/plugins/discord-base-message-updater.js
+++ /dev/null
@@ -1,188 +0,0 @@
-import Sequelize from 'sequelize';
-
-import BasePlugin from './base-plugin.js';
-
-const { DataTypes } = Sequelize;
-
-export default class DiscordBaseMessageUpdater extends BasePlugin {
- static get optionsSpecification() {
- return {
- discordClient: {
- required: true,
- description: 'Discord connector name.',
- connector: 'discord',
- default: 'discord'
- },
- messageStore: {
- required: true,
- description: 'Sequelize connector name.',
- connector: 'sequelize',
- default: 'sqlite'
- },
- command: {
- required: true,
- description: 'Command name to get message.',
- default: '',
- example: '!command'
- },
- disableSubscriptions: {
- required: false,
- description: 'Whether to allow messages to be subscribed to automatic updates.',
- default: false
- }
- };
- }
-
- constructor(server, options, connectors) {
- super(server, options, connectors);
-
- // Setup model to store subscribed messages.
- this.SubscribedMessage = this.options.messageStore.define(
- `${this.constructor.name}_SubscribedMessage`,
- { channelID: DataTypes.STRING, messageID: DataTypes.STRING, server: DataTypes.INTEGER },
- { timestamps: false }
- );
-
- this.onDiscordMessage = this.onDiscordMessage.bind(this);
- }
-
- async prepareToMount() {
- await this.SubscribedMessage.sync();
- }
-
- async mount() {
- this.options.discordClient.on('message', this.onDiscordMessage);
- }
-
- async unmount() {
- this.options.discordClient.removeEventListener('message', this.onDiscordMessage);
- }
-
- async generateMessage() {
- throw new Error('generateMessage method must be defined.');
- }
-
- async onDiscordMessage(message) {
- // Parse the incoming message.
- const commandMatch = message.content.match(
- new RegExp(`^${this.options.command}(?: (subscribe)| (unsubscribe) ([0-9]+) ([0-9]+))?$`, 'i')
- );
-
- // Stop processing the message if it does not match the command.
- if (!commandMatch) return;
-
- // Split message parts.
- const [subscribe, unsubscribe, channelID, messageID] = commandMatch.slice(1);
-
- // Handle non subscription messages.
- if (subscribe === undefined && unsubscribe === undefined) {
- this.verbose(1, 'Generating message content...');
- const generatedMessage = await this.generateMessage();
-
- this.verbose(1, 'Sending non-subscription message...');
- await message.channel.send(generatedMessage);
- this.verbose(1, 'Sent non-subscription message.');
-
- return;
- }
-
- // Handle subscription message.
- if (subscribe !== undefined) {
- if (this.options.disableSubscriptions) {
- await message.reply('automated updates is disabled.');
- return;
- }
-
- this.verbose(1, 'Generating message content...');
- const generatedMessage = await this.generateMessage();
-
- this.verbose(1, 'Sending subscription message...');
- const newMessage = await message.channel.send(generatedMessage);
- this.verbose(1, 'Sent subscription message.');
-
- // Subscribe the message for automated updates.
- const newChannelID = newMessage.channel.id;
- const newMessageID = newMessage.id;
-
- this.verbose(
- 1,
- `Subscribing message (Channel ID: ${newChannelID}, Message ID: ${newMessageID}) to automated updates...`
- );
- await this.SubscribedMessage.create({
- channelID: newChannelID,
- messageID: newMessageID,
- server: this.server.id
- });
- this.verbose(
- 1,
- `Subscribed message (Channel ID: ${newChannelID}, Message ID: ${newMessageID}) to automated updates.`
- );
-
- return;
- }
-
- // Handle unsubscription messages.
- if (unsubscribe !== undefined) {
- this.verbose(
- 1,
- `Unsubscribing message (Channel ID: ${channelID}, Message ID: ${messageID}) from automated updates...`
- );
- await this.SubscribedMessage.destroy({
- where: {
- channelID: channelID,
- messageID: messageID,
- server: this.server.id
- }
- });
- this.verbose(
- 1,
- `Unsubscribed message (Channel ID: ${channelID}, Message ID: ${messageID}) from automated updates.`
- );
-
- this.verbose(1, 'Sending acknowledgement message...');
- await message.reply('unsubscribed message from automated updates.');
- this.verbose(1, 'Sent acknowledgement message.');
- }
- }
-
- async updateMessages() {
- this.verbose(1, 'Generating message content for update...');
- // Generate the new message.
- const generatedMessage = await this.generateMessage();
-
- // Get subscribed messages.
- const subscribedMessages = await this.SubscribedMessage.findAll({
- where: { server: this.server.id }
- });
-
- // Update each message.
- this.verbose(1, `Updating ${subscribedMessages.length} messages...`);
- for (const subscribedMessage of subscribedMessages) {
- const { channelID, messageID } = subscribedMessage;
-
- try {
- this.verbose(1, `Getting message (Channel ID: ${channelID}, Message ID: ${messageID})...`);
- const channel = await this.options.discordClient.channels.fetch(channelID);
- const message = await channel.messages.fetch(messageID);
-
- this.verbose(1, `Updating message (Channel ID: ${channelID}, Message ID: ${messageID})...`);
- await message.edit(generatedMessage);
- this.verbose(1, `Updated message (Channel ID: ${channelID}, Message ID: ${messageID}).`);
- } catch (err) {
- if (err.code === 10008) {
- this.verbose(
- 1,
- `Message (Channel ID: ${channelID}, Message ID: ${messageID}) was deleted. Removing from automated updates...`
- );
- await subscribedMessage.destroy();
- } else {
- this.verbose(
- 1,
- `Message (Channel ID: ${channelID}, Message ID: ${messageID}) could not be updated: `,
- err
- );
- }
- }
- }
- }
-}
diff --git a/squad-server/plugins/discord-base-plugin.js b/squad-server/plugins/discord-base-plugin.js
deleted file mode 100644
index 26557ed9e..000000000
--- a/squad-server/plugins/discord-base-plugin.js
+++ /dev/null
@@ -1,41 +0,0 @@
-import BasePlugin from './base-plugin.js';
-
-import { COPYRIGHT_MESSAGE } from '../utils/constants.js';
-
-export default class DiscordBasePlugin extends BasePlugin {
- static get optionsSpecification() {
- return {
- discordClient: {
- required: true,
- description: 'Discord connector name.',
- connector: 'discord',
- default: 'discord'
- }
- };
- }
-
- async prepareToMount() {
- try {
- this.channel = await this.options.discordClient.channels.fetch(this.options.channelID);
- } catch (error) {
- this.channel = null;
- this.verbose(
- 1,
- `Could not fetch Discord channel with channelID "${this.options.channelID}". Error: ${error.message}`
- );
- this.verbose(2, `${error.stack}`);
- }
- }
-
- async sendDiscordMessage(message) {
- if (!this.channel) {
- this.verbose(1, `Could not send Discord Message. Channel not initialized.`);
- return;
- }
-
- if (typeof message === 'object' && 'embed' in message)
- message.embed.footer = message.embed.footer || { text: COPYRIGHT_MESSAGE };
-
- await this.channel.send(message);
- }
-}
diff --git a/squad-server/plugins/discord-chat.js b/squad-server/plugins/discord-chat.js
deleted file mode 100644
index fdaa1e300..000000000
--- a/squad-server/plugins/discord-chat.js
+++ /dev/null
@@ -1,90 +0,0 @@
-import DiscordBasePlugin from './discord-base-plugin.js';
-
-export default class DiscordChat extends DiscordBasePlugin {
- static get description() {
- return 'The DiscordChat
plugin will log in-game chat to a Discord channel.';
- }
-
- static get defaultEnabled() {
- return true;
- }
-
- static get optionsSpecification() {
- return {
- ...DiscordBasePlugin.optionsSpecification,
- channelID: {
- required: true,
- description: 'The ID of the channel to log admin broadcasts to.',
- default: '',
- example: '667741905228136459'
- },
- chatColors: {
- required: false,
- description: 'The color of the embed for each chat.',
- default: {},
- example: { ChatAll: 16761867 }
- },
- color: {
- required: false,
- description: 'The color of the embed.',
- default: 16761867
- },
- ignoreChats: {
- required: false,
- default: ['ChatSquad'],
- description: 'A list of chat names to ignore.'
- }
- };
- }
-
- constructor(server, options, connectors) {
- super(server, options, connectors);
-
- this.onChatMessage = this.onChatMessage.bind(this);
- }
-
- async mount() {
- this.server.on('CHAT_MESSAGE', this.onChatMessage);
- }
-
- async unmount() {
- this.server.removeEventListener('CHAT_MESSAGE', this.onChatMessage);
- }
-
- async onChatMessage(info) {
- if (this.options.ignoreChats.includes(info.chat)) return;
-
- await this.sendDiscordMessage({
- embed: {
- title: info.chat,
- color: this.options.chatColors[info.chat] || this.options.color,
- fields: [
- {
- name: 'Player',
- value: info.player.name,
- inline: true
- },
- {
- name: 'SteamID',
- value: `[${info.player.steamID}](https://steamcommunity.com/profiles/${info.steamID})`,
- inline: true
- },
- {
- name: 'EosID',
- value: info.player.eosID,
- inline: true
- },
- {
- name: 'Team & Squad',
- value: `Team: ${info.player.teamID}, Squad: ${info.player.squadID || 'Unassigned'}`
- },
- {
- name: 'Message',
- value: `${info.message}`
- }
- ],
- timestamp: info.time.toISOString()
- }
- });
- }
-}
diff --git a/squad-server/plugins/discord-debug.js b/squad-server/plugins/discord-debug.js
deleted file mode 100644
index edea4a32d..000000000
--- a/squad-server/plugins/discord-debug.js
+++ /dev/null
@@ -1,40 +0,0 @@
-import DiscordBasePlugin from './discord-base-plugin.js';
-
-export default class DiscordDebug extends DiscordBasePlugin {
- static get description() {
- return (
- 'The DiscordDebug
plugin can be used to help debug SquadJS by dumping SquadJS events to a ' +
- 'Discord channel.'
- );
- }
-
- static get defaultEnabled() {
- return false;
- }
-
- static get optionsSpecification() {
- return {
- ...DiscordBasePlugin.optionsSpecification,
- channelID: {
- required: true,
- description: 'The ID of the channel to log events to.',
- default: '',
- example: '667741905228136459'
- },
- events: {
- required: true,
- description: 'A list of events to dump.',
- default: [],
- example: ['PLAYER_DIED']
- }
- };
- }
-
- async mount() {
- for (const event of this.options.events) {
- this.server.on(event, async (info) => {
- await this.sendDiscordMessage(`\`\`\`${JSON.stringify({ ...info, event }, null, 2)}\`\`\``);
- });
- }
- }
-}
diff --git a/squad-server/plugins/discord-fob-hab-explosion-damage.js b/squad-server/plugins/discord-fob-hab-explosion-damage.js
deleted file mode 100644
index d7619c22a..000000000
--- a/squad-server/plugins/discord-fob-hab-explosion-damage.js
+++ /dev/null
@@ -1,86 +0,0 @@
-import DiscordBasePlugin from './discord-base-plugin.js';
-
-export default class DiscordFOBHABExplosionDamage extends DiscordBasePlugin {
- static get description() {
- return (
- 'The DiscordFOBHABExplosionDamage
plugin logs damage done to FOBs and HABs by ' +
- 'explosions to help identify engineers blowing up friendly FOBs and HABs.'
- );
- }
-
- static get defaultEnabled() {
- return true;
- }
-
- static get optionsSpecification() {
- return {
- ...DiscordBasePlugin.optionsSpecification,
- channelID: {
- required: true,
- description: 'The ID of the channel to log FOB/HAB explosion damage to.',
- default: '',
- example: '667741905228136459'
- },
- color: {
- required: false,
- description: 'The color of the embeds.',
- default: 16761867
- }
- };
- }
-
- constructor(server, options, connectors) {
- super(server, options, connectors);
-
- this.onDeployableDamaged = this.onDeployableDamaged.bind(this);
- }
-
- async mount() {
- this.server.on('DEPLOYABLE_DAMAGED', this.onDeployableDamaged);
- }
-
- async unmount() {
- this.server.removeEventListener('DEPLOYABLE_DAMAGED', this.onDeployableDamaged);
- }
-
- async onDeployableDamaged(info) {
- if (!info.deployable.match(/(?:FOBRadio|Hab)_/i)) return;
- if (!info.weapon.match(/_Deployable_/i)) return;
- if (!info.player) return;
-
- const fields = [
- {
- name: "Player's Name",
- value: info.player.name,
- inline: true
- },
- {
- name: "Player's SteamID",
- value: `[${info.player.steamID}](https://steamcommunity.com/profiles/${info.player.steamID})`,
- inline: true
- },
- {
- name: "Player's EosID",
- value: info.player.eosID,
- inline: true
- },
- {
- name: 'Deployable',
- value: info.deployable
- },
- {
- name: 'Weapon',
- value: info.weapon
- }
- ];
-
- await this.sendDiscordMessage({
- embed: {
- title: `FOB/HAB Explosion Damage: ${info.player.name}`,
- color: this.options.color,
- fields: fields,
- timestamp: info.time.toISOString()
- }
- });
- }
-}
diff --git a/squad-server/plugins/discord-killfeed.js b/squad-server/plugins/discord-killfeed.js
deleted file mode 100644
index 1b68f2a8c..000000000
--- a/squad-server/plugins/discord-killfeed.js
+++ /dev/null
@@ -1,108 +0,0 @@
-import DiscordBasePlugin from './discord-base-plugin.js';
-
-export default class DiscordKillFeed extends DiscordBasePlugin {
- static get description() {
- return (
- 'The DiscordKillFeed
plugin logs all wounds and related information to a Discord channel for ' +
- 'admins to review.'
- );
- }
-
- static get defaultEnabled() {
- return false;
- }
-
- static get optionsSpecification() {
- return {
- ...DiscordBasePlugin.optionsSpecification,
- channelID: {
- required: true,
- description: 'The ID of the channel to log teamkills to.',
- default: '',
- example: '667741905228136459'
- },
- color: {
- required: false,
- description: 'The color of the embeds.',
- default: 16761867
- },
- disableCBL: {
- required: false,
- description: 'Disable Community Ban List information.',
- default: false
- }
- };
- }
-
- constructor(server, options, connectors) {
- super(server, options, connectors);
-
- this.onWound = this.onWound.bind(this);
- }
-
- async mount() {
- this.server.on('PLAYER_WOUNDED', this.onWound);
- }
-
- async unmount() {
- this.server.removeEventListener('PLAYER_WOUNDED', this.onWound);
- }
-
- async onWound(info) {
- if (!info.attacker) return;
-
- const fields = [
- {
- name: "Attacker's Name",
- value: info.attacker.name,
- inline: true
- },
- {
- name: "Attacker's SteamID",
- value: `[${info.attacker.steamID}](https://steamcommunity.com/profiles/${info.attacker.steamID})`,
- inline: true
- },
- {
- name: "Attacker's EosID",
- value: info.attacker.eosID,
- inline: true
- },
- {
- name: 'Weapon',
- value: info.weapon
- },
- {
- name: "Victim's Name",
- value: info.victim ? info.victim.name : 'Unknown',
- inline: true
- },
- {
- name: "Victim's SteamID",
- value: info.victim
- ? `[${info.victim.steamID}](https://steamcommunity.com/profiles/${info.victim.steamID})`
- : 'Unknown',
- inline: true
- },
- {
- name: "Victim's EosID",
- value: info.victim ? info.victim.eosID : 'Unknown',
- inline: true
- }
- ];
-
- if (!this.options.disableCBL)
- fields.push({
- name: 'Community Ban List',
- value: `[Attacker's Bans](https://communitybanlist.com/search/${info.attacker.steamID})`
- });
-
- await this.sendDiscordMessage({
- embed: {
- title: `KillFeed: ${info.attacker.name}`,
- color: this.options.color,
- fields: fields,
- timestamp: info.time.toISOString()
- }
- });
- }
-}
diff --git a/squad-server/plugins/discord-placeholder.js b/squad-server/plugins/discord-placeholder.js
deleted file mode 100644
index 495f7c531..000000000
--- a/squad-server/plugins/discord-placeholder.js
+++ /dev/null
@@ -1,59 +0,0 @@
-import BasePlugin from './base-plugin.js';
-
-export default class DiscordPlaceholder extends BasePlugin {
- static get description() {
- return (
- 'The DiscordPlaceholder
plugin allows you to make your bot create placeholder messages that ' +
- 'can be used when configuring other plugins.'
- );
- }
-
- static get defaultEnabled() {
- return true;
- }
-
- static get optionsSpecification() {
- return {
- discordClient: {
- required: true,
- description: 'Discord connector name.',
- connector: 'discord',
- default: 'discord'
- },
- command: {
- required: false,
- description: 'Command to create Discord placeholder.',
- default: '!placeholder'
- },
- channelID: {
- required: true,
- description: 'The bot will only answer with a placeholder on this channel',
- default: ''
- }
- };
- }
-
- constructor(server, options, connectors) {
- super(server, options, connectors);
-
- this.escapeRegex = (str) => str.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
-
- this.onMessage = this.onMessage.bind(this);
- }
-
- async mount() {
- this.options.discordClient.on('message', this.onMessage);
- }
-
- async unmount() {
- this.options.discordClient.removeEventListener('message', this.onMessage);
- }
-
- async onMessage(message) {
- if (message.author.bot) return;
- if (message.channel.id !== this.options.channelID) return;
- const prefixRegex = new RegExp(`^(${this.escapeRegex(this.options.command)})\\s*`);
- if (!prefixRegex.test(message.content)) return;
- await message.channel.send('Placeholder.');
- }
-}
diff --git a/squad-server/plugins/discord-rcon.js b/squad-server/plugins/discord-rcon.js
deleted file mode 100644
index 5f42e68e3..000000000
--- a/squad-server/plugins/discord-rcon.js
+++ /dev/null
@@ -1,119 +0,0 @@
-import BasePlugin from './base-plugin.js';
-
-export default class DiscordRcon extends BasePlugin {
- static get description() {
- return (
- 'The DiscordRcon
plugin allows a specified Discord channel to be used as a RCON console to ' +
- 'run RCON commands.'
- );
- }
-
- static get defaultEnabled() {
- return false;
- }
-
- static get optionsSpecification() {
- return {
- discordClient: {
- required: true,
- description: 'Discord connector name.',
- connector: 'discord',
- default: 'discord'
- },
- channelID: {
- required: true,
- description: 'ID of channel to turn into RCON console.',
- default: '',
- example: '667741905228136459'
- },
- permissions: {
- required: false,
- description:
- '{}
) permissions will be disabledDiscordRoundWinner
plugin will send the round winner to a Discord channel.';
- }
-
- static get defaultEnabled() {
- return true;
- }
-
- static get optionsSpecification() {
- return {
- ...DiscordBasePlugin.optionsSpecification,
- channelID: {
- required: true,
- description: 'The ID of the channel to log admin broadcasts to.',
- default: '',
- example: '667741905228136459'
- },
- color: {
- required: false,
- description: 'The color of the embed.',
- default: 16761867
- }
- };
- }
-
- constructor(server, options, connectors) {
- super(server, options, connectors);
-
- this.onNewGame = this.onNewGame.bind(this);
- }
-
- async mount() {
- this.server.on('NEW_GAME', this.onNewGame);
- }
-
- async unmount() {
- this.server.removeEventListener('NEW_GAME', this.onNewGame);
- }
-
- async onNewGame(info) {
- await this.sendDiscordMessage({
- embed: {
- title: 'Round Winner',
- color: this.options.color,
- fields: [
- {
- name: 'Message',
- value: `${info.winner} won on ${this.server.layerHistory[1].layer.name}.`
- }
- ],
- timestamp: info.time.toISOString()
- }
- });
- }
-}
diff --git a/squad-server/plugins/discord-roundended.js b/squad-server/plugins/discord-roundended.js
deleted file mode 100644
index f9757b167..000000000
--- a/squad-server/plugins/discord-roundended.js
+++ /dev/null
@@ -1,79 +0,0 @@
-import DiscordBasePlugin from './discord-base-plugin.js';
-
-export default class DiscordRoundEnded extends DiscordBasePlugin {
- static get description() {
- return 'The DiscordRoundEnded
plugin will send the round winner to a Discord channel.';
- }
-
- static get defaultEnabled() {
- return true;
- }
-
- static get optionsSpecification() {
- return {
- ...DiscordBasePlugin.optionsSpecification,
- channelID: {
- required: true,
- description: 'The ID of the channel to log round end events to.',
- default: '',
- example: '667741905228136459'
- },
- color: {
- required: false,
- description: 'The color of the embed.',
- default: 16761867
- }
- };
- }
-
- constructor(server, options, connectors) {
- super(server, options, connectors);
-
- this.onRoundEnd = this.onRoundEnd.bind(this);
- }
-
- async mount() {
- this.server.on('ROUND_ENDED', this.onRoundEnd);
- }
-
- async unmount() {
- this.server.removeEventListener('ROUND_ENDED', this.onRoundEnd);
- }
-
- async onRoundEnd(info) {
- if (!info.winner || !info.loser) {
- await this.sendDiscordMessage({
- embed: {
- title: 'Round Ended',
- description: 'This match Ended in a Draw',
- color: this.options.color,
- timestamp: info.time.toISOString()
- }
- });
- return;
- }
-
- await this.sendDiscordMessage({
- embed: {
- title: 'Round Ended',
- description: `${info.winner.layer} - ${info.winner.level}`,
- color: this.options.color,
- fields: [
- {
- name: `Team ${info.winner.team} Won`,
- value: `${info.winner.subfaction}\n ${info.winner.faction}\n won with ${info.winner.tickets} tickets.`
- },
- {
- name: `Team ${info.loser.team} Lost`,
- value: `${info.loser.subfaction}\n ${info.loser.faction}\n lost with ${info.loser.tickets} tickets.`
- },
- {
- name: 'Ticket Difference',
- value: `${info.winner.tickets - info.loser.tickets}.`
- }
- ],
- timestamp: info.time.toISOString()
- }
- });
- }
-}
diff --git a/squad-server/plugins/discord-server-status.js b/squad-server/plugins/discord-server-status.js
deleted file mode 100644
index a3c9d4a6b..000000000
--- a/squad-server/plugins/discord-server-status.js
+++ /dev/null
@@ -1,133 +0,0 @@
-import Discord from 'discord.js';
-import tinygradient from 'tinygradient';
-
-import { COPYRIGHT_MESSAGE } from '../utils/constants.js';
-
-import DiscordBaseMessageUpdater from './discord-base-message-updater.js';
-
-export default class DiscordServerStatus extends DiscordBaseMessageUpdater {
- static get description() {
- return 'The DiscordServerStatus
plugin can be used to get the server status in Discord.';
- }
-
- static get defaultEnabled() {
- return true;
- }
-
- static get optionsSpecification() {
- return {
- ...DiscordBaseMessageUpdater.optionsSpecification,
- command: {
- required: false,
- description: 'Command name to get message.',
- default: '!status'
- },
- updateInterval: {
- required: false,
- description: 'How frequently to update the time in Discord.',
- default: 60 * 1000
- },
- setBotStatus: {
- required: false,
- description: "Whether to update the bot's status with server information.",
- default: true
- }
- };
- }
-
- constructor(server, options, connectors) {
- super(server, options, connectors);
-
- this.updateMessages = this.updateMessages.bind(this);
- this.updateStatus = this.updateStatus.bind(this);
- }
-
- async mount() {
- await super.mount();
- this.updateInterval = setInterval(this.updateMessages, this.options.updateInterval);
- this.updateStatusInterval = setInterval(this.updateStatus, this.options.updateInterval);
- }
-
- async unmount() {
- await super.unmount();
- clearInterval(this.updateInterval);
- clearInterval(this.updateStatusInterval);
- }
-
- async generateMessage() {
- const embed = new Discord.MessageEmbed();
-
- // Set embed title.
- embed.setTitle(this.server.serverName);
-
- // Set player embed field.
- let players = '';
-
- players += `${this.server.a2sPlayerCount}`;
- if (this.server.publicQueue + this.server.reserveQueue > 0)
- players += ` (+${this.server.publicQueue + this.server.reserveQueue})`;
-
- players += ` / ${this.server.publicSlots}`;
- if (this.server.reserveSlots > 0) players += ` (+${this.server.reserveSlots})`;
-
- embed.addField('Players', players);
-
- // Set layer embed fields.
- embed.addField(
- 'Current Layer',
- `\`\`\`${this.server.currentLayer?.name || 'Unknown'}\`\`\``,
- true
- );
- embed.addField(
- 'Next Layer',
- `\`\`\`${
- this.server.nextLayer?.name || (this.server.nextLayerToBeVoted ? 'To be voted' : 'Unknown')
- }\`\`\``,
- true
- );
-
- // Set layer image.
- embed.setImage(
- this.server.currentLayer
- ? `https://squad-data.nyc3.cdn.digitaloceanspaces.com/main/${this.server.currentLayer.layerid}.jpg`
- : undefined
- );
-
- // Set timestamp.
- embed.setTimestamp(new Date());
-
- // Set footer.
- embed.setFooter(COPYRIGHT_MESSAGE);
-
- // Clamp the ratio between 0 and 1 to avoid tinygradient errors.
- const ratio = this.server.a2sPlayerCount / (this.server.publicSlots + this.server.reserveSlots);
- const clampedRatio = Math.min(1, Math.max(0, ratio));
-
- // Set gradient embed color.
- embed.setColor(
- parseInt(
- tinygradient([
- { color: '#ff0000', pos: 0 },
- { color: '#ffff00', pos: 0.5 },
- { color: '#00ff00', pos: 1 }
- ])
- .rgbAt(clampedRatio)
- .toHex(),
- 16
- )
- );
-
- return embed;
- }
-
- async updateStatus() {
- if (!this.options.setBotStatus) return;
-
- await this.options.discordClient.user.setActivity(
- `(${this.server.a2sPlayerCount}/${this.server.publicSlots}) ${
- this.server.currentLayer?.name || 'Unknown'
- }`,
- { type: 'WATCHING' }
- );
- }
-}
diff --git a/squad-server/plugins/discord-squad-created.js b/squad-server/plugins/discord-squad-created.js
deleted file mode 100644
index 1fe83830d..000000000
--- a/squad-server/plugins/discord-squad-created.js
+++ /dev/null
@@ -1,79 +0,0 @@
-import DiscordBasePlugin from './discord-base-plugin.js';
-
-export default class DiscordSquadCreated extends DiscordBasePlugin {
- static get description() {
- return 'The SquadCreated
plugin will log Squad Creation events to a Discord channel.';
- }
-
- static get defaultEnabled() {
- return false;
- }
-
- static get optionsSpecification() {
- return {
- ...DiscordBasePlugin.optionsSpecification,
- channelID: {
- required: true,
- description: 'The ID of the channel to log Squad Creation events to.',
- default: '',
- example: '667741905228136459'
- },
- color: {
- required: false,
- description: 'The color of the embed.',
- default: 16761867
- },
- useEmbed: {
- required: false,
- description: `Send message as Embed`,
- default: true
- }
- };
- }
-
- constructor(server, options, connectors) {
- super(server, options, connectors);
-
- this.onSquadCreated = this.onSquadCreated.bind(this);
- }
-
- async mount() {
- this.server.on('SQUAD_CREATED', this.onSquadCreated);
- }
-
- async unmount() {
- this.server.removeEventListener('SQUAD_CREATED', this.onSquadCreated);
- }
-
- async onSquadCreated(info) {
- if (this.options.useEmbed) {
- await this.sendDiscordMessage({
- embed: {
- title: `Squad Created`,
- color: this.options.color,
- fields: [
- {
- name: 'Player',
- value: info.player.name,
- inline: true
- },
- {
- name: 'Team',
- value: info.teamName,
- inline: true
- },
- {
- name: 'Squad Number & Squad Name',
- value: `${info.player.squadID} : ${info.squadName}`
- }
- ],
- timestamp: info.time.toISOString()
- }
- });
- } else {
- await this.sendDiscordMessage(
- ` \`\`\`Player: ${info.player.name}\n created Squad ${info.player.squadID} : ${info.squadName}\n on ${info.teamName}\`\`\` `
- );
- }
- }
-}
diff --git a/squad-server/plugins/discord-subsystem-restarter.js b/squad-server/plugins/discord-subsystem-restarter.js
deleted file mode 100644
index e718e7575..000000000
--- a/squad-server/plugins/discord-subsystem-restarter.js
+++ /dev/null
@@ -1,74 +0,0 @@
-import BasePlugin from './base-plugin.js';
-
-export default class DiscordSubsystemRestarter extends BasePlugin {
- static get description() {
- return (
- 'The DiscordSubSystemRestarter
plugin allows you to manually restart SquadJS subsystems in case ' +
- 'an issues arises with them.' +
- '!squadjs restartsubsystem rcon
!squadjs restartsubsystem logparser
DiscordTeamkill
plugin logs teamkills and related information to a Discord channel for ' +
- 'admins to review.'
- );
- }
-
- static get defaultEnabled() {
- return true;
- }
-
- static get optionsSpecification() {
- return {
- ...DiscordBasePlugin.optionsSpecification,
- channelID: {
- required: true,
- description: 'The ID of the channel to log teamkills to.',
- default: '',
- example: '667741905228136459'
- },
- color: {
- required: false,
- description: 'The color of the embeds.',
- default: 16761867
- },
- disableCBL: {
- required: false,
- description: 'Disable Community Ban List information.',
- default: false
- }
- };
- }
-
- constructor(server, options, connectors) {
- super(server, options, connectors);
-
- this.onTeamkill = this.onTeamkill.bind(this);
- }
-
- async mount() {
- this.server.on('TEAMKILL', this.onTeamkill);
- }
-
- async unmount() {
- this.server.removeEventListener('TEAMKILL', this.onTeamkill);
- }
-
- async onTeamkill(info) {
- if (!info.attacker) return;
-
- const fields = [
- {
- name: "Attacker's Name",
- value: info.attacker.name,
- inline: true
- },
- {
- name: "Attacker's SteamID",
- value: `[${info.attacker.steamID}](https://steamcommunity.com/profiles/${info.attacker.steamID})`,
- inline: true
- },
- {
- name: "Attacker's EosID",
- value: info.attacker.eosID,
- inline: true
- },
- {
- name: 'Weapon',
- value: info.weapon
- },
- {
- name: "Victim's Name",
- value: info.victim.name,
- inline: true
- },
- {
- name: "Victim's SteamID",
- value: `[${info.victim.steamID}](https://steamcommunity.com/profiles/${info.victim.steamID})`,
- inline: true
- },
- {
- name: "Victim's EosID",
- value: info.victim.eosID,
- inline: true
- }
- ];
-
- if (!this.options.disableCBL)
- fields.push({
- name: 'Community Ban List',
- value: `[Attacker's Bans](https://communitybanlist.com/search/${info.attacker.steamID})`
- });
-
- await this.sendDiscordMessage({
- embed: {
- title: `Teamkill: ${info.attacker.name}`,
- color: this.options.color,
- fields: fields,
- timestamp: info.time.toISOString()
- }
- });
- }
-}
diff --git a/squad-server/plugins/fog-of-war.js b/squad-server/plugins/fog-of-war.js
deleted file mode 100644
index 2db57283d..000000000
--- a/squad-server/plugins/fog-of-war.js
+++ /dev/null
@@ -1,46 +0,0 @@
-import BasePlugin from './base-plugin.js';
-
-export default class FogOfWar extends BasePlugin {
- static get description() {
- return 'The FogOfWar
plugin can be used to automate setting fog of war mode.';
- }
-
- static get defaultEnabled() {
- return false;
- }
-
- static get optionsSpecification() {
- return {
- mode: {
- required: false,
- description: 'Fog of war mode to set.',
- default: 1
- },
- delay: {
- required: false,
- description: 'Delay before setting fog of war mode.',
- default: 10 * 1000
- }
- };
- }
-
- constructor(server, options, connectors) {
- super(server, options, connectors);
-
- this.onNewGame = this.onNewGame.bind(this);
- }
-
- async mount() {
- this.server.on('NEW_GAME', this.onNewGame);
- }
-
- async unmount() {
- this.server.removeEventListener('NEW_GAME', this.onNewGame);
- }
-
- async onNewGame() {
- setTimeout(() => {
- this.server.rcon.setFogOfWar(this.options.mode);
- }, this.options.delay);
- }
-}
diff --git a/squad-server/plugins/index.js b/squad-server/plugins/index.js
deleted file mode 100644
index a6a1a9540..000000000
--- a/squad-server/plugins/index.js
+++ /dev/null
@@ -1,50 +0,0 @@
-import fs from 'fs';
-
-import Logger from 'core/logger';
-import path from 'path';
-import { fileURLToPath } from 'url';
-
-const __dirname = path.dirname(fileURLToPath(import.meta.url));
-
-class Plugins {
- constructor() {
- this.plugins = null;
- }
-
- async getPlugins(force = false) {
- if (this.plugins && !force) return this.plugins;
-
- this.plugins = {};
-
- const dir = await fs.promises.opendir(path.join(__dirname, './'));
-
- const pluginFilenames = [];
- for await (const dirent of dir) {
- // Check for non .js file type
- if (!dirent.isFile() || !dirent.name.endsWith('.js')) {
- continue;
- }
- if (
- [
- 'index.js',
- 'base-plugin.js',
- 'discord-base-message-updater.js',
- 'discord-base-plugin.js',
- 'readme.md'
- ].includes(dirent.name)
- )
- continue;
- pluginFilenames.push(dirent.name);
- }
-
- for (const pluginFilename of pluginFilenames) {
- Logger.verbose('Plugins', 1, `Loading plugin file ${pluginFilename}...`);
- const { default: Plugin } = await import(`./${pluginFilename}`);
- this.plugins[Plugin.name] = Plugin;
- }
-
- return this.plugins;
- }
-}
-
-export default new Plugins();
diff --git a/squad-server/plugins/intervalled-broadcasts.js b/squad-server/plugins/intervalled-broadcasts.js
deleted file mode 100644
index bb47f87c2..000000000
--- a/squad-server/plugins/intervalled-broadcasts.js
+++ /dev/null
@@ -1,49 +0,0 @@
-import BasePlugin from './base-plugin.js';
-
-export default class IntervalledBroadcasts extends BasePlugin {
- static get description() {
- return (
- 'The IntervalledBroadcasts
plugin allows you to set broadcasts, which will be broadcasted at ' +
- 'preset intervals'
- );
- }
-
- static get defaultEnabled() {
- return false;
- }
-
- static get optionsSpecification() {
- return {
- broadcasts: {
- required: false,
- description: 'Messages to broadcast.',
- default: [],
- example: ['This server is powered by SquadJS.']
- },
- interval: {
- required: false,
- description: 'Frequency of the broadcasts in milliseconds.',
- default: 5 * 60 * 1000
- }
- };
- }
-
- constructor(server, options, connectors) {
- super(server, options, connectors);
-
- this.broadcast = this.broadcast.bind(this);
- }
-
- async mount() {
- this.interval = setInterval(this.broadcast, this.options.interval);
- }
-
- async unmount() {
- clearInterval(this.interval);
- }
-
- async broadcast() {
- await this.server.rcon.broadcast(this.options.broadcasts[0]);
- this.options.broadcasts.push(this.options.broadcasts.shift());
- }
-}
diff --git a/squad-server/plugins/readme.md b/squad-server/plugins/readme.md
deleted file mode 100644
index cd4f0bdf5..000000000
--- a/squad-server/plugins/readme.md
+++ /dev/null
@@ -1,45 +0,0 @@
-## Creating Your Own Plugins
-To create your own plugin you need a basic knowledge of JavaScript.
-
-Typical plugins are functions that take the server as an argument in order to allow the plugin to access information about the server or manipulate it in some way:
-```js
-function aPluginToLogServerID(server){
- console.log(server.id);
-}
-```
-
-Stored in the server object are a range of different properties that store information about the server.
- * `id` - ID of the server.
- * `serverName` - Name of the server.
- * `maxPlayers` - Maximum number of players on the server.
- * `publicSlots` - Maximum number of public slots.
- * `reserveSlots` - Maximum number of reserved slots.
- * `publicQueue` - Length of the public queue.
- * `reserveQueue` - Length of the reserved queue.
- * `matchTimeout` - Time until match ends?
- * `gameVersion` - Game version.
- * `layerHistory` - Array history of layers used with most recent at the start. Each entry is an object with layer info in.
- * `currentLayer` - The current layer.
- * `nextLayer` - The next layer.
- * `players` - Array of players. Each entry is a PlayerObject with various bits of info in.
-
-One approach to making a plugin would be to run an action periodically, in the style of the original SquadJS:
-```js
-function aPluginToLogPlayerCountEvery60Seconds(server){
- setInterval(() => {
- console.log(server.players.length);
- }, 60 * 1000);
-}
-```
-
-A more common approach in this version of SquadJS is to react to an event happening:
-```js
-function aPluginToLogTeamkills(server){
- server.on('TEAMKILL', info => {
- console.log(info);
- });
-}
-```
-Various actions can be completed in a plugin. Most of these will involve outside system, e.g. Discord.js to run a Discord bot, so they are not documented here. However, you may run RCON commands using `server.rcon.execute("Command");`.
-
-If you're struggling to create a plugin, the existing [`plugins`](https://github.com/Team-Silver-Sphere/SquadJS/tree/master/plugins) are a good place to go for examples or feel free to ask for help in the Squad RCON Discord.
\ No newline at end of file
diff --git a/squad-server/plugins/seeding-mode.js b/squad-server/plugins/seeding-mode.js
deleted file mode 100644
index 5aa67fbe0..000000000
--- a/squad-server/plugins/seeding-mode.js
+++ /dev/null
@@ -1,103 +0,0 @@
-import BasePlugin from './base-plugin.js';
-
-export default class SeedingMode extends BasePlugin {
- static get description() {
- return (
- 'The SeedingMode
plugin broadcasts seeding rule messages to players at regular intervals ' +
- 'when the server is below a specified player count. It can also be configured to display "Live" messages when ' +
- 'the server goes live.'
- );
- }
-
- static get defaultEnabled() {
- return true;
- }
-
- static get optionsSpecification() {
- return {
- interval: {
- required: false,
- description: 'Frequency of seeding messages in milliseconds.',
- default: 2.5 * 60 * 1000
- },
- seedingThreshold: {
- required: false,
- description: 'Player count required for server not to be in seeding mode.',
- default: 50
- },
- seedingMessage: {
- required: false,
- description: 'Seeding message to display.',
- default: 'Seeding Rules Active! Fight only over the middle flags! No FOB Hunting!'
- },
- liveEnabled: {
- required: false,
- description: 'Enable "Live" messages for when the server goes live.',
- default: true
- },
- liveThreshold: {
- required: false,
- description: 'Player count required for "Live" messages to not bee displayed.',
- default: 52
- },
- liveMessage: {
- required: false,
- description: '"Live" message to display.',
- default: 'Live!'
- },
- waitOnNewGames: {
- required: false,
- description: 'Should the plugin wait to be executed on NEW_GAME event.',
- default: true
- },
- waitTimeOnNewGame: {
- required: false,
- description: 'The time to wait before check player counts in seconds.',
- default: 30
- }
- };
- }
-
- constructor(server, options, connectors) {
- super(server, options, connectors);
-
- this.stop = false;
- this.broadcast = this.broadcast.bind(this);
- this.onNewGame = this.onNewGame.bind(this);
- }
-
- async mount() {
- if (this.options.waitOnNewGames) {
- this.server.on('NEW_GAME', this.onNewGame);
- }
-
- this.interval = setInterval(this.broadcast, this.options.interval);
- }
-
- async unmount() {
- clearInterval(this.interval);
- this.server.removeEventListener('NEW_GAME', this.onNewGame);
- }
-
- onNewGame() {
- this.stop = true;
- setTimeout(() => {
- this.stop = false;
- }, 30 * 1000);
- }
-
- async broadcast() {
- if (this.stop) return;
- if (
- this.server.a2sPlayerCount !== 0 &&
- this.server.a2sPlayerCount < this.options.seedingThreshold
- )
- await this.server.rcon.broadcast(this.options.seedingMessage);
- else if (
- this.server.a2sPlayerCount !== 0 &&
- this.options.liveEnabled &&
- this.server.a2sPlayerCount < this.options.liveThreshold
- )
- await this.server.rcon.broadcast(this.options.liveMessage);
- }
-}
diff --git a/squad-server/plugins/socket-io-api.js b/squad-server/plugins/socket-io-api.js
deleted file mode 100644
index 64a09a358..000000000
--- a/squad-server/plugins/socket-io-api.js
+++ /dev/null
@@ -1,181 +0,0 @@
-import { createServer } from 'http';
-import { Server } from 'socket.io';
-
-import BasePlugin from './base-plugin.js';
-
-const eventsToBroadcast = [
- 'CHAT_MESSAGE',
- 'POSSESSED_ADMIN_CAMERA',
- 'UNPOSSESSED_ADMIN_CAMERA',
- 'RCON_ERROR',
- 'ADMIN_BROADCAST',
- 'DEPLOYABLE_DAMAGED',
- 'NEW_GAME',
- 'PLAYER_CONNECTED',
- 'PLAYER_DISCONNECTED',
- 'PLAYER_DAMAGED',
- 'PLAYER_WOUNDED',
- 'PLAYER_DIED',
- 'PLAYER_REVIVED',
- 'TEAMKILL',
- 'PLAYER_POSSESS',
- 'PLAYER_UNPOSSESS',
- 'TICK_RATE',
- 'PLAYER_TEAM_CHANGE',
- 'PLAYER_SQUAD_CHANGE',
- 'UPDATED_PLAYER_INFORMATION',
- 'UPDATED_LAYER_INFORMATION',
- 'UPDATED_A2S_INFORMATION',
- 'PLAYER_AUTO_KICKED',
- 'PLAYER_WARNED',
- 'PLAYER_KICKED',
- 'PLAYER_BANNED',
- 'SQUAD_CREATED'
-];
-
-export default class SocketIOAPI extends BasePlugin {
- static get description() {
- return (
- 'The SocketIOAPI
plugin allows remote access to a SquadJS instance via Socket.IO' +
- '
- const socket = io.connect('ws://IP:PORT', {
- auth: {
- token: "MySecretPassword"
- }
- })
-
` +
- 'If you need more documentation about socket.io please go ahead and read the following;' +
- 'TeamRandomizer
can be used to randomize teams. It's great for destroying clan stacks or for " +
- 'social events. It can be run by typing, by default, !randomize
into in-game admin chat'
- );
- }
-
- static get defaultEnabled() {
- return true;
- }
-
- static get optionsSpecification() {
- return {
- command: {
- required: false,
- description: 'The command used to randomize the teams.',
- default: 'randomize'
- }
- };
- }
-
- constructor(server, options, connectors) {
- super(server, options, connectors);
-
- this.onChatCommand = this.onChatCommand.bind(this);
- }
-
- async mount() {
- this.server.on(`CHAT_COMMAND:${this.options.command}`, this.onChatCommand);
- }
-
- async unmount() {
- this.server.removeEventListener(`CHAT_COMMAND:${this.options.command}`, this.onChatCommand);
- }
-
- async onChatCommand(info) {
- if (info.chat !== 'ChatAdmin') return;
-
- const players = this.server.players.slice(0);
-
- let currentIndex = players.length;
- let temporaryValue;
- let randomIndex;
-
- while (currentIndex !== 0) {
- randomIndex = Math.floor(Math.random() * currentIndex);
- currentIndex -= 1;
-
- temporaryValue = players[currentIndex];
- players[currentIndex] = players[randomIndex];
- players[randomIndex] = temporaryValue;
- }
-
- let team = '1';
-
- for (const player of players) {
- if (player.teamID !== team) await this.server.rcon.switchTeam(player.eosID);
-
- team = team === '1' ? '2' : '1';
- }
- }
-}
diff --git a/squad-server/scripts/build-config-file.js b/squad-server/scripts/build-config-file.js
deleted file mode 100644
index e6cfc7b08..000000000
--- a/squad-server/scripts/build-config-file.js
+++ /dev/null
@@ -1,8 +0,0 @@
-import SquadServerFactory from '../factory.js';
-
-console.log('Building config...');
-SquadServerFactory.buildConfigFile()
- .then(() => {
- console.log('Done.');
- })
- .catch(console.log);
diff --git a/squad-server/scripts/build-readme.js b/squad-server/scripts/build-readme.js
deleted file mode 100644
index f471c91bd..000000000
--- a/squad-server/scripts/build-readme.js
+++ /dev/null
@@ -1,8 +0,0 @@
-import SquadServerFactory from '../factory.js';
-
-console.log('Building readme...');
-SquadServerFactory.buildReadmeFile()
- .then(() => {
- console.log('Done.');
- })
- .catch(console.log);
diff --git a/squad-server/templates/SquadJS-Dashboard-v2.json b/squad-server/templates/SquadJS-Dashboard-v2.json
deleted file mode 100644
index ed8b8ab7b..000000000
--- a/squad-server/templates/SquadJS-Dashboard-v2.json
+++ /dev/null
@@ -1,3623 +0,0 @@
-{
- "annotations": {
- "list": [
- {
- "builtIn": 1,
- "datasource": "-- Grafana --",
- "enable": true,
- "hide": true,
- "iconColor": "rgba(0, 211, 255, 1)",
- "name": "Annotations & Alerts",
- "type": "dashboard"
- }
- ]
- },
- "editable": true,
- "gnetId": null,
- "graphTooltip": 2,
- "id": 7,
- "iteration": 1615585228169,
- "links": [],
- "panels": [
- {
- "columnAliases": [],
- "columnFiltersEnabled": false,
- "columnWidthHints": [],
- "columns": [],
- "compactRowsEnabled": false,
- "datasource": "MySQL",
- "datatablePagingType": "simple_numbers",
- "datatableTheme": "basic_theme",
- "description": "This panel does not sort top scores. ",
- "emptyData": true,
- "fieldConfig": {
- "defaults": {
- "custom": {}
- },
- "overrides": []
- },
- "fontSize": "100%",
- "gridPos": {
- "h": 9,
- "w": 24,
- "x": 0,
- "y": 0
- },
- "hoverEnabled": true,
- "id": 35,
- "infoEnabled": true,
- "lengthChangeEnabled": true,
- "orderColumnEnabled": true,
- "pagingTypes": [
- {
- "text": "Page number buttons only",
- "value": "numbers"
- },
- {
- "text": "'Previous' and 'Next' buttons only",
- "value": "simple"
- },
- {
- "text": "'Previous' and 'Next' buttons, plus page numbers",
- "value": "simple_numbers"
- },
- {
- "text": "'First', 'Previous', 'Next' and 'Last' buttons",
- "value": "full"
- },
- {
- "text": "'First', 'Previous', 'Next' and 'Last' buttons, plus page numbers",
- "value": "full_numbers"
- },
- {
- "text": "'First' and 'Last' buttons, plus page numbers",
- "value": "first_last_numbers"
- }
- ],
- "panelHeight": null,
- "pluginVersion": "7.1.1",
- "rowNumbersEnabled": false,
- "rowsPerPage": 5,
- "scroll": false,
- "scrollHeight": "default",
- "searchEnabled": true,
- "showCellBorders": false,
- "showHeader": true,
- "showRowBorders": true,
- "sort": {
- "col": 0,
- "desc": true
- },
- "sortByColumns": [
- {
- "columnData": "Kills",
- "sortMethod": "desc"
- }
- ],
- "sortByColumnsData": [
- [
- 3,
- "desc"
- ]
- ],
- "stripedRowsEnabled": true,
- "styles": [
- {
- "dateFormat": "YYYY-MM-DD HH:mm:ss",
- "pattern": "Time",
- "type": "date"
- },
- {
- "colorMode": null,
- "colors": [
- "rgba(245, 54, 54, 0.9)",
- "rgba(237, 129, 40, 0.89)",
- "rgba(50, 172, 45, 0.97)"
- ],
- "decimals": 2,
- "pattern": "/.*/",
- "splitPattern": "/ /",
- "thresholds": [],
- "type": "string",
- "unit": "short"
- }
- ],
- "targets": [
- {
- "format": "table",
- "group": [],
- "metricColumn": "none",
- "rawQuery": true,
- "rawSql": "SELECT\r\n m.attacker AS \"Steam ID\",\r\n m.attackerName AS \"Name\",\r\n `Wounds`,\r\n `Kills`,\r\n `Deaths`,\r\n `Kills`/`Deaths` AS `K/D`,\r\n `Revives`\r\nFROM `DBLog_Wounds` m\r\nLEFT JOIN (\r\n SELECT\r\n attacker,\r\n COUNT(*) AS `Wounds`\r\n FROM `DBLog_Wounds`\r\n WHERE\r\n $__timeFilter(time) AND\r\n server = $SERVER_ID\r\n GROUP BY attacker\r\n) w ON w.attacker = m.attacker\r\nLEFT JOIN (\r\n SELECT\r\n attacker,\r\n COUNT(*) AS `Kills`\r\n FROM `DBLog_Deaths`\r\n WHERE\r\n $__timeFilter(time) AND\r\n server = $SERVER_ID\r\n GROUP BY attacker\r\n) k ON k.attacker = m.attacker\r\nLEFT JOIN (\r\n SELECT\r\n victim,\r\n COUNT(*) AS `Deaths`\r\n FROM `DBLog_Deaths`\r\n WHERE\r\n $__timeFilter(time) AND\r\n server = $SERVER_ID\r\n GROUP BY victim\r\n) d ON d.victim = m.attacker\r\nLEFT JOIN (\r\n SELECT\r\n reviver,\r\n COUNT(*) AS `Revives`\r\n FROM `DBLog_Revives`\r\n WHERE\r\n $__timeFilter(time) AND\r\n server = $SERVER_ID\r\n GROUP BY reviver\r\n) r ON r.reviver = m.attacker\r\n WHERE\r\n $__timeFilter(time) AND\r\n server = $SERVER_ID \r\nGROUP BY m.attacker\r\nHAVING `K/D` IS NOT NULL;",
- "refId": "A",
- "select": [
- [
- {
- "params": [
- "id"
- ],
- "type": "column"
- }
- ]
- ],
- "table": "DBLog_TickRates",
- "timeColumn": "time",
- "timeColumnType": "timestamp",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- }
- ],
- "themeOptions": {
- "dark": "./styles/dark.scss",
- "light": "./styles/light.scss"
- },
- "themes": [
- {
- "disabled": false,
- "text": "Basic",
- "value": "basic_theme"
- },
- {
- "disabled": true,
- "text": "Bootstrap",
- "value": "bootstrap_theme"
- },
- {
- "disabled": true,
- "text": "Foundation",
- "value": "foundation_theme"
- },
- {
- "disabled": true,
- "text": "ThemeRoller",
- "value": "themeroller_theme"
- }
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": " Only for search in the top scores - This panel does not sort top scores. ",
- "transform": "table",
- "type": "briangann-datatable-panel"
- },
- {
- "columns": [],
- "datasource": "MySQL",
- "fieldConfig": {
- "defaults": {
- "custom": {}
- },
- "overrides": []
- },
- "fontSize": "100%",
- "gridPos": {
- "h": 14,
- "w": 24,
- "x": 0,
- "y": 9
- },
- "id": 32,
- "pageSize": null,
- "showHeader": true,
- "sort": {
- "col": 3,
- "desc": true
- },
- "styles": [],
- "targets": [
- {
- "format": "table",
- "group": [],
- "metricColumn": "none",
- "rawQuery": true,
- "rawSql": "SELECT\r\n m.attacker AS \"Steam ID\",\r\n m.attackerName AS \"Name\",\r\n `Wounds`,\r\n `Kills`,\r\n `Deaths`,\r\n `Kills`/`Deaths` AS `K/D`,\r\n `Revives`\r\nFROM `DBLog_Wounds` m\r\nLEFT JOIN (\r\n SELECT\r\n attacker,\r\n COUNT(*) AS `Wounds`\r\n FROM `DBLog_Wounds`\r\n WHERE\r\n $__timeFilter(time) AND\r\n server = $SERVER_ID\r\n GROUP BY attacker\r\n) w ON w.attacker = m.attacker\r\nLEFT JOIN (\r\n SELECT\r\n attacker,\r\n COUNT(*) AS `Kills`\r\n FROM `DBLog_Deaths`\r\n WHERE\r\n $__timeFilter(time) AND\r\n server = $SERVER_ID\r\n GROUP BY attacker\r\n) k ON k.attacker = m.attacker\r\nLEFT JOIN (\r\n SELECT\r\n victim,\r\n COUNT(*) AS `Deaths`\r\n FROM `DBLog_Deaths`\r\n WHERE\r\n $__timeFilter(time) AND\r\n server = $SERVER_ID\r\n GROUP BY victim\r\n) d ON d.victim = m.attacker\r\nLEFT JOIN (\r\n SELECT\r\n reviver,\r\n COUNT(*) AS `Revives`\r\n FROM `DBLog_Revives`\r\n WHERE\r\n $__timeFilter(time) AND\r\n server = $SERVER_ID\r\n GROUP BY reviver\r\n) r ON r.reviver = m.attacker\r\n WHERE\r\n $__timeFilter(time) AND\r\n server = $SERVER_ID \r\nGROUP BY m.attacker\r\nHAVING `K/D` IS NOT NULL;",
- "refId": "B",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "column"
- }
- ]
- ],
- "timeColumn": "time",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- }
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Top Scorers",
- "transform": "table",
- "type": "table-old"
- },
- {
- "datasource": "MySQL",
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "thresholds"
- },
- "custom": {},
- "displayName": "",
- "mappings": [],
- "max": 60,
- "min": 0,
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "dark-red",
- "value": null
- },
- {
- "color": "yellow",
- "value": 15
- },
- {
- "color": "dark-green",
- "value": 20
- }
- ]
- }
- },
- "overrides": []
- },
- "gridPos": {
- "h": 8,
- "w": 6,
- "x": 0,
- "y": 23
- },
- "id": 16,
- "options": {
- "orientation": "auto",
- "reduceOptions": {
- "calcs": [
- "mean"
- ],
- "fields": "",
- "values": false
- },
- "showThresholdLabels": false,
- "showThresholdMarkers": true
- },
- "pluginVersion": "7.1.4",
- "targets": [
- {
- "format": "time_series",
- "group": [],
- "groupBy": [],
- "measurement": "tick_rate",
- "metricColumn": "none",
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT LAST(\"tick_rate\") FROM \"DBLog_TickRates\" WHERE server = '$SERVER_ID'",
- "rawQuery": true,
- "rawSql": "SELECT\n time AS \"time\",\n tickRate\nFROM DBLog_TickRates\nWHERE\n $__timeFilter(time) AND\n server = \"$SERVER_ID\"\nORDER BY time DESC",
- "refId": "A",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "tick_rate"
- ],
- "type": "column"
- }
- ]
- ],
- "table": "DBLog_TickRates",
- "tags": [],
- "timeColumn": "time",
- "timeColumnType": "timestamp",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- },
- {
- "datatype": "int",
- "name": "",
- "params": [
- "server",
- "=",
- "$SERVER"
- ],
- "type": "expression"
- }
- ]
- }
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Current Tick Rate",
- "type": "gauge"
- },
- {
- "aliasColors": {},
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "MySQL",
- "fieldConfig": {
- "defaults": {
- "custom": {}
- },
- "overrides": []
- },
- "fill": 1,
- "fillGradient": 0,
- "gridPos": {
- "h": 8,
- "w": 18,
- "x": 6,
- "y": 23
- },
- "hiddenSeries": false,
- "id": 2,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "nullPointMode": "null",
- "percentage": false,
- "pluginVersion": "7.1.4",
- "pointradius": 2,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "spaceLength": 10,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "format": "time_series",
- "group": [
- {
- "params": [
- "$__interval",
- "none"
- ],
- "type": "time"
- }
- ],
- "groupBy": [
- {
- "params": [
- "5m"
- ],
- "type": "time"
- },
- {
- "params": [
- "null"
- ],
- "type": "fill"
- }
- ],
- "measurement": "tick_rate",
- "metricColumn": "none",
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT \n mean(\"tick_rate\") \nFROM \"DBLog_TickRates\" \nWHERE \n $timeFilter AND\n server = '$SERVER_ID'\nGROUP BY time($INTERVAL) fill(null)",
- "rawQuery": true,
- "rawSql": "SELECT\n $__timeGroupAlias(time,$__interval),\n avg(tickRate) AS \"tick_rate\"\nFROM DBLog_TickRates\nWHERE\n $__timeFilter(time) AND\n server = \"$SERVER_ID\"\nGROUP BY 1\nORDER BY $__timeGroup(time,$__interval)",
- "refId": "A",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "tick_rate"
- ],
- "type": "column"
- },
- {
- "params": [
- "avg"
- ],
- "type": "aggregate"
- },
- {
- "params": [
- "tick_rate"
- ],
- "type": "alias"
- }
- ]
- ],
- "table": "DBLog_TickRates",
- "tags": [],
- "timeColumn": "time",
- "timeColumnType": "timestamp",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- }
- ],
- "thresholds": [
- {
- "colorMode": "custom",
- "fill": false,
- "fillColor": "rgba(50, 116, 217, 0.2)",
- "line": true,
- "lineColor": "#F2495C",
- "op": "lt",
- "value": 15,
- "yaxis": "left"
- },
- {
- "colorMode": "custom",
- "fill": false,
- "fillColor": "rgba(50, 116, 217, 0.2)",
- "line": true,
- "lineColor": "#FADE2A",
- "op": "lt",
- "value": 20,
- "yaxis": "left"
- }
- ],
- "timeFrom": null,
- "timeRegions": [],
- "timeShift": null,
- "title": "Tick Rate",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "buckets": null,
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": "60",
- "min": "0",
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ],
- "yaxis": {
- "align": false,
- "alignLevel": null
- }
- },
- {
- "datasource": "MySQL",
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "thresholds"
- },
- "custom": {},
- "displayName": "",
- "mappings": [],
- "max": 80,
- "min": 0,
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "orange",
- "value": null
- },
- {
- "color": "green",
- "value": 50
- }
- ]
- }
- },
- "overrides": []
- },
- "gridPos": {
- "h": 8,
- "w": 6,
- "x": 0,
- "y": 31
- },
- "id": 27,
- "options": {
- "orientation": "auto",
- "reduceOptions": {
- "calcs": [
- "mean"
- ],
- "fields": "",
- "values": false
- },
- "showThresholdLabels": false,
- "showThresholdMarkers": true
- },
- "pluginVersion": "7.1.4",
- "targets": [
- {
- "format": "time_series",
- "group": [
- {
- "params": [
- "$__interval",
- "none"
- ],
- "type": "time"
- }
- ],
- "groupBy": [],
- "measurement": "tick_rate",
- "metricColumn": "none",
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT LAST(\"player_count\") FROM \"DBLog_PlayerCounts\" WHERE server = '$SERVER_ID'",
- "rawQuery": true,
- "rawSql": "SELECT\n $__timeGroupAlias(time,$__interval),\n players AS \"Player Count\"\nFROM DBLog_PlayerCounts\nWHERE\n $__timeFilter(time) AND\n server = \"$SERVER_ID\"\nGROUP BY 1\nORDER BY $__timeGroup(time,$__interval) DESC\nLIMIT 1",
- "refId": "A",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "player_count"
- ],
- "type": "column"
- },
- {
- "params": [
- "Player Count"
- ],
- "type": "alias"
- }
- ]
- ],
- "table": "DBLog_PlayerCounts",
- "tags": [],
- "timeColumn": "time",
- "timeColumnType": "timestamp",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- }
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Current Player Count",
- "type": "gauge"
- },
- {
- "aliasColors": {},
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "MySQL",
- "fieldConfig": {
- "defaults": {
- "custom": {}
- },
- "overrides": []
- },
- "fill": 1,
- "fillGradient": 0,
- "gridPos": {
- "h": 8,
- "w": 18,
- "x": 6,
- "y": 31
- },
- "hiddenSeries": false,
- "id": 28,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "nullPointMode": "null",
- "percentage": false,
- "pluginVersion": "7.1.4",
- "pointradius": 2,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "spaceLength": 10,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "format": "time_series",
- "group": [
- {
- "params": [
- "$__interval",
- "none"
- ],
- "type": "time"
- }
- ],
- "groupBy": [
- {
- "params": [
- "5m"
- ],
- "type": "time"
- },
- {
- "params": [
- "null"
- ],
- "type": "fill"
- }
- ],
- "measurement": "tick_rate",
- "metricColumn": "none",
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT \n MEAN(\"player_count\") \nFROM \"DBLog_PlayerCounts\" \nWHERE \n $timeFilter AND\n server = '$SERVER_ID'\nGROUP BY time($INTERVAL) fill(null)",
- "rawQuery": true,
- "rawSql": "SELECT\n $__timeGroupAlias(time,$__interval),\n avg(players) AS \"player_count\"\nFROM DBLog_PlayerCounts\nWHERE\n $__timeFilter(time) AND\n server = \"$SERVER_ID\"\nGROUP BY 1\nORDER BY $__timeGroup(time,$__interval)",
- "refId": "A",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "player_count"
- ],
- "type": "column"
- },
- {
- "params": [
- "avg"
- ],
- "type": "aggregate"
- },
- {
- "params": [
- "player_count"
- ],
- "type": "alias"
- }
- ]
- ],
- "table": "DBLog_PlayerCounts",
- "tags": [],
- "timeColumn": "time",
- "timeColumnType": "timestamp",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- }
- ],
- "thresholds": [
- {
- "colorMode": "custom",
- "fill": false,
- "fillColor": "rgba(50, 116, 217, 0.2)",
- "line": true,
- "lineColor": "#FF9830",
- "op": "lt",
- "value": 50,
- "yaxis": "left"
- }
- ],
- "timeFrom": null,
- "timeRegions": [],
- "timeShift": null,
- "title": "Player Count",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "buckets": null,
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": "80",
- "min": "0",
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ],
- "yaxis": {
- "align": false,
- "alignLevel": null
- }
- },
- {
- "cacheTimeout": null,
- "colorBackground": false,
- "colorValue": false,
- "colors": [
- "#299c46",
- "rgba(237, 129, 40, 0.89)",
- "#d44a3a"
- ],
- "datasource": "MySQL",
- "fieldConfig": {
- "defaults": {
- "custom": {}
- },
- "overrides": []
- },
- "format": "none",
- "gauge": {
- "maxValue": 100,
- "minValue": 0,
- "show": false,
- "thresholdLabels": false,
- "thresholdMarkers": true
- },
- "gridPos": {
- "h": 4,
- "w": 6,
- "x": 0,
- "y": 39
- },
- "id": 12,
- "interval": null,
- "links": [],
- "mappingType": 1,
- "mappingTypes": [
- {
- "name": "value to text",
- "value": 1
- },
- {
- "name": "range to text",
- "value": 2
- }
- ],
- "maxDataPoints": 100,
- "nullPointMode": "connected",
- "nullText": null,
- "postfix": " Wounds",
- "postfixFontSize": "50%",
- "prefix": "",
- "prefixFontSize": "50%",
- "rangeMaps": [
- {
- "from": "null",
- "text": "N/A",
- "to": "null"
- }
- ],
- "sparkline": {
- "fillColor": "rgba(31, 118, 189, 0.18)",
- "full": false,
- "lineColor": "rgb(31, 120, 193)",
- "show": true,
- "ymax": null,
- "ymin": null
- },
- "tableColumn": "",
- "targets": [
- {
- "format": "time_series",
- "group": [
- {
- "params": [
- "$__interval",
- "none"
- ],
- "type": "time"
- }
- ],
- "groupBy": [
- {
- "params": [
- "$__interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "null"
- ],
- "type": "fill"
- }
- ],
- "metricColumn": "none",
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT COUNT(\"victimName\") \nFROM DBLog_Wounds\nWHERE \n $timeFilter AND\n server = '$SERVER_ID'",
- "rawQuery": true,
- "rawSql": "SELECT\n $__timeGroupAlias(time,$__interval),\n count(id) AS \"id\"\nFROM DBLog_Wounds\nWHERE\n $__timeFilter(time) AND\n server = \"$SERVER_ID\"\nGROUP BY 1\nORDER BY $__timeGroup(time,$__interval)",
- "refId": "A",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "id"
- ],
- "type": "column"
- },
- {
- "params": [
- "count"
- ],
- "type": "aggregate"
- },
- {
- "params": [
- "id"
- ],
- "type": "alias"
- }
- ]
- ],
- "table": "DBLog_Wounds",
- "tags": [],
- "timeColumn": "time",
- "timeColumnType": "timestamp",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- }
- ],
- "thresholds": "",
- "timeFrom": null,
- "timeShift": null,
- "title": "Wounded in Time Period",
- "type": "singlestat",
- "valueFontSize": "80%",
- "valueMaps": [
- {
- "op": "=",
- "text": "N/A",
- "value": "null"
- }
- ],
- "valueName": "avg"
- },
- {
- "cacheTimeout": null,
- "colorBackground": false,
- "colorValue": false,
- "colors": [
- "#299c46",
- "rgba(237, 129, 40, 0.89)",
- "#d44a3a"
- ],
- "datasource": "MySQL",
- "fieldConfig": {
- "defaults": {
- "custom": {}
- },
- "overrides": []
- },
- "format": "none",
- "gauge": {
- "maxValue": 100,
- "minValue": 0,
- "show": false,
- "thresholdLabels": false,
- "thresholdMarkers": true
- },
- "gridPos": {
- "h": 4,
- "w": 6,
- "x": 6,
- "y": 39
- },
- "id": 13,
- "interval": null,
- "links": [],
- "mappingType": 1,
- "mappingTypes": [
- {
- "name": "value to text",
- "value": 1
- },
- {
- "name": "range to text",
- "value": 2
- }
- ],
- "maxDataPoints": 100,
- "nullPointMode": "connected",
- "nullText": null,
- "postfix": " Deaths",
- "postfixFontSize": "50%",
- "prefix": "",
- "prefixFontSize": "50%",
- "rangeMaps": [
- {
- "from": "null",
- "text": "N/A",
- "to": "null"
- }
- ],
- "sparkline": {
- "fillColor": "rgba(31, 118, 189, 0.18)",
- "full": false,
- "lineColor": "rgb(31, 120, 193)",
- "show": true,
- "ymax": null,
- "ymin": null
- },
- "tableColumn": "",
- "targets": [
- {
- "format": "time_series",
- "group": [
- {
- "params": [
- "$__interval",
- "none"
- ],
- "type": "time"
- }
- ],
- "groupBy": [
- {
- "params": [
- "$__interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "null"
- ],
- "type": "fill"
- }
- ],
- "metricColumn": "none",
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT \n count(\"victimName\") \nFROM \"DBLog_Deaths\"\nWHERE \n $timeFilter AND\n server = '$SERVER_ID'",
- "rawQuery": true,
- "rawSql": "SELECT\n $__timeGroupAlias(time,$__interval),\n count(id) AS \"id\"\nFROM DBLog_Deaths\nWHERE\n $__timeFilter(time) AND\n server = \"$SERVER_ID\"\nGROUP BY 1\nORDER BY $__timeGroup(time,$__interval)",
- "refId": "A",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "id"
- ],
- "type": "column"
- },
- {
- "params": [
- "count"
- ],
- "type": "aggregate"
- },
- {
- "params": [
- "id"
- ],
- "type": "alias"
- }
- ]
- ],
- "table": "DBLog_Deaths",
- "tags": [],
- "timeColumn": "time",
- "timeColumnType": "timestamp",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- }
- ],
- "thresholds": "",
- "timeFrom": null,
- "timeShift": null,
- "title": "Deaths in Time Period",
- "type": "singlestat",
- "valueFontSize": "80%",
- "valueMaps": [
- {
- "op": "=",
- "text": "N/A",
- "value": "null"
- }
- ],
- "valueName": "avg"
- },
- {
- "cacheTimeout": null,
- "colorBackground": false,
- "colorValue": false,
- "colors": [
- "#299c46",
- "rgba(237, 129, 40, 0.89)",
- "#d44a3a"
- ],
- "datasource": "MySQL",
- "fieldConfig": {
- "defaults": {
- "custom": {}
- },
- "overrides": []
- },
- "format": "none",
- "gauge": {
- "maxValue": 100,
- "minValue": 0,
- "show": false,
- "thresholdLabels": false,
- "thresholdMarkers": true
- },
- "gridPos": {
- "h": 4,
- "w": 6,
- "x": 12,
- "y": 39
- },
- "id": 10,
- "interval": "",
- "links": [],
- "mappingType": 1,
- "mappingTypes": [
- {
- "name": "value to text",
- "value": 1
- },
- {
- "name": "range to text",
- "value": 2
- }
- ],
- "maxDataPoints": 100,
- "nullPointMode": "connected",
- "nullText": null,
- "postfix": " TKs",
- "postfixFontSize": "50%",
- "prefix": "",
- "prefixFontSize": "50%",
- "rangeMaps": [
- {
- "from": "null",
- "text": "N/A",
- "to": "null"
- }
- ],
- "sparkline": {
- "fillColor": "rgba(31, 118, 189, 0.18)",
- "full": false,
- "lineColor": "rgb(31, 120, 193)",
- "show": true,
- "ymax": null,
- "ymin": null
- },
- "tableColumn": "",
- "targets": [
- {
- "format": "time_series",
- "group": [
- {
- "params": [
- "$__interval",
- "none"
- ],
- "type": "time"
- }
- ],
- "groupBy": [],
- "measurement": "player_wound",
- "metricColumn": "none",
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT \n count(\"victimName\") \nFROM \"DBLog_Wounds\"\nWHERE \n teamkill = true AND\n $timeFilter AND\n server = '$SERVER_ID'",
- "rawQuery": true,
- "rawSql": "SELECT\n $__timeGroupAlias(time,$__interval),\n count(id) AS \"id\"\nFROM DBLog_Wounds\nWHERE\n $__timeFilter(time) AND\n teamkill = '1' AND\n server = \"$SERVER_ID\"\nGROUP BY 1\nORDER BY $__timeGroup(time,$__interval)",
- "refId": "A",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "id"
- ],
- "type": "column"
- },
- {
- "params": [
- "count"
- ],
- "type": "aggregate"
- },
- {
- "params": [
- "id"
- ],
- "type": "alias"
- }
- ]
- ],
- "table": "DBLog_Wounds",
- "tags": [],
- "timeColumn": "time",
- "timeColumnType": "timestamp",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- },
- {
- "datatype": "tinyint",
- "name": "",
- "params": [
- "teamkill",
- "=",
- "'1'"
- ],
- "type": "expression"
- }
- ]
- }
- ],
- "thresholds": "",
- "timeFrom": null,
- "timeShift": null,
- "title": "TKs in Time Period",
- "type": "singlestat",
- "valueFontSize": "80%",
- "valueMaps": [
- {
- "op": "=",
- "text": "N/A",
- "value": "null"
- }
- ],
- "valueName": "current"
- },
- {
- "cacheTimeout": null,
- "colorBackground": false,
- "colorValue": false,
- "colors": [
- "#299c46",
- "rgba(237, 129, 40, 0.89)",
- "#d44a3a"
- ],
- "datasource": "MySQL",
- "fieldConfig": {
- "defaults": {
- "custom": {}
- },
- "overrides": []
- },
- "format": "none",
- "gauge": {
- "maxValue": 100,
- "minValue": 0,
- "show": false,
- "thresholdLabels": false,
- "thresholdMarkers": true
- },
- "gridPos": {
- "h": 4,
- "w": 6,
- "x": 18,
- "y": 39
- },
- "id": 14,
- "interval": "",
- "links": [],
- "mappingType": 1,
- "mappingTypes": [
- {
- "name": "value to text",
- "value": 1
- },
- {
- "name": "range to text",
- "value": 2
- }
- ],
- "maxDataPoints": 100,
- "nullPointMode": "connected",
- "nullText": null,
- "postfix": " Revives",
- "postfixFontSize": "50%",
- "prefix": "",
- "prefixFontSize": "50%",
- "rangeMaps": [
- {
- "from": "null",
- "text": "N/A",
- "to": "null"
- }
- ],
- "sparkline": {
- "fillColor": "rgba(31, 118, 189, 0.18)",
- "full": false,
- "lineColor": "rgb(31, 120, 193)",
- "show": true,
- "ymax": null,
- "ymin": null
- },
- "tableColumn": "",
- "targets": [
- {
- "format": "time_series",
- "group": [
- {
- "params": [
- "$__interval",
- "none"
- ],
- "type": "time"
- }
- ],
- "groupBy": [],
- "measurement": "revive",
- "metricColumn": "none",
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT count(\"victimName\") FROM \"DBLog_Revives\" WHERE $timeFilter AND server = '$SERVER_ID'",
- "rawQuery": true,
- "rawSql": "SELECT\n $__timeGroupAlias(time,$__interval),\n count(id) AS \"id\"\nFROM DBLog_Revives\nWHERE\n $__timeFilter(time) AND\n server = \"$SERVER_ID\"\nGROUP BY 1\nORDER BY $__timeGroup(time,$__interval)",
- "refId": "A",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "id"
- ],
- "type": "column"
- },
- {
- "params": [
- "count"
- ],
- "type": "aggregate"
- },
- {
- "params": [
- "id"
- ],
- "type": "alias"
- }
- ]
- ],
- "table": "DBLog_Revives",
- "tags": [],
- "timeColumn": "time",
- "timeColumnType": "timestamp",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- }
- ],
- "thresholds": "",
- "timeFrom": null,
- "timeShift": null,
- "title": "Revives in Time Period",
- "type": "singlestat",
- "valueFontSize": "80%",
- "valueMaps": [
- {
- "op": "=",
- "text": "N/A",
- "value": "null"
- }
- ],
- "valueName": "current"
- },
- {
- "columns": [],
- "datasource": "MySQL",
- "fieldConfig": {
- "defaults": {
- "custom": {}
- },
- "overrides": []
- },
- "fontSize": "100%",
- "gridPos": {
- "h": 13,
- "w": 24,
- "x": 0,
- "y": 43
- },
- "id": 4,
- "pageSize": null,
- "showHeader": true,
- "sort": {
- "col": 0,
- "desc": true
- },
- "styles": [
- {
- "alias": "",
- "align": "auto",
- "colorMode": null,
- "colors": [
- "rgba(245, 54, 54, 0.9)",
- "rgba(237, 129, 40, 0.89)",
- "rgba(50, 172, 45, 0.97)"
- ],
- "dateFormat": "YYYY-MM-DD HH:mm:ss",
- "decimals": 2,
- "mappingType": 1,
- "pattern": "Time",
- "thresholds": [],
- "type": "date",
- "unit": "short"
- }
- ],
- "targets": [
- {
- "format": "table",
- "group": [],
- "metricColumn": "none",
- "rawQuery": true,
- "rawSql": "SELECT\n a.time AS \"Time\",\n a.attacker AS \"Attacker\",\n a.attackerName AS \"Attacker Name\",\n a.weapon AS \"Weapon\",\n a.victim AS \"Victim\",\n a.victimName AS \"Victim Name\",\n Total AS \"Total in Time Frame\"\nFROM DBLog_Wounds a\nJOIN\n (\n SELECT\n attacker,\n COUNT(*) AS \"Total\"\n FROM DBLog_Wounds\n WHERE \n $__timeFilter(time) AND\n server = $SERVER_ID AND\n teamkill = true\n GROUP BY attacker\n ) AS b\n ON a.attacker = b.attacker\nWHERE \n $__timeFilter(time) AND\n server = $SERVER_ID AND\n teamkill = true AND\n server = $SERVER_ID\nORDER BY time DESC\nLIMIT 30;",
- "refId": "B",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "column"
- }
- ]
- ],
- "timeColumn": "time",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- }
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Recent Teamkills",
- "transform": "table",
- "type": "table-old"
- },
- {
- "aliasColors": {},
- "breakPoint": "50%",
- "cacheTimeout": null,
- "combine": {
- "label": "Others",
- "threshold": 0
- },
- "datasource": "MySQL",
- "fieldConfig": {
- "defaults": {
- "custom": {}
- },
- "overrides": []
- },
- "fontSize": "80%",
- "format": "short",
- "gridPos": {
- "h": 9,
- "w": 6,
- "x": 0,
- "y": 56
- },
- "id": 20,
- "interval": null,
- "legend": {
- "percentage": true,
- "show": true,
- "values": true
- },
- "legendType": "Under graph",
- "links": [],
- "maxDataPoints": 3,
- "nullPointMode": "connected",
- "pieType": "pie",
- "strokeWidth": 1,
- "targets": [
- {
- "alias": "Non-Teamkills",
- "format": "time_series",
- "group": [
- {
- "params": [
- "$__interval",
- "none"
- ],
- "type": "time"
- }
- ],
- "groupBy": [
- {
- "params": [
- "$__interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "null"
- ],
- "type": "fill"
- }
- ],
- "metricColumn": "none",
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT \n COUNT(\"victimName\") \nFROM \"DBLog_Wounds\" \nWHERE \n $timeFilter AND\n server = '$SERVER_ID' AND\n teamkill = false",
- "rawQuery": true,
- "rawSql": "SELECT\n $__timeGroupAlias(time,$__interval),\n count(id) AS \"Non-Teamkill\"\nFROM DBLog_Wounds\nWHERE\n $__timeFilter(time) AND\n teamkill = 0 AND\n server = \"$SERVER_ID\"\nGROUP BY 1\nORDER BY $__timeGroup(time,$__interval)",
- "refId": "B",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "id"
- ],
- "type": "column"
- },
- {
- "params": [
- "count"
- ],
- "type": "aggregate"
- },
- {
- "params": [
- "Non-Teamkill"
- ],
- "type": "alias"
- }
- ]
- ],
- "table": "DBLog_Wounds",
- "tags": [],
- "timeColumn": "time",
- "timeColumnType": "timestamp",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- },
- {
- "datatype": "tinyint",
- "name": "",
- "params": [
- "teamkill",
- "=",
- "0"
- ],
- "type": "expression"
- }
- ]
- },
- {
- "alias": "Teamkills",
- "format": "time_series",
- "group": [
- {
- "params": [
- "$__interval",
- "none"
- ],
- "type": "time"
- }
- ],
- "groupBy": [
- {
- "params": [
- "$__interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "null"
- ],
- "type": "fill"
- }
- ],
- "metricColumn": "none",
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT \n COUNT(\"victimName\") \nFROM \"DBLog_Wounds\" \nWHERE \n $timeFilter AND\n server = '$SERVER_ID' AND\n teamkill = true",
- "rawQuery": true,
- "rawSql": "SELECT\n $__timeGroupAlias(time,$__interval),\n count(id) AS \"Teamkill\"\nFROM DBLog_Wounds\nWHERE\n $__timeFilter(time) AND\n teamkill = '1' AND\n server = \"$SERVER_ID\"\nGROUP BY 1\nORDER BY $__timeGroup(time,$__interval)",
- "refId": "A",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "id"
- ],
- "type": "column"
- },
- {
- "params": [
- "count"
- ],
- "type": "aggregate"
- },
- {
- "params": [
- "Teamkill"
- ],
- "type": "alias"
- }
- ]
- ],
- "table": "DBLog_Wounds",
- "tags": [],
- "timeColumn": "time",
- "timeColumnType": "timestamp",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- },
- {
- "datatype": "tinyint",
- "name": "",
- "params": [
- "teamkill",
- "=",
- "'1'"
- ],
- "type": "expression"
- }
- ]
- }
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Non-Teamkills vs Teamkills (Wounds)",
- "type": "grafana-piechart-panel",
- "valueName": "current"
- },
- {
- "aliasColors": {},
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "MySQL",
- "fieldConfig": {
- "defaults": {
- "custom": {}
- },
- "overrides": []
- },
- "fill": 1,
- "fillGradient": 0,
- "gridPos": {
- "h": 9,
- "w": 18,
- "x": 6,
- "y": 56
- },
- "hiddenSeries": false,
- "id": 29,
- "interval": "2m",
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "nullPointMode": "null",
- "percentage": false,
- "pluginVersion": "7.1.4",
- "pointradius": 2,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "spaceLength": 10,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "alias": "Players Wounded",
- "format": "time_series",
- "group": [
- {
- "params": [
- "$__interval",
- "none"
- ],
- "type": "time"
- }
- ],
- "groupBy": [
- {
- "params": [
- "$__interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "0"
- ],
- "type": "fill"
- }
- ],
- "measurement": "player_wound",
- "metricColumn": "none",
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT count(\"victimName\") FROM \"DBLog_Wounds\" WHERE $timeFilter AND server = '$SERVER_ID' GROUP BY time($INTERVAL) fill(0)",
- "rawQuery": true,
- "rawSql": "SELECT\n $__timeGroupAlias(time,$__interval),\n count(id) AS \"All\"\nFROM DBLog_Wounds\nWHERE\n $__timeFilter(time) AND\n server = \"$SERVER_ID\"\nGROUP BY 1\nORDER BY $__timeGroup(time,$__interval)",
- "refId": "A",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "id"
- ],
- "type": "column"
- },
- {
- "params": [
- "count"
- ],
- "type": "aggregate"
- },
- {
- "params": [
- "All"
- ],
- "type": "alias"
- }
- ]
- ],
- "table": "DBLog_Wounds",
- "tags": [],
- "timeColumn": "time",
- "timeColumnType": "timestamp",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- },
- {
- "alias": "Players Wounded By Team 1",
- "format": "time_series",
- "group": [
- {
- "params": [
- "$__interval",
- "none"
- ],
- "type": "time"
- }
- ],
- "groupBy": [
- {
- "params": [
- "$__interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "0"
- ],
- "type": "fill"
- }
- ],
- "measurement": "player_die",
- "metricColumn": "none",
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT count(\"victimName\") FROM \"DBLog_Wounds\" WHERE $timeFilter AND server = '$SERVER_ID' AND attackerTeamID=1 GROUP BY time($INTERVAL) fill(0)",
- "rawQuery": true,
- "rawSql": "SELECT\n $__timeGroupAlias(time,$__interval),\n count(id) AS \"Team 1\"\nFROM DBLog_Wounds\nWHERE\n $__timeFilter(time) AND\n attackerTeamID = 1 AND\n server = \"$SERVER_ID\"\nGROUP BY 1\nORDER BY $__timeGroup(time,$__interval)",
- "refId": "B",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "id"
- ],
- "type": "column"
- },
- {
- "params": [
- "count"
- ],
- "type": "aggregate"
- },
- {
- "params": [
- "Team 1"
- ],
- "type": "alias"
- }
- ]
- ],
- "table": "DBLog_Wounds",
- "tags": [],
- "timeColumn": "time",
- "timeColumnType": "timestamp",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- },
- {
- "datatype": "int",
- "name": "",
- "params": [
- "attackerTeamID",
- "=",
- "1"
- ],
- "type": "expression"
- }
- ]
- },
- {
- "alias": "Players Wounded By Team 2",
- "format": "time_series",
- "group": [
- {
- "params": [
- "$__interval",
- "none"
- ],
- "type": "time"
- }
- ],
- "groupBy": [
- {
- "params": [
- "$__interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "0"
- ],
- "type": "fill"
- }
- ],
- "measurement": "player_die",
- "metricColumn": "none",
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT count(\"victimName\") FROM \"DBLog_Wounds\" WHERE $timeFilter AND server = '$SERVER_ID' AND attackerTeamID=2 GROUP BY time($INTERVAL) fill(0)",
- "rawQuery": true,
- "rawSql": "SELECT\n $__timeGroupAlias(time,$__interval),\n count(id) AS \"Team 2\"\nFROM DBLog_Wounds\nWHERE\n $__timeFilter(time) AND\n attackerTeamID = 2 AND\n server = \"$SERVER_ID\"\nGROUP BY 1\nORDER BY $__timeGroup(time,$__interval)",
- "refId": "C",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "id"
- ],
- "type": "column"
- },
- {
- "params": [
- "count"
- ],
- "type": "aggregate"
- },
- {
- "params": [
- "Team 2"
- ],
- "type": "alias"
- }
- ]
- ],
- "table": "DBLog_Wounds",
- "tags": [],
- "timeColumn": "time",
- "timeColumnType": "timestamp",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- },
- {
- "datatype": "int",
- "name": "",
- "params": [
- "attackerTeamID",
- "=",
- "2"
- ],
- "type": "expression"
- }
- ]
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeRegions": [],
- "timeShift": null,
- "title": "Wounds Per Minutes",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "buckets": null,
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ],
- "yaxis": {
- "align": false,
- "alignLevel": null
- }
- },
- {
- "aliasColors": {},
- "breakPoint": "50%",
- "cacheTimeout": null,
- "combine": {
- "label": "Others",
- "threshold": 0
- },
- "datasource": "MySQL",
- "fieldConfig": {
- "defaults": {
- "custom": {}
- },
- "overrides": []
- },
- "fontSize": "80%",
- "format": "short",
- "gridPos": {
- "h": 9,
- "w": 6,
- "x": 0,
- "y": 65
- },
- "id": 18,
- "interval": null,
- "legend": {
- "header": "",
- "percentage": true,
- "show": true,
- "sideWidth": null,
- "values": true
- },
- "legendType": "Under graph",
- "links": [],
- "maxDataPoints": 3,
- "nullPointMode": "connected",
- "pieType": "pie",
- "strokeWidth": 1,
- "targets": [
- {
- "alias": "Deaths",
- "format": "time_series",
- "group": [
- {
- "params": [
- "$__interval",
- "none"
- ],
- "type": "time"
- }
- ],
- "groupBy": [
- {
- "params": [
- "$__interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "null"
- ],
- "type": "fill"
- }
- ],
- "measurement": "player_die",
- "metricColumn": "none",
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT \n COUNT(\"victimName\") \nFROM \"DBLog_Deaths\" \nWHERE \n $timeFilter ",
- "rawQuery": true,
- "rawSql": "SELECT\n $__timeGroupAlias(woundTime,$__interval),\n count(id) AS \"Deaths\"\nFROM DBLog_Deaths\nWHERE\n $__timeFilter(woundTime) AND\n server = \"$SERVER_ID\"\nGROUP BY 1\nORDER BY $__timeGroup(woundTime,$__interval)",
- "refId": "A",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "id"
- ],
- "type": "column"
- },
- {
- "params": [
- "count"
- ],
- "type": "aggregate"
- },
- {
- "params": [
- "Deaths"
- ],
- "type": "alias"
- }
- ]
- ],
- "table": "DBLog_Deaths",
- "tags": [],
- "timeColumn": "woundTime",
- "timeColumnType": "timestamp",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- },
- {
- "alias": "Revives",
- "format": "time_series",
- "group": [
- {
- "params": [
- "$__interval",
- "none"
- ],
- "type": "time"
- }
- ],
- "groupBy": [
- {
- "params": [
- "$__interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "null"
- ],
- "type": "fill"
- }
- ],
- "metricColumn": "none",
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT \n COUNT(\"victimName\") \nFROM \"DBLog_Revives\" \nWHERE \n $timeFilter ",
- "rawQuery": true,
- "rawSql": "SELECT\n $__timeGroupAlias(woundTime,$__interval),\n count(id) AS \"Revives\"\nFROM DBLog_Revives\nWHERE\n $__timeFilter(woundTime) AND\n server = \"$SERVER_ID\"\nGROUP BY 1\nORDER BY $__timeGroup(woundTime,$__interval)",
- "refId": "B",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "id"
- ],
- "type": "column"
- },
- {
- "params": [
- "count"
- ],
- "type": "aggregate"
- },
- {
- "params": [
- "Revives"
- ],
- "type": "alias"
- }
- ]
- ],
- "table": "DBLog_Revives",
- "tags": [],
- "timeColumn": "woundTime",
- "timeColumnType": "timestamp",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- }
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Deaths vs Revives",
- "type": "grafana-piechart-panel",
- "valueName": "current"
- },
- {
- "aliasColors": {},
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "MySQL",
- "fieldConfig": {
- "defaults": {
- "custom": {}
- },
- "overrides": []
- },
- "fill": 1,
- "fillGradient": 0,
- "gridPos": {
- "h": 9,
- "w": 18,
- "x": 6,
- "y": 65
- },
- "hiddenSeries": false,
- "id": 6,
- "interval": "2m",
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "nullPointMode": "null",
- "percentage": false,
- "pluginVersion": "7.1.4",
- "pointradius": 2,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "spaceLength": 10,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "alias": "Players Killed",
- "format": "time_series",
- "group": [
- {
- "params": [
- "$__interval",
- "none"
- ],
- "type": "time"
- }
- ],
- "groupBy": [
- {
- "params": [
- "$__interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "0"
- ],
- "type": "fill"
- }
- ],
- "measurement": "player_wound",
- "metricColumn": "none",
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT count(\"victimName\") FROM \"DBLog_Deaths\" WHERE $timeFilter AND server = '$SERVER_ID' GROUP BY time($INTERVAL) fill(0)",
- "rawQuery": true,
- "rawSql": "SELECT\n $__timeGroupAlias(time,$__interval),\n count(id) AS \"All\"\nFROM DBLog_Deaths\nWHERE\n $__timeFilter(time) AND\n server = \"$SERVER_ID\"\nGROUP BY 1\nORDER BY $__timeGroup(time,$__interval)",
- "refId": "A",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "id"
- ],
- "type": "column"
- },
- {
- "params": [
- "count"
- ],
- "type": "aggregate"
- },
- {
- "params": [
- "All"
- ],
- "type": "alias"
- }
- ]
- ],
- "table": "DBLog_Deaths",
- "tags": [],
- "timeColumn": "time",
- "timeColumnType": "timestamp",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- },
- {
- "alias": "Players Killed By Team 1",
- "format": "time_series",
- "group": [
- {
- "params": [
- "$__interval",
- "none"
- ],
- "type": "time"
- }
- ],
- "groupBy": [
- {
- "params": [
- "$__interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "0"
- ],
- "type": "fill"
- }
- ],
- "measurement": "player_die",
- "metricColumn": "none",
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT count(\"victimName\") FROM \"DBLog_Deaths\" WHERE $timeFilter AND server = '$SERVER_ID' AND attackerTeamID=1 GROUP BY time($INTERVAL) fill(0)",
- "rawQuery": true,
- "rawSql": "SELECT\n $__timeGroupAlias(time,$__interval),\n count(id) AS \"Team 1\"\nFROM DBLog_Deaths\nWHERE\n $__timeFilter(time) AND\n attackerTeamID = 1 AND\n server = \"$SERVER_ID\"\nGROUP BY 1\nORDER BY $__timeGroup(time,$__interval)",
- "refId": "B",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "id"
- ],
- "type": "column"
- },
- {
- "params": [
- "count"
- ],
- "type": "aggregate"
- },
- {
- "params": [
- "Team 1"
- ],
- "type": "alias"
- }
- ]
- ],
- "table": "DBLog_Deaths",
- "tags": [],
- "timeColumn": "time",
- "timeColumnType": "timestamp",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- },
- {
- "datatype": "int",
- "name": "",
- "params": [
- "attackerTeamID",
- "=",
- "1"
- ],
- "type": "expression"
- }
- ]
- },
- {
- "alias": "Players Killed By Team 2",
- "format": "time_series",
- "group": [
- {
- "params": [
- "$__interval",
- "none"
- ],
- "type": "time"
- }
- ],
- "groupBy": [
- {
- "params": [
- "$__interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "0"
- ],
- "type": "fill"
- }
- ],
- "measurement": "player_die",
- "metricColumn": "none",
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT count(\"victimName\") FROM \"DBLog_Deaths\" WHERE $timeFilter AND server = '$SERVER_ID' AND attackerTeamID=2 GROUP BY time($INTERVAL) fill(0)",
- "rawQuery": true,
- "rawSql": "SELECT\n $__timeGroupAlias(time,$__interval),\n count(id) AS \"Team 2\"\nFROM DBLog_Deaths\nWHERE\n $__timeFilter(time) AND\n attackerTeamID = 2 AND\n server = \"$SERVER_ID\"\nGROUP BY 1\nORDER BY $__timeGroup(time,$__interval)",
- "refId": "C",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "id"
- ],
- "type": "column"
- },
- {
- "params": [
- "count"
- ],
- "type": "aggregate"
- },
- {
- "params": [
- "Team 2"
- ],
- "type": "alias"
- }
- ]
- ],
- "table": "DBLog_Deaths",
- "tags": [],
- "timeColumn": "time",
- "timeColumnType": "timestamp",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- },
- {
- "datatype": "int",
- "name": "",
- "params": [
- "attackerTeamID",
- "=",
- "2"
- ],
- "type": "expression"
- }
- ]
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeRegions": [],
- "timeShift": null,
- "title": "Kills Per Minutes",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "buckets": null,
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ],
- "yaxis": {
- "align": false,
- "alignLevel": null
- }
- },
- {
- "aliasColors": {},
- "breakPoint": "50%",
- "cacheTimeout": null,
- "combine": {
- "label": "Others",
- "threshold": 0
- },
- "datasource": "MySQL",
- "fieldConfig": {
- "defaults": {
- "custom": {}
- },
- "overrides": []
- },
- "fontSize": "80%",
- "format": "short",
- "gridPos": {
- "h": 9,
- "w": 6,
- "x": 0,
- "y": 74
- },
- "id": 31,
- "interval": null,
- "legend": {
- "percentage": true,
- "show": true,
- "values": true
- },
- "legendType": "Under graph",
- "links": [],
- "maxDataPoints": 3,
- "nullPointMode": "connected",
- "pieType": "pie",
- "strokeWidth": 1,
- "targets": [
- {
- "alias": "Team 1 Kills",
- "format": "time_series",
- "group": [
- {
- "params": [
- "$__interval",
- "none"
- ],
- "type": "time"
- }
- ],
- "groupBy": [
- {
- "params": [
- "$__interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "null"
- ],
- "type": "fill"
- }
- ],
- "metricColumn": "none",
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT count(\"victimName\") FROM \"DBLog_Deaths\" WHERE $timeFilter AND server = '$SERVER_ID' AND attackerTeamID=1",
- "rawQuery": true,
- "rawSql": "SELECT\n $__timeGroupAlias(time,$__interval),\n count(id) AS \"Team 1\"\nFROM DBLog_Wounds\nWHERE\n $__timeFilter(time) AND\n attackerTeamID = 1 AND\n server = \"$SERVER_ID\"\nGROUP BY 1\nORDER BY $__timeGroup(time,$__interval)",
- "refId": "A",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "id"
- ],
- "type": "column"
- },
- {
- "params": [
- "count"
- ],
- "type": "aggregate"
- },
- {
- "params": [
- "Team 1"
- ],
- "type": "alias"
- }
- ]
- ],
- "table": "DBLog_Wounds",
- "tags": [],
- "timeColumn": "time",
- "timeColumnType": "timestamp",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- },
- {
- "datatype": "int",
- "name": "",
- "params": [
- "attackerTeamID",
- "=",
- "1"
- ],
- "type": "expression"
- }
- ]
- },
- {
- "alias": "Team 2 Kills",
- "format": "time_series",
- "group": [
- {
- "params": [
- "$__interval",
- "none"
- ],
- "type": "time"
- }
- ],
- "groupBy": [
- {
- "params": [
- "$__interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "null"
- ],
- "type": "fill"
- }
- ],
- "metricColumn": "none",
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT count(\"victimName\") FROM \"DBLog_Deaths\" WHERE $timeFilter AND server = '$SERVER_ID' AND attackerTeamID=2",
- "rawQuery": true,
- "rawSql": "SELECT\n $__timeGroupAlias(time,$__interval),\n count(id) AS \"Team 2\"\nFROM DBLog_Wounds\nWHERE\n $__timeFilter(time) AND\n server = \"$SERVER_ID\"\nGROUP BY 1\nORDER BY $__timeGroup(time,$__interval)",
- "refId": "B",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "id"
- ],
- "type": "column"
- },
- {
- "params": [
- "count"
- ],
- "type": "aggregate"
- },
- {
- "params": [
- "Team 2"
- ],
- "type": "alias"
- }
- ]
- ],
- "table": "DBLog_Wounds",
- "tags": [],
- "timeColumn": "time",
- "timeColumnType": "timestamp",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- }
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Team 1 vs Team 2",
- "type": "grafana-piechart-panel",
- "valueName": "current"
- },
- {
- "aliasColors": {},
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "MySQL",
- "fieldConfig": {
- "defaults": {
- "custom": {}
- },
- "overrides": []
- },
- "fill": 1,
- "fillGradient": 0,
- "gridPos": {
- "h": 9,
- "w": 18,
- "x": 6,
- "y": 74
- },
- "hiddenSeries": false,
- "id": 8,
- "interval": "2m",
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "nullPointMode": "null",
- "percentage": false,
- "pluginVersion": "7.1.4",
- "pointradius": 2,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "spaceLength": 10,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "alias": "Revives",
- "format": "time_series",
- "group": [
- {
- "params": [
- "$__interval",
- "none"
- ],
- "type": "time"
- }
- ],
- "groupBy": [
- {
- "params": [
- "$__interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "0"
- ],
- "type": "fill"
- }
- ],
- "measurement": "revive",
- "metricColumn": "none",
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT count(\"victimName\") FROM \"DBLog_Revives\" WHERE $timeFilter AND server = '$SERVER_ID' GROUP BY time($INTERVAL) fill(0)",
- "rawQuery": true,
- "rawSql": "SELECT\n $__timeGroupAlias(time,$__interval),\n count(id) AS \"All\"\nFROM DBLog_Revives\nWHERE\n $__timeFilter(time) AND\n server = \"$SERVER_ID\"\nGROUP BY 1\nORDER BY $__timeGroup(time,$__interval)",
- "refId": "A",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "id"
- ],
- "type": "column"
- },
- {
- "params": [
- "count"
- ],
- "type": "aggregate"
- },
- {
- "params": [
- "All"
- ],
- "type": "alias"
- }
- ]
- ],
- "table": "DBLog_Revives",
- "tags": [],
- "timeColumn": "time",
- "timeColumnType": "timestamp",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- },
- {
- "alias": "Revives",
- "format": "time_series",
- "group": [
- {
- "params": [
- "$__interval",
- "none"
- ],
- "type": "time"
- }
- ],
- "groupBy": [
- {
- "params": [
- "$__interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "0"
- ],
- "type": "fill"
- }
- ],
- "measurement": "revive",
- "metricColumn": "none",
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT count(\"victimName\") FROM \"DBLog_Revives\" WHERE $timeFilter AND server = '$SERVER_ID' AND reviverTeamID = 1 GROUP BY time($INTERVAL) fill(0)",
- "rawQuery": true,
- "rawSql": "SELECT\n $__timeGroupAlias(time,$__interval),\n count(id) AS \"Team 1\"\nFROM DBLog_Revives\nWHERE\n $__timeFilter(time) AND\n victimTeamID = 1 AND\n server = \"$SERVER_ID\"\nGROUP BY 1\nORDER BY $__timeGroup(time,$__interval)",
- "refId": "B",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "id"
- ],
- "type": "column"
- },
- {
- "params": [
- "count"
- ],
- "type": "aggregate"
- },
- {
- "params": [
- "Team 1"
- ],
- "type": "alias"
- }
- ]
- ],
- "table": "DBLog_Revives",
- "tags": [],
- "timeColumn": "time",
- "timeColumnType": "timestamp",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- },
- {
- "datatype": "int",
- "name": "",
- "params": [
- "victimTeamID",
- "=",
- "1"
- ],
- "type": "expression"
- }
- ]
- },
- {
- "alias": "Revives",
- "format": "time_series",
- "group": [
- {
- "params": [
- "$__interval",
- "none"
- ],
- "type": "time"
- }
- ],
- "groupBy": [
- {
- "params": [
- "$__interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "0"
- ],
- "type": "fill"
- }
- ],
- "measurement": "revive",
- "metricColumn": "none",
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT count(\"victimName\") FROM \"DBLog_Revives\" WHERE $timeFilter AND server = '$SERVER_ID' AND reviverTeamID = 2 GROUP BY time($INTERVAL) fill(0)",
- "rawQuery": true,
- "rawSql": "SELECT\n $__timeGroupAlias(time,$__interval),\n count(id) AS \"Team 2\"\nFROM DBLog_Revives\nWHERE\n $__timeFilter(time) AND\n victimTeamID = 2 AND\n server = \"$SERVER_ID\"\nGROUP BY 1\nORDER BY $__timeGroup(time,$__interval)",
- "refId": "C",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "id"
- ],
- "type": "column"
- },
- {
- "params": [
- "count"
- ],
- "type": "aggregate"
- },
- {
- "params": [
- "Team 2"
- ],
- "type": "alias"
- }
- ]
- ],
- "table": "DBLog_Revives",
- "tags": [],
- "timeColumn": "time",
- "timeColumnType": "timestamp",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- },
- {
- "datatype": "int",
- "name": "",
- "params": [
- "victimTeamID",
- "=",
- "2"
- ],
- "type": "expression"
- }
- ]
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeRegions": [],
- "timeShift": null,
- "title": "Revives Per Minutes",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "buckets": null,
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ],
- "yaxis": {
- "align": false,
- "alignLevel": null
- }
- },
- {
- "columns": [],
- "datasource": "MySQL",
- "fieldConfig": {
- "defaults": {
- "custom": {}
- },
- "overrides": []
- },
- "fontSize": "100%",
- "gridPos": {
- "h": 8,
- "w": 12,
- "x": 0,
- "y": 83
- },
- "id": 22,
- "pageSize": null,
- "showHeader": true,
- "sort": {
- "col": 2,
- "desc": true
- },
- "styles": [
- {
- "alias": "Time",
- "align": "auto",
- "dateFormat": "YYYY-MM-DD HH:mm:ss",
- "pattern": "Time",
- "type": "date"
- },
- {
- "alias": "",
- "align": "auto",
- "colorMode": null,
- "colors": [
- "rgba(245, 54, 54, 0.9)",
- "rgba(237, 129, 40, 0.89)",
- "rgba(50, 172, 45, 0.97)"
- ],
- "decimals": 2,
- "pattern": "/.*/",
- "thresholds": [],
- "type": "number",
- "unit": "short"
- }
- ],
- "targets": [
- {
- "format": "table",
- "group": [],
- "metricColumn": "none",
- "rawQuery": true,
- "rawSql": "SELECT\n layerClassname as \"Layer\",\n startTime AS \"Start Time\",\n endTime AS \"End Time\"\nFROM `DBLog_Matches`\nWHERE \n (\n $__timeFilter(startTime) OR \n $__timeFilter(endTime) OR\n endTime IS NULL\n ) AND \n server = $SERVER_ID \nORDER BY startTime DESC;",
- "refId": "A",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "column"
- }
- ]
- ],
- "timeColumn": "time",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- }
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Matches",
- "transform": "table",
- "type": "table-old"
- },
- {
- "aliasColors": {},
- "breakPoint": "50%",
- "cacheTimeout": null,
- "combine": {
- "label": "Others",
- "threshold": 0
- },
- "datasource": "MySQL",
- "fieldConfig": {
- "defaults": {
- "custom": {}
- },
- "overrides": []
- },
- "fontSize": "80%",
- "format": "short",
- "gridPos": {
- "h": 8,
- "w": 6,
- "x": 12,
- "y": 83
- },
- "id": 25,
- "interval": null,
- "legend": {
- "percentage": true,
- "show": true,
- "sort": "current",
- "sortDesc": true,
- "values": true
- },
- "legendType": "Under graph",
- "links": [],
- "maxDataPoints": 3,
- "nullPointMode": "connected",
- "pieType": "pie",
- "strokeWidth": 1,
- "targets": [
- {
- "format": "time_series",
- "group": [],
- "metricColumn": "layer",
- "rawQuery": true,
- "rawSql": "SELECT\n layerClassname AS metric,\n COUNT(*),\n startTime AS time\nFROM `DBLog_Matches`\nWHERE\n (\n $__timeFilter(startTime) OR \n $__timeFilter(endTime) OR\n endTime IS NULL\n ) AND \n server = $SERVER_ID \nGROUP BY layerClassname",
- "refId": "A",
- "select": [
- [
- {
- "params": [
- "id"
- ],
- "type": "column"
- }
- ]
- ],
- "table": "game",
- "timeColumn": "startTime",
- "timeColumnType": "timestamp",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- }
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Layers",
- "type": "grafana-piechart-panel",
- "valueName": "current"
- },
- {
- "aliasColors": {},
- "breakPoint": "50%",
- "cacheTimeout": null,
- "combine": {
- "label": "Others",
- "threshold": 0
- },
- "datasource": "MySQL",
- "fieldConfig": {
- "defaults": {
- "custom": {}
- },
- "overrides": []
- },
- "fontSize": "80%",
- "format": "short",
- "gridPos": {
- "h": 8,
- "w": 6,
- "x": 18,
- "y": 83
- },
- "id": 24,
- "interval": null,
- "legend": {
- "percentage": true,
- "show": true,
- "values": true
- },
- "legendType": "Under graph",
- "links": [],
- "maxDataPoints": 3,
- "nullPointMode": "connected",
- "pieType": "pie",
- "strokeWidth": 1,
- "targets": [
- {
- "format": "time_series",
- "group": [],
- "metricColumn": "layer",
- "rawQuery": true,
- "rawSql": "SELECT\n mapClassname AS metric,\n COUNT(*),\n startTime AS time\nFROM `DBLog_Matches`\nWHERE\n (\n $__timeFilter(startTime) OR \n $__timeFilter(endTime) OR\n endTime IS NULL\n ) AND \n server = $SERVER_ID \nGROUP BY mapClassname",
- "refId": "A",
- "select": [
- [
- {
- "params": [
- "id"
- ],
- "type": "column"
- }
- ]
- ],
- "table": "game",
- "timeColumn": "startTime",
- "timeColumnType": "timestamp",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- }
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Maps",
- "type": "grafana-piechart-panel",
- "valueName": "current"
- },
- {
- "aliasColors": {},
- "breakPoint": "50%",
- "cacheTimeout": null,
- "combine": {
- "label": "Others",
- "threshold": "0.01"
- },
- "datasource": "MySQL",
- "fieldConfig": {
- "defaults": {
- "custom": {
- "align": null
- },
- "mappings": [],
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- },
- {
- "color": "red",
- "value": 80
- }
- ]
- }
- },
- "overrides": []
- },
- "fontSize": "80%",
- "format": "short",
- "gridPos": {
- "h": 10,
- "w": 12,
- "x": 0,
- "y": 91
- },
- "id": 33,
- "interval": null,
- "legend": {
- "percentage": true,
- "show": true,
- "values": true
- },
- "legendType": "Right side",
- "links": [],
- "maxDataPoints": 3,
- "nullPointMode": "connected",
- "pieType": "pie",
- "pluginVersion": "7.1.0",
- "strokeWidth": 1,
- "targets": [
- {
- "alias": "Non-Teamkills",
- "format": "time_series",
- "group": [
- {
- "params": [
- "$__interval",
- "none"
- ],
- "type": "time"
- }
- ],
- "groupBy": [
- {
- "params": [
- "$__interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "null"
- ],
- "type": "fill"
- }
- ],
- "metricColumn": "weapon",
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT \n COUNT(\"victimName\") \nFROM \"DBLog_Wounds\" \nWHERE \n $timeFilter AND\n server = '$SERVER_ID' AND\n teamkill = false",
- "rawQuery": true,
- "rawSql": "SELECT\n $__timeGroupAlias(time,$__interval),\n weapon AS metric,\n count(id) AS \"Wounds\"\nFROM DBLog_Wounds\nWHERE\n $__timeFilter(time) AND\n server = \"$SERVER_ID\"\nGROUP BY 2\nORDER BY count(id) DESC",
- "refId": "B",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "id"
- ],
- "type": "column"
- },
- {
- "params": [
- "count"
- ],
- "type": "aggregate"
- },
- {
- "params": [
- "Wounds"
- ],
- "type": "alias"
- }
- ]
- ],
- "table": "DBLog_Wounds",
- "tags": [],
- "timeColumn": "time",
- "timeColumnType": "timestamp",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- }
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Weapons",
- "type": "grafana-piechart-panel",
- "valueName": "current"
- },
- {
- "columnAliases": [],
- "columnFiltersEnabled": false,
- "columnWidthHints": [],
- "columns": [],
- "compactRowsEnabled": false,
- "datasource": "MySQL",
- "datatablePagingType": "simple_numbers",
- "datatableTheme": "basic_theme",
- "description": "",
- "emptyData": false,
- "fieldConfig": {
- "defaults": {
- "custom": {}
- },
- "overrides": []
- },
- "fontSize": "100%",
- "gridPos": {
- "h": 10,
- "w": 12,
- "x": 12,
- "y": 91
- },
- "hoverEnabled": true,
- "id": 36,
- "infoEnabled": true,
- "lengthChangeEnabled": true,
- "orderColumnEnabled": true,
- "pagingTypes": [
- {
- "$$hashKey": "object:227",
- "text": "Page number buttons only",
- "value": "numbers"
- },
- {
- "$$hashKey": "object:228",
- "text": "'Previous' and 'Next' buttons only",
- "value": "simple"
- },
- {
- "$$hashKey": "object:229",
- "text": "'Previous' and 'Next' buttons, plus page numbers",
- "value": "simple_numbers"
- },
- {
- "$$hashKey": "object:230",
- "text": "'First', 'Previous', 'Next' and 'Last' buttons",
- "value": "full"
- },
- {
- "$$hashKey": "object:231",
- "text": "'First', 'Previous', 'Next' and 'Last' buttons, plus page numbers",
- "value": "full_numbers"
- },
- {
- "$$hashKey": "object:232",
- "text": "'First' and 'Last' buttons, plus page numbers",
- "value": "first_last_numbers"
- }
- ],
- "panelHeight": null,
- "pluginVersion": "7.1.1",
- "rowNumbersEnabled": false,
- "rowsPerPage": 20,
- "scroll": true,
- "scrollHeight": "default",
- "searchEnabled": true,
- "showCellBorders": false,
- "showHeader": true,
- "showRowBorders": true,
- "sort": {
- "col": 0,
- "desc": true
- },
- "sortByColumns": [
- {
- "columnData": "Kills",
- "sortMethod": "desc"
- }
- ],
- "sortByColumnsData": [
- [
- 3,
- "desc"
- ]
- ],
- "stripedRowsEnabled": true,
- "styles": [
- {
- "dateFormat": "YYYY-MM-DD HH:mm:ss",
- "pattern": "Time",
- "type": "date"
- },
- {
- "colorMode": null,
- "colors": [
- "rgba(245, 54, 54, 0.9)",
- "rgba(237, 129, 40, 0.89)",
- "rgba(50, 172, 45, 0.97)"
- ],
- "decimals": 2,
- "pattern": "/.*/",
- "splitPattern": "/ /",
- "thresholds": [],
- "type": "string",
- "unit": "short"
- }
- ],
- "targets": [
- {
- "format": "table",
- "group": [],
- "metricColumn": "none",
- "rawQuery": true,
- "rawSql": "SELECT DISTINCTROW\n layer,\n NTH_VALUE(LW.winner, 1) OVER (PARTITION BY LW.layer) AS \"Most Frequent Winner\",\n NTH_VALUE(LW.wins, 1) OVER (PARTITION BY LW.layer) AS \"Most Frequent Winner Wins\",\n (NTH_VALUE(LW.wins, 1) OVER (PARTITION BY LW.layer) / (NTH_VALUE(LW.wins, 1) OVER (PARTITION BY LW.layer) + NTH_VALUE(LW.wins, 2) OVER (PARTITION BY LW.layer))) * 100 AS \"Most Frequent Winner Win Percentage\",\n NTH_VALUE(LW.winner, 2) OVER (PARTITION BY LW.layer) AS \"Least Frequent Winner\",\n NTH_VALUE(LW.wins, 2) OVER (PARTITION BY LW.layer) AS \"Least Frequent Winner Count\",\n (NTH_VALUE(LW.wins, 2) OVER (PARTITION BY LW.layer) / (NTH_VALUE(LW.wins, 1) OVER (PARTITION BY LW.layer) + NTH_VALUE(LW.wins, 2) OVER (PARTITION BY LW.layer))) * 100 AS \"Least Frequent Winner Win Percentage\"\nFROM (\n SELECT\n M.layer,\n M.winner,\n COUNT(*) AS \"wins\"\n FROM dblog_matches M\n WHERE\n M.layer IS NOT NULL AND\n M.winner IS NOT NULL\n GROUP BY M.layer, M.winner\n ORDER BY wins DESC\n) LW;\n",
- "refId": "A",
- "select": [
- [
- {
- "params": [
- "id"
- ],
- "type": "column"
- }
- ]
- ],
- "table": "DBLog_TickRates",
- "timeColumn": "time",
- "timeColumnType": "timestamp",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- }
- ],
- "themeOptions": {
- "dark": "./styles/dark.scss",
- "light": "./styles/light.scss"
- },
- "themes": [
- {
- "$$hashKey": "object:208",
- "disabled": false,
- "text": "Basic",
- "value": "basic_theme"
- },
- {
- "$$hashKey": "object:209",
- "disabled": true,
- "text": "Bootstrap",
- "value": "bootstrap_theme"
- },
- {
- "$$hashKey": "object:210",
- "disabled": true,
- "text": "Foundation",
- "value": "foundation_theme"
- },
- {
- "$$hashKey": "object:211",
- "disabled": true,
- "text": "ThemeRoller",
- "value": "themeroller_theme"
- }
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Matches - Win/Loss Comparison",
- "transform": "table",
- "type": "briangann-datatable-panel"
- }
- ],
- "refresh": false,
- "schemaVersion": 26,
- "style": "dark",
- "tags": [],
- "templating": {
- "list": [
- {
- "allValue": null,
- "current": {
- "selected": true,
- "text": "1",
- "value": "1"
- },
- "hide": 0,
- "includeAll": false,
- "label": "Server",
- "multi": false,
- "name": "SERVER_ID",
- "options": [
- {
- "selected": true,
- "text": "1",
- "value": "1"
- },
- {
- "selected": false,
- "text": "2",
- "value": "2"
- }
- ],
- "query": "1,2",
- "queryValue": "",
- "skipUrlSync": false,
- "type": "custom"
- },
- {
- "auto": false,
- "auto_count": 30,
- "auto_min": "10s",
- "current": {
- "selected": false,
- "text": "1m",
- "value": "1m"
- },
- "hide": 0,
- "label": "Interval",
- "name": "INTERVAL",
- "options": [
- {
- "selected": true,
- "text": "1m",
- "value": "1m"
- },
- {
- "selected": false,
- "text": "2m",
- "value": "2m"
- },
- {
- "selected": false,
- "text": "3m",
- "value": "3m"
- },
- {
- "selected": false,
- "text": "4m",
- "value": "4m"
- },
- {
- "selected": false,
- "text": "5m",
- "value": "5m"
- },
- {
- "selected": false,
- "text": "10m",
- "value": "10m"
- },
- {
- "selected": false,
- "text": "20m",
- "value": "20m"
- },
- {
- "selected": false,
- "text": "30m",
- "value": "30m"
- }
- ],
- "query": "1m,2m,3m,4m,5m,10m,20m,30m",
- "refresh": 2,
- "skipUrlSync": false,
- "type": "interval"
- }
- ]
- },
- "time": {
- "from": "now-3h",
- "to": "now"
- },
- "timepicker": {
- "refresh_intervals": [
- "10s",
- "30s",
- "1m",
- "5m",
- "15m",
- "30m",
- "1h",
- "2h",
- "1d"
- ]
- },
- "timezone": "",
- "title": "Server Overview",
- "uid": "n7Xl7jEWx",
- "version": 13
-}
\ No newline at end of file
diff --git a/squad-server/templates/SquadJS-Dashboard-v3.json b/squad-server/templates/SquadJS-Dashboard-v3.json
deleted file mode 100644
index 188d61a52..000000000
--- a/squad-server/templates/SquadJS-Dashboard-v3.json
+++ /dev/null
@@ -1,3636 +0,0 @@
-{
- "annotations": {
- "list": [
- {
- "builtIn": 1,
- "datasource": {
- "type": "datasource",
- "uid": "grafana"
- },
- "enable": true,
- "hide": true,
- "iconColor": "rgba(0, 211, 255, 1)",
- "name": "Annotations & Alerts",
- "target": {
- "limit": 100,
- "matchAny": false,
- "tags": [],
- "type": "dashboard"
- },
- "type": "dashboard"
- }
- ]
- },
- "editable": true,
- "fiscalYearStartMonth": 0,
- "graphTooltip": 2,
- "id": 1,
- "iteration": 1656601727600,
- "links": [],
- "liveNow": false,
- "panels": [
- {
- "alignNumbersToRightEnabled": true,
- "columnAliases": [],
- "columnFiltersEnabled": false,
- "columnWidthHints": [],
- "columns": [],
- "compactRowsEnabled": false,
- "datasource": {
- "uid": "MySQL"
- },
- "datatablePagingType": "simple_numbers",
- "datatableTheme": "basic_theme",
- "description": "This panel does not sort top scores. ",
- "emptyData": false,
- "fontSize": "100%",
- "gridPos": {
- "h": 9,
- "w": 24,
- "x": 0,
- "y": 0
- },
- "hoverEnabled": true,
- "id": 35,
- "infoEnabled": true,
- "lengthChangeEnabled": true,
- "orderColumnEnabled": true,
- "pagingTypes": [
- {
- "text": "Page number buttons only",
- "value": "numbers"
- },
- {
- "text": "'Previous' and 'Next' buttons only",
- "value": "simple"
- },
- {
- "text": "'Previous' and 'Next' buttons, plus page numbers",
- "value": "simple_numbers"
- },
- {
- "text": "'First', 'Previous', 'Next' and 'Last' buttons",
- "value": "full"
- },
- {
- "text": "'First', 'Previous', 'Next' and 'Last' buttons, plus page numbers",
- "value": "full_numbers"
- },
- {
- "text": "'First' and 'Last' buttons, plus page numbers",
- "value": "first_last_numbers"
- }
- ],
- "panelHeight": 284,
- "pluginVersion": "7.1.1",
- "rowNumbersEnabled": false,
- "rowsPerPage": 5,
- "scroll": false,
- "scrollHeight": "default",
- "searchEnabled": true,
- "searchHighlightingEnabled": false,
- "showCellBorders": false,
- "showHeader": true,
- "showRowBorders": true,
- "sort": {
- "col": 0,
- "desc": true
- },
- "sortByColumns": [
- {
- "columnData": "Kills",
- "sortMethod": "desc"
- }
- ],
- "sortByColumnsData": [
- [
- 3,
- "desc"
- ]
- ],
- "stripedRowsEnabled": true,
- "styles": [
- {
- "dateFormat": "YYYY-MM-DD HH:mm:ss",
- "pattern": "Time",
- "type": "date"
- },
- {
- "colors": [
- "rgba(245, 54, 54, 0.9)",
- "rgba(237, 129, 40, 0.89)",
- "rgba(50, 172, 45, 0.97)"
- ],
- "decimals": 2,
- "pattern": "/.*/",
- "splitPattern": "/ /",
- "thresholds": [],
- "type": "string",
- "unit": "short"
- }
- ],
- "targets": [
- {
- "datasource": {
- "uid": "MySQL"
- },
- "format": "table",
- "group": [],
- "metricColumn": "none",
- "rawQuery": true,
- "rawSql": "SELECT\r\n m.attacker AS \"Steam ID\",\r\n m.attackerName AS \"Name\",\r\n `Wounds`,\r\n `Kills`,\r\n `Deaths`,\r\n `Kills`/`Deaths` AS `K/D`,\r\n `Revives`\r\nFROM `DBLog_Wounds` m\r\nLEFT JOIN (\r\n SELECT\r\n attacker,\r\n COUNT(*) AS `Wounds`\r\n FROM `DBLog_Wounds`\r\n WHERE\r\n $__timeFilter(time) AND\r\n server = $SERVER_ID\r\n GROUP BY attacker\r\n) w ON w.attacker = m.attacker\r\nLEFT JOIN (\r\n SELECT\r\n attacker,\r\n COUNT(*) AS `Kills`\r\n FROM `DBLog_Deaths`\r\n WHERE\r\n $__timeFilter(time) AND\r\n server = $SERVER_ID\r\n GROUP BY attacker\r\n) k ON k.attacker = m.attacker\r\nLEFT JOIN (\r\n SELECT\r\n victim,\r\n COUNT(*) AS `Deaths`\r\n FROM `DBLog_Deaths`\r\n WHERE\r\n $__timeFilter(time) AND\r\n server = $SERVER_ID\r\n GROUP BY victim\r\n) d ON d.victim = m.attacker\r\nLEFT JOIN (\r\n SELECT\r\n reviver,\r\n COUNT(*) AS `Revives`\r\n FROM `DBLog_Revives`\r\n WHERE\r\n $__timeFilter(time) AND\r\n server = $SERVER_ID\r\n GROUP BY reviver\r\n) r ON r.reviver = m.attacker\r\n WHERE\r\n $__timeFilter(time) AND\r\n server = $SERVER_ID \r\nGROUP BY m.attacker\r\nHAVING `K/D` IS NOT NULL;",
- "refId": "A",
- "select": [
- [
- {
- "params": [
- "id"
- ],
- "type": "column"
- }
- ]
- ],
- "table": "DBLog_TickRates",
- "timeColumn": "time",
- "timeColumnType": "timestamp",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- }
- ],
- "themeOptions": {
- "dark": "./styles/dark.scss",
- "light": "./styles/light.scss"
- },
- "themes": [
- {
- "disabled": false,
- "text": "Basic",
- "value": "basic_theme"
- },
- {
- "disabled": true,
- "text": "Bootstrap",
- "value": "bootstrap_theme"
- },
- {
- "disabled": true,
- "text": "Foundation",
- "value": "foundation_theme"
- },
- {
- "disabled": true,
- "text": "ThemeRoller",
- "value": "themeroller_theme"
- }
- ],
- "title": " Only for search in the top scores - This panel does not sort top scores. ",
- "transform": "table",
- "type": "briangann-datatable-panel"
- },
- {
- "columns": [],
- "datasource": {
- "uid": "MySQL"
- },
- "fontSize": "100%",
- "gridPos": {
- "h": 14,
- "w": 24,
- "x": 0,
- "y": 9
- },
- "id": 32,
- "showHeader": true,
- "sort": {
- "col": 3,
- "desc": true
- },
- "styles": [],
- "targets": [
- {
- "datasource": {
- "uid": "MySQL"
- },
- "format": "table",
- "group": [],
- "metricColumn": "none",
- "rawQuery": true,
- "rawSql": "SELECT\r\n m.attacker AS \"Steam ID\",\r\n m.attackerName AS \"Name\",\r\n `Wounds`,\r\n `Kills`,\r\n `Deaths`,\r\n `Kills`/`Deaths` AS `K/D`,\r\n `Revives`\r\nFROM `DBLog_Wounds` m\r\nLEFT JOIN (\r\n SELECT\r\n attacker,\r\n COUNT(*) AS `Wounds`\r\n FROM `DBLog_Wounds`\r\n WHERE\r\n $__timeFilter(time) AND\r\n server = $SERVER_ID\r\n GROUP BY attacker\r\n) w ON w.attacker = m.attacker\r\nLEFT JOIN (\r\n SELECT\r\n attacker,\r\n COUNT(*) AS `Kills`\r\n FROM `DBLog_Deaths`\r\n WHERE\r\n $__timeFilter(time) AND\r\n server = $SERVER_ID\r\n GROUP BY attacker\r\n) k ON k.attacker = m.attacker\r\nLEFT JOIN (\r\n SELECT\r\n victim,\r\n COUNT(*) AS `Deaths`\r\n FROM `DBLog_Deaths`\r\n WHERE\r\n $__timeFilter(time) AND\r\n server = $SERVER_ID\r\n GROUP BY victim\r\n) d ON d.victim = m.attacker\r\nLEFT JOIN (\r\n SELECT\r\n reviver,\r\n COUNT(*) AS `Revives`\r\n FROM `DBLog_Revives`\r\n WHERE\r\n $__timeFilter(time) AND\r\n server = $SERVER_ID\r\n GROUP BY reviver\r\n) r ON r.reviver = m.attacker\r\n WHERE\r\n $__timeFilter(time) AND\r\n server = $SERVER_ID \r\nGROUP BY m.attacker\r\nHAVING `K/D` IS NOT NULL;",
- "refId": "B",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "column"
- }
- ]
- ],
- "timeColumn": "time",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- }
- ],
- "title": "Top Scorers",
- "transform": "table",
- "type": "table-old"
- },
- {
- "datasource": {
- "uid": "MySQL"
- },
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "thresholds"
- },
- "displayName": "",
- "mappings": [],
- "max": 60,
- "min": 0,
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "dark-red",
- "value": null
- },
- {
- "color": "yellow",
- "value": 15
- },
- {
- "color": "dark-green",
- "value": 20
- }
- ]
- }
- },
- "overrides": []
- },
- "gridPos": {
- "h": 8,
- "w": 6,
- "x": 0,
- "y": 23
- },
- "id": 16,
- "options": {
- "orientation": "auto",
- "reduceOptions": {
- "calcs": [
- "mean"
- ],
- "fields": "",
- "values": false
- },
- "showThresholdLabels": false,
- "showThresholdMarkers": true
- },
- "pluginVersion": "9.0.2",
- "targets": [
- {
- "datasource": {
- "uid": "MySQL"
- },
- "format": "time_series",
- "group": [],
- "groupBy": [],
- "measurement": "tick_rate",
- "metricColumn": "none",
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT LAST(\"tick_rate\") FROM \"DBLog_TickRates\" WHERE server = '$SERVER_ID'",
- "rawQuery": true,
- "rawSql": "SELECT\n time AS \"time\",\n tickRate\nFROM DBLog_TickRates\nWHERE\n $__timeFilter(time) AND\n server = \"$SERVER_ID\"\nORDER BY time DESC",
- "refId": "A",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "tick_rate"
- ],
- "type": "column"
- }
- ]
- ],
- "table": "DBLog_TickRates",
- "tags": [],
- "timeColumn": "time",
- "timeColumnType": "timestamp",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- },
- {
- "datatype": "int",
- "name": "",
- "params": [
- "server",
- "=",
- "$SERVER"
- ],
- "type": "expression"
- }
- ]
- }
- ],
- "title": "Current Tick Rate",
- "type": "gauge"
- },
- {
- "aliasColors": {},
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": {
- "uid": "MySQL"
- },
- "fill": 1,
- "fillGradient": 0,
- "gridPos": {
- "h": 8,
- "w": 18,
- "x": 6,
- "y": 23
- },
- "hiddenSeries": false,
- "id": 2,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "nullPointMode": "null",
- "options": {
- "alertThreshold": true
- },
- "percentage": false,
- "pluginVersion": "9.0.2",
- "pointradius": 2,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "spaceLength": 10,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "datasource": {
- "uid": "MySQL"
- },
- "format": "time_series",
- "group": [
- {
- "params": [
- "$__interval",
- "none"
- ],
- "type": "time"
- }
- ],
- "groupBy": [
- {
- "params": [
- "5m"
- ],
- "type": "time"
- },
- {
- "params": [
- "null"
- ],
- "type": "fill"
- }
- ],
- "measurement": "tick_rate",
- "metricColumn": "none",
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT \n mean(\"tick_rate\") \nFROM \"DBLog_TickRates\" \nWHERE \n $timeFilter AND\n server = '$SERVER_ID'\nGROUP BY time($INTERVAL) fill(null)",
- "rawQuery": true,
- "rawSql": "SELECT\n $__timeGroupAlias(time,$__interval),\n avg(tickRate) AS \"tick_rate\"\nFROM DBLog_TickRates\nWHERE\n $__timeFilter(time) AND\n server = \"$SERVER_ID\"\nGROUP BY 1\nORDER BY $__timeGroup(time,$__interval)",
- "refId": "A",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "tick_rate"
- ],
- "type": "column"
- },
- {
- "params": [
- "avg"
- ],
- "type": "aggregate"
- },
- {
- "params": [
- "tick_rate"
- ],
- "type": "alias"
- }
- ]
- ],
- "table": "DBLog_TickRates",
- "tags": [],
- "timeColumn": "time",
- "timeColumnType": "timestamp",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- }
- ],
- "thresholds": [
- {
- "colorMode": "custom",
- "fill": false,
- "fillColor": "rgba(50, 116, 217, 0.2)",
- "line": true,
- "lineColor": "#F2495C",
- "op": "lt",
- "value": 15,
- "yaxis": "left"
- },
- {
- "colorMode": "custom",
- "fill": false,
- "fillColor": "rgba(50, 116, 217, 0.2)",
- "line": true,
- "lineColor": "#FADE2A",
- "op": "lt",
- "value": 20,
- "yaxis": "left"
- }
- ],
- "timeRegions": [],
- "title": "Tick Rate",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "mode": "time",
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "short",
- "logBase": 1,
- "max": "60",
- "min": "0",
- "show": true
- },
- {
- "format": "short",
- "logBase": 1,
- "show": true
- }
- ],
- "yaxis": {
- "align": false
- }
- },
- {
- "datasource": {
- "uid": "MySQL"
- },
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "thresholds"
- },
- "displayName": "",
- "mappings": [],
- "max": 80,
- "min": 0,
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "orange",
- "value": null
- },
- {
- "color": "green",
- "value": 50
- }
- ]
- }
- },
- "overrides": []
- },
- "gridPos": {
- "h": 8,
- "w": 6,
- "x": 0,
- "y": 31
- },
- "id": 27,
- "options": {
- "orientation": "auto",
- "reduceOptions": {
- "calcs": [
- "mean"
- ],
- "fields": "",
- "values": false
- },
- "showThresholdLabels": false,
- "showThresholdMarkers": true
- },
- "pluginVersion": "9.0.2",
- "targets": [
- {
- "datasource": {
- "uid": "MySQL"
- },
- "format": "time_series",
- "group": [
- {
- "params": [
- "$__interval",
- "none"
- ],
- "type": "time"
- }
- ],
- "groupBy": [],
- "measurement": "tick_rate",
- "metricColumn": "none",
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT LAST(\"player_count\") FROM \"DBLog_PlayerCounts\" WHERE server = '$SERVER_ID'",
- "rawQuery": true,
- "rawSql": "SELECT\n $__timeGroupAlias(time,$__interval),\n players AS \"Player Count\"\nFROM DBLog_PlayerCounts\nWHERE\n $__timeFilter(time) AND\n server = \"$SERVER_ID\"\nGROUP BY 1\nORDER BY $__timeGroup(time,$__interval) DESC\nLIMIT 1",
- "refId": "A",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "player_count"
- ],
- "type": "column"
- },
- {
- "params": [
- "Player Count"
- ],
- "type": "alias"
- }
- ]
- ],
- "table": "DBLog_PlayerCounts",
- "tags": [],
- "timeColumn": "time",
- "timeColumnType": "timestamp",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- }
- ],
- "title": "Current Player Count",
- "type": "gauge"
- },
- {
- "aliasColors": {},
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": {
- "uid": "MySQL"
- },
- "fill": 1,
- "fillGradient": 0,
- "gridPos": {
- "h": 8,
- "w": 18,
- "x": 6,
- "y": 31
- },
- "hiddenSeries": false,
- "id": 28,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "nullPointMode": "null",
- "options": {
- "alertThreshold": true
- },
- "percentage": false,
- "pluginVersion": "9.0.2",
- "pointradius": 2,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "spaceLength": 10,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "datasource": {
- "uid": "MySQL"
- },
- "format": "time_series",
- "group": [
- {
- "params": [
- "$__interval",
- "none"
- ],
- "type": "time"
- }
- ],
- "groupBy": [
- {
- "params": [
- "5m"
- ],
- "type": "time"
- },
- {
- "params": [
- "null"
- ],
- "type": "fill"
- }
- ],
- "measurement": "tick_rate",
- "metricColumn": "none",
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT \n MEAN(\"player_count\") \nFROM \"DBLog_PlayerCounts\" \nWHERE \n $timeFilter AND\n server = '$SERVER_ID'\nGROUP BY time($INTERVAL) fill(null)",
- "rawQuery": true,
- "rawSql": "SELECT\n $__timeGroupAlias(time,$__interval),\n avg(players) AS \"player_count\"\nFROM DBLog_PlayerCounts\nWHERE\n $__timeFilter(time) AND\n server = \"$SERVER_ID\"\nGROUP BY 1\nORDER BY $__timeGroup(time,$__interval)",
- "refId": "A",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "player_count"
- ],
- "type": "column"
- },
- {
- "params": [
- "avg"
- ],
- "type": "aggregate"
- },
- {
- "params": [
- "player_count"
- ],
- "type": "alias"
- }
- ]
- ],
- "table": "DBLog_PlayerCounts",
- "tags": [],
- "timeColumn": "time",
- "timeColumnType": "timestamp",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- }
- ],
- "thresholds": [
- {
- "colorMode": "custom",
- "fill": false,
- "fillColor": "rgba(50, 116, 217, 0.2)",
- "line": true,
- "lineColor": "#FF9830",
- "op": "lt",
- "value": 50,
- "yaxis": "left"
- }
- ],
- "timeRegions": [],
- "title": "Player Count",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "mode": "time",
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "short",
- "logBase": 1,
- "max": "80",
- "min": "0",
- "show": true
- },
- {
- "format": "short",
- "logBase": 1,
- "show": true
- }
- ],
- "yaxis": {
- "align": false
- }
- },
- {
- "datasource": {
- "uid": "MySQL"
- },
- "fieldConfig": {
- "defaults": {
- "color": {
- "fixedColor": "rgb(31, 120, 193)",
- "mode": "fixed"
- },
- "mappings": [
- {
- "options": {
- "match": "null",
- "result": {
- "text": "N/A"
- }
- },
- "type": "special"
- }
- ],
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- },
- {
- "color": "red",
- "value": 80
- }
- ]
- },
- "unit": "none"
- },
- "overrides": []
- },
- "gridPos": {
- "h": 4,
- "w": 6,
- "x": 0,
- "y": 39
- },
- "id": 12,
- "links": [],
- "maxDataPoints": 100,
- "options": {
- "colorMode": "none",
- "graphMode": "area",
- "justifyMode": "auto",
- "orientation": "horizontal",
- "reduceOptions": {
- "calcs": [
- "mean"
- ],
- "fields": "",
- "values": false
- },
- "textMode": "auto"
- },
- "pluginVersion": "9.0.2",
- "targets": [
- {
- "datasource": {
- "uid": "MySQL"
- },
- "format": "time_series",
- "group": [
- {
- "params": [
- "$__interval",
- "none"
- ],
- "type": "time"
- }
- ],
- "groupBy": [
- {
- "params": [
- "$__interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "null"
- ],
- "type": "fill"
- }
- ],
- "metricColumn": "none",
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT COUNT(\"victimName\") \nFROM DBLog_Wounds\nWHERE \n $timeFilter AND\n server = '$SERVER_ID'",
- "rawQuery": true,
- "rawSql": "SELECT\n $__timeGroupAlias(time,$__interval),\n count(id) AS \"id\"\nFROM DBLog_Wounds\nWHERE\n $__timeFilter(time) AND\n server = \"$SERVER_ID\"\nGROUP BY 1\nORDER BY $__timeGroup(time,$__interval)",
- "refId": "A",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "id"
- ],
- "type": "column"
- },
- {
- "params": [
- "count"
- ],
- "type": "aggregate"
- },
- {
- "params": [
- "id"
- ],
- "type": "alias"
- }
- ]
- ],
- "table": "DBLog_Wounds",
- "tags": [],
- "timeColumn": "time",
- "timeColumnType": "timestamp",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- }
- ],
- "title": "Wounded in Time Period",
- "type": "stat"
- },
- {
- "datasource": {
- "uid": "MySQL"
- },
- "fieldConfig": {
- "defaults": {
- "color": {
- "fixedColor": "rgb(31, 120, 193)",
- "mode": "fixed"
- },
- "mappings": [
- {
- "options": {
- "match": "null",
- "result": {
- "text": "N/A"
- }
- },
- "type": "special"
- }
- ],
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- },
- {
- "color": "red",
- "value": 80
- }
- ]
- },
- "unit": "none"
- },
- "overrides": []
- },
- "gridPos": {
- "h": 4,
- "w": 6,
- "x": 6,
- "y": 39
- },
- "id": 13,
- "links": [],
- "maxDataPoints": 100,
- "options": {
- "colorMode": "none",
- "graphMode": "area",
- "justifyMode": "auto",
- "orientation": "horizontal",
- "reduceOptions": {
- "calcs": [
- "mean"
- ],
- "fields": "",
- "values": false
- },
- "textMode": "auto"
- },
- "pluginVersion": "9.0.2",
- "targets": [
- {
- "datasource": {
- "uid": "MySQL"
- },
- "format": "time_series",
- "group": [
- {
- "params": [
- "$__interval",
- "none"
- ],
- "type": "time"
- }
- ],
- "groupBy": [
- {
- "params": [
- "$__interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "null"
- ],
- "type": "fill"
- }
- ],
- "metricColumn": "none",
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT \n count(\"victimName\") \nFROM \"DBLog_Deaths\"\nWHERE \n $timeFilter AND\n server = '$SERVER_ID'",
- "rawQuery": true,
- "rawSql": "SELECT\n $__timeGroupAlias(time,$__interval),\n count(id) AS \"id\"\nFROM DBLog_Deaths\nWHERE\n $__timeFilter(time) AND\n server = \"$SERVER_ID\"\nGROUP BY 1\nORDER BY $__timeGroup(time,$__interval)",
- "refId": "A",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "id"
- ],
- "type": "column"
- },
- {
- "params": [
- "count"
- ],
- "type": "aggregate"
- },
- {
- "params": [
- "id"
- ],
- "type": "alias"
- }
- ]
- ],
- "table": "DBLog_Deaths",
- "tags": [],
- "timeColumn": "time",
- "timeColumnType": "timestamp",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- }
- ],
- "title": "Deaths in Time Period",
- "type": "stat"
- },
- {
- "datasource": {
- "uid": "MySQL"
- },
- "fieldConfig": {
- "defaults": {
- "color": {
- "fixedColor": "rgb(31, 120, 193)",
- "mode": "fixed"
- },
- "mappings": [
- {
- "options": {
- "match": "null",
- "result": {
- "text": "N/A"
- }
- },
- "type": "special"
- }
- ],
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- },
- {
- "color": "red",
- "value": 80
- }
- ]
- },
- "unit": "none"
- },
- "overrides": []
- },
- "gridPos": {
- "h": 4,
- "w": 6,
- "x": 12,
- "y": 39
- },
- "id": 10,
- "interval": "",
- "links": [],
- "maxDataPoints": 100,
- "options": {
- "colorMode": "none",
- "graphMode": "area",
- "justifyMode": "auto",
- "orientation": "horizontal",
- "reduceOptions": {
- "calcs": [
- "lastNotNull"
- ],
- "fields": "",
- "values": false
- },
- "textMode": "auto"
- },
- "pluginVersion": "9.0.2",
- "targets": [
- {
- "datasource": {
- "uid": "MySQL"
- },
- "format": "time_series",
- "group": [
- {
- "params": [
- "$__interval",
- "none"
- ],
- "type": "time"
- }
- ],
- "groupBy": [],
- "measurement": "player_wound",
- "metricColumn": "none",
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT \n count(\"victimName\") \nFROM \"DBLog_Wounds\"\nWHERE \n teamkill = true AND\n $timeFilter AND\n server = '$SERVER_ID'",
- "rawQuery": true,
- "rawSql": "SELECT\n $__timeGroupAlias(time,$__interval),\n count(id) AS \"id\"\nFROM DBLog_Wounds\nWHERE\n $__timeFilter(time) AND\n teamkill = '1' AND\n server = \"$SERVER_ID\"\nGROUP BY 1\nORDER BY $__timeGroup(time,$__interval)",
- "refId": "A",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "id"
- ],
- "type": "column"
- },
- {
- "params": [
- "count"
- ],
- "type": "aggregate"
- },
- {
- "params": [
- "id"
- ],
- "type": "alias"
- }
- ]
- ],
- "table": "DBLog_Wounds",
- "tags": [],
- "timeColumn": "time",
- "timeColumnType": "timestamp",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- },
- {
- "datatype": "tinyint",
- "name": "",
- "params": [
- "teamkill",
- "=",
- "'1'"
- ],
- "type": "expression"
- }
- ]
- }
- ],
- "title": "TKs in Time Period",
- "type": "stat"
- },
- {
- "datasource": {
- "uid": "MySQL"
- },
- "fieldConfig": {
- "defaults": {
- "color": {
- "fixedColor": "rgb(31, 120, 193)",
- "mode": "fixed"
- },
- "mappings": [
- {
- "options": {
- "match": "null",
- "result": {
- "text": "N/A"
- }
- },
- "type": "special"
- }
- ],
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- },
- {
- "color": "red",
- "value": 80
- }
- ]
- },
- "unit": "none"
- },
- "overrides": []
- },
- "gridPos": {
- "h": 4,
- "w": 6,
- "x": 18,
- "y": 39
- },
- "id": 14,
- "interval": "",
- "links": [],
- "maxDataPoints": 100,
- "options": {
- "colorMode": "none",
- "graphMode": "area",
- "justifyMode": "auto",
- "orientation": "horizontal",
- "reduceOptions": {
- "calcs": [
- "lastNotNull"
- ],
- "fields": "",
- "values": false
- },
- "textMode": "auto"
- },
- "pluginVersion": "9.0.2",
- "targets": [
- {
- "datasource": {
- "uid": "MySQL"
- },
- "format": "time_series",
- "group": [
- {
- "params": [
- "$__interval",
- "none"
- ],
- "type": "time"
- }
- ],
- "groupBy": [],
- "measurement": "revive",
- "metricColumn": "none",
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT count(\"victimName\") FROM \"DBLog_Revives\" WHERE $timeFilter AND server = '$SERVER_ID'",
- "rawQuery": true,
- "rawSql": "SELECT\n $__timeGroupAlias(time,$__interval),\n count(id) AS \"id\"\nFROM DBLog_Revives\nWHERE\n $__timeFilter(time) AND\n server = \"$SERVER_ID\"\nGROUP BY 1\nORDER BY $__timeGroup(time,$__interval)",
- "refId": "A",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "id"
- ],
- "type": "column"
- },
- {
- "params": [
- "count"
- ],
- "type": "aggregate"
- },
- {
- "params": [
- "id"
- ],
- "type": "alias"
- }
- ]
- ],
- "table": "DBLog_Revives",
- "tags": [],
- "timeColumn": "time",
- "timeColumnType": "timestamp",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- }
- ],
- "title": "Revives in Time Period",
- "type": "stat"
- },
- {
- "columns": [],
- "datasource": {
- "uid": "MySQL"
- },
- "fontSize": "100%",
- "gridPos": {
- "h": 13,
- "w": 24,
- "x": 0,
- "y": 43
- },
- "id": 4,
- "showHeader": true,
- "sort": {
- "col": 0,
- "desc": true
- },
- "styles": [
- {
- "alias": "",
- "align": "auto",
- "colors": [
- "rgba(245, 54, 54, 0.9)",
- "rgba(237, 129, 40, 0.89)",
- "rgba(50, 172, 45, 0.97)"
- ],
- "dateFormat": "YYYY-MM-DD HH:mm:ss",
- "decimals": 2,
- "mappingType": 1,
- "pattern": "Time",
- "thresholds": [],
- "type": "date",
- "unit": "short"
- }
- ],
- "targets": [
- {
- "datasource": {
- "uid": "MySQL"
- },
- "format": "table",
- "group": [],
- "metricColumn": "none",
- "rawQuery": true,
- "rawSql": "SELECT\n a.time AS \"Time\",\n a.attacker AS \"Attacker\",\n a.attackerName AS \"Attacker Name\",\n a.weapon AS \"Weapon\",\n a.victim AS \"Victim\",\n a.victimName AS \"Victim Name\",\n Total AS \"Total in Time Frame\"\nFROM DBLog_Wounds a\nJOIN\n (\n SELECT\n attacker,\n COUNT(*) AS \"Total\"\n FROM DBLog_Wounds\n WHERE \n $__timeFilter(time) AND\n server = $SERVER_ID AND\n teamkill = true\n GROUP BY attacker\n ) AS b\n ON a.attacker = b.attacker\nWHERE \n $__timeFilter(time) AND\n server = $SERVER_ID AND\n teamkill = true AND\n server = $SERVER_ID\nORDER BY time DESC\nLIMIT 30;",
- "refId": "B",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "column"
- }
- ]
- ],
- "timeColumn": "time",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- }
- ],
- "title": "Recent Teamkills",
- "transform": "table",
- "type": "table-old"
- },
- {
- "datasource": {
- "uid": "MySQL"
- },
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "palette-classic"
- },
- "custom": {
- "hideFrom": {
- "legend": false,
- "tooltip": false,
- "viz": false
- }
- },
- "decimals": 0,
- "mappings": [],
- "unit": "short"
- },
- "overrides": []
- },
- "gridPos": {
- "h": 9,
- "w": 6,
- "x": 0,
- "y": 56
- },
- "id": 20,
- "links": [],
- "maxDataPoints": 3,
- "options": {
- "legend": {
- "calcs": [],
- "displayMode": "table",
- "placement": "bottom",
- "values": [
- "value",
- "percent"
- ]
- },
- "pieType": "pie",
- "reduceOptions": {
- "calcs": [
- "lastNotNull"
- ],
- "fields": "",
- "values": false
- },
- "tooltip": {
- "mode": "single",
- "sort": "none"
- }
- },
- "targets": [
- {
- "alias": "Non-Teamkills",
- "datasource": {
- "uid": "MySQL"
- },
- "format": "time_series",
- "group": [
- {
- "params": [
- "$__interval",
- "none"
- ],
- "type": "time"
- }
- ],
- "groupBy": [
- {
- "params": [
- "$__interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "null"
- ],
- "type": "fill"
- }
- ],
- "metricColumn": "none",
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT \n COUNT(\"victimName\") \nFROM \"DBLog_Wounds\" \nWHERE \n $timeFilter AND\n server = '$SERVER_ID' AND\n teamkill = false",
- "rawQuery": true,
- "rawSql": "SELECT\n $__timeGroupAlias(time,$__interval),\n count(id) AS \"Non-Teamkill\"\nFROM DBLog_Wounds\nWHERE\n $__timeFilter(time) AND\n teamkill = 0 AND\n server = \"$SERVER_ID\"\nGROUP BY 1\nORDER BY $__timeGroup(time,$__interval)",
- "refId": "B",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "id"
- ],
- "type": "column"
- },
- {
- "params": [
- "count"
- ],
- "type": "aggregate"
- },
- {
- "params": [
- "Non-Teamkill"
- ],
- "type": "alias"
- }
- ]
- ],
- "table": "DBLog_Wounds",
- "tags": [],
- "timeColumn": "time",
- "timeColumnType": "timestamp",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- },
- {
- "datatype": "tinyint",
- "name": "",
- "params": [
- "teamkill",
- "=",
- "0"
- ],
- "type": "expression"
- }
- ]
- },
- {
- "alias": "Teamkills",
- "datasource": {
- "uid": "MySQL"
- },
- "format": "time_series",
- "group": [
- {
- "params": [
- "$__interval",
- "none"
- ],
- "type": "time"
- }
- ],
- "groupBy": [
- {
- "params": [
- "$__interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "null"
- ],
- "type": "fill"
- }
- ],
- "metricColumn": "none",
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT \n COUNT(\"victimName\") \nFROM \"DBLog_Wounds\" \nWHERE \n $timeFilter AND\n server = '$SERVER_ID' AND\n teamkill = true",
- "rawQuery": true,
- "rawSql": "SELECT\n $__timeGroupAlias(time,$__interval),\n count(id) AS \"Teamkill\"\nFROM DBLog_Wounds\nWHERE\n $__timeFilter(time) AND\n teamkill = '1' AND\n server = \"$SERVER_ID\"\nGROUP BY 1\nORDER BY $__timeGroup(time,$__interval)",
- "refId": "A",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "id"
- ],
- "type": "column"
- },
- {
- "params": [
- "count"
- ],
- "type": "aggregate"
- },
- {
- "params": [
- "Teamkill"
- ],
- "type": "alias"
- }
- ]
- ],
- "table": "DBLog_Wounds",
- "tags": [],
- "timeColumn": "time",
- "timeColumnType": "timestamp",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- },
- {
- "datatype": "tinyint",
- "name": "",
- "params": [
- "teamkill",
- "=",
- "'1'"
- ],
- "type": "expression"
- }
- ]
- }
- ],
- "title": "Non-Teamkills vs Teamkills (Wounds)",
- "type": "piechart"
- },
- {
- "aliasColors": {},
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": {
- "uid": "MySQL"
- },
- "fill": 1,
- "fillGradient": 0,
- "gridPos": {
- "h": 9,
- "w": 18,
- "x": 6,
- "y": 56
- },
- "hiddenSeries": false,
- "id": 29,
- "interval": "2m",
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "nullPointMode": "null",
- "options": {
- "alertThreshold": true
- },
- "percentage": false,
- "pluginVersion": "9.0.2",
- "pointradius": 2,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "spaceLength": 10,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "alias": "Players Wounded",
- "datasource": {
- "uid": "MySQL"
- },
- "format": "time_series",
- "group": [
- {
- "params": [
- "$__interval",
- "none"
- ],
- "type": "time"
- }
- ],
- "groupBy": [
- {
- "params": [
- "$__interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "0"
- ],
- "type": "fill"
- }
- ],
- "measurement": "player_wound",
- "metricColumn": "none",
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT count(\"victimName\") FROM \"DBLog_Wounds\" WHERE $timeFilter AND server = '$SERVER_ID' GROUP BY time($INTERVAL) fill(0)",
- "rawQuery": true,
- "rawSql": "SELECT\n $__timeGroupAlias(time,$__interval),\n count(id) AS \"All\"\nFROM DBLog_Wounds\nWHERE\n $__timeFilter(time) AND\n server = \"$SERVER_ID\"\nGROUP BY 1\nORDER BY $__timeGroup(time,$__interval)",
- "refId": "A",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "id"
- ],
- "type": "column"
- },
- {
- "params": [
- "count"
- ],
- "type": "aggregate"
- },
- {
- "params": [
- "All"
- ],
- "type": "alias"
- }
- ]
- ],
- "table": "DBLog_Wounds",
- "tags": [],
- "timeColumn": "time",
- "timeColumnType": "timestamp",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- },
- {
- "alias": "Players Wounded By Team 1",
- "datasource": {
- "uid": "MySQL"
- },
- "format": "time_series",
- "group": [
- {
- "params": [
- "$__interval",
- "none"
- ],
- "type": "time"
- }
- ],
- "groupBy": [
- {
- "params": [
- "$__interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "0"
- ],
- "type": "fill"
- }
- ],
- "measurement": "player_die",
- "metricColumn": "none",
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT count(\"victimName\") FROM \"DBLog_Wounds\" WHERE $timeFilter AND server = '$SERVER_ID' AND attackerTeamID=1 GROUP BY time($INTERVAL) fill(0)",
- "rawQuery": true,
- "rawSql": "SELECT\n $__timeGroupAlias(time,$__interval),\n count(id) AS \"Team 1\"\nFROM DBLog_Wounds\nWHERE\n $__timeFilter(time) AND\n attackerTeamID = 1 AND\n server = \"$SERVER_ID\"\nGROUP BY 1\nORDER BY $__timeGroup(time,$__interval)",
- "refId": "B",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "id"
- ],
- "type": "column"
- },
- {
- "params": [
- "count"
- ],
- "type": "aggregate"
- },
- {
- "params": [
- "Team 1"
- ],
- "type": "alias"
- }
- ]
- ],
- "table": "DBLog_Wounds",
- "tags": [],
- "timeColumn": "time",
- "timeColumnType": "timestamp",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- },
- {
- "datatype": "int",
- "name": "",
- "params": [
- "attackerTeamID",
- "=",
- "1"
- ],
- "type": "expression"
- }
- ]
- },
- {
- "alias": "Players Wounded By Team 2",
- "datasource": {
- "uid": "MySQL"
- },
- "format": "time_series",
- "group": [
- {
- "params": [
- "$__interval",
- "none"
- ],
- "type": "time"
- }
- ],
- "groupBy": [
- {
- "params": [
- "$__interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "0"
- ],
- "type": "fill"
- }
- ],
- "measurement": "player_die",
- "metricColumn": "none",
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT count(\"victimName\") FROM \"DBLog_Wounds\" WHERE $timeFilter AND server = '$SERVER_ID' AND attackerTeamID=2 GROUP BY time($INTERVAL) fill(0)",
- "rawQuery": true,
- "rawSql": "SELECT\n $__timeGroupAlias(time,$__interval),\n count(id) AS \"Team 2\"\nFROM DBLog_Wounds\nWHERE\n $__timeFilter(time) AND\n attackerTeamID = 2 AND\n server = \"$SERVER_ID\"\nGROUP BY 1\nORDER BY $__timeGroup(time,$__interval)",
- "refId": "C",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "id"
- ],
- "type": "column"
- },
- {
- "params": [
- "count"
- ],
- "type": "aggregate"
- },
- {
- "params": [
- "Team 2"
- ],
- "type": "alias"
- }
- ]
- ],
- "table": "DBLog_Wounds",
- "tags": [],
- "timeColumn": "time",
- "timeColumnType": "timestamp",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- },
- {
- "datatype": "int",
- "name": "",
- "params": [
- "attackerTeamID",
- "=",
- "2"
- ],
- "type": "expression"
- }
- ]
- }
- ],
- "thresholds": [],
- "timeRegions": [],
- "title": "Wounds Per Minutes",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "mode": "time",
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "short",
- "logBase": 1,
- "show": true
- },
- {
- "format": "short",
- "logBase": 1,
- "show": true
- }
- ],
- "yaxis": {
- "align": false
- }
- },
- {
- "datasource": {
- "uid": "MySQL"
- },
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "palette-classic"
- },
- "custom": {
- "hideFrom": {
- "legend": false,
- "tooltip": false,
- "viz": false
- }
- },
- "decimals": 0,
- "mappings": [],
- "unit": "short"
- },
- "overrides": []
- },
- "gridPos": {
- "h": 9,
- "w": 6,
- "x": 0,
- "y": 65
- },
- "id": 18,
- "links": [],
- "maxDataPoints": 3,
- "options": {
- "legend": {
- "calcs": [],
- "displayMode": "table",
- "placement": "bottom",
- "values": [
- "value",
- "percent"
- ]
- },
- "pieType": "pie",
- "reduceOptions": {
- "calcs": [
- "lastNotNull"
- ],
- "fields": "",
- "values": false
- },
- "tooltip": {
- "mode": "single",
- "sort": "none"
- }
- },
- "targets": [
- {
- "alias": "Deaths",
- "datasource": {
- "uid": "MySQL"
- },
- "format": "time_series",
- "group": [
- {
- "params": [
- "$__interval",
- "none"
- ],
- "type": "time"
- }
- ],
- "groupBy": [
- {
- "params": [
- "$__interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "null"
- ],
- "type": "fill"
- }
- ],
- "measurement": "player_die",
- "metricColumn": "none",
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT \n COUNT(\"victimName\") \nFROM \"DBLog_Deaths\" \nWHERE \n $timeFilter ",
- "rawQuery": true,
- "rawSql": "SELECT\n $__timeGroupAlias(woundTime,$__interval),\n count(id) AS \"Deaths\"\nFROM DBLog_Deaths\nWHERE\n $__timeFilter(woundTime) AND\n server = \"$SERVER_ID\"\nGROUP BY 1\nORDER BY $__timeGroup(woundTime,$__interval)",
- "refId": "A",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "id"
- ],
- "type": "column"
- },
- {
- "params": [
- "count"
- ],
- "type": "aggregate"
- },
- {
- "params": [
- "Deaths"
- ],
- "type": "alias"
- }
- ]
- ],
- "table": "DBLog_Deaths",
- "tags": [],
- "timeColumn": "woundTime",
- "timeColumnType": "timestamp",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- },
- {
- "alias": "Revives",
- "datasource": {
- "uid": "MySQL"
- },
- "format": "time_series",
- "group": [
- {
- "params": [
- "$__interval",
- "none"
- ],
- "type": "time"
- }
- ],
- "groupBy": [
- {
- "params": [
- "$__interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "null"
- ],
- "type": "fill"
- }
- ],
- "metricColumn": "none",
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT \n COUNT(\"victimName\") \nFROM \"DBLog_Revives\" \nWHERE \n $timeFilter ",
- "rawQuery": true,
- "rawSql": "SELECT\n $__timeGroupAlias(woundTime,$__interval),\n count(id) AS \"Revives\"\nFROM DBLog_Revives\nWHERE\n $__timeFilter(woundTime) AND\n server = \"$SERVER_ID\"\nGROUP BY 1\nORDER BY $__timeGroup(woundTime,$__interval)",
- "refId": "B",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "id"
- ],
- "type": "column"
- },
- {
- "params": [
- "count"
- ],
- "type": "aggregate"
- },
- {
- "params": [
- "Revives"
- ],
- "type": "alias"
- }
- ]
- ],
- "table": "DBLog_Revives",
- "tags": [],
- "timeColumn": "woundTime",
- "timeColumnType": "timestamp",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- }
- ],
- "title": "Deaths vs Revives",
- "type": "piechart"
- },
- {
- "aliasColors": {},
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": {
- "uid": "MySQL"
- },
- "fill": 1,
- "fillGradient": 0,
- "gridPos": {
- "h": 9,
- "w": 18,
- "x": 6,
- "y": 65
- },
- "hiddenSeries": false,
- "id": 6,
- "interval": "2m",
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "nullPointMode": "null",
- "options": {
- "alertThreshold": true
- },
- "percentage": false,
- "pluginVersion": "9.0.2",
- "pointradius": 2,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "spaceLength": 10,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "alias": "Players Killed",
- "datasource": {
- "uid": "MySQL"
- },
- "format": "time_series",
- "group": [
- {
- "params": [
- "$__interval",
- "none"
- ],
- "type": "time"
- }
- ],
- "groupBy": [
- {
- "params": [
- "$__interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "0"
- ],
- "type": "fill"
- }
- ],
- "measurement": "player_wound",
- "metricColumn": "none",
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT count(\"victimName\") FROM \"DBLog_Deaths\" WHERE $timeFilter AND server = '$SERVER_ID' GROUP BY time($INTERVAL) fill(0)",
- "rawQuery": true,
- "rawSql": "SELECT\n $__timeGroupAlias(time,$__interval),\n count(id) AS \"All\"\nFROM DBLog_Deaths\nWHERE\n $__timeFilter(time) AND\n server = \"$SERVER_ID\"\nGROUP BY 1\nORDER BY $__timeGroup(time,$__interval)",
- "refId": "A",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "id"
- ],
- "type": "column"
- },
- {
- "params": [
- "count"
- ],
- "type": "aggregate"
- },
- {
- "params": [
- "All"
- ],
- "type": "alias"
- }
- ]
- ],
- "table": "DBLog_Deaths",
- "tags": [],
- "timeColumn": "time",
- "timeColumnType": "timestamp",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- },
- {
- "alias": "Players Killed By Team 1",
- "datasource": {
- "uid": "MySQL"
- },
- "format": "time_series",
- "group": [
- {
- "params": [
- "$__interval",
- "none"
- ],
- "type": "time"
- }
- ],
- "groupBy": [
- {
- "params": [
- "$__interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "0"
- ],
- "type": "fill"
- }
- ],
- "measurement": "player_die",
- "metricColumn": "none",
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT count(\"victimName\") FROM \"DBLog_Deaths\" WHERE $timeFilter AND server = '$SERVER_ID' AND attackerTeamID=1 GROUP BY time($INTERVAL) fill(0)",
- "rawQuery": true,
- "rawSql": "SELECT\n $__timeGroupAlias(time,$__interval),\n count(id) AS \"Team 1\"\nFROM DBLog_Deaths\nWHERE\n $__timeFilter(time) AND\n attackerTeamID = 1 AND\n server = \"$SERVER_ID\"\nGROUP BY 1\nORDER BY $__timeGroup(time,$__interval)",
- "refId": "B",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "id"
- ],
- "type": "column"
- },
- {
- "params": [
- "count"
- ],
- "type": "aggregate"
- },
- {
- "params": [
- "Team 1"
- ],
- "type": "alias"
- }
- ]
- ],
- "table": "DBLog_Deaths",
- "tags": [],
- "timeColumn": "time",
- "timeColumnType": "timestamp",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- },
- {
- "datatype": "int",
- "name": "",
- "params": [
- "attackerTeamID",
- "=",
- "1"
- ],
- "type": "expression"
- }
- ]
- },
- {
- "alias": "Players Killed By Team 2",
- "datasource": {
- "uid": "MySQL"
- },
- "format": "time_series",
- "group": [
- {
- "params": [
- "$__interval",
- "none"
- ],
- "type": "time"
- }
- ],
- "groupBy": [
- {
- "params": [
- "$__interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "0"
- ],
- "type": "fill"
- }
- ],
- "measurement": "player_die",
- "metricColumn": "none",
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT count(\"victimName\") FROM \"DBLog_Deaths\" WHERE $timeFilter AND server = '$SERVER_ID' AND attackerTeamID=2 GROUP BY time($INTERVAL) fill(0)",
- "rawQuery": true,
- "rawSql": "SELECT\n $__timeGroupAlias(time,$__interval),\n count(id) AS \"Team 2\"\nFROM DBLog_Deaths\nWHERE\n $__timeFilter(time) AND\n attackerTeamID = 2 AND\n server = \"$SERVER_ID\"\nGROUP BY 1\nORDER BY $__timeGroup(time,$__interval)",
- "refId": "C",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "id"
- ],
- "type": "column"
- },
- {
- "params": [
- "count"
- ],
- "type": "aggregate"
- },
- {
- "params": [
- "Team 2"
- ],
- "type": "alias"
- }
- ]
- ],
- "table": "DBLog_Deaths",
- "tags": [],
- "timeColumn": "time",
- "timeColumnType": "timestamp",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- },
- {
- "datatype": "int",
- "name": "",
- "params": [
- "attackerTeamID",
- "=",
- "2"
- ],
- "type": "expression"
- }
- ]
- }
- ],
- "thresholds": [],
- "timeRegions": [],
- "title": "Kills Per Minutes",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "mode": "time",
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "short",
- "logBase": 1,
- "show": true
- },
- {
- "format": "short",
- "logBase": 1,
- "show": true
- }
- ],
- "yaxis": {
- "align": false
- }
- },
- {
- "datasource": {
- "uid": "MySQL"
- },
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "palette-classic"
- },
- "custom": {
- "hideFrom": {
- "legend": false,
- "tooltip": false,
- "viz": false
- }
- },
- "decimals": 0,
- "mappings": [],
- "unit": "short"
- },
- "overrides": []
- },
- "gridPos": {
- "h": 9,
- "w": 6,
- "x": 0,
- "y": 74
- },
- "id": 31,
- "links": [],
- "maxDataPoints": 3,
- "options": {
- "legend": {
- "calcs": [],
- "displayMode": "table",
- "placement": "bottom",
- "values": [
- "value",
- "percent"
- ]
- },
- "pieType": "pie",
- "reduceOptions": {
- "calcs": [
- "lastNotNull"
- ],
- "fields": "",
- "values": false
- },
- "tooltip": {
- "mode": "single",
- "sort": "none"
- }
- },
- "targets": [
- {
- "alias": "Team 1 Kills",
- "datasource": {
- "uid": "MySQL"
- },
- "format": "time_series",
- "group": [
- {
- "params": [
- "$__interval",
- "none"
- ],
- "type": "time"
- }
- ],
- "groupBy": [
- {
- "params": [
- "$__interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "null"
- ],
- "type": "fill"
- }
- ],
- "metricColumn": "none",
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT count(\"victimName\") FROM \"DBLog_Deaths\" WHERE $timeFilter AND server = '$SERVER_ID' AND attackerTeamID=1",
- "rawQuery": true,
- "rawSql": "SELECT\n $__timeGroupAlias(time,$__interval),\n count(id) AS \"Team 1\"\nFROM DBLog_Wounds\nWHERE\n $__timeFilter(time) AND\n attackerTeamID = 1 AND\n server = \"$SERVER_ID\"\nGROUP BY 1\nORDER BY $__timeGroup(time,$__interval)",
- "refId": "A",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "id"
- ],
- "type": "column"
- },
- {
- "params": [
- "count"
- ],
- "type": "aggregate"
- },
- {
- "params": [
- "Team 1"
- ],
- "type": "alias"
- }
- ]
- ],
- "table": "DBLog_Wounds",
- "tags": [],
- "timeColumn": "time",
- "timeColumnType": "timestamp",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- },
- {
- "datatype": "int",
- "name": "",
- "params": [
- "attackerTeamID",
- "=",
- "1"
- ],
- "type": "expression"
- }
- ]
- },
- {
- "alias": "Team 2 Kills",
- "datasource": {
- "uid": "MySQL"
- },
- "format": "time_series",
- "group": [
- {
- "params": [
- "$__interval",
- "none"
- ],
- "type": "time"
- }
- ],
- "groupBy": [
- {
- "params": [
- "$__interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "null"
- ],
- "type": "fill"
- }
- ],
- "metricColumn": "none",
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT count(\"victimName\") FROM \"DBLog_Deaths\" WHERE $timeFilter AND server = '$SERVER_ID' AND attackerTeamID=2",
- "rawQuery": true,
- "rawSql": "SELECT\n $__timeGroupAlias(time,$__interval),\n count(id) AS \"Team 2\"\nFROM DBLog_Wounds\nWHERE\n $__timeFilter(time) AND\n server = \"$SERVER_ID\"\nGROUP BY 1\nORDER BY $__timeGroup(time,$__interval)",
- "refId": "B",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "id"
- ],
- "type": "column"
- },
- {
- "params": [
- "count"
- ],
- "type": "aggregate"
- },
- {
- "params": [
- "Team 2"
- ],
- "type": "alias"
- }
- ]
- ],
- "table": "DBLog_Wounds",
- "tags": [],
- "timeColumn": "time",
- "timeColumnType": "timestamp",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- }
- ],
- "title": "Team 1 vs Team 2",
- "type": "piechart"
- },
- {
- "aliasColors": {},
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": {
- "uid": "MySQL"
- },
- "fill": 1,
- "fillGradient": 0,
- "gridPos": {
- "h": 9,
- "w": 18,
- "x": 6,
- "y": 74
- },
- "hiddenSeries": false,
- "id": 8,
- "interval": "2m",
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "nullPointMode": "null",
- "options": {
- "alertThreshold": true
- },
- "percentage": false,
- "pluginVersion": "9.0.2",
- "pointradius": 2,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "spaceLength": 10,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "alias": "Revives",
- "datasource": {
- "uid": "MySQL"
- },
- "format": "time_series",
- "group": [
- {
- "params": [
- "$__interval",
- "none"
- ],
- "type": "time"
- }
- ],
- "groupBy": [
- {
- "params": [
- "$__interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "0"
- ],
- "type": "fill"
- }
- ],
- "measurement": "revive",
- "metricColumn": "none",
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT count(\"victimName\") FROM \"DBLog_Revives\" WHERE $timeFilter AND server = '$SERVER_ID' GROUP BY time($INTERVAL) fill(0)",
- "rawQuery": true,
- "rawSql": "SELECT\n $__timeGroupAlias(time,$__interval),\n count(id) AS \"All\"\nFROM DBLog_Revives\nWHERE\n $__timeFilter(time) AND\n server = \"$SERVER_ID\"\nGROUP BY 1\nORDER BY $__timeGroup(time,$__interval)",
- "refId": "A",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "id"
- ],
- "type": "column"
- },
- {
- "params": [
- "count"
- ],
- "type": "aggregate"
- },
- {
- "params": [
- "All"
- ],
- "type": "alias"
- }
- ]
- ],
- "table": "DBLog_Revives",
- "tags": [],
- "timeColumn": "time",
- "timeColumnType": "timestamp",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- },
- {
- "alias": "Revives",
- "datasource": {
- "uid": "MySQL"
- },
- "format": "time_series",
- "group": [
- {
- "params": [
- "$__interval",
- "none"
- ],
- "type": "time"
- }
- ],
- "groupBy": [
- {
- "params": [
- "$__interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "0"
- ],
- "type": "fill"
- }
- ],
- "measurement": "revive",
- "metricColumn": "none",
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT count(\"victimName\") FROM \"DBLog_Revives\" WHERE $timeFilter AND server = '$SERVER_ID' AND reviverTeamID = 1 GROUP BY time($INTERVAL) fill(0)",
- "rawQuery": true,
- "rawSql": "SELECT\n $__timeGroupAlias(time,$__interval),\n count(id) AS \"Team 1\"\nFROM DBLog_Revives\nWHERE\n $__timeFilter(time) AND\n victimTeamID = 1 AND\n server = \"$SERVER_ID\"\nGROUP BY 1\nORDER BY $__timeGroup(time,$__interval)",
- "refId": "B",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "id"
- ],
- "type": "column"
- },
- {
- "params": [
- "count"
- ],
- "type": "aggregate"
- },
- {
- "params": [
- "Team 1"
- ],
- "type": "alias"
- }
- ]
- ],
- "table": "DBLog_Revives",
- "tags": [],
- "timeColumn": "time",
- "timeColumnType": "timestamp",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- },
- {
- "datatype": "int",
- "name": "",
- "params": [
- "victimTeamID",
- "=",
- "1"
- ],
- "type": "expression"
- }
- ]
- },
- {
- "alias": "Revives",
- "datasource": {
- "uid": "MySQL"
- },
- "format": "time_series",
- "group": [
- {
- "params": [
- "$__interval",
- "none"
- ],
- "type": "time"
- }
- ],
- "groupBy": [
- {
- "params": [
- "$__interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "0"
- ],
- "type": "fill"
- }
- ],
- "measurement": "revive",
- "metricColumn": "none",
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT count(\"victimName\") FROM \"DBLog_Revives\" WHERE $timeFilter AND server = '$SERVER_ID' AND reviverTeamID = 2 GROUP BY time($INTERVAL) fill(0)",
- "rawQuery": true,
- "rawSql": "SELECT\n $__timeGroupAlias(time,$__interval),\n count(id) AS \"Team 2\"\nFROM DBLog_Revives\nWHERE\n $__timeFilter(time) AND\n victimTeamID = 2 AND\n server = \"$SERVER_ID\"\nGROUP BY 1\nORDER BY $__timeGroup(time,$__interval)",
- "refId": "C",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "id"
- ],
- "type": "column"
- },
- {
- "params": [
- "count"
- ],
- "type": "aggregate"
- },
- {
- "params": [
- "Team 2"
- ],
- "type": "alias"
- }
- ]
- ],
- "table": "DBLog_Revives",
- "tags": [],
- "timeColumn": "time",
- "timeColumnType": "timestamp",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- },
- {
- "datatype": "int",
- "name": "",
- "params": [
- "victimTeamID",
- "=",
- "2"
- ],
- "type": "expression"
- }
- ]
- }
- ],
- "thresholds": [],
- "timeRegions": [],
- "title": "Revives Per Minutes",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "mode": "time",
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "short",
- "logBase": 1,
- "show": true
- },
- {
- "format": "short",
- "logBase": 1,
- "show": true
- }
- ],
- "yaxis": {
- "align": false
- }
- },
- {
- "columns": [],
- "datasource": {
- "uid": "MySQL"
- },
- "fontSize": "100%",
- "gridPos": {
- "h": 8,
- "w": 12,
- "x": 0,
- "y": 83
- },
- "id": 22,
- "showHeader": true,
- "sort": {
- "col": 2,
- "desc": true
- },
- "styles": [
- {
- "alias": "Time",
- "align": "auto",
- "dateFormat": "YYYY-MM-DD HH:mm:ss",
- "pattern": "Time",
- "type": "date"
- },
- {
- "alias": "",
- "align": "auto",
- "colors": [
- "rgba(245, 54, 54, 0.9)",
- "rgba(237, 129, 40, 0.89)",
- "rgba(50, 172, 45, 0.97)"
- ],
- "decimals": 2,
- "pattern": "/.*/",
- "thresholds": [],
- "type": "number",
- "unit": "short"
- }
- ],
- "targets": [
- {
- "datasource": {
- "uid": "MySQL"
- },
- "format": "table",
- "group": [],
- "metricColumn": "none",
- "rawQuery": true,
- "rawSql": "SELECT\n layerClassname as \"Layer\",\n startTime AS \"Start Time\",\n endTime AS \"End Time\"\nFROM `DBLog_Matches`\nWHERE \n (\n $__timeFilter(startTime) OR \n $__timeFilter(endTime) OR\n endTime IS NULL\n ) AND \n server = $SERVER_ID \nORDER BY startTime DESC;",
- "refId": "A",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "column"
- }
- ]
- ],
- "timeColumn": "time",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- }
- ],
- "title": "Matches",
- "transform": "table",
- "type": "table-old"
- },
- {
- "datasource": {
- "type": "mysql",
- "uid": "thqbOjq7z"
- },
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "palette-classic"
- },
- "custom": {
- "hideFrom": {
- "legend": false,
- "tooltip": false,
- "viz": false
- }
- },
- "mappings": []
- },
- "overrides": []
- },
- "gridPos": {
- "h": 8,
- "w": 6,
- "x": 12,
- "y": 83
- },
- "id": 25,
- "links": [],
- "maxDataPoints": 3,
- "options": {
- "legend": {
- "displayMode": "list",
- "placement": "bottom"
- },
- "pieType": "pie",
- "reduceOptions": {
- "calcs": [
- "lastNotNull"
- ],
- "fields": "",
- "values": false
- },
- "tooltip": {
- "mode": "single",
- "sort": "none"
- }
- },
- "pluginVersion": "9.0.2",
- "targets": [
- {
- "datasource": {
- "uid": "MySQL"
- },
- "format": "time_series",
- "group": [],
- "metricColumn": "layer",
- "rawQuery": true,
- "rawSql": "SELECT\n layerClassname AS metric,\n COUNT(*),\n startTime AS time\nFROM `DBLog_Matches`\nWHERE\n (\n $__timeFilter(startTime) OR \n $__timeFilter(endTime) OR\n endTime IS NULL\n ) AND \n server = $SERVER_ID \nGROUP BY layerClassname\nORDER BY time ASC",
- "refId": "A",
- "select": [
- [
- {
- "params": [
- "id"
- ],
- "type": "column"
- }
- ]
- ],
- "table": "game",
- "timeColumn": "startTime",
- "timeColumnType": "timestamp",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- }
- ],
- "title": "Layers",
- "type": "piechart"
- },
- {
- "datasource": {
- "type": "mysql",
- "uid": "thqbOjq7z"
- },
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "palette-classic"
- },
- "custom": {
- "hideFrom": {
- "legend": false,
- "tooltip": false,
- "viz": false
- }
- },
- "decimals": 0,
- "mappings": [],
- "unit": "short"
- },
- "overrides": []
- },
- "gridPos": {
- "h": 8,
- "w": 6,
- "x": 18,
- "y": 83
- },
- "id": 24,
- "links": [],
- "maxDataPoints": 3,
- "options": {
- "legend": {
- "calcs": [],
- "displayMode": "table",
- "placement": "bottom",
- "values": [
- "value",
- "percent"
- ]
- },
- "pieType": "pie",
- "reduceOptions": {
- "calcs": [
- "lastNotNull"
- ],
- "fields": "",
- "values": false
- },
- "tooltip": {
- "mode": "single",
- "sort": "none"
- }
- },
- "targets": [
- {
- "datasource": {
- "uid": "MySQL"
- },
- "format": "time_series",
- "group": [],
- "metricColumn": "layer",
- "rawQuery": true,
- "rawSql": "SELECT\n mapClassname AS metric,\n COUNT(*),\n startTime AS time\nFROM `DBLog_Matches`\nWHERE\n (\n $__timeFilter(startTime) OR \n $__timeFilter(endTime) OR\n endTime IS NULL\n ) AND \n server = $SERVER_ID \nGROUP BY mapClassname\nORDER BY time ASC",
- "refId": "A",
- "select": [
- [
- {
- "params": [
- "id"
- ],
- "type": "column"
- }
- ]
- ],
- "table": "game",
- "timeColumn": "startTime",
- "timeColumnType": "timestamp",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- }
- ],
- "title": "Maps",
- "type": "piechart"
- },
- {
- "datasource": {
- "type": "mysql",
- "uid": "thqbOjq7z"
- },
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "palette-classic"
- },
- "custom": {
- "hideFrom": {
- "legend": false,
- "tooltip": false,
- "viz": false
- }
- },
- "decimals": 0,
- "mappings": [],
- "unit": "short"
- },
- "overrides": []
- },
- "gridPos": {
- "h": 10,
- "w": 12,
- "x": 0,
- "y": 91
- },
- "id": 33,
- "links": [],
- "maxDataPoints": 3,
- "options": {
- "legend": {
- "calcs": [],
- "displayMode": "table",
- "placement": "right",
- "values": [
- "value",
- "percent"
- ]
- },
- "pieType": "pie",
- "reduceOptions": {
- "calcs": [
- "lastNotNull"
- ],
- "fields": "",
- "values": false
- },
- "tooltip": {
- "mode": "single",
- "sort": "none"
- }
- },
- "pluginVersion": "7.1.0",
- "targets": [
- {
- "alias": "Non-Teamkills",
- "datasource": {
- "uid": "MySQL"
- },
- "format": "time_series",
- "group": [
- {
- "params": [
- "$__interval",
- "none"
- ],
- "type": "time"
- }
- ],
- "groupBy": [
- {
- "params": [
- "$__interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "null"
- ],
- "type": "fill"
- }
- ],
- "metricColumn": "weapon",
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT \n COUNT(\"victimName\") \nFROM \"DBLog_Wounds\" \nWHERE \n $timeFilter AND\n server = '$SERVER_ID' AND\n teamkill = false",
- "rawQuery": true,
- "rawSql": "SELECT\n $__timeGroupAlias(time,$__interval),\n weapon AS metric,\n count(id) AS \"Wounds\"\nFROM DBLog_Wounds\nWHERE\n $__timeFilter(time) AND\n server = \"$SERVER_ID\"\nGROUP BY 2\nORDER BY time ASC\n",
- "refId": "B",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "id"
- ],
- "type": "column"
- },
- {
- "params": [
- "count"
- ],
- "type": "aggregate"
- },
- {
- "params": [
- "Wounds"
- ],
- "type": "alias"
- }
- ]
- ],
- "table": "DBLog_Wounds",
- "tags": [],
- "timeColumn": "time",
- "timeColumnType": "timestamp",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- }
- ],
- "title": "Weapons",
- "type": "piechart"
- },
- {
- "alignNumbersToRightEnabled": true,
- "columnAliases": [],
- "columnFiltersEnabled": false,
- "columnWidthHints": [],
- "columns": [],
- "compactRowsEnabled": false,
- "datasource": {
- "uid": "MySQL"
- },
- "datatablePagingType": "simple_numbers",
- "datatableTheme": "basic_theme",
- "description": "",
- "emptyData": false,
- "fontSize": "100%",
- "gridPos": {
- "h": 10,
- "w": 12,
- "x": 12,
- "y": 91
- },
- "hoverEnabled": true,
- "id": 36,
- "infoEnabled": true,
- "lengthChangeEnabled": true,
- "orderColumnEnabled": true,
- "pagingTypes": [
- {
- "$$hashKey": "object:227",
- "text": "Page number buttons only",
- "value": "numbers"
- },
- {
- "$$hashKey": "object:228",
- "text": "'Previous' and 'Next' buttons only",
- "value": "simple"
- },
- {
- "$$hashKey": "object:229",
- "text": "'Previous' and 'Next' buttons, plus page numbers",
- "value": "simple_numbers"
- },
- {
- "$$hashKey": "object:230",
- "text": "'First', 'Previous', 'Next' and 'Last' buttons",
- "value": "full"
- },
- {
- "$$hashKey": "object:231",
- "text": "'First', 'Previous', 'Next' and 'Last' buttons, plus page numbers",
- "value": "full_numbers"
- },
- {
- "$$hashKey": "object:232",
- "text": "'First' and 'Last' buttons, plus page numbers",
- "value": "first_last_numbers"
- }
- ],
- "panelHeight": 322,
- "pluginVersion": "7.1.1",
- "rowNumbersEnabled": false,
- "rowsPerPage": 20,
- "scroll": true,
- "scrollHeight": "default",
- "searchEnabled": true,
- "searchHighlightingEnabled": false,
- "showCellBorders": false,
- "showHeader": true,
- "showRowBorders": true,
- "sort": {
- "col": 0,
- "desc": true
- },
- "sortByColumns": [
- {
- "columnData": "Kills",
- "sortMethod": "desc"
- }
- ],
- "sortByColumnsData": [
- [
- 3,
- "desc"
- ]
- ],
- "stripedRowsEnabled": true,
- "styles": [
- {
- "dateFormat": "YYYY-MM-DD HH:mm:ss",
- "pattern": "Time",
- "type": "date"
- },
- {
- "colors": [
- "rgba(245, 54, 54, 0.9)",
- "rgba(237, 129, 40, 0.89)",
- "rgba(50, 172, 45, 0.97)"
- ],
- "decimals": 2,
- "pattern": "/.*/",
- "splitPattern": "/ /",
- "thresholds": [],
- "type": "string",
- "unit": "short"
- }
- ],
- "targets": [
- {
- "datasource": {
- "uid": "MySQL"
- },
- "format": "table",
- "group": [],
- "metricColumn": "none",
- "rawQuery": true,
- "rawSql": "SELECT DISTINCTROW\n layer,\n NTH_VALUE(LW.winner, 1) OVER (PARTITION BY LW.layer) AS \"Most Frequent Winner\",\n NTH_VALUE(LW.wins, 1) OVER (PARTITION BY LW.layer) AS \"Most Frequent Winner Wins\",\n (NTH_VALUE(LW.wins, 1) OVER (PARTITION BY LW.layer) / (NTH_VALUE(LW.wins, 1) OVER (PARTITION BY LW.layer) + NTH_VALUE(LW.wins, 2) OVER (PARTITION BY LW.layer))) * 100 AS \"Most Frequent Winner Win Percentage\",\n NTH_VALUE(LW.winner, 2) OVER (PARTITION BY LW.layer) AS \"Least Frequent Winner\",\n NTH_VALUE(LW.wins, 2) OVER (PARTITION BY LW.layer) AS \"Least Frequent Winner Count\",\n (NTH_VALUE(LW.wins, 2) OVER (PARTITION BY LW.layer) / (NTH_VALUE(LW.wins, 1) OVER (PARTITION BY LW.layer) + NTH_VALUE(LW.wins, 2) OVER (PARTITION BY LW.layer))) * 100 AS \"Least Frequent Winner Win Percentage\"\nFROM (\n SELECT\n M.layer,\n M.winner,\n COUNT(*) AS \"wins\"\n FROM dblog_matches M\n WHERE\n M.layer IS NOT NULL AND\n M.winner IS NOT NULL\n GROUP BY M.layer, M.winner\n ORDER BY wins DESC\n) LW;\n",
- "refId": "A",
- "select": [
- [
- {
- "params": [
- "id"
- ],
- "type": "column"
- }
- ]
- ],
- "table": "DBLog_TickRates",
- "timeColumn": "time",
- "timeColumnType": "timestamp",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- }
- ],
- "themeOptions": {
- "dark": "./styles/dark.scss",
- "light": "./styles/light.scss"
- },
- "themes": [
- {
- "$$hashKey": "object:208",
- "disabled": false,
- "text": "Basic",
- "value": "basic_theme"
- },
- {
- "$$hashKey": "object:209",
- "disabled": true,
- "text": "Bootstrap",
- "value": "bootstrap_theme"
- },
- {
- "$$hashKey": "object:210",
- "disabled": true,
- "text": "Foundation",
- "value": "foundation_theme"
- },
- {
- "$$hashKey": "object:211",
- "disabled": true,
- "text": "ThemeRoller",
- "value": "themeroller_theme"
- }
- ],
- "title": "Matches - Win/Loss Comparison",
- "transform": "table",
- "type": "briangann-datatable-panel"
- }
- ],
- "refresh": false,
- "schemaVersion": 36,
- "style": "dark",
- "tags": [],
- "templating": {
- "list": [
- {
- "current": {
- "selected": true,
- "text": "1",
- "value": "1"
- },
- "hide": 0,
- "includeAll": false,
- "label": "Server",
- "multi": false,
- "name": "SERVER_ID",
- "options": [
- {
- "selected": true,
- "text": "1",
- "value": "1"
- },
- {
- "selected": false,
- "text": "2",
- "value": "2"
- }
- ],
- "query": "1,2,3,10",
- "queryValue": "",
- "skipUrlSync": false,
- "type": "custom"
- },
- {
- "auto": false,
- "auto_count": 30,
- "auto_min": "10s",
- "current": {
- "selected": false,
- "text": "1m",
- "value": "1m"
- },
- "hide": 0,
- "label": "Interval",
- "name": "INTERVAL",
- "options": [
- {
- "selected": true,
- "text": "1m",
- "value": "1m"
- },
- {
- "selected": false,
- "text": "2m",
- "value": "2m"
- },
- {
- "selected": false,
- "text": "3m",
- "value": "3m"
- },
- {
- "selected": false,
- "text": "4m",
- "value": "4m"
- },
- {
- "selected": false,
- "text": "5m",
- "value": "5m"
- },
- {
- "selected": false,
- "text": "10m",
- "value": "10m"
- },
- {
- "selected": false,
- "text": "20m",
- "value": "20m"
- },
- {
- "selected": false,
- "text": "30m",
- "value": "30m"
- }
- ],
- "query": "1m,2m,3m,4m,5m,10m,20m,30m",
- "refresh": 2,
- "skipUrlSync": false,
- "type": "interval"
- }
- ]
- },
- "time": {
- "from": "now-3h",
- "to": "now"
- },
- "timepicker": {
- "refresh_intervals": [
- "10s",
- "30s",
- "1m",
- "5m",
- "15m",
- "30m",
- "1h",
- "2h",
- "1d"
- ]
- },
- "timezone": "",
- "title": "Squad Server Overview",
- "uid": "n7Xl7jEWx",
- "version": 2,
- "weekStart": ""
-}
\ No newline at end of file
diff --git a/squad-server/templates/config-template.json b/squad-server/templates/config-template.json
deleted file mode 100644
index 6080d98c4..000000000
--- a/squad-server/templates/config-template.json
+++ /dev/null
@@ -1,55 +0,0 @@
-{
- "server": {
- "id": 1,
- "host": "xxx.xxx.xxx.xxx",
- "queryPort": 27165,
- "rconPort": 21114,
- "rconPassword": "password",
- "logReaderMode": "tail",
- "logDir": "C:/path/to/squad/log/folder",
- "ftp": {
- "port": 21,
- "user": "FTP Username",
- "password": "FTP Password"
- },
- "sftp": {
- "host": "xxx.xxx.xxx.xxx",
- "port": 21,
- "username": "SFTP Username",
- "password": "SFTP Password"
- },
- "adminLists": [
- {
- "type": "",
- "source": ""
- }
- ]
- },
- "connectors": {
- "discord": "Discord Login Token",
- "awnAPI": {"orgID":"YourOrgID", "creds": {"username":"AwnUsername", "password":"AwnPassword"}},
- "mysql": {
- "host": "host",
- "port": 3306,
- "username": "squadjs",
- "password": "password",
- "database": "squadjs",
- "dialect": "mysql"
- },
- "sqlite": "sqlite:database.sqlite"
- },
- "plugins": [],
- "logger": {
- "verboseness": {
- "SquadServer": 1,
- "LogParser": 1,
- "RCON": 1
- },
- "colors": {
- "SquadServer": "yellowBright",
- "SquadServerFactory": "yellowBright",
- "LogParser": "blueBright",
- "RCON": "redBright"
- }
- }
-}
diff --git a/squad-server/templates/readme-template.md b/squad-server/templates/readme-template.md
deleted file mode 100644
index d5b813170..000000000
--- a/squad-server/templates/readme-template.md
+++ /dev/null
@@ -1,289 +0,0 @@
-