Skip to content

Commit

Permalink
[+] Added new config variable for max number of rows
Browse files Browse the repository at this point in the history
[+] Added setting in UI for max number of rows in pers.  modelling
  • Loading branch information
SolidProgramming committed Jan 9, 2025
1 parent d4c0a4a commit ab79d04
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 9 deletions.
2 changes: 2 additions & 0 deletions roles/database/files/sql/idempotent/fworch-texts.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2255,6 +2255,8 @@ INSERT INTO txt VALUES ('allowServiceInConn', 'German', 'Einfache Dienste in
INSERT INTO txt VALUES ('allowServiceInConn', 'English', 'Allow Simple Services in Connection');
INSERT INTO txt VALUES ('overviewDisplayLines', 'German', 'Max. Anzahl Zeilen in Übersicht');
INSERT INTO txt VALUES ('overviewDisplayLines', 'English', 'Max. Number of Rows in Overview');
INSERT INTO txt VALUES ('maxModellingTableRows', 'German', 'Max. Anzahl Zeilen in Tabellen');
INSERT INTO txt VALUES ('maxModellingTableRows', 'English', 'Max. Number of Rows in Tables');
INSERT INTO txt VALUES ('reducedProtocolSet', 'German', 'Reduzierten Protokollset darstellen');
INSERT INTO txt VALUES ('reducedProtocolSet', 'English', 'Display reduced Protocol set');
INSERT INTO txt VALUES ('importAppDataPath', 'German', 'Pfad und Name von Appdaten-Import (ohne Endung)');
Expand Down
5 changes: 4 additions & 1 deletion roles/lib/files/FWO.Config.Api/Data/ConfigData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,10 @@ public class ConfigData : ICloneable
[JsonProperty("modExtraConfigs"), JsonPropertyName("modExtraConfigs")]
public string ModExtraConfigs { get; set; } = "";

public ConfigData(bool editable = false)
[JsonProperty("maxModellingTableRows"), JsonPropertyName("maxModellingTableRows")]
public int MaxModellingTableRows { get; set; } = 10;

public ConfigData(bool editable = false)
{
Editable = editable;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@
</div>
</div>
</div>
<div class="form-group row mt-2">
<div class="row col-sm-4" data-toggle="tooltip" title="@(userConfig.PureLine("H5605"))">
<label class="col-form-label col-sm-8">@(userConfig.GetText("maxModellingTableRows")):</label>
<input type="number" min="0" class="col-sm-3" @bind="configData!.MaxModellingTableRows" />
</div>
</div>
</form>
<hr />
<button type="button" class="btn btn-sm btn-primary" @onclick="Save" @onclick:preventDefault>@(userConfig.GetText("save"))</button>
Expand Down
9 changes: 1 addition & 8 deletions roles/ui/files/FWO.UI/Shared/PageSizeComponent.razor
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,7 @@

protected override async Task OnInitializedAsync()
{
try
{
PageSize = UserConfig.OverviewDisplayLines;
}
catch (Exception)
{
PageSize = 10;
}
PageSize = UserConfig.MaxModellingTableRows;

await SubmitPageSize();

Expand Down

0 comments on commit ab79d04

Please sign in to comment.