cmdbox 0.6.1.1__py3-none-any.whl → 0.6.2.1__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.
- cmdbox/app/app.py +7 -0
- cmdbox/app/auth/signin.py +7 -3
- cmdbox/app/common.py +14 -2
- cmdbox/app/commons/loghandler.py +2 -2
- cmdbox/app/edge.py +3 -3
- cmdbox/app/feature.py +9 -0
- cmdbox/app/features/cli/agent_base.py +42 -42
- cmdbox/app/features/cli/audit_base.py +28 -28
- cmdbox/app/features/cli/cmdbox_audit_createdb.py +28 -28
- cmdbox/app/features/cli/cmdbox_audit_delete.py +26 -26
- cmdbox/app/features/cli/cmdbox_audit_search.py +42 -42
- cmdbox/app/features/cli/cmdbox_audit_write.py +22 -22
- cmdbox/app/features/cli/cmdbox_client_file_copy.py +36 -36
- cmdbox/app/features/cli/cmdbox_client_file_download.py +38 -38
- cmdbox/app/features/cli/cmdbox_client_file_list.py +34 -34
- cmdbox/app/features/cli/cmdbox_client_file_mkdir.py +32 -32
- cmdbox/app/features/cli/cmdbox_client_file_move.py +34 -34
- cmdbox/app/features/cli/cmdbox_client_file_remove.py +32 -32
- cmdbox/app/features/cli/cmdbox_client_file_rmdir.py +32 -32
- cmdbox/app/features/cli/cmdbox_client_file_upload.py +38 -38
- cmdbox/app/features/cli/cmdbox_client_server_info.py +26 -26
- cmdbox/app/features/cli/cmdbox_cmd_list.py +22 -21
- cmdbox/app/features/cli/cmdbox_cmd_load.py +24 -20
- cmdbox/app/features/cli/cmdbox_edge_config.py +40 -40
- cmdbox/app/features/cli/cmdbox_edge_start.py +4 -4
- cmdbox/app/features/cli/cmdbox_gui_start.py +2 -2
- cmdbox/app/features/cli/cmdbox_gui_stop.py +2 -2
- cmdbox/app/features/cli/cmdbox_mcp_proxy.py +17 -11
- cmdbox/app/features/cli/cmdbox_server_list.py +20 -20
- cmdbox/app/features/cli/cmdbox_server_start.py +26 -26
- cmdbox/app/features/cli/cmdbox_server_stop.py +26 -26
- cmdbox/app/features/cli/cmdbox_web_apikey_add.py +24 -24
- cmdbox/app/features/cli/cmdbox_web_apikey_del.py +24 -24
- cmdbox/app/features/cli/cmdbox_web_gencert.py +24 -24
- cmdbox/app/features/cli/cmdbox_web_genpass.py +20 -20
- cmdbox/app/features/cli/cmdbox_web_group_add.py +26 -26
- cmdbox/app/features/cli/cmdbox_web_group_del.py +22 -22
- cmdbox/app/features/cli/cmdbox_web_group_edit.py +26 -26
- cmdbox/app/features/cli/cmdbox_web_group_list.py +22 -22
- cmdbox/app/features/cli/cmdbox_web_start.py +65 -65
- cmdbox/app/features/cli/cmdbox_web_stop.py +10 -10
- cmdbox/app/features/cli/cmdbox_web_user_add.py +32 -32
- cmdbox/app/features/cli/cmdbox_web_user_del.py +22 -22
- cmdbox/app/features/cli/cmdbox_web_user_edit.py +32 -32
- cmdbox/app/features/cli/cmdbox_web_user_list.py +22 -22
- cmdbox/app/features/web/cmdbox_web_agent.py +0 -4
- cmdbox/app/features/web/cmdbox_web_exec_cmd.py +2 -2
- cmdbox/app/mcp.py +316 -120
- cmdbox/app/options.py +26 -23
- cmdbox/extensions/sample_project/sample/app/features/cli/sample_client_time.py +4 -4
- cmdbox/extensions/sample_project/sample/app/features/cli/sample_server_time.py +18 -18
- cmdbox/extensions/sample_project/sample/extensions/user_list.yml +4 -0
- cmdbox/extensions/user_list.yml +4 -0
- cmdbox/licenses/LICENSE_dnspython_2_7_0_ISC_License-ISCL.txt +35 -0
- cmdbox/licenses/LICENSE_email_validator_2_2_0_The_Unlicense-Unlicense.txt +27 -0
- cmdbox/licenses/files.txt +4 -2
- cmdbox/version.py +2 -2
- cmdbox/web/agent.html +2 -2
- cmdbox/web/assets/cmdbox/audit.js +14 -14
- cmdbox/web/assets/cmdbox/common.js +21 -7
- cmdbox/web/assets/cmdbox/list_cmd.js +5 -5
- cmdbox/web/assets/cmdbox/signin.js +17 -7
- cmdbox/web/assets/cmdbox/svgicon.js +3 -3
- cmdbox/web/assets/cmdbox/users.js +14 -5
- cmdbox/web/audit.html +6 -6
- cmdbox/web/signin.html +13 -10
- cmdbox/web/users.html +4 -4
- {cmdbox-0.6.1.1.dist-info → cmdbox-0.6.2.1.dist-info}/METADATA +27 -23
- {cmdbox-0.6.1.1.dist-info → cmdbox-0.6.2.1.dist-info}/RECORD +75 -73
- /cmdbox/licenses/{LICENSE_fastmcp_2_9_2_Apache_Software_License.txt → LICENSE_fastmcp_2_10_1_Apache_Software_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE_mcp_1_9_4_MIT_License.txt → LICENSE_mcp_1_10_1_MIT_License.txt} +0 -0
- {cmdbox-0.6.1.1.dist-info → cmdbox-0.6.2.1.dist-info}/LICENSE +0 -0
- {cmdbox-0.6.1.1.dist-info → cmdbox-0.6.2.1.dist-info}/WHEEL +0 -0
- {cmdbox-0.6.1.1.dist-info → cmdbox-0.6.2.1.dist-info}/entry_points.txt +0 -0
- {cmdbox-0.6.1.1.dist-info → cmdbox-0.6.2.1.dist-info}/top_level.txt +0 -0
cmdbox/app/app.py
CHANGED
|
@@ -144,6 +144,13 @@ class CmdBoxApp:
|
|
|
144
144
|
eloggerinittime = time.perf_counter()
|
|
145
145
|
if logger.level == logging.DEBUG:
|
|
146
146
|
logger.debug(f"args.mode={args.mode}, args.cmd={args.cmd}")
|
|
147
|
+
# 警告出力時にスタックを出力する
|
|
148
|
+
#import warnings
|
|
149
|
+
#def custom_warning_handler(message, category, filename, lineno, file=None, line=None):
|
|
150
|
+
# import traceback
|
|
151
|
+
# print(f"Warning: {message}, Category: {category}, File: {filename}, Line: {lineno}")
|
|
152
|
+
# traceback.print_stack()
|
|
153
|
+
#warnings.showwarning = custom_warning_handler
|
|
147
154
|
|
|
148
155
|
#scmdexectime = time.perf_counter()
|
|
149
156
|
feat = self.options.get_cmd_attr(args.mode, args.cmd, 'feature')
|
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
|
-
|
|
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
|
-
|
|
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/common.py
CHANGED
|
@@ -172,11 +172,23 @@ def create_console(stderr:bool=False, file=None) -> Console:
|
|
|
172
172
|
"""
|
|
173
173
|
#console = Console(soft_wrap=True, height=True, highlighter=loghandler.LogLevelHighlighter(), theme=loghandler.theme,
|
|
174
174
|
# stderr=stderr, file=file)
|
|
175
|
-
console = Console(height=
|
|
176
|
-
soft_wrap=
|
|
175
|
+
console = Console(height=False, highlighter=loghandler.LogLevelHighlighter(), theme=loghandler.theme,
|
|
176
|
+
soft_wrap=False, stderr=stderr, file=file, log_time=True, log_path=False, log_time_format='[%Y-%m-%d %H:%M:%S]')
|
|
177
177
|
#console = Console(soft_wrap=True, stderr=stderr, file=file, log_time=True, log_path=False, log_time_format='[%Y-%m-%d %H:%M:%S]')
|
|
178
178
|
return console
|
|
179
179
|
|
|
180
|
+
def console_log(console:Console, message:Any, **kwargs) -> None:
|
|
181
|
+
"""
|
|
182
|
+
コンソールにログを出力します。
|
|
183
|
+
|
|
184
|
+
Args:
|
|
185
|
+
console (Console): コンソール
|
|
186
|
+
message (Any): 出力するメッセージ
|
|
187
|
+
**kwargs: その他のキーワード引数
|
|
188
|
+
"""
|
|
189
|
+
dtstr = datetime.datetime.now().strftime('[%Y-%m-%d %H:%M:%S]')
|
|
190
|
+
console.print(f"{dtstr} {message}", highlight=True, **kwargs)
|
|
191
|
+
|
|
180
192
|
def default_logger(debug:bool=False, ver=version, webcall:bool=False) -> logging.Logger:
|
|
181
193
|
"""
|
|
182
194
|
デフォルトのロガーを生成します。
|
cmdbox/app/commons/loghandler.py
CHANGED
|
@@ -105,13 +105,13 @@ theme=Theme({
|
|
|
105
105
|
class LogLevelHighlighter(highlighter.ReprHighlighter):
|
|
106
106
|
def __init__(self):
|
|
107
107
|
#self.highlights = []
|
|
108
|
-
self.highlights.append(r"(?P<log_debug>DEBUG)")
|
|
108
|
+
self.highlights.append(r"(?P<log_debug>DEBUG|EXEC)")
|
|
109
109
|
self.highlights.append(r"(?P<log_info>INFO)")
|
|
110
110
|
self.highlights.append(r"(?P<log_warn>WARN|WARNING|WARN|CAUTION|NOTICE|STOP|DISCONNECTED|DENY)")
|
|
111
111
|
self.highlights.append(r"(?P<log_error>ERROR|ALERT|ABORT|FAILED)")
|
|
112
112
|
self.highlights.append(r"(?P<log_fatal>FATAL|CRITICAL)")
|
|
113
113
|
self.highlights.append(r"(?P<log_product>CMDBOX|IINFER|USOUND|GAIAN|GAIC|WITSHAPE)")
|
|
114
|
-
self.highlights.append(r"(?P<log_success>SUCCESS|OK|PASSED|DONE|COMPLETE|START|FINISH|OPEN|CONNECTED|ALLOW
|
|
114
|
+
self.highlights.append(r"(?P<log_success>SUCCESS|OK|PASSED|DONE|COMPLETE|START|FINISH|OPEN|CONNECTED|ALLOW)")
|
|
115
115
|
"""
|
|
116
116
|
self.highlights.append(r"(?P<tag_start><)(?P<tag_name>[-\w.:|]*)(?P<tag_contents>[\w\W]*)(?P<tag_end>>)")
|
|
117
117
|
self.highlights.append(r'(?P<attrib_name>[\w_]{1,50})=(?P<attrib_value>"?[\w_]+"?)?')
|
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
|
-
|
|
98
|
-
|
|
99
|
-
help =
|
|
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
|
cmdbox/app/feature.py
CHANGED
|
@@ -123,6 +123,15 @@ class Feature(object):
|
|
|
123
123
|
status, res = tool.exec_cmd(opt, logger, timeout, prevres)
|
|
124
124
|
yield status, res
|
|
125
125
|
|
|
126
|
+
def audited_by(self) -> bool:
|
|
127
|
+
"""
|
|
128
|
+
この機能が監査ログを記録する対象かどうかを返します
|
|
129
|
+
|
|
130
|
+
Returns:
|
|
131
|
+
bool: 監査ログを記録する場合はTrue
|
|
132
|
+
"""
|
|
133
|
+
return True
|
|
134
|
+
|
|
126
135
|
class OneshotEdgeFeature(Feature):
|
|
127
136
|
"""
|
|
128
137
|
一度だけ実行するエッジ機能の基底クラス
|
|
@@ -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
|
-
|
|
17
|
-
|
|
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
|
-
|
|
21
|
-
|
|
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
|
-
|
|
25
|
-
|
|
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
|
-
|
|
28
|
-
|
|
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
|
-
|
|
31
|
-
|
|
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
|
-
|
|
34
|
-
|
|
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
|
-
|
|
38
|
-
|
|
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
|
-
|
|
41
|
-
|
|
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
|
-
|
|
44
|
-
|
|
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
|
-
|
|
47
|
-
|
|
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
|
-
|
|
50
|
-
|
|
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
|
-
|
|
54
|
-
|
|
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
|
-
|
|
62
|
-
|
|
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
|
-
|
|
65
|
-
|
|
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
|
-
|
|
68
|
-
|
|
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
|
-
|
|
71
|
-
|
|
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
|
-
|
|
74
|
-
|
|
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
|
-
|
|
77
|
-
|
|
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
|
-
|
|
80
|
-
|
|
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
|
-
|
|
83
|
-
|
|
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
|
-
|
|
86
|
-
|
|
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
|
-
|
|
23
|
-
|
|
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
|
-
|
|
27
|
-
|
|
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
|
-
|
|
30
|
-
|
|
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
|
-
|
|
33
|
-
|
|
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
|
-
|
|
36
|
-
|
|
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
|
-
|
|
40
|
-
|
|
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
|
-
|
|
43
|
-
|
|
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
|
-
|
|
46
|
-
|
|
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
|
-
|
|
50
|
-
|
|
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
|
-
|
|
53
|
-
|
|
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
|
-
|
|
56
|
-
|
|
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
|
-
|
|
59
|
-
|
|
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
|
-
|
|
62
|
-
|
|
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
|
-
|
|
65
|
-
|
|
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
|
-
|
|
43
|
-
|
|
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
|
-
|
|
47
|
-
|
|
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
|
-
|
|
50
|
-
|
|
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
|
-
|
|
53
|
-
|
|
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
|
-
|
|
56
|
-
|
|
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
|
-
|
|
59
|
-
|
|
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
|
-
|
|
62
|
-
|
|
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
|
-
|
|
66
|
-
|
|
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
|
-
|
|
69
|
-
|
|
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
|
-
|
|
72
|
-
|
|
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
|
-
|
|
75
|
-
|
|
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
|
-
|
|
78
|
-
|
|
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
|
-
|
|
81
|
-
|
|
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
|
-
|
|
84
|
-
|
|
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['
|
|
42
|
-
opt['
|
|
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
|
-
|
|
46
|
-
|
|
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
|
-
|
|
49
|
-
|
|
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
|
-
|
|
52
|
-
|
|
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
|
-
|
|
55
|
-
|
|
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
|
-
|
|
58
|
-
|
|
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
|
-
|
|
61
|
-
|
|
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
|
-
|
|
64
|
-
|
|
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
|
-
|
|
67
|
-
|
|
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
|
-
|
|
70
|
-
|
|
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
|
-
|
|
73
|
-
|
|
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
|
-
|
|
76
|
-
|
|
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
|
-
|
|
79
|
-
|
|
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
|
|