cmdbox 0.6.1__py3-none-any.whl → 0.6.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of cmdbox might be problematic. Click here for more details.

Files changed (72) hide show
  1. cmdbox/app/auth/azure_signin.py +5 -1
  2. cmdbox/app/auth/signin.py +7 -3
  3. cmdbox/app/edge.py +3 -3
  4. cmdbox/app/features/cli/agent_base.py +42 -42
  5. cmdbox/app/features/cli/audit_base.py +28 -28
  6. cmdbox/app/features/cli/cmdbox_audit_createdb.py +28 -28
  7. cmdbox/app/features/cli/cmdbox_audit_delete.py +26 -26
  8. cmdbox/app/features/cli/cmdbox_audit_search.py +42 -42
  9. cmdbox/app/features/cli/cmdbox_audit_write.py +22 -22
  10. cmdbox/app/features/cli/cmdbox_client_file_copy.py +36 -36
  11. cmdbox/app/features/cli/cmdbox_client_file_download.py +38 -38
  12. cmdbox/app/features/cli/cmdbox_client_file_list.py +34 -34
  13. cmdbox/app/features/cli/cmdbox_client_file_mkdir.py +32 -32
  14. cmdbox/app/features/cli/cmdbox_client_file_move.py +34 -34
  15. cmdbox/app/features/cli/cmdbox_client_file_remove.py +32 -32
  16. cmdbox/app/features/cli/cmdbox_client_file_rmdir.py +32 -32
  17. cmdbox/app/features/cli/cmdbox_client_file_upload.py +38 -38
  18. cmdbox/app/features/cli/cmdbox_client_server_info.py +26 -26
  19. cmdbox/app/features/cli/cmdbox_cmd_list.py +22 -21
  20. cmdbox/app/features/cli/cmdbox_cmd_load.py +24 -20
  21. cmdbox/app/features/cli/cmdbox_edge_config.py +40 -40
  22. cmdbox/app/features/cli/cmdbox_edge_start.py +4 -4
  23. cmdbox/app/features/cli/cmdbox_gui_start.py +2 -2
  24. cmdbox/app/features/cli/cmdbox_gui_stop.py +2 -2
  25. cmdbox/app/features/cli/cmdbox_mcp_proxy.py +17 -11
  26. cmdbox/app/features/cli/cmdbox_server_list.py +20 -20
  27. cmdbox/app/features/cli/cmdbox_server_start.py +26 -26
  28. cmdbox/app/features/cli/cmdbox_server_stop.py +26 -26
  29. cmdbox/app/features/cli/cmdbox_web_apikey_add.py +24 -24
  30. cmdbox/app/features/cli/cmdbox_web_apikey_del.py +24 -24
  31. cmdbox/app/features/cli/cmdbox_web_gencert.py +24 -24
  32. cmdbox/app/features/cli/cmdbox_web_genpass.py +20 -20
  33. cmdbox/app/features/cli/cmdbox_web_group_add.py +26 -26
  34. cmdbox/app/features/cli/cmdbox_web_group_del.py +22 -22
  35. cmdbox/app/features/cli/cmdbox_web_group_edit.py +26 -26
  36. cmdbox/app/features/cli/cmdbox_web_group_list.py +22 -22
  37. cmdbox/app/features/cli/cmdbox_web_start.py +66 -66
  38. cmdbox/app/features/cli/cmdbox_web_stop.py +10 -10
  39. cmdbox/app/features/cli/cmdbox_web_user_add.py +32 -32
  40. cmdbox/app/features/cli/cmdbox_web_user_del.py +22 -22
  41. cmdbox/app/features/cli/cmdbox_web_user_edit.py +32 -32
  42. cmdbox/app/features/cli/cmdbox_web_user_list.py +22 -22
  43. cmdbox/app/features/web/cmdbox_web_agent.py +0 -4
  44. cmdbox/app/mcp.py +316 -120
  45. cmdbox/app/options.py +21 -21
  46. cmdbox/app/web.py +1 -1
  47. cmdbox/extensions/sample_project/sample/app/features/cli/sample_client_time.py +4 -4
  48. cmdbox/extensions/sample_project/sample/app/features/cli/sample_server_time.py +18 -18
  49. cmdbox/extensions/sample_project/sample/extensions/user_list.yml +4 -0
  50. cmdbox/extensions/user_list.yml +4 -0
  51. cmdbox/licenses/LICENSE_dnspython_2_7_0_ISC_License-ISCL.txt +35 -0
  52. cmdbox/licenses/LICENSE_email_validator_2_2_0_The_Unlicense-Unlicense.txt +27 -0
  53. cmdbox/licenses/files.txt +4 -2
  54. cmdbox/version.py +2 -2
  55. cmdbox/web/agent.html +2 -2
  56. cmdbox/web/assets/cmdbox/audit.js +14 -14
  57. cmdbox/web/assets/cmdbox/common.js +21 -7
  58. cmdbox/web/assets/cmdbox/list_cmd.js +5 -5
  59. cmdbox/web/assets/cmdbox/signin.js +17 -7
  60. cmdbox/web/assets/cmdbox/svgicon.js +3 -3
  61. cmdbox/web/assets/cmdbox/users.js +14 -5
  62. cmdbox/web/audit.html +6 -6
  63. cmdbox/web/signin.html +33 -7
  64. cmdbox/web/users.html +4 -4
  65. {cmdbox-0.6.1.dist-info → cmdbox-0.6.2.dist-info}/METADATA +27 -23
  66. {cmdbox-0.6.1.dist-info → cmdbox-0.6.2.dist-info}/RECORD +72 -70
  67. /cmdbox/licenses/{LICENSE_fastmcp_2_9_2_Apache_Software_License.txt → LICENSE_fastmcp_2_10_1_Apache_Software_License.txt} +0 -0
  68. /cmdbox/licenses/{LICENSE_mcp_1_9_4_MIT_License.txt → LICENSE_mcp_1_10_1_MIT_License.txt} +0 -0
  69. {cmdbox-0.6.1.dist-info → cmdbox-0.6.2.dist-info}/LICENSE +0 -0
  70. {cmdbox-0.6.1.dist-info → cmdbox-0.6.2.dist-info}/WHEEL +0 -0
  71. {cmdbox-0.6.1.dist-info → cmdbox-0.6.2.dist-info}/entry_points.txt +0 -0
  72. {cmdbox-0.6.1.dist-info → cmdbox-0.6.2.dist-info}/top_level.txt +0 -0
@@ -13,6 +13,8 @@ class AzureSignin(Signin):
13
13
  #url='https://graph.microsoft.com/v1.0/me/transitiveMemberOf?$Top=999',
14
14
  headers={'Authorization': f'Bearer {data}'}
15
15
  )
16
+ if not user_info_resp.ok and user_info_resp.text:
17
+ raise requests.exceptions.HTTPError(user_info_resp.text, response=user_info_resp)
16
18
  user_info_resp.raise_for_status()
17
19
  user_info_json = user_info_resp.json()
18
20
  if isinstance(user_info_json, dict):
@@ -27,12 +29,14 @@ class AzureSignin(Signin):
27
29
  'code': req.query_params['code'],
28
30
  'scope': " ".join(conf['scope']),
29
31
  'client_id': conf['client_id'],
30
- #'client_secret': conf['client_secret'],
32
+ 'client_secret': conf['client_secret'],
31
33
  'redirect_uri': conf['redirect_uri'],
32
34
  'grant_type': 'authorization_code'}
33
35
  query = '&'.join([f'{k}={urllib.parse.quote(v)}' for k, v in data.items()])
34
36
  # アクセストークン取得
35
37
  token_resp = requests.post(url=f'https://login.microsoftonline.com/{conf["tenant_id"]}/oauth2/v2.0/token', headers=headers, data=query)
38
+ if not token_resp.ok and token_resp.text:
39
+ raise requests.exceptions.HTTPError(token_resp.text, response=token_resp)
36
40
  token_resp.raise_for_status()
37
41
  token_json = token_resp.json()
38
42
  return token_json['access_token']
cmdbox/app/auth/signin.py CHANGED
@@ -110,6 +110,9 @@ class Signin(object):
110
110
  Union[None, RedirectResponse]: サインインエラーの場合はリダイレクトレスポンス
111
111
  """
112
112
  Signin._enable_cors(req, res)
113
+ if req is None or req.url is None:
114
+ logger.warning(f"Request or URL is None. req={req}, url={req.url if req else 'None'}")
115
+ return RedirectResponse(url='/signin?error=invalidrequest')
113
116
  if signin_file_data is None:
114
117
  return None
115
118
  if 'signin' in req.session:
@@ -162,7 +165,7 @@ class Signin(object):
162
165
  if not auth.startswith('Bearer '):
163
166
  #self.logger.warning(f"Bearer not found. headers={req.headers}")
164
167
  return RedirectResponse(url=f'/signin{req.url.path}?error=apikeyfail')
165
- bearer, apikey = auth.split(' ').strip()
168
+ apikey = auth.replace('Bearer ', '').strip()
166
169
  if logger.level == logging.DEBUG:
167
170
  logger.debug(f"received apikey: {apikey}")
168
171
  find_user = None
@@ -181,11 +184,12 @@ class Signin(object):
181
184
  algorithm = signin_file_data['apikey']['verify_jwt']['algorithm']
182
185
  issuer = signin_file_data['apikey']['verify_jwt']['issuer']
183
186
  audience = signin_file_data['apikey']['verify_jwt']['audience']
184
- claims = jwt.decode(apikey, publickey, algorithms=[algorithm],
187
+ claims:Dict = jwt.decode(apikey, publickey, algorithms=[algorithm],
185
188
  issuer=issuer, audience=audience,
186
189
  options={'verify_iss': issuer is not None,
187
190
  'verify_aud': audience is not None},)
188
- find_user = dict(**claims, **user)
191
+ claims.update(user)
192
+ find_user = claims
189
193
  find_user['uid'] = find_user['uid'] if 'uid' in find_user else -1
190
194
  find_user['name'] = find_user['name'] if 'name' in find_user else None
191
195
  find_user['groups'] = find_user['groups'] if 'groups' in find_user else None
cmdbox/app/edge.py CHANGED
@@ -94,9 +94,9 @@ class Edge(object):
94
94
  default = str(default) if isinstance(default, Path) else default
95
95
  default = str(default) if isinstance(default, bool) else default
96
96
  default = str(default) if isinstance(default, int) or isinstance(default, float) else default
97
- discription_ja = r['discription_ja'] if 'discription_ja' in r else None
98
- discription_en = r['discription_en'] if 'discription_en' in r else None
99
- help = discription_en if language.find('Japan') < 0 and language.find('ja_JP') < 0 else discription_ja
97
+ description_ja = r['description_ja'] if 'description_ja' in r else None
98
+ description_en = r['description_en'] if 'description_en' in r else None
99
+ help = description_en if language.find('Japan') < 0 and language.find('ja_JP') < 0 else description_ja
100
100
  choice = r['choice'] if 'choice' in r else None
101
101
  choice = [str(c) for c in choice] if choice is not None else None
102
102
  required = r['required'] if 'required' in r else False
@@ -13,75 +13,75 @@ class AgentBase(feature.ResultEdgeFeature):
13
13
  """
14
14
  return dict(
15
15
  use_redis=self.USE_REDIS_FALSE, nouse_webmode=False, use_agent=True,
16
- discription_ja="-",
17
- discription_en="-",
16
+ description_ja="-",
17
+ description_en="-",
18
18
  choice=[
19
19
  dict(opt="agent", type=Options.T_STR, default="no", required=False, multi=False, hide=False, choice=["no", "use"],
20
- discription_ja="エージェントを使用するかどうかを指定します。",
21
- discription_en="Specifies whether the agent is used.",
20
+ description_ja="エージェントを使用するかどうかを指定します。",
21
+ description_en="Specifies whether the agent is used.",
22
22
  choice_show=dict(use=["agent_name", "agent_description", "agent_instruction", "agent_session_store", "llmprov",],)),
23
23
  dict(opt="agent_name", type=Options.T_STR, default=self.ver.__appid__, required=False, multi=False, hide=False, choice=None,
24
- discription_ja="エージェント名を指定します。",
25
- discription_en="Specifies the agent name."),
24
+ description_ja="エージェント名を指定します。",
25
+ description_en="Specifies the agent name."),
26
26
  dict(opt="agent_description", type=Options.T_STR, default=None, required=False, multi=False, hide=False, choice=None,
27
- discription_ja="エージェントの説明を指定します。",
28
- discription_en="Specify agent description."),
27
+ description_ja="エージェントの説明を指定します。",
28
+ description_en="Specify agent description."),
29
29
  dict(opt="agent_instruction", type=Options.T_TEXT, default=None, required=False, multi=False, hide=False, choice=None,
30
- discription_ja="エージェントのシステム指示を指定します。",
31
- discription_en="Specifies the agent's system instructions."),
30
+ description_ja="エージェントのシステム指示を指定します。",
31
+ description_en="Specifies the agent's system instructions."),
32
32
  dict(opt="agent_session_store", type=Options.T_STR, default=None, required=False, multi=False, hide=False, choice=['memory', 'sqlite', 'postgresql'],
33
- discription_ja="エージェントのセッションを保存する方法を指定します。",
34
- discription_en="Specify how the agent's session is to be saved.",
33
+ description_ja="エージェントのセッションを保存する方法を指定します。",
34
+ description_en="Specify how the agent's session is to be saved.",
35
35
  choice_show=dict(postgresql=["agent_pg_host", "agent_pg_port", "agent_pg_user", "agent_pg_password", "agent_pg_dbname"]),),
36
36
  dict(opt="agent_pg_host", type=Options.T_STR, default='localhost', required=False, multi=False, hide=False, choice=None, web="mask",
37
- discription_ja="postgresqlホストを指定する。",
38
- discription_en="Specify the postgresql host."),
37
+ description_ja="postgresqlホストを指定する。",
38
+ description_en="Specify the postgresql host."),
39
39
  dict(opt="agent_pg_port", type=Options.T_INT, default=5432, required=False, multi=False, hide=False, choice=None, web="mask",
40
- discription_ja="postgresqlのポートを指定する。",
41
- discription_en="Specify the postgresql port."),
40
+ description_ja="postgresqlのポートを指定する。",
41
+ description_en="Specify the postgresql port."),
42
42
  dict(opt="agent_pg_user", type=Options.T_STR, default='postgres', required=False, multi=False, hide=False, choice=None, web="mask",
43
- discription_ja="postgresqlのユーザー名を指定する。",
44
- discription_en="Specify the postgresql user name."),
43
+ description_ja="postgresqlのユーザー名を指定する。",
44
+ description_en="Specify the postgresql user name."),
45
45
  dict(opt="agent_pg_password", type=Options.T_STR, default='postgres', required=False, multi=False, hide=False, choice=None, web="mask",
46
- discription_ja="postgresqlのパスワードを指定する。",
47
- discription_en="Specify the postgresql password."),
46
+ description_ja="postgresqlのパスワードを指定する。",
47
+ description_en="Specify the postgresql password."),
48
48
  dict(opt="agent_pg_dbname", type=Options.T_STR, default='agent', required=False, multi=False, hide=False, choice=None,
49
- discription_ja="postgresqlデータベース名を指定します。",
50
- discription_en="Specify the postgresql database name."),
49
+ description_ja="postgresqlデータベース名を指定します。",
50
+ description_en="Specify the postgresql database name."),
51
51
  dict(opt="llmprov", type=Options.T_STR, default=None, required=False, multi=False, hide=False,
52
52
  choice=["", "azureopenai", "openai", "vertexai", "ollama"],
53
- discription_ja="llmのプロバイダを指定します。",
54
- discription_en="Specify llm provider.",
53
+ description_ja="llmのプロバイダを指定します。",
54
+ description_en="Specify llm provider.",
55
55
  choice_show=dict(azureopenai=["llmapikey", "llmendpoint", "llmmodel", "llmapiversion"],
56
56
  openai=["llmapikey", "llmendpoint", "llmmodel"],
57
57
  vertexai=["llmprojectid", "llmsvaccountfile", "llmlocation", "llmmodel", "llmseed", "llmtemperature"],
58
58
  ollama=["llmendpoint", "llmmodel", "llmtemperature"],),
59
59
  ),
60
60
  dict(opt="llmprojectid", type=Options.T_STR, default=None, required=False, multi=False, hide=False, choice=None,
61
- discription_ja="llmのプロバイダ接続のためのプロジェクトIDを指定します。",
62
- discription_en="Specify the project ID for llm's provider connection."),
61
+ description_ja="llmのプロバイダ接続のためのプロジェクトIDを指定します。",
62
+ description_en="Specify the project ID for llm's provider connection."),
63
63
  dict(opt="llmsvaccountfile", type=Options.T_FILE, default=None, required=False, multi=False, hide=False, choice=None,
64
- discription_ja="llmのプロバイダ接続のためのサービスアカウントファイルを指定します。",
65
- discription_en="Specifies the service account file for llm's provider connection."),
64
+ description_ja="llmのプロバイダ接続のためのサービスアカウントファイルを指定します。",
65
+ description_en="Specifies the service account file for llm's provider connection."),
66
66
  dict(opt="llmlocation", type=Options.T_STR, default=None, required=False, multi=False, hide=False, choice=None,
67
- discription_ja="llmのプロバイダ接続のためのロケーションを指定します。",
68
- discription_en="Specifies the location for llm provider connections."),
67
+ description_ja="llmのプロバイダ接続のためのロケーションを指定します。",
68
+ description_en="Specifies the location for llm provider connections."),
69
69
  dict(opt="llmapikey", type=Options.T_STR, default=None, required=False, multi=False, hide=False, choice=None,
70
- discription_ja="llmのプロバイダ接続のためのAPIキーを指定します。",
71
- discription_en="Specify API key for llm provider connection."),
70
+ description_ja="llmのプロバイダ接続のためのAPIキーを指定します。",
71
+ description_en="Specify API key for llm provider connection."),
72
72
  dict(opt="llmapiversion", type=Options.T_STR, default=None, required=False, multi=False, hide=False, choice=None,
73
- discription_ja="llmのプロバイダ接続のためのAPIバージョンを指定します。",
74
- discription_en="Specifies the API version for llm provider connections."),
73
+ description_ja="llmのプロバイダ接続のためのAPIバージョンを指定します。",
74
+ description_en="Specifies the API version for llm provider connections."),
75
75
  dict(opt="llmendpoint", type=Options.T_STR, default=None, required=False, multi=False, hide=False, choice=None,
76
- discription_ja="llmのプロバイダ接続のためのエンドポイントを指定します。",
77
- discription_en="Specifies the endpoint for llm provider connections."),
76
+ description_ja="llmのプロバイダ接続のためのエンドポイントを指定します。",
77
+ description_en="Specifies the endpoint for llm provider connections."),
78
78
  dict(opt="llmmodel", type=Options.T_STR, default="text-multilingual-embedding-002", required=False, multi=False, hide=False, choice=None,
79
- discription_ja="llmモデルを指定します。",
80
- discription_en="Specifies the llm model."),
79
+ description_ja="llmモデルを指定します。",
80
+ description_en="Specifies the llm model."),
81
81
  dict(opt="llmseed", type=Options.T_INT, default=13, required=False, multi=False, hide=False, choice=None,
82
- discription_ja="llmモデルを使用するときのシード値を指定します。",
83
- discription_en="Specifies the seed value when using llm model."),
82
+ description_ja="llmモデルを使用するときのシード値を指定します。",
83
+ description_en="Specifies the seed value when using llm model."),
84
84
  dict(opt="llmtemperature", type=Options.T_FLOAT, default=0.1, required=False, multi=False, hide=False, choice=None,
85
- discription_ja="llmのモデルを使用するときのtemperatureを指定します。",
86
- discription_en="Specifies the temperature when using llm model."),
85
+ description_ja="llmのモデルを使用するときのtemperatureを指定します。",
86
+ description_en="Specifies the temperature when using llm model."),
87
87
  ])
@@ -19,50 +19,50 @@ class AuditBase(feature.ResultEdgeFeature):
19
19
  """
20
20
  return dict(
21
21
  use_redis=self.USE_REDIS_MEIGHT, nouse_webmode=False, use_agent=True,
22
- discription_ja="",
23
- discription_en="",
22
+ description_ja="",
23
+ description_en="",
24
24
  choice=[
25
25
  dict(opt="host", type=Options.T_STR, default=self.default_host, required=True, multi=False, hide=True, choice=None, web="mask",
26
- discription_ja="Redisサーバーのサービスホストを指定します。",
27
- discription_en="Specify the service host of the Redis server."),
26
+ description_ja="Redisサーバーのサービスホストを指定します。",
27
+ description_en="Specify the service host of the Redis server."),
28
28
  dict(opt="port", type=Options.T_INT, default=self.default_port, required=True, multi=False, hide=True, choice=None, web="mask",
29
- discription_ja="Redisサーバーのサービスポートを指定します。",
30
- discription_en="Specify the service port of the Redis server."),
29
+ description_ja="Redisサーバーのサービスポートを指定します。",
30
+ description_en="Specify the service port of the Redis server."),
31
31
  dict(opt="password", type=Options.T_STR, default=self.default_pass, required=True, multi=False, hide=True, choice=None, web="mask",
32
- discription_ja=f"Redisサーバーのアクセスパスワード(任意)を指定します。省略時は `{self.default_pass}` を使用します。",
33
- discription_en=f"Specify the access password of the Redis server (optional). If omitted, `{self.default_pass}` is used."),
32
+ description_ja=f"Redisサーバーのアクセスパスワード(任意)を指定します。省略時は `{self.default_pass}` を使用します。",
33
+ description_en=f"Specify the access password of the Redis server (optional). If omitted, `{self.default_pass}` is used."),
34
34
  dict(opt="svname", type=Options.T_STR, default=self.default_svname, required=True, multi=False, hide=True, choice=None, web="readonly",
35
- discription_ja="サーバーのサービス名を指定します。省略時は `server` を使用します。",
36
- discription_en="Specify the service name of the inference server. If omitted, `server` is used."),
35
+ description_ja="サーバーのサービス名を指定します。省略時は `server` を使用します。",
36
+ description_en="Specify the service name of the inference server. If omitted, `server` is used."),
37
37
 
38
38
  dict(opt="retry_count", type=Options.T_INT, default=3, required=False, multi=False, hide=True, choice=None,
39
- discription_ja="Redisサーバーへの再接続回数を指定します。0以下を指定すると永遠に再接続を行います。",
40
- discription_en="Specifies the number of reconnections to the Redis server.If less than 0 is specified, reconnection is forever."),
39
+ description_ja="Redisサーバーへの再接続回数を指定します。0以下を指定すると永遠に再接続を行います。",
40
+ description_en="Specifies the number of reconnections to the Redis server.If less than 0 is specified, reconnection is forever."),
41
41
  dict(opt="retry_interval", type=Options.T_INT, default=5, required=False, multi=False, hide=True, choice=None,
42
- discription_ja="Redisサーバーに再接続までの秒数を指定します。",
43
- discription_en="Specifies the number of seconds before reconnecting to the Redis server."),
42
+ description_ja="Redisサーバーに再接続までの秒数を指定します。",
43
+ description_en="Specifies the number of seconds before reconnecting to the Redis server."),
44
44
  dict(opt="timeout", type=Options.T_INT, default="15", required=False, multi=False, hide=True, choice=None,
45
- discription_ja="サーバーの応答が返ってくるまでの最大待ち時間を指定。",
46
- discription_en="Specify the maximum waiting time until the server responds."),
45
+ description_ja="サーバーの応答が返ってくるまでの最大待ち時間を指定。",
46
+ description_en="Specify the maximum waiting time until the server responds."),
47
47
 
48
48
  dict(opt="pg_enabled", type=Options.T_BOOL, default=False, required=False, multi=False, hide=True, choice=[True, False], web="mask",
49
- discription_ja="postgresqlデータベース・サーバを使用する場合はTrueを指定します。",
50
- discription_en="Specify True if using the postgresql database server."),
49
+ description_ja="postgresqlデータベース・サーバを使用する場合はTrueを指定します。",
50
+ description_en="Specify True if using the postgresql database server."),
51
51
  dict(opt="pg_host", type=Options.T_STR, default='localhost', required=False, multi=False, hide=True, choice=None, web="mask",
52
- discription_ja="postgresqlホストを指定する。",
53
- discription_en="Specify the postgresql host."),
52
+ description_ja="postgresqlホストを指定する。",
53
+ description_en="Specify the postgresql host."),
54
54
  dict(opt="pg_port", type=Options.T_INT, default=5432, required=False, multi=False, hide=True, choice=None, web="mask",
55
- discription_ja="postgresqlのポートを指定する。",
56
- discription_en="Specify the postgresql port."),
55
+ description_ja="postgresqlのポートを指定する。",
56
+ description_en="Specify the postgresql port."),
57
57
  dict(opt="pg_user", type=Options.T_STR, default='postgres', required=False, multi=False, hide=True, choice=None, web="mask",
58
- discription_ja="postgresqlのユーザー名を指定する。",
59
- discription_en="Specify the postgresql user name."),
58
+ description_ja="postgresqlのユーザー名を指定する。",
59
+ description_en="Specify the postgresql user name."),
60
60
  dict(opt="pg_password", type=Options.T_STR, default='postgres', required=False, multi=False, hide=True, choice=None, web="mask",
61
- discription_ja="postgresqlのパスワードを指定する。",
62
- discription_en="Specify the postgresql password."),
61
+ description_ja="postgresqlのパスワードを指定する。",
62
+ description_en="Specify the postgresql password."),
63
63
  dict(opt="pg_dbname", type=Options.T_STR, default='audit', required=False, multi=False, hide=True, choice=None,
64
- discription_ja="postgresqlデータベース名を指定します。",
65
- discription_en="Specify the postgresql database name."),
64
+ description_ja="postgresqlデータベース名を指定します。",
65
+ description_en="Specify the postgresql database name."),
66
66
  ]
67
67
  )
68
68
 
@@ -39,49 +39,49 @@ class AuditCreatedb(feature.UnsupportEdgeFeature):
39
39
  """
40
40
  return dict(
41
41
  use_redis=self.USE_REDIS_MEIGHT, nouse_webmode=True,
42
- discription_ja="監査を記録するデータベースを作成します。",
43
- discription_en="Create a database to record audits.",
42
+ description_ja="監査を記録するデータベースを作成します。",
43
+ description_en="Create a database to record audits.",
44
44
  choice=[
45
45
  dict(opt="pg_host", type=Options.T_STR, default='localhost', required=True, multi=False, hide=False, choice=None,
46
- discription_ja="postgresqlホストを指定する。",
47
- discription_en="Specify the postgresql host."),
46
+ description_ja="postgresqlホストを指定する。",
47
+ description_en="Specify the postgresql host."),
48
48
  dict(opt="pg_port", type=Options.T_INT, default=5432, required=True, multi=False, hide=False, choice=None,
49
- discription_ja="postgresqlのポートを指定する。",
50
- discription_en="Specify the postgresql port."),
49
+ description_ja="postgresqlのポートを指定する。",
50
+ description_en="Specify the postgresql port."),
51
51
  dict(opt="pg_user", type=Options.T_STR, default='postgres', required=True, multi=False, hide=False, choice=None,
52
- discription_ja="postgresqlのユーザー名を指定する。",
53
- discription_en="Specify the postgresql user name."),
52
+ description_ja="postgresqlのユーザー名を指定する。",
53
+ description_en="Specify the postgresql user name."),
54
54
  dict(opt="pg_password", type=Options.T_STR, default='postgres', required=True, multi=False, hide=False, choice=None,
55
- discription_ja="postgresqlのパスワードを指定する。",
56
- discription_en="Specify the postgresql password."),
55
+ description_ja="postgresqlのパスワードを指定する。",
56
+ description_en="Specify the postgresql password."),
57
57
  dict(opt="pg_dbname", type=Options.T_STR, default='audit', required=True, multi=False, hide=False, choice=None,
58
- discription_ja="postgresqlデータベース名を指定します。",
59
- discription_en="Specify the postgresql database name."),
58
+ description_ja="postgresqlデータベース名を指定します。",
59
+ description_en="Specify the postgresql database name."),
60
60
  dict(opt="new_pg_dbname", type=Options.T_STR, default='audit', required=True, multi=False, hide=False, choice=None,
61
- discription_ja="新しいpostgresqlデータベース名を指定します。",
62
- discription_en="Specify a new postgresql database name."),
61
+ description_ja="新しいpostgresqlデータベース名を指定します。",
62
+ description_en="Specify a new postgresql database name."),
63
63
 
64
64
  dict(opt="host", type=Options.T_STR, default=self.default_host, required=True, multi=False, hide=True, choice=None, web="mask",
65
- discription_ja="Redisサーバーのサービスホストを指定します。",
66
- discription_en="Specify the service host of the Redis server."),
65
+ description_ja="Redisサーバーのサービスホストを指定します。",
66
+ description_en="Specify the service host of the Redis server."),
67
67
  dict(opt="port", type=Options.T_INT, default=self.default_port, required=True, multi=False, hide=True, choice=None, web="mask",
68
- discription_ja="Redisサーバーのサービスポートを指定します。",
69
- discription_en="Specify the service port of the Redis server."),
68
+ description_ja="Redisサーバーのサービスポートを指定します。",
69
+ description_en="Specify the service port of the Redis server."),
70
70
  dict(opt="password", type=Options.T_STR, default=self.default_pass, required=True, multi=False, hide=True, choice=None, web="mask",
71
- discription_ja=f"Redisサーバーのアクセスパスワード(任意)を指定します。省略時は `{self.default_pass}` を使用します。",
72
- discription_en=f"Specify the access password of the Redis server (optional). If omitted, `{self.default_pass}` is used."),
71
+ description_ja=f"Redisサーバーのアクセスパスワード(任意)を指定します。省略時は `{self.default_pass}` を使用します。",
72
+ description_en=f"Specify the access password of the Redis server (optional). If omitted, `{self.default_pass}` is used."),
73
73
  dict(opt="svname", type=Options.T_STR, default=self.default_svname, required=True, multi=False, hide=True, choice=None, web="readonly",
74
- discription_ja="サーバーのサービス名を指定します。省略時は `server` を使用します。",
75
- discription_en="Specify the service name of the inference server. If omitted, `server` is used."),
74
+ description_ja="サーバーのサービス名を指定します。省略時は `server` を使用します。",
75
+ description_en="Specify the service name of the inference server. If omitted, `server` is used."),
76
76
  dict(opt="retry_count", type=Options.T_INT, default=3, required=False, multi=False, hide=True, choice=None,
77
- discription_ja="Redisサーバーへの再接続回数を指定します。0以下を指定すると永遠に再接続を行います。",
78
- discription_en="Specifies the number of reconnections to the Redis server.If less than 0 is specified, reconnection is forever."),
77
+ description_ja="Redisサーバーへの再接続回数を指定します。0以下を指定すると永遠に再接続を行います。",
78
+ description_en="Specifies the number of reconnections to the Redis server.If less than 0 is specified, reconnection is forever."),
79
79
  dict(opt="retry_interval", type=Options.T_INT, default=5, required=False, multi=False, hide=True, choice=None,
80
- discription_ja="Redisサーバーに再接続までの秒数を指定します。",
81
- discription_en="Specifies the number of seconds before reconnecting to the Redis server."),
80
+ description_ja="Redisサーバーに再接続までの秒数を指定します。",
81
+ description_en="Specifies the number of seconds before reconnecting to the Redis server."),
82
82
  dict(opt="timeout", type=Options.T_INT, default="15", required=False, multi=False, hide=True, choice=None,
83
- discription_ja="サーバーの応答が返ってくるまでの最大待ち時間を指定。",
84
- discription_en="Specify the maximum waiting time until the server responds."),
83
+ description_ja="サーバーの応答が返ってくるまでの最大待ち時間を指定。",
84
+ description_en="Specify the maximum waiting time until the server responds."),
85
85
  ]
86
86
  )
87
87
 
@@ -38,45 +38,45 @@ class AuditDelete(audit_base.AuditBase):
38
38
  Dict[str, Any]: オプション
39
39
  """
40
40
  opt = super().get_option()
41
- opt['discription_ja'] = "監査ログを削除します。"
42
- opt['discription_en'] = "Delete the audit log."
41
+ opt['description_ja'] = "監査ログを削除します。"
42
+ opt['description_en'] = "Delete the audit log."
43
43
  opt['choice'] += [
44
44
  dict(opt="delete_audit_type", type=Options.T_STR, default=None, required=False, multi=False, hide=False, choice=['']+Options.AUDITS,
45
- discription_ja="削除条件の監査の種類を指定します。",
46
- discription_en="Specifies the type of audit for the delete condition."),
45
+ description_ja="削除条件の監査の種類を指定します。",
46
+ description_en="Specifies the type of audit for the delete condition."),
47
47
  dict(opt="delete_clmsg_id", type=Options.T_STR, default=None, required=False, multi=False, hide=False, choice=None,
48
- discription_ja="削除条件のクライアントのメッセージIDを指定します。",
49
- discription_en="Specify the message ID of the client for the delete condition."),
48
+ description_ja="削除条件のクライアントのメッセージIDを指定します。",
49
+ description_en="Specify the message ID of the client for the delete condition."),
50
50
  dict(opt="delete_clmsg_sdate", type=Options.T_DATETIME, default=None, required=False, multi=False, hide=False, choice=None,
51
- discription_ja="削除条件のクライアントのメッセージ発生日時(開始)を指定します。",
52
- discription_en="Specify the date and time (start) when the message occurred for the client in the delete condition."),
51
+ description_ja="削除条件のクライアントのメッセージ発生日時(開始)を指定します。",
52
+ description_en="Specify the date and time (start) when the message occurred for the client in the delete condition."),
53
53
  dict(opt="delete_clmsg_edate", type=Options.T_DATETIME, default=None, required=False, multi=False, hide=False, choice=None,
54
- discription_ja="削除条件のクライアントのメッセージ発生日時(終了)を指定します。",
55
- discription_en="Specify the date and time (end) when the message occurred for the client in the delete condition."),
54
+ description_ja="削除条件のクライアントのメッセージ発生日時(終了)を指定します。",
55
+ description_en="Specify the date and time (end) when the message occurred for the client in the delete condition."),
56
56
  dict(opt="delete_clmsg_src", type=Options.T_STR, default=None, required=False, multi=False, hide=False, choice=None,
57
- discription_ja="削除条件のクライアントのメッセージの発生源を指定します。LIKE検索を行います。",
58
- discription_en="Specifies the source of the message for the client in the delete condition; performs a LIKE search."),
57
+ description_ja="削除条件のクライアントのメッセージの発生源を指定します。LIKE検索を行います。",
58
+ description_en="Specifies the source of the message for the client in the delete condition; performs a LIKE search."),
59
59
  dict(opt="delete_clmsg_title", type=Options.T_STR, default=None, required=False, multi=False, hide=False, choice=None,
60
- discription_ja="削除条件のクライアントのメッセージタイトルを指定します。LIKE検索を行います。",
61
- discription_en="Specifies the message title of the client for the deletion condition; a LIKE search is performed."),
60
+ description_ja="削除条件のクライアントのメッセージタイトルを指定します。LIKE検索を行います。",
61
+ description_en="Specifies the message title of the client for the deletion condition; a LIKE search is performed."),
62
62
  dict(opt="delete_clmsg_user", type=Options.T_STR, default=None, required=False, multi=False, hide=False, choice=None,
63
- discription_ja="削除条件のクライアントのメッセージの発生させたユーザーを指定します。LIKE検索を行います。",
64
- discription_en="Specifies the user who generated the message for the client in the delete condition; performs a LIKE search."),
63
+ description_ja="削除条件のクライアントのメッセージの発生させたユーザーを指定します。LIKE検索を行います。",
64
+ description_en="Specifies the user who generated the message for the client in the delete condition; performs a LIKE search."),
65
65
  dict(opt="delete_clmsg_body", type=Options.T_DICT, default=None, required=False, multi=True, hide=False, choice=None,
66
- discription_ja="削除条件のクライアントのメッセージの本文を辞書形式で指定します。LIKE検索を行います。",
67
- discription_en="Specifies the body of the client's message in the delete condition in dictionary format; performs a LIKE search."),
66
+ description_ja="削除条件のクライアントのメッセージの本文を辞書形式で指定します。LIKE検索を行います。",
67
+ description_en="Specifies the body of the client's message in the delete condition in dictionary format; performs a LIKE search."),
68
68
  dict(opt="delete_clmsg_tag", type=Options.T_STR, default=None, required=False, multi=True, hide=False, choice=None,
69
- discription_ja="削除条件のクライアントのメッセージのタグを指定します。",
70
- discription_en="Specifies the tag of the client's message in the delete condition."),
69
+ description_ja="削除条件のクライアントのメッセージのタグを指定します。",
70
+ description_en="Specifies the tag of the client's message in the delete condition."),
71
71
  dict(opt="delete_svmsg_id", type=Options.T_STR, default=None, required=False, multi=False, hide=False, choice=None,
72
- discription_ja="削除条件のサーバーのメッセージIDを指定します。",
73
- discription_en="Specify the message ID of the server for the delete condition."),
72
+ description_ja="削除条件のサーバーのメッセージIDを指定します。",
73
+ description_en="Specify the message ID of the server for the delete condition."),
74
74
  dict(opt="delete_svmsg_sdate", type=Options.T_DATETIME, default=None, required=False, multi=False, hide=False, choice=None,
75
- discription_ja="削除条件のサーバーのメッセージ発生日時(開始)を指定します。",
76
- discription_en="Specify the date and time (start) when the message occurred for the server in the delete condition."),
75
+ description_ja="削除条件のサーバーのメッセージ発生日時(開始)を指定します。",
76
+ description_en="Specify the date and time (start) when the message occurred for the server in the delete condition."),
77
77
  dict(opt="delete_svmsg_edate", type=Options.T_DATETIME, default=None, required=False, multi=False, hide=False, choice=None,
78
- discription_ja="削除条件のサーバーのメッセージ発生日時(終了)を指定します。",
79
- discription_en="Specify the date and time (end) when the message occurred for the server in the delete condition."),
78
+ description_ja="削除条件のサーバーのメッセージ発生日時(終了)を指定します。",
79
+ description_en="Specify the date and time (end) when the message occurred for the server in the delete condition."),
80
80
  ]
81
81
  return opt
82
82
 
@@ -40,70 +40,70 @@ class AuditSearch(audit_base.AuditBase):
40
40
  Dict[str, Any]: オプション
41
41
  """
42
42
  opt = super().get_option()
43
- opt['discription_ja'] = "監査ログを検索します。"
44
- opt['discription_en'] = "Search the audit log."
43
+ opt['description_ja'] = "監査ログを検索します。"
44
+ opt['description_en'] = "Search the audit log."
45
45
  opt['choice'] += [
46
46
  dict(opt="select", type=Options.T_DICT, default=None, required=False, multi=True, hide=False,
47
47
  choice=dict(key=['']+self.TBL_COLS, val=['-','count','sum','avg','min','max']),
48
- discription_ja="取得項目を指定します。指定しない場合は全ての項目を取得します。",
49
- discription_en="Specify the items to be retrieved. If not specified, all items are acquired."),
48
+ description_ja="取得項目を指定します。指定しない場合は全ての項目を取得します。",
49
+ description_en="Specify the items to be retrieved. If not specified, all items are acquired."),
50
50
  dict(opt="select_date_format", type=Options.T_STR, default=None, required=False, multi=False, hide=False, choice=['']+self.DT_FMT,
51
- discription_ja="取得項目の日時のフォーマットを指定します。",
52
- discription_en="Specifies the format of the date and time of the acquisition item."),
51
+ description_ja="取得項目の日時のフォーマットを指定します。",
52
+ description_en="Specifies the format of the date and time of the acquisition item."),
53
53
  dict(opt="filter_audit_type", type=Options.T_STR, default=None, required=False, multi=False, hide=False, choice=['']+Options.AUDITS,
54
- discription_ja="フィルタ条件の監査の種類を指定します。",
55
- discription_en="Specifies the type of audit for the filter condition."),
54
+ description_ja="フィルタ条件の監査の種類を指定します。",
55
+ description_en="Specifies the type of audit for the filter condition."),
56
56
  dict(opt="filter_clmsg_id", type=Options.T_STR, default=None, required=False, multi=False, hide=False, choice=None,
57
- discription_ja="フィルタ条件のクライアントのメッセージIDを指定します。",
58
- discription_en="Specify the message ID of the client for the filter condition."),
57
+ description_ja="フィルタ条件のクライアントのメッセージIDを指定します。",
58
+ description_en="Specify the message ID of the client for the filter condition."),
59
59
  dict(opt="filter_clmsg_sdate", type=Options.T_DATETIME, default=None, required=False, multi=False, hide=False, choice=None,
60
- discription_ja="フィルタ条件のクライアントのメッセージ発生日時(開始)を指定します。",
61
- discription_en="Specify the date and time (start) when the message occurred for the client in the filter condition."),
60
+ description_ja="フィルタ条件のクライアントのメッセージ発生日時(開始)を指定します。",
61
+ description_en="Specify the date and time (start) when the message occurred for the client in the filter condition."),
62
62
  dict(opt="filter_clmsg_edate", type=Options.T_DATETIME, default=None, required=False, multi=False, hide=False, choice=None,
63
- discription_ja="フィルタ条件のクライアントのメッセージ発生日時(終了)を指定します。",
64
- discription_en="Specify the date and time (end) when the message occurred for the client in the filter condition."),
63
+ description_ja="フィルタ条件のクライアントのメッセージ発生日時(終了)を指定します。",
64
+ description_en="Specify the date and time (end) when the message occurred for the client in the filter condition."),
65
65
  dict(opt="filter_clmsg_src", type=Options.T_STR, default=None, required=False, multi=False, hide=False, choice=None,
66
- discription_ja="フィルタ条件のクライアントのメッセージの発生源を指定します。LIKE検索を行います。",
67
- discription_en="Specifies the source of the message for the client in the filter condition; performs a LIKE search."),
66
+ description_ja="フィルタ条件のクライアントのメッセージの発生源を指定します。LIKE検索を行います。",
67
+ description_en="Specifies the source of the message for the client in the filter condition; performs a LIKE search."),
68
68
  dict(opt="filter_clmsg_title", type=Options.T_STR, default=None, required=False, multi=False, hide=False, choice=None,
69
- discription_ja="フィルタ条件のクライアントのメッセージタイトルを指定します。LIKE検索を行います。",
70
- discription_en="Specifies the message title of the client for the filter condition; a LIKE search is performed."),
69
+ description_ja="フィルタ条件のクライアントのメッセージタイトルを指定します。LIKE検索を行います。",
70
+ description_en="Specifies the message title of the client for the filter condition; a LIKE search is performed."),
71
71
  dict(opt="filter_clmsg_user", type=Options.T_STR, default=None, required=False, multi=False, hide=False, choice=None,
72
- discription_ja="フィルタ条件のクライアントのメッセージの発生させたユーザーを指定します。LIKE検索を行います。",
73
- discription_en="Specifies the user who generated the message for the client in the filter condition; performs a LIKE search."),
72
+ description_ja="フィルタ条件のクライアントのメッセージの発生させたユーザーを指定します。LIKE検索を行います。",
73
+ description_en="Specifies the user who generated the message for the client in the filter condition; performs a LIKE search."),
74
74
  dict(opt="filter_clmsg_body", type=Options.T_DICT, default=None, required=False, multi=True, hide=False, choice=None,
75
- discription_ja="フィルタ条件のクライアントのメッセージの本文を辞書形式で指定します。LIKE検索を行います。",
76
- discription_en="Specifies the body of the client's message in the filter condition in dictionary format; performs a LIKE search."),
75
+ description_ja="フィルタ条件のクライアントのメッセージの本文を辞書形式で指定します。LIKE検索を行います。",
76
+ description_en="Specifies the body of the client's message in the filter condition in dictionary format; performs a LIKE search."),
77
77
  dict(opt="filter_clmsg_tag", type=Options.T_STR, default=None, required=False, multi=True, hide=False, choice=None,
78
- discription_ja="フィルタ条件のクライアントのメッセージのタグを指定します。",
79
- discription_en="Specifies the tag of the client's message in the filter condition."),
78
+ description_ja="フィルタ条件のクライアントのメッセージのタグを指定します。",
79
+ description_en="Specifies the tag of the client's message in the filter condition."),
80
80
  dict(opt="filter_svmsg_id", type=Options.T_STR, default=None, required=False, multi=False, hide=False, choice=None,
81
- discription_ja="フィルタ条件のサーバーのメッセージIDを指定します。",
82
- discription_en="Specify the message ID of the server for the filter condition."),
81
+ description_ja="フィルタ条件のサーバーのメッセージIDを指定します。",
82
+ description_en="Specify the message ID of the server for the filter condition."),
83
83
  dict(opt="filter_svmsg_sdate", type=Options.T_DATETIME, default=None, required=False, multi=False, hide=False, choice=None,
84
- discription_ja="フィルタ条件のサーバーのメッセージ発生日時(開始)を指定します。",
85
- discription_en="Specify the date and time (start) when the message occurred for the server in the filter condition."),
84
+ description_ja="フィルタ条件のサーバーのメッセージ発生日時(開始)を指定します。",
85
+ description_en="Specify the date and time (start) when the message occurred for the server in the filter condition."),
86
86
  dict(opt="filter_svmsg_edate", type=Options.T_DATETIME, default=None, required=False, multi=False, hide=False, choice=None,
87
- discription_ja="フィルタ条件のサーバーのメッセージ発生日時(終了)を指定します。",
88
- discription_en="Specify the date and time (end) when the message occurred for the server in the filter condition."),
87
+ description_ja="フィルタ条件のサーバーのメッセージ発生日時(終了)を指定します。",
88
+ description_en="Specify the date and time (end) when the message occurred for the server in the filter condition."),
89
89
  dict(opt="groupby", type=Options.T_STR, default=None, required=False, multi=True, hide=False, choice=['']+self.TBL_COLS,
90
- discription_ja="グループ化項目を指定します。",
91
- discription_en="Specify grouping items."),
90
+ description_ja="グループ化項目を指定します。",
91
+ description_en="Specify grouping items."),
92
92
  dict(opt="groupby_date_format", type=Options.T_STR, default=None, required=False, multi=False, hide=False, choice=['']+self.DT_FMT,
93
- discription_ja="グループ化項目の日時のフォーマットを指定します。",
94
- discription_en="Specifies the format of the date and time of the grouping item."),
93
+ description_ja="グループ化項目の日時のフォーマットを指定します。",
94
+ description_en="Specifies the format of the date and time of the grouping item."),
95
95
  dict(opt="sort", type=Options.T_DICT, default=None, required=False, multi=True, hide=False, choice=dict(key=['']+self.TBL_COLS, val=['', 'ASC', 'DESC']),
96
- discription_ja="ソート項目を指定します。",
97
- discription_en="Specify the sort item."),
96
+ description_ja="ソート項目を指定します。",
97
+ description_en="Specify the sort item."),
98
98
  dict(opt="offset", type=Options.T_INT, default=0, required=False, multi=False, hide=False, choice=None,
99
- discription_ja="取得する行の開始位置を指定します。",
100
- discription_en="Specifies the starting position of the row to be retrieved."),
99
+ description_ja="取得する行の開始位置を指定します。",
100
+ description_en="Specifies the starting position of the row to be retrieved."),
101
101
  dict(opt="limit", type=Options.T_INT, default=100, required=False, multi=False, hide=False, choice=None,
102
- discription_ja="取得する行数を指定します。",
103
- discription_en="Specifies the number of rows to retrieve."),
102
+ description_ja="取得する行数を指定します。",
103
+ description_en="Specifies the number of rows to retrieve."),
104
104
  dict(opt="csv", type=Options.T_BOOL, default=False, required=False, multi=False, hide=False, choice=[False, True],
105
- discription_ja="検索結果をcsvで出力します。",
106
- discription_en="Output search results in csv.")
105
+ description_ja="検索結果をcsvで出力します。",
106
+ description_en="Output search results in csv.")
107
107
  ]
108
108
  return opt
109
109