Skip to content

Commit

Permalink
## Added new features / Bug fixed
Browse files Browse the repository at this point in the history
・インストーラによるセットアップ機能を追加。
・モバイル版のデザインを新UIテーマに変更。
・セッション情報をKey Value Storeに保存する機能を追加。
・プロセスで実行種別に「追加したボタン/作成・更新」機能を追加。
・プロセスで作成したボタンのアイコンを変更する機能を追加。
・LDAP同期の設定にグループの拡張属性(LdapExtendedAttributes)機能を追加。
・システムログをテキスト形式で出力する機能を追加。
・計算式の計算方法を「拡張」にした場合に「条件外の場合」が動作しない問題を解消。
・一覧編集モード時にサーバスクリプトのcolumns.ExtendedCellCssが効かない問題を解消。
・プロセスの一括実行後に選択していたチェックがクリアされない問題を解消。
・エクスポート時に複数選択が設定された項目が意図しない出力となる問題を解消。
・サイトパッケージインポート時のエラーが分かりづらい問題を解消。
  • Loading branch information
pierre3 committed Dec 10, 2024
1 parent f6867d8 commit 33097d8
Show file tree
Hide file tree
Showing 92 changed files with 4,502 additions and 344 deletions.
6 changes: 3 additions & 3 deletions Implem.CodeDefiner/Implem.CodeDefiner.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
<TargetFramework>net8.0</TargetFramework>
<Copyright>Copyright © Implem Inc 2014 - 2024</Copyright>
<Description>This program does the automatic code creation and merging of existing code based on the definition. Also it will make the configuration change of sql server database.</Description>
<AssemblyVersion>1.4.10.3</AssemblyVersion>
<FileVersion>1.4.10.3</FileVersion>
<Version>1.4.10.3</Version>
<AssemblyVersion>1.4.11.0</AssemblyVersion>
<FileVersion>1.4.11.0</FileVersion>
<Version>1.4.11.0</Version>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
</PropertyGroup>

Expand Down
6 changes: 6 additions & 0 deletions Implem.DefinitionAccessor/Def.cs
Original file line number Diff line number Diff line change
Expand Up @@ -690,6 +690,8 @@ public static void SetCodeDefinition()
case "Model_SwitchTargetsParameter": Code.Model_SwitchTargetsParameter = definitionRow[1].ToString().NoSpace(definitionRow["NoSpace"].ToBool()); SetCodeTable(CodeTable.Model_SwitchTargetsParameter, definitionRow, CodeXls); break;
case "Model_SynchronizeSummary": Code.Model_SynchronizeSummary = definitionRow[1].ToString().NoSpace(definitionRow["NoSpace"].ToBool()); SetCodeTable(CodeTable.Model_SynchronizeSummary, definitionRow, CodeXls); break;
case "Model_SynchronizeSummaryExecute": Code.Model_SynchronizeSummaryExecute = definitionRow[1].ToString().NoSpace(definitionRow["NoSpace"].ToBool()); SetCodeTable(CodeTable.Model_SynchronizeSummaryExecute, definitionRow, CodeXls); break;
case "Model_SysLogLogger": Code.Model_SysLogLogger = definitionRow[1].ToString().NoSpace(definitionRow["NoSpace"].ToBool()); SetCodeTable(CodeTable.Model_SysLogLogger, definitionRow, CodeXls); break;
case "Model_SysLogUsing": Code.Model_SysLogUsing = definitionRow[1].ToString().NoSpace(definitionRow["NoSpace"].ToBool()); SetCodeTable(CodeTable.Model_SysLogUsing, definitionRow, CodeXls); break;
case "Model_TenantIdParameter": Code.Model_TenantIdParameter = definitionRow[1].ToString().NoSpace(definitionRow["NoSpace"].ToBool()); SetCodeTable(CodeTable.Model_TenantIdParameter, definitionRow, CodeXls); break;
case "Model_TimeSeriesCases": Code.Model_TimeSeriesCases = definitionRow[1].ToString().NoSpace(definitionRow["NoSpace"].ToBool()); SetCodeTable(CodeTable.Model_TimeSeriesCases, definitionRow, CodeXls); break;
case "Model_TimeSeriesJsonCases": Code.Model_TimeSeriesJsonCases = definitionRow[1].ToString().NoSpace(definitionRow["NoSpace"].ToBool()); SetCodeTable(CodeTable.Model_TimeSeriesJsonCases, definitionRow, CodeXls); break;
Expand Down Expand Up @@ -7217,6 +7219,8 @@ public class CodeColumn2nd
public string Model_SwitchTargetsParameter;
public string Model_SynchronizeSummary;
public string Model_SynchronizeSummaryExecute;
public string Model_SysLogLogger;
public string Model_SysLogUsing;
public string Model_TenantIdParameter;
public string Model_TimeSeriesCases;
public string Model_TimeSeriesJsonCases;
Expand Down Expand Up @@ -8062,6 +8066,8 @@ public class CodeTable
public CodeDefinition Model_SwitchTargetsParameter = new CodeDefinition();
public CodeDefinition Model_SynchronizeSummary = new CodeDefinition();
public CodeDefinition Model_SynchronizeSummaryExecute = new CodeDefinition();
public CodeDefinition Model_SysLogLogger = new CodeDefinition();
public CodeDefinition Model_SysLogUsing = new CodeDefinition();
public CodeDefinition Model_TenantIdParameter = new CodeDefinition();
public CodeDefinition Model_TimeSeriesCases = new CodeDefinition();
public CodeDefinition Model_TimeSeriesJsonCases = new CodeDefinition();
Expand Down
6 changes: 3 additions & 3 deletions Implem.DefinitionAccessor/Implem.DefinitionAccessor.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Copyright>Copyright © Implem Inc 2014 - 2024</Copyright>
<AssemblyVersion>1.4.10.3</AssemblyVersion>
<FileVersion>1.4.10.3</FileVersion>
<Version>1.4.10.3</Version>
<AssemblyVersion>1.4.11.0</AssemblyVersion>
<FileVersion>1.4.11.0</FileVersion>
<Version>1.4.11.0</Version>
<Nullable>disable</Nullable>
</PropertyGroup>

Expand Down
1 change: 1 addition & 0 deletions Implem.DefinitionAccessor/Initializer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ public static void SetParameters()
Parameters.Notification = Read<Notification>();
Parameters.Permissions = Read<Permissions>();
Parameters.Rds = Read<Rds>();
Parameters.Kvs = Read<Kvs>();
Parameters.Registration = Read<Registration>();
Parameters.Reminder = Read<Reminder>();
Parameters.Script = Read<Script>();
Expand Down
6 changes: 3 additions & 3 deletions Implem.DisplayAccessor/Implem.DisplayAccessor.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Copyright>Copyright © Implem Inc 2014 - 2024</Copyright>
<AssemblyVersion>1.4.10.3</AssemblyVersion>
<FileVersion>1.4.10.3</FileVersion>
<Version>1.4.10.3</Version>
<AssemblyVersion>1.4.11.0</AssemblyVersion>
<FileVersion>1.4.11.0</FileVersion>
<Version>1.4.11.0</Version>
<Nullable>disable</Nullable>
</PropertyGroup>

Expand Down
6 changes: 3 additions & 3 deletions Implem.Factory/Implem.Factory.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Copyright>Copyright © Implem Inc 2014 - 2024</Copyright>
<AssemblyVersion>1.4.10.3</AssemblyVersion>
<FileVersion>1.4.10.3</FileVersion>
<Version>1.4.10.3</Version>
<AssemblyVersion>1.4.11.0</AssemblyVersion>
<FileVersion>1.4.11.0</FileVersion>
<Version>1.4.11.0</Version>
<Nullable>disable</Nullable>
</PropertyGroup>

Expand Down
6 changes: 3 additions & 3 deletions Implem.Libraries/Implem.Libraries.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Copyright>Copyright © Implem Inc 2014 - 2024</Copyright>
<AssemblyVersion>1.4.10.3</AssemblyVersion>
<FileVersion>1.4.10.3</FileVersion>
<Version>1.4.10.3</Version>
<AssemblyVersion>1.4.11.0</AssemblyVersion>
<FileVersion>1.4.11.0</FileVersion>
<Version>1.4.11.0</Version>
<Nullable>disable</Nullable>
</PropertyGroup>

Expand Down
6 changes: 3 additions & 3 deletions Implem.ParameterAccessor/Implem.ParameterAccessor.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Copyright>Copyright © Implem Inc 2014 - 2024</Copyright>
<AssemblyVersion>1.4.10.3</AssemblyVersion>
<FileVersion>1.4.10.3</FileVersion>
<Version>1.4.10.3</Version>
<AssemblyVersion>1.4.11.0</AssemblyVersion>
<FileVersion>1.4.11.0</FileVersion>
<Version>1.4.11.0</Version>
<Nullable>disable</Nullable>
</PropertyGroup>

Expand Down
1 change: 1 addition & 0 deletions Implem.ParameterAccessor/Parameters.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ public static class Parameters
public static Parameter Parameter;
public static Permissions Permissions;
public static Rds Rds;
public static Kvs Kvs;
public static Registration Registration;
public static Reminder Reminder;
public static Script Script;
Expand Down
7 changes: 7 additions & 0 deletions Implem.ParameterAccessor/Parts/Kvs.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
namespace Implem.ParameterAccessor.Parts
{
public class Kvs
{
public string ConnectionStringForSession;
}
}
1 change: 1 addition & 0 deletions Implem.ParameterAccessor/Parts/Ldap.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ public class Ldap
public string LdapMailAddressPattern;
public string LdapGroupName;
public string LdapGroupNamePattern;
public List<LdapExtendedAttribute> LdapGroupExtendedAttributes;
public List<LdapExtendedAttribute> LdapExtendedAttributes;
public int LdapSyncPageSize;
public List<string> LdapSyncPatterns;
Expand Down
1 change: 1 addition & 0 deletions Implem.ParameterAccessor/Parts/Session.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
public class Session
{
public int RetentionPeriod;
public bool UseKeyValueStore;
}
}
2 changes: 2 additions & 0 deletions Implem.ParameterAccessor/Parts/SysLog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,7 @@ public class SysLog
public bool SignOut;
public bool ClientId;
public int ExportLimit;
public bool EnableLoggingToDatabase = true;
public bool EnableLoggingToFile; //= false
}
}
2 changes: 1 addition & 1 deletion Implem.Pleasanter.sln
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Project("{E53339B2-1760-4266-BCC7-CA923CBCF16C}") = "docker-compose", "docker-co
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Implem.Plugins", "Implem.Plugins\Implem.Plugins.csproj", "{DB7A8513-48C4-4226-92F9-60FD4DB90DD8}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Implem.MySql", "Rds\Implem.MySql\Implem.MySql.csproj", "{7BF47007-3BB2-44F6-85B2-E50B215D40ED}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Implem.MySql", "Rds\Implem.MySql\Implem.MySql.csproj", "{7BF47007-3BB2-44F6-85B2-E50B215D40ED}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -995,6 +995,7 @@ namespace Implem.Pleasanter.Models

public void SetExtendedColumnDefaultValue(SiteSettings ss, string formulaScript, string calculationMethod)
{
if (formulaScript.IsNullOrEmpty()) return;
var columns = System.Text.RegularExpressions.Regex.Matches(formulaScript, @"\[([^]]*)\]");
foreach (var column in columns)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
hb.Td(action: () => hb
.CheckBox(
controlCss: "grid-check",
_checked: recordSelector.Checked(dataId),
_checked: recordSelector?.Checked(dataId) ?? false,
dataId: dataId.ToString(),
_using: !isHistory));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
SiteSettings.TextAlignTypes.Right => " right-align",
SiteSettings.TextAlignTypes.Center => " center-align",
_ => string.Empty
},
}
+ $" {serverScriptModelColumn?.ExtendedCellCss}",
action: () => hb.Field(
context: context,
column: column,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ using Implem.Pleasanter.Libraries.Security;
using Implem.Pleasanter.Libraries.Server;
using Implem.Pleasanter.Libraries.ServerScripts;
using Implem.Pleasanter.Libraries.Settings;
<!--Model_SysLogUsing-->
using System;
using System.Collections.Generic;
using System.Data;
Expand All @@ -27,6 +28,7 @@ namespace Implem.Pleasanter.Models
public class #ModelName#Model : <!--Model_InheritBase--><!--Model_InheritBaseItem--><!--Model_IConvertable-->
{

<!--Model_SysLogLogger-->
<!--Model_ItemProperties_Sites-->
<!--Model_GroupProperties_GroupMembers-->
<!--Model_GroupProperties_GroupChildren-->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
ss: ss,
columnName: dataChange.ColumnName,
formulaSet: formulaSet,
isOutOfCondition: false,
outputFormulaLogs: ss.ProcessOutputFormulaLogs);
}
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@
ss.Formulas?.ForEach(formulaSet =>
{
var columnName = formulaSet.Target;
var view = ss.Views?.Get(formulaSet.Condition);
var isOutOfCondition = view != null && !Matched(context: context, ss: ss, view: view);
if (string.IsNullOrEmpty(formulaSet.CalculationMethod)
|| formulaSet.CalculationMethod == FormulaSet.CalculationMethods.Default.ToString())
{
var formula = formulaSet.Formula;
var view = ss.Views?.Get(formulaSet.Condition);
if (view != null && !Matched(context: context, ss: ss, view: view))
if (isOutOfCondition)
{
if (formulaSet.OutOfCondition != null)
{
Expand Down Expand Up @@ -56,11 +57,17 @@
}
else if (formulaSet.CalculationMethod == FormulaSet.CalculationMethods.Extended.ToString())
{
var formula = formulaSet.Formula;
if (isOutOfCondition && formulaSet.FormulaScriptOutOfCondition == null)
{
return;
}
var value = ExecFormulaExtended(
context: context,
ss: ss,
columnName: columnName,
formulaSet: formulaSet,
isOutOfCondition: isOutOfCondition,
outputFormulaLogs: ss.OutputFormulaLogs);
var formData = new Dictionary<string, string>
{
Expand All @@ -82,24 +89,29 @@ private string ExecFormulaExtended(
SiteSettings ss,
string columnName,
FormulaSet formulaSet,
bool isOutOfCondition,
bool? outputFormulaLogs)
{
var script = isOutOfCondition == false
? formulaSet.FormulaScript
: formulaSet.FormulaScriptOutOfCondition;
if (script == null) script = string.Empty;
SetExtendedColumnDefaultValue(
ss: ss,
formulaScript: formulaSet.FormulaScript,
formulaScript: script,
calculationMethod: formulaSet.CalculationMethod);
formulaSet = FormulaBuilder.UpdateColumnDisplayText(
ss: ss,
formulaSet: formulaSet);
formulaSet.FormulaScript = FormulaBuilder.ParseFormulaScript(
script = FormulaBuilder.ParseFormulaScript(
ss: ss,
formulaScript: formulaSet.FormulaScript,
formulaScript: script,
calculationMethod: formulaSet.CalculationMethod);
var value = FormulaServerScriptUtilities.Execute(
context: context,
ss: ss,
itemModel: this,
formulaScript: formulaSet.FormulaScript);
formulaScript: script);
switch (value)
{
case "#N/A":
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"Id": "Model_SysLogLogger",
"Indent": "2",
"Include": "SysLogs"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
private static readonly Logger logger = LogManager.GetLogger("syslogs");
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"Id": "Model_SysLogUsing",
"Indent": "0",
"Include": "SysLogs"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
using Implem.Pleasanter.Models.SysLogs;
using NLog;
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@
{
return Messages.NotFound(context: context).ToJson();
}
var processes = ss.Processes
?.Where(o => o.Id == processId
|| (o.ExecutionType == Process.ExecutionTypes.AddedButtonOrCreateOrUpdate
&& ((process.ExecutionType == Process.ExecutionTypes.CreateOrUpdate)
|| ((process.ExecutionType ?? Process.ExecutionTypes.AddedButton) == Process.ExecutionTypes.AddedButton)
&& ((process.ActionType ?? Process.ActionTypes.Save) == Process.ActionTypes.Save))))
.ToList() ?? new List<Process>();
var selectedWhere = SelectedWhere(
context: context,
ss: ss);
Expand Down Expand Up @@ -68,18 +75,30 @@
else
{
var previousTitle = #modelName#Model.Title.DisplayValue;
#modelName#Model.SetByProcess(
context: context,
ss: ss,
process: process);
foreach (var p in processes)
{
p.MatchConditions = #modelName#Model.GetProcessMatchConditions(
context: context,
ss: ss,
process: p);
if (p.MatchConditions && p.Accessable(
context: context,
ss: ss))
{
#modelName#Model.SetByProcess(
context: context,
ss: ss,
process: p);
}
}
#modelName#Model.VerUp = Versions.MustVerUp(
context: context,
ss: ss,
baseModel: #modelName#Model);
var errorData = #modelName#Model.Update(
context: context,
ss: ss,
processes: process.ToSingleList(),
processes: processes,
notice: true,
previousTitle: previousTitle);
switch (errorData.Type)
Expand Down Expand Up @@ -119,7 +138,7 @@
break;
}
}
};
}
if (errorMessage != null)
{
context.Messages.Add(errorMessage);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,8 @@ private static HtmlBuilder GridRows(
<!--Model_Utilities_FormDataSet-->
<!--Model_Utilities_SetEditRowParameter-->

checkRow: checkRow));
checkRow: checkRow,
clearCheck: clearCheck));
}

<!--Model_Utilities_GridNewRows-->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ if (process != null)
ss: ss,
process: process);
}
else if (process.ExecutionType != Process.ExecutionTypes.CreateOrUpdate)
else if ((process.ExecutionType ?? Process.ExecutionTypes.AddedButton) == Process.ExecutionTypes.AddedButton)
{
return ApiResults.BadRequest(context: context);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ foreach (var process in processes)
ss: ss,
process: process);
}
else if (process.ExecutionType != Process.ExecutionTypes.CreateOrUpdate)
else if ((process.ExecutionType ?? Process.ExecutionTypes.AddedButton) == Process.ExecutionTypes.AddedButton)
{
var message = process.GetErrorMessage(context: context);
message.Text = #modelName#Model.ReplacedDisplayValues(
Expand Down
Loading

0 comments on commit 33097d8

Please sign in to comment.