Rename play time to online time

Be a bit more accurate in the online time stat name and call it for what
it is.  It counts time spend online on the server, not necessarily
time spent playing.
This commit is contained in:
Hornwitser committed 2022-07-20 13:18:47 +02:00
1 parent fc1daa7e71
commit 04852196ad
5 files changed
+8 -8

No files matched your search

+1 -1
View File
@@ -750,7 +750,7 @@ instanceCommands.add(new libCommand.Command({
instanceCommands.add(new libCommand.Command({
definition: ["extract-players <instance>", "Extract players from running save into the cluster.", (yargs) => {
yargs.positional("instance", { describe: "Instance to extract players and play time from", type: "string" });
yargs.positional("instance", { describe: "Instance to extract players and online time from", type: "string" });
}],
handler: async function(args, control) {
let instanceId = await libCommand.resolveInstance(control, args.instance);
+1 -1
View File
@@ -478,7 +478,7 @@ definePermission({
definePermission({
name: "core.instance.extract_players",
title: "Extract player stats from running save",
description: "Run extraction to create a user for each player in the save and set the play time from the save.",
description: "Run extraction to create a user for each player in the save and set the online time from the save.",
});
definePermission({
name: "core.instance.start",
@@ -284,7 +284,7 @@ export default function UserViewPage() {
</Form>
<SectionHeader title="Player stats" />
<Descriptions size="small" bordered column={{ xs: 1, sm: 2, lg: 3 }}>
<Descriptions.Item label="Total play time">
<Descriptions.Item label="Total online time">
{formatDuration(user["player_stats"]["online_time_ms"] || 0)}
</Descriptions.Item>
<Descriptions.Item label="Total join count">
@@ -306,8 +306,8 @@ export default function UserViewPage() {
sorter: (a, b) => strcmp(a[0], b[0]),
},
{
title: "Play time",
key: "playTime",
title: "Online time",
key: "onlineTime",
render: ([, stats]) => formatDuration(stats["online_time_ms"] || 0),
sorter: (a, b) => (a[1]["online_time_ms"] || 0) - (b[1]["online_time_ms"] || 0),
},
+2 -2
View File
@@ -99,8 +99,8 @@ export default function UsersPage() {
render: user => user.roles.map(id => <Tag key={id}>{(roles.get(id) || { name: id })["name"]}</Tag>),
},
{
title: "Play time",
key: "playTime",
title: "Online time",
key: "onlineTime",
render: user => user["player_stats"]["online_time_ms"]
&& formatDuration(user["player_stats"]["online_time_ms"]),
sorter: (a, b) => (a["player_stats"]["online_time_ms"] || 0) -