Added setting for max steam offer count

This commit is contained in:
2023-11-04 23:37:07 +01:00
parent e6165caed9
commit dcbb481b10
20 changed files with 106 additions and 9 deletions

View File

@@ -7,6 +7,7 @@ export interface TechnicianConfig extends DataWithHistory {
waitForRestart?: number;
waitForShutdown?: number;
cacheMaxMessages?: number;
maxSteamOfferCount?: number;
featureFlags: FeatureFlag[];
pingURLs: string[];
technicianIds: string[];

View File

@@ -216,7 +216,7 @@ export class Mutations {
`;
static updateTechnicianConfig = `
mutation updateTechnicianConfig($id: ID, $helpCommandReferenceUrl: String, $waitForRestart: Int, $waitForShutdown: Int, $cacheMaxMessages: Int, $featureFlags: [FeatureFlagInput], $pingURLs: [String], $technicianIds: [String]) {
mutation updateTechnicianConfig($id: ID, $helpCommandReferenceUrl: String, $waitForRestart: Int, $waitForShutdown: Int, $cacheMaxMessages: Int, $maxSteamOfferCount: Int, $featureFlags: [FeatureFlagInput], $pingURLs: [String], $technicianIds: [String]) {
technicianConfig {
updateTechnicianConfig(input: {
id: $id,
@@ -224,6 +224,7 @@ export class Mutations {
waitForRestart: $waitForRestart,
waitForShutdown: $waitForShutdown,
cacheMaxMessages: $cacheMaxMessages,
maxSteamOfferCount: $maxSteamOfferCount,
featureFlags: $featureFlags,
pingURLs: $pingURLs,
technicianIds: $technicianIds
@@ -233,6 +234,7 @@ export class Mutations {
waitForRestart
waitForShutdown
cacheMaxMessages
maxSteamOfferCount
featureFlags {
key
value

View File

@@ -497,6 +497,7 @@ export class Queries {
waitForRestart
waitForShutdown
cacheMaxMessages
maxSteamOfferCount
featureFlags {
key
value

View File

@@ -168,6 +168,15 @@
</div>
</div>
<div class="content-row">
<div class="content-column">
<div class="content-data-name">{{'admin.settings.bot.max_steam_offer_count' | translate}}:</div>
<div class="content-data-value">
<input type="number" pInputText [(ngModel)]="config.maxSteamOfferCount" placeholder="{{'admin.settings.bot.max_steam_offer_count' | translate}}">
</div>
</div>
</div>
<div class="content-divider"></div>
<app-config-list translationKey="admin.settings.bot.ping_urls" [(data)]="config.pingURLs"></app-config-list>
<app-config-list translationKey="admin.settings.bot.technician_ids" [options]="possibleTechnicians" optionLabel="name" optionValue="id"

View File

@@ -156,6 +156,7 @@ export class SettingsComponent implements OnInit {
waitForRestart: this.config.waitForRestart,
waitForShutdown: this.config.waitForShutdown,
cacheMaxMessages: this.config.cacheMaxMessages,
maxSteamOfferCount: this.config.maxSteamOfferCount,
featureFlags: this.config.featureFlags,
pingURLs: this.config.pingURLs,
technicianIds: this.config.technicianIds

View File

@@ -27,6 +27,7 @@
"cache_max_messages": "Anzahl der Nachrichten im cache",
"header": "Bot",
"help_url": "Befehlsreferenz",
"max_steam_offer_count": "Maximal zu betrachtende Steam Angebote",
"ping_urls": "Ping Adressen",
"technician_ids": "Techniker Ids",
"wait_for_restart": "Wartezeit vor Neustart",

View File

@@ -27,6 +27,7 @@
"cache_max_messages": "Number of messages in cache",
"header": "Bot",
"help_url": "Help URL",
"max_steam_offer_count": "Maximum monitoring steam offers",
"ping_urls": "Ping addresses",
"technician_ids": "Technician Ids",
"wait_for_restart": "Time to wait before restart",