cmdbox 0.6.1.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 (71) hide show
  1. cmdbox/app/auth/signin.py +7 -3
  2. cmdbox/app/edge.py +3 -3
  3. cmdbox/app/features/cli/agent_base.py +42 -42
  4. cmdbox/app/features/cli/audit_base.py +28 -28
  5. cmdbox/app/features/cli/cmdbox_audit_createdb.py +28 -28
  6. cmdbox/app/features/cli/cmdbox_audit_delete.py +26 -26
  7. cmdbox/app/features/cli/cmdbox_audit_search.py +42 -42
  8. cmdbox/app/features/cli/cmdbox_audit_write.py +22 -22
  9. cmdbox/app/features/cli/cmdbox_client_file_copy.py +36 -36
  10. cmdbox/app/features/cli/cmdbox_client_file_download.py +38 -38
  11. cmdbox/app/features/cli/cmdbox_client_file_list.py +34 -34
  12. cmdbox/app/features/cli/cmdbox_client_file_mkdir.py +32 -32
  13. cmdbox/app/features/cli/cmdbox_client_file_move.py +34 -34
  14. cmdbox/app/features/cli/cmdbox_client_file_remove.py +32 -32
  15. cmdbox/app/features/cli/cmdbox_client_file_rmdir.py +32 -32
  16. cmdbox/app/features/cli/cmdbox_client_file_upload.py +38 -38
  17. cmdbox/app/features/cli/cmdbox_client_server_info.py +26 -26
  18. cmdbox/app/features/cli/cmdbox_cmd_list.py +22 -21
  19. cmdbox/app/features/cli/cmdbox_cmd_load.py +24 -20
  20. cmdbox/app/features/cli/cmdbox_edge_config.py +40 -40
  21. cmdbox/app/features/cli/cmdbox_edge_start.py +4 -4
  22. cmdbox/app/features/cli/cmdbox_gui_start.py +2 -2
  23. cmdbox/app/features/cli/cmdbox_gui_stop.py +2 -2
  24. cmdbox/app/features/cli/cmdbox_mcp_proxy.py +17 -11
  25. cmdbox/app/features/cli/cmdbox_server_list.py +20 -20
  26. cmdbox/app/features/cli/cmdbox_server_start.py +26 -26
  27. cmdbox/app/features/cli/cmdbox_server_stop.py +26 -26
  28. cmdbox/app/features/cli/cmdbox_web_apikey_add.py +24 -24
  29. cmdbox/app/features/cli/cmdbox_web_apikey_del.py +24 -24
  30. cmdbox/app/features/cli/cmdbox_web_gencert.py +24 -24
  31. cmdbox/app/features/cli/cmdbox_web_genpass.py +20 -20
  32. cmdbox/app/features/cli/cmdbox_web_group_add.py +26 -26
  33. cmdbox/app/features/cli/cmdbox_web_group_del.py +22 -22
  34. cmdbox/app/features/cli/cmdbox_web_group_edit.py +26 -26
  35. cmdbox/app/features/cli/cmdbox_web_group_list.py +22 -22
  36. cmdbox/app/features/cli/cmdbox_web_start.py +65 -65
  37. cmdbox/app/features/cli/cmdbox_web_stop.py +10 -10
  38. cmdbox/app/features/cli/cmdbox_web_user_add.py +32 -32
  39. cmdbox/app/features/cli/cmdbox_web_user_del.py +22 -22
  40. cmdbox/app/features/cli/cmdbox_web_user_edit.py +32 -32
  41. cmdbox/app/features/cli/cmdbox_web_user_list.py +22 -22
  42. cmdbox/app/features/web/cmdbox_web_agent.py +0 -4
  43. cmdbox/app/mcp.py +316 -120
  44. cmdbox/app/options.py +21 -21
  45. cmdbox/app/web.py +1 -1
  46. cmdbox/extensions/sample_project/sample/app/features/cli/sample_client_time.py +4 -4
  47. cmdbox/extensions/sample_project/sample/app/features/cli/sample_server_time.py +18 -18
  48. cmdbox/extensions/sample_project/sample/extensions/user_list.yml +4 -0
  49. cmdbox/extensions/user_list.yml +4 -0
  50. cmdbox/licenses/LICENSE_dnspython_2_7_0_ISC_License-ISCL.txt +35 -0
  51. cmdbox/licenses/LICENSE_email_validator_2_2_0_The_Unlicense-Unlicense.txt +27 -0
  52. cmdbox/licenses/files.txt +4 -2
  53. cmdbox/version.py +2 -2
  54. cmdbox/web/agent.html +2 -2
  55. cmdbox/web/assets/cmdbox/audit.js +14 -14
  56. cmdbox/web/assets/cmdbox/common.js +21 -7
  57. cmdbox/web/assets/cmdbox/list_cmd.js +5 -5
  58. cmdbox/web/assets/cmdbox/signin.js +17 -7
  59. cmdbox/web/assets/cmdbox/svgicon.js +3 -3
  60. cmdbox/web/assets/cmdbox/users.js +14 -5
  61. cmdbox/web/audit.html +6 -6
  62. cmdbox/web/signin.html +13 -10
  63. cmdbox/web/users.html +4 -4
  64. {cmdbox-0.6.1.1.dist-info → cmdbox-0.6.2.dist-info}/METADATA +27 -23
  65. {cmdbox-0.6.1.1.dist-info → cmdbox-0.6.2.dist-info}/RECORD +71 -69
  66. /cmdbox/licenses/{LICENSE_fastmcp_2_9_2_Apache_Software_License.txt → LICENSE_fastmcp_2_10_1_Apache_Software_License.txt} +0 -0
  67. /cmdbox/licenses/{LICENSE_mcp_1_9_4_MIT_License.txt → LICENSE_mcp_1_10_1_MIT_License.txt} +0 -0
  68. {cmdbox-0.6.1.1.dist-info → cmdbox-0.6.2.dist-info}/LICENSE +0 -0
  69. {cmdbox-0.6.1.1.dist-info → cmdbox-0.6.2.dist-info}/WHEEL +0 -0
  70. {cmdbox-0.6.1.1.dist-info → cmdbox-0.6.2.dist-info}/entry_points.txt +0 -0
  71. {cmdbox-0.6.1.1.dist-info → cmdbox-0.6.2.dist-info}/top_level.txt +0 -0
@@ -36,33 +36,33 @@ class ServerTime(feature.Feature):
36
36
  """
37
37
  return dict(
38
38
  type=Options.T_STR, default=None, required=False, multi=False, hide=False, use_redis=self.USE_REDIS_FALSE,
39
- discription_ja="サーバー側の現在時刻を表示します。",
40
- discription_en="Displays the current time at the server side.",
39
+ description_ja="サーバー側の現在時刻を表示します。",
40
+ description_en="Displays the current time at the server side.",
41
41
  choice=[
42
42
  dict(opt="host", type=Options.T_STR, default=self.default_host, required=True, multi=False, hide=True, choice=None,
43
- discription_ja="Redisサーバーのサービスホストを指定します。",
44
- discription_en="Specify the service host of the Redis server."),
43
+ description_ja="Redisサーバーのサービスホストを指定します。",
44
+ description_en="Specify the service host of the Redis server."),
45
45
  dict(opt="port", type=Options.T_INT, default=self.default_port, required=True, multi=False, hide=True, choice=None,
46
- discription_ja="Redisサーバーのサービスポートを指定します。",
47
- discription_en="Specify the service port of the Redis server."),
46
+ description_ja="Redisサーバーのサービスポートを指定します。",
47
+ description_en="Specify the service port of the Redis server."),
48
48
  dict(opt="password", type=Options.T_STR, default=self.default_pass, required=True, multi=False, hide=True, choice=None,
49
- discription_ja="Redisサーバーのアクセスパスワード(任意)を指定します。省略時は `password` を使用します。",
50
- discription_en="Specify the access password of the Redis server (optional). If omitted, `password` is used."),
49
+ description_ja="Redisサーバーのアクセスパスワード(任意)を指定します。省略時は `password` を使用します。",
50
+ description_en="Specify the access password of the Redis server (optional). If omitted, `password` is used."),
51
51
  dict(opt="svname", type=Options.T_STR, default=self.default_svname, required=True, multi=False, hide=True, choice=None,
52
- discription_ja="サーバーのサービス名を指定します。省略時は `server` を使用します。",
53
- discription_en="Specify the service name of the inference server. If omitted, `server` is used."),
52
+ description_ja="サーバーのサービス名を指定します。省略時は `server` を使用します。",
53
+ description_en="Specify the service name of the inference server. If omitted, `server` is used."),
54
54
  dict(opt="timedelta", type=Options.T_INT, default=9, required=False, multi=False, hide=False, choice=None,
55
- discription_ja="時差の時間数を指定します。",
56
- discription_en="Specify the number of hours of time difference."),
55
+ description_ja="時差の時間数を指定します。",
56
+ description_en="Specify the number of hours of time difference."),
57
57
  dict(opt="retry_count", type=Options.T_INT, default=3, required=False, multi=False, hide=True, choice=None,
58
- discription_ja="Redisサーバーへの再接続回数を指定します。0以下を指定すると永遠に再接続を行います。",
59
- discription_en="Specifies the number of reconnections to the Redis server.If less than 0 is specified, reconnection is forever."),
58
+ description_ja="Redisサーバーへの再接続回数を指定します。0以下を指定すると永遠に再接続を行います。",
59
+ description_en="Specifies the number of reconnections to the Redis server.If less than 0 is specified, reconnection is forever."),
60
60
  dict(opt="retry_interval", type=Options.T_INT, default=5, required=False, multi=False, hide=True, choice=None,
61
- discription_ja="Redisサーバーに再接続までの秒数を指定します。",
62
- discription_en="Specifies the number of seconds before reconnecting to the Redis server."),
61
+ description_ja="Redisサーバーに再接続までの秒数を指定します。",
62
+ description_en="Specifies the number of seconds before reconnecting to the Redis server."),
63
63
  dict(opt="timeout", type=Options.T_INT, default="15", required=False, multi=False, hide=True, choice=None,
64
- discription_ja="サーバーの応答が返ってくるまでの最大待ち時間を指定。",
65
- discription_en="Specify the maximum waiting time until the server responds."),
64
+ description_ja="サーバーの応答が返ってくるまでの最大待ち時間を指定。",
65
+ description_en="Specify the maximum waiting time until the server responds."),
66
66
  ])
67
67
 
68
68
  def get_svcmd(self):
@@ -49,6 +49,10 @@ cmdrule: # A list of command rules, Specify a rule that de
49
49
  mode: server
50
50
  cmds: [list]
51
51
  rule: allow
52
+ - groups: [user]
53
+ mode: cmd
54
+ cmds: [list, load]
55
+ rule: allow
52
56
  - groups: [user, guest]
53
57
  mode: audit
54
58
  cmds: [write]
@@ -49,6 +49,10 @@ cmdrule: # A list of command rules, Specify a rule that de
49
49
  mode: server
50
50
  cmds: [list]
51
51
  rule: allow
52
+ - groups: [user]
53
+ mode: cmd
54
+ cmds: [list, load]
55
+ rule: allow
52
56
  - groups: [user, guest]
53
57
  mode: audit
54
58
  cmds: [write]
@@ -0,0 +1,35 @@
1
+ ISC License
2
+
3
+ Copyright (C) Dnspython Contributors
4
+
5
+ Permission to use, copy, modify, and/or distribute this software for
6
+ any purpose with or without fee is hereby granted, provided that the
7
+ above copyright notice and this permission notice appear in all
8
+ copies.
9
+
10
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
11
+ WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
12
+ WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
13
+ AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
14
+ DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
15
+ PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
16
+ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
17
+ PERFORMANCE OF THIS SOFTWARE.
18
+
19
+
20
+
21
+ Copyright (C) 2001-2017 Nominum, Inc.
22
+ Copyright (C) Google Inc.
23
+
24
+ Permission to use, copy, modify, and distribute this software and its
25
+ documentation for any purpose with or without fee is hereby granted,
26
+ provided that the above copyright notice and this permission notice
27
+ appear in all copies.
28
+
29
+ THE SOFTWARE IS PROVIDED "AS IS" AND NOMINUM DISCLAIMS ALL WARRANTIES
30
+ WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
31
+ MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL NOMINUM BE LIABLE FOR
32
+ ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
33
+ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
34
+ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
35
+ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
@@ -0,0 +1,27 @@
1
+ This is free and unencumbered software released into the public
2
+ domain.
3
+
4
+ Anyone is free to copy, modify, publish, use, compile, sell, or
5
+ distribute this software, either in source code form or as a
6
+ compiled binary, for any purpose, commercial or non-commercial,
7
+ and by any means.
8
+
9
+ In jurisdictions that recognize copyright laws, the author or
10
+ authors of this software dedicate any and all copyright
11
+ interest in the software to the public domain. We make this
12
+ dedication for the benefit of the public at large and to the
13
+ detriment of our heirs and successors. We intend this
14
+ dedication to be an overt act of relinquishment in perpetuity
15
+ of all present and future rights to this software under
16
+ copyright law.
17
+
18
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
19
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
20
+ OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
21
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR
22
+ ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
23
+ CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
24
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25
+ THE SOFTWARE.
26
+
27
+ For more information, please refer to <https://unlicense.org/>
cmdbox/licenses/files.txt CHANGED
@@ -27,11 +27,13 @@ The cloudpickle developer team BSD License cloudpickle https://github.com/cloudp
27
27
  Jonathan Hartley <tartley@tartley.com> BSD License colorama https://github.com/tartley/colorama 0.4.6 cmdbox\licenses\LICENSE_colorama_0_4_6_BSD_License.txt
28
28
  The cryptography developers <cryptography-dev@python.org> Apache-2.0 OR BSD-3-Clause cryptography https://github.com/pyca/cryptography 45.0.4 cmdbox\licenses\LICENSE_cryptography_45_0_4_Apache-2_0_OR_BSD-3-Clause.txt
29
29
  Nir Cohen Apache Software License distro https://github.com/python-distro/distro 1.9.0 cmdbox\licenses\LICENSE_distro_1_9_0_Apache_Software_License.txt
30
+ Bob Halley <halley@dnspython.org> ISC License (ISCL) dnspython https://www.dnspython.org 2.7.0 cmdbox\licenses\LICENSE_dnspython_2_7_0_ISC_License-ISCL.txt
30
31
  Marcin Kurczewski MIT License docstring_parser https://github.com/rr-/docstring_parser 0.16 cmdbox\licenses\LICENSE_docstring_parser_0_16_MIT_License.txt
31
32
  David Goodger <goodger@python.org> BSD License; GNU General Public License (GPL); Public Domain; Python Software Foundation License docutils https://docutils.sourceforge.io 0.21.2 cmdbox\licenses\LICENSE_docutils_0_21_2_BSD_License-GNU_General_Public_License-GPL-Public_Domain-Python_Software_Foundation_License.txt
33
+ Joshua Tauberer The Unlicense (Unlicense) email_validator https://github.com/JoshData/python-email-validator 2.2.0 cmdbox\licenses\LICENSE_email_validator_2_2_0_The_Unlicense-Unlicense.txt
32
34
  Alex Grönholm <alex.gronholm@nextday.fi> MIT License exceptiongroup https://github.com/agronholm/exceptiongroup/blob/main/CHANGES.rst 1.3.0 cmdbox\licenses\LICENSE_exceptiongroup_1_3_0_MIT_License.txt
33
35
  =?utf-8?q?Sebasti=C3=A1n_Ram=C3=ADrez?= <tiangolo@gmail.com> MIT License fastapi https://github.com/fastapi/fastapi 0.115.14 cmdbox\licenses\LICENSE_fastapi_0_115_14_MIT_License.txt
34
- Jeremiah Lowin Apache Software License fastmcp https://gofastmcp.com 2.9.2 cmdbox\licenses\LICENSE_fastmcp_2_9_2_Apache_Software_License.txt
36
+ Jeremiah Lowin Apache Software License fastmcp https://gofastmcp.com 2.10.1 cmdbox\licenses\LICENSE_fastmcp_2_10_1_Apache_Software_License.txt
35
37
  UNKNOWN The Unlicense (Unlicense) filelock https://github.com/tox-dev/py-filelock 3.18.0 cmdbox\licenses\LICENSE_filelock_3_18_0_The_Unlicense-Unlicense.txt
36
38
  UNKNOWN Apache-2.0 frozenlist https://github.com/aio-libs/frozenlist 1.7.0 cmdbox\licenses\LICENSE_frozenlist_1_7_0_Apache-2_0.txt
37
39
  UNKNOWN BSD License fsspec https://github.com/fsspec/filesystem_spec 2025.5.1 cmdbox\licenses\LICENSE_fsspec_2025_5_1_BSD_License.txt
@@ -83,7 +85,7 @@ Julian Berman <Julian+jsonschema-specifications@GrayVines.com> UNKNOWN jsonschem
83
85
  Kang Zhang <jobo.zh@gmail.com> MIT License keyring https://github.com/jaraco/keyring 25.6.0 cmdbox\licenses\LICENSE_keyring_25_6_0_MIT_License.txt
84
86
  BerriAI MIT License litellm https://litellm.ai 1.73.6 cmdbox\licenses\LICENSE_litellm_1_73_6_MIT_License.txt
85
87
  Chris Sewell <chrisj_sewell@hotmail.com> MIT License markdown-it-py https://github.com/executablebooks/markdown-it-py 3.0.0 cmdbox\licenses\LICENSE_markdown-it-py_3_0_0_MIT_License.txt
86
- Anthropic, PBC. MIT License mcp https://modelcontextprotocol.io 1.9.4 cmdbox\licenses\LICENSE_mcp_1_9_4_MIT_License.txt
88
+ Anthropic, PBC. MIT License mcp https://modelcontextprotocol.io 1.10.1 cmdbox\licenses\LICENSE_mcp_1_10_1_MIT_License.txt
87
89
  Taneli Hukkinen <hukkin@users.noreply.github.com> MIT License mdurl https://github.com/executablebooks/mdurl 0.1.2 cmdbox\licenses\LICENSE_mdurl_0_1_2_MIT_License.txt
88
90
  Erik Rose <erikrose@grinchcentral.com> MIT License more-itertools https://github.com/more-itertools/more-itertools 10.7.0 cmdbox\licenses\LICENSE_more-itertools_10_7_0_MIT_License.txt
89
91
  Andrew Svetlov Apache License 2.0 multidict https://github.com/aio-libs/multidict 6.6.2 cmdbox\licenses\LICENSE_multidict_6_6_2_Apache_License_2_0.txt
cmdbox/version.py CHANGED
@@ -1,9 +1,9 @@
1
1
  import datetime
2
2
 
3
- dt_now = datetime.datetime(2025, 7, 4)
3
+ dt_now = datetime.datetime(2025, 7, 8)
4
4
  __appid__ = 'cmdbox'
5
5
  __title__ = 'cmdbox (Command Development Application)'
6
- __version__ = '0.6.1.1'
6
+ __version__ = '0.6.2'
7
7
  __copyright__ = f'Copyright © 2023-{dt_now.strftime("%Y")} hamacom2004jp'
8
8
  __pypiurl__ = 'https://pypi.org/project/cmdbox/'
9
9
  __srcurl__ = 'https://github.com/hamacom2004jp/cmdbox'
cmdbox/web/agent.html CHANGED
@@ -168,12 +168,12 @@
168
168
  </h5>
169
169
  <button type="button" class="btn btn_window_stack">
170
170
  <svg width="16" height="16" fill="currentColor" class="bi bi-window-stack">
171
- <use href="#svg_window_stack"></use>
171
+ <use href="#btn_window_stack"></use>
172
172
  </svg>
173
173
  </button>
174
174
  <button type="button" class="btn btn_window">
175
175
  <svg width="16" height="16" fill="currentColor" class="bi bi-window">
176
- <use href="#svg_window"></use>
176
+ <use href="#btn_window"></use>
177
177
  </svg>
178
178
  </button>
179
179
  <button type="button" class="btn btn_close p-0 m-0" data-bs-dismiss="modal" aria-label="Close" style="margin-left: 0px;">
@@ -168,34 +168,34 @@ audit.metrics_modal_func = (title) => {
168
168
  const rows = [
169
169
  {opt:'title', type:'str', default:title?title:'', required:true, multi:false, hide:false, choice:null},
170
170
  {opt:'chart_type', type:'str', default:data['chart_type']?data['chart_type']:'line', required:true, multi:false, hide:false, choice:chart_type,
171
- discription_en: 'Specifies the type of graph.',
172
- discription_ja: 'グラフのタイプを指定します。',
171
+ description_en: 'Specifies the type of graph.',
172
+ description_ja: 'グラフのタイプを指定します。',
173
173
  choice_show: {
174
174
  'line':['stroke_curve','stroke_width'],
175
175
  'area':['stroke_curve','chart_stacked','stroke_width'],
176
176
  'bar':['chart_stacked']}},
177
177
  {opt:'stroke_curve', type:'str', default:data['stroke_curve']?data['stroke_curve']:'straight', required:false, multi:false, hide:false, choice:stroke_curve,
178
- discription_en: 'Specifies the type of line.',
179
- discription_ja: '線のタイプを指定します。'},
178
+ description_en: 'Specifies the type of line.',
179
+ description_ja: '線のタイプを指定します。'},
180
180
  {opt:'chart_stacked', type:'bool', default:data['chart_stacked']?data['chart_stacked']:false, required:false, multi:false, hide:false, choice:[false, true],
181
- discription_en: 'Specifies whether to stack the graph.',
182
- discription_ja: 'グラフを積み上げるかどうかを指定します。'},
181
+ description_en: 'Specifies whether to stack the graph.',
182
+ description_ja: 'グラフを積み上げるかどうかを指定します。'},
183
183
  {opt:'stroke_width', type:'int', default:data['stroke_width']?data['stroke_width']:2, required:false, multi:false, hide:false, choice:[...Array(5).keys()].map(i => i+1),
184
- discription_en: 'Specifies the width of the line.',
185
- discription_ja: '線の幅を指定します。'},
184
+ description_en: 'Specifies the width of the line.',
185
+ description_ja: '線の幅を指定します。'},
186
186
  {opt:'col_size', type:'int', default:data['col_size']?data['col_size']:6, required:true, multi:false, hide:false, choice:[...Array(12).keys()].map(i => i+1),
187
- discription_en: 'Specifies the size of the graph display width.',
188
- discription_ja: 'グラフの表示幅のサイズを指定します。'},
187
+ description_en: 'Specifies the size of the graph display width.',
188
+ description_ja: 'グラフの表示幅のサイズを指定します。'},
189
189
  {opt:'horizontal', type:'str', default:data['horizontal']?data['horizontal']:'clmsg_date', required:true, multi:false, hide:false, choice:axis,
190
- discription_en: 'Specify the items to be displayed on the horizontal axis.',
191
- discription_ja: '横軸の表示項目を指定します。',
190
+ description_en: 'Specify the items to be displayed on the horizontal axis.',
191
+ description_ja: '横軸の表示項目を指定します。',
192
192
  choice_show: {
193
193
  'clmsg_date':['horizontal_date_format'],
194
194
  'svmsg_date':['horizontal_date_format']}},
195
195
  {opt:'horizontal_date_format', type:'str', default:data['horizontal_date_format']?data['horizontal_date_format']:'%Y/%m/%d',
196
196
  required:false, multi:false, hide:false, choice:['','%Y/%m/%d %H:%M', '%Y/%m/%d %H', '%Y/%m/%d', '%Y/%m', '%Y', '%m', '%w'],
197
- discription_en: 'Specify the date format to be displayed on the horizontal axis.',
198
- discription_ja: '横軸の表示日付フォーマットを指定します。'},
197
+ description_en: 'Specify the date format to be displayed on the horizontal axis.',
198
+ description_ja: '横軸の表示日付フォーマットを指定します。'},
199
199
  ];
200
200
  data['vertical'] = data['vertical'] || {'clmsg_id':'count'};
201
201
  Object.keys(data['vertical']).forEach((key) => {
@@ -92,6 +92,20 @@ cmdbox.message = (res) => {
92
92
  alert(msg.replace(/\\n/g, '\n'));
93
93
  cmdbox.hide_loading();
94
94
  };
95
+ /**
96
+ * コンテキストパスを取得
97
+ * @returns {string} - コンテキストパス
98
+ */
99
+ cmdbox.ctx_path = () => {
100
+ const cur_path = window.location.pathname;
101
+ if (cur_path.indexOf('dosignin') >= 0) {
102
+ return cur_path.slice(0, cur_path.indexOf('dosignin'));
103
+ }
104
+ else if (cur_path.indexOf('signin') >= 0) {
105
+ return cur_path.slice(0, cur_path.indexOf('signin'));
106
+ }
107
+ return '';
108
+ }
95
109
  /**
96
110
  * コピーライト表示
97
111
  */
@@ -105,7 +119,7 @@ cmdbox.copyright = async () => {
105
119
  * @param {string} sel - セレクタ
106
120
  */
107
121
  cmdbox.appid = async (sel) => {
108
- const res = await fetch('gui/appid', {method: 'GET'});
122
+ const res = await fetch(`${cmdbox.ctx_path()}gui/appid`, {method: 'GET'});
109
123
  if (res.status != 200) cmdbox.message({'error':`${res.status}: ${res.statusText}`});
110
124
  const appid = await res.text()
111
125
  $(sel).text(appid);
@@ -136,7 +150,7 @@ cmdbox.set_logoicon = async (sel) => {
136
150
  cmdbox.singout = (sitepath) => {
137
151
  if (confirm('Sign out ok ?')) {
138
152
  const rand = cmdbox.random_string(8);
139
- location.href = `../dosignout/${sitepath}?r=${rand}`;
153
+ location.href = `dosignout/${sitepath}?r=${rand}`;
140
154
  }
141
155
  };
142
156
  cmdbox.editapikey = async () => {
@@ -414,7 +428,7 @@ $(()=>{
414
428
  if (window.location.search) {
415
429
  const params = new URLSearchParams(window.location.search);
416
430
  if (params.has('error') || params.has('warn')) {
417
- const elem = $(`<div class="alert alert-warning alert-dismissible d-block" role="alert">`).css('z-index', '10000');
431
+ const elem = $(`<div class="alert alert-warning alert-dismissible d-block position-absolute start-50 translate-middle-x" role="alert">`).css('z-index', '10000');
418
432
  const msgelem = $('<div>Sign in faild: The ID or PW is incorrect or the user is not authorized.</div>').appendTo(elem);
419
433
  if (params.get('error') == 'noauth') msgelem.text('Sign in faild: No credentials are available. Please sign in.');
420
434
  if (params.get('error') == 'expirationofpassword') msgelem.text('Sign in faild: The password has expired.');
@@ -1320,10 +1334,10 @@ cmdbox.add_form_func = (i, cmd_modal, row_content, row, next_elem, lcolsize=12,
1320
1334
  const opt = arr.map(row => {
1321
1335
  if (row && typeof row === 'object') {
1322
1336
  key = Object.keys(row)[0];
1323
- d = window.navigator.language=='ja'?row[key].discription_ja:row[key].discription_en;
1324
- return `<option value="${key}" discription="${d}">${key}</option>`;
1337
+ d = window.navigator.language=='ja'?row[key].description_ja:row[key].description_en;
1338
+ return `<option value="${key}" description="${d}">${key}</option>`;
1325
1339
  }
1326
- return `<option value="${row}" discription="">${row}</option>`;
1340
+ return `<option value="${row}" description="">${row}</option>`;
1327
1341
  }).join('');
1328
1342
  return opt;
1329
1343
  }
@@ -1426,7 +1440,7 @@ cmdbox.add_form_func = (i, cmd_modal, row_content, row, next_elem, lcolsize=12,
1426
1440
  }
1427
1441
  const title = elem.find('.row_content_template_title');
1428
1442
  title.html('');
1429
- title.attr('title', window.navigator.language=='ja'?row.discription_ja:row.discription_en)
1443
+ title.attr('title', window.navigator.language=='ja'?row.description_ja:row.description_en)
1430
1444
  if (row.required) {
1431
1445
  title.append('<span class="text-danger" title="required">*</span>');
1432
1446
  }
@@ -124,10 +124,10 @@ const list_cmd_func_then = () => {
124
124
  const opt = arr.map(row => {
125
125
  if (typeof row === 'object') {
126
126
  key = Object.keys(row)[0];
127
- d = window.navigator.language=='ja'?row[key].discription_ja:row[key].discription_en;
128
- return `<option value="${key}" discription="${d}">${key}</option>`;
127
+ d = window.navigator.language=='ja'?row[key].description_ja:row[key].description_en;
128
+ return `<option value="${key}" description="${d}">${key}</option>`;
129
129
  }
130
- return `<option value="${row}" discription="">${row}</option>`;
130
+ return `<option value="${row}" description="">${row}</option>`;
131
131
  }).join('');
132
132
  return opt;
133
133
  }
@@ -143,7 +143,7 @@ const list_cmd_func_then = () => {
143
143
  const py_get_cmds = await get_cmds(mode);
144
144
  cmd_modal.find('[name="cmd"]').html(mkopt(py_get_cmds));
145
145
  const selected_mode = cmd_modal.find('[name="mode"] option:selected');
146
- cmd_modal.find('.mode_label').attr('title', selected_mode.attr('discription'));
146
+ cmd_modal.find('.mode_label').attr('title', selected_mode.attr('description'));
147
147
  const row_content = cmd_modal.find('.row_content');
148
148
  row_content.html('');
149
149
  }
@@ -158,7 +158,7 @@ const list_cmd_func_then = () => {
158
158
  const mode = cmd_modal.find('[name="mode"]').val();
159
159
  const cmd = cmd_modal.find('[name="cmd"]').val();
160
160
  const selected_cmd = cmd_modal.find('[name="cmd"] option:selected');
161
- cmd_modal.find('.cmd_label').attr('title', selected_cmd.attr('discription'));
161
+ cmd_modal.find('.cmd_label').attr('title', selected_cmd.attr('description'));
162
162
  const py_get_cmd_choices = await cmdbox.get_cmd_choices(mode, cmd);
163
163
  row_content.html('');
164
164
  // 表示オプションを追加
@@ -20,7 +20,7 @@ $(() => {
20
20
  const selecter_password = '.form-signin .form-signin-password';
21
21
  const selecter_remember = '.form-signin .form-signin-remember';
22
22
  const form_signin = $('.form-signin');
23
- form_signin.attr('action', location.pathname.replace('/signin', '/dosignin'));
23
+ form_signin.attr('action', location.pathname.replace('/signin', '/dosignin').replace('/dosignin/dosignin', '/dosignin'));
24
24
  form_signin.off('submit').on('submit', (event) => {
25
25
  const remember = $(selecter_remember).prop('checked');
26
26
  if (remember) {
@@ -62,19 +62,19 @@ $(() => {
62
62
  const btn_saml_azure = $('.btn-saml-azure');
63
63
  btn_google.off('click').on('click', async (event) => {
64
64
  const path = window.location.pathname.replace('/signin', '');
65
- window.location.href = `../oauth2/google${path}?n=${cmdbox.random_string(8)}`;
65
+ window.location.href = `${ctx_path()}oauth2/google${path}?n=${cmdbox.random_string(8)}`;
66
66
  });
67
67
  btn_github.off('click').on('click', async (event) => {
68
68
  const path = window.location.pathname.replace('/signin', '');
69
- window.location.href = `../oauth2/github${path}?n=${cmdbox.random_string(8)}`;
69
+ window.location.href = `${ctx_path()}oauth2/github${path}?n=${cmdbox.random_string(8)}`;
70
70
  });
71
71
  btn_azure.off('click').on('click', async (event) => {
72
72
  const path = window.location.pathname.replace('/signin', '');
73
- window.location.href = `../oauth2/azure${path}?n=${cmdbox.random_string(8)}`;
73
+ window.location.href = `${ctx_path()}oauth2/azure${path}?n=${cmdbox.random_string(8)}`;
74
74
  });
75
75
  btn_saml_azure.off('click').on('click', async (event) => {
76
76
  const path = window.location.pathname.replace('/signin', '');
77
- window.location.href = `../saml/azure${path}?n=${cmdbox.random_string(8)}`;
77
+ window.location.href = `${ctx_path()}saml/azure${path}?n=${cmdbox.random_string(8)}`;
78
78
  });
79
79
  oauth2_enabled().then((res) => {
80
80
  if (res.google) btn_google.show();
@@ -98,10 +98,20 @@ const bbforce_cmd = async () => {
98
98
  return await res.json();
99
99
  }
100
100
  const oauth2_enabled = async () => {
101
- const res = await fetch('../oauth2/enabled', {method: 'GET'});
101
+ const res = await fetch(`${ctx_path()}oauth2/enabled`, {method: 'GET'});
102
102
  return await res.json();
103
103
  }
104
104
  const saml_enabled = async () => {
105
- const res = await fetch('../saml/enabled', {method: 'GET'});
105
+ const res = await fetch(`${ctx_path()}saml/enabled`, {method: 'GET'});
106
106
  return await res.json();
107
+ }
108
+ const ctx_path = () => {
109
+ const cur_path = window.location.pathname;
110
+ if (cur_path.indexOf('dosignin') >= 0) {
111
+ return cur_path.slice(0, cur_path.indexOf('dosignin'));
112
+ }
113
+ else if (cur_path.indexOf('signin') >= 0) {
114
+ return cur_path.slice(0, cur_path.indexOf('signin'));
115
+ }
116
+ return '';
107
117
  }
@@ -1,4 +1,4 @@
1
- const init_svgicons = () => {
1
+ init_svgicons = () => {
2
2
  const body = document.querySelector('body');
3
3
  body.insertAdjacentHTML('afterbegin', `<svg id="svgicons" xmlns="http://www.w3.org/2000/svg" style="display: none;"></svg>`);
4
4
  const svgicons = document.getElementById('svgicons');
@@ -9,12 +9,12 @@ const init_svgicons = () => {
9
9
  +`<path fill-rule="evenodd" d="M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8zm8-7a7 7 0 0 0-5.468 11.37C3.242 11.226 4.805 10 8 10s4.757 1.225 5.468 2.37A7 7 0 0 0 8 1z"/>`
10
10
  +`</symbol>`);
11
11
  svgicons.insertAdjacentHTML('beforeend',
12
- `<symbol id="svg_window_stack" viewBox="0 0 16 16">`
12
+ `<symbol id="btn_window_stack" viewBox="0 0 16 16">`
13
13
  +`<path d="M4.5 6a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1ZM6 6a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1Zm2-.5a.5.5 0 1 1-1 0 .5.5 0 0 1 1 0Z"/>`
14
14
  +`<path d="M12 1a2 2 0 0 1 2 2 2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2 2 2 0 0 1-2-2V3a2 2 0 0 1 2-2h10ZM2 12V5a2 2 0 0 1 2-2h9a1 1 0 0 0-1-1H2a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1Zm1-4v5a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1V8H3Zm12-1V5a1 1 0 0 0-1-1H4a1 1 0 0 0-1 1v2h12Z"/>`
15
15
  +`</symbol>`);
16
16
  svgicons.insertAdjacentHTML('beforeend',
17
- `<symbol id="svg_window" viewBox="0 0 16 16">`
17
+ `<symbol id="btn_window" viewBox="0 0 16 16">`
18
18
  +`<path d="M2.5 4a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1zm2-.5a.5.5 0 1 1-1 0 .5.5 0 0 1 1 0zm1 .5a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1z"/>`
19
19
  +`<path d="M2 1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V3a2 2 0 0 0-2-2H2zm13 2v2H1V3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1zM2 14a1 1 0 0 1-1-1V6h14v7a1 1 0 0 1-1 1H2z"/>`
20
20
  +`</symbol>`);
@@ -94,14 +94,23 @@ users.users_list = async () => {
94
94
  continue;
95
95
  }
96
96
  if (col == 'apikeys') {
97
- const apikeys = user && user[col] && Object.keys(user[col]).length>0 ? user[col] : {'':''};
98
- const apikeys_add_func = (apikey,) => {
97
+ const apikeys = user && user[col] && Object.keys(user[col]).length>0 ? user[col] : {};
98
+ const apikeys_add_func = (apikeys, apikey,) => {
99
99
  const row = $(modal.find('.row_content_template_str').html()).appendTo(row_content);
100
- row_content.find('.row_content_template_title').removeClass('row_content_template_title').text(col);
100
+ row_content.find('.row_content_template_title').removeClass('row_content_template_title').text(`${col}:${apikey}`);
101
101
  const input = row_content.find('.row_content_template_input').removeClass('row_content_template_input');
102
- input.attr('disabled', 'disabled').val(apikey);
102
+ input.attr('disabled', 'disabled').val(apikeys[apikey][1]);
103
+ const btn_m = $('<button class="btn btn-secondary copy_buton" type="button"></button>').appendTo(input.parent());
104
+ btn_m.append('<svg width="16" height="16" fill="currentColor" class="bi bi-copy" viewBox="0 0 16 16"><use href="#btn_copy"></use></svg>');
105
+ btn_m.off('click').on('click', (event) => {
106
+ navigator.clipboard.writeText(apikeys[apikey][0]).then(() => {
107
+ cmdbox.message({'success': 'Key copied to clipboard.'});
108
+ }).catch((err) => {
109
+ cmdbox.message({'error': `Failed to copy key: ${err}`});
110
+ });
111
+ });
103
112
  };
104
- for (const apikey in apikeys) apikeys_add_func(apikey);
113
+ for (const apikey in apikeys) apikeys_add_func(apikeys, apikey);
105
114
  continue;
106
115
  }
107
116
  const row = $(modal.find('.row_content_template_str').html()).appendTo(row_content);
cmdbox/web/audit.html CHANGED
@@ -108,12 +108,12 @@
108
108
  <h5 class="modal-title">Search Condition</h5>
109
109
  <button type="button" class="btn btn_window_stack">
110
110
  <svg width="16" height="16" fill="currentColor" class="bi bi-window-stack" viewBox="0 0 16 16">
111
- <use href="#svg_window_stack"></use>
111
+ <use href="#btn_window_stack"></use>
112
112
  </svg>
113
113
  </button>
114
114
  <button type="button" class="btn btn_window">
115
115
  <svg width="16" height="16" fill="currentColor" class="bi bi-window" viewBox="0 0 16 16">
116
- <use href="#svg_window"></use>
116
+ <use href="#btn_window"></use>
117
117
  </svg>
118
118
  </button>
119
119
  <button type="button" class="btn btn_close p-0 m-0" data-bs-dismiss="modal" aria-label="Close" style="margin-left: 0px;">
@@ -146,12 +146,12 @@
146
146
  <h5 class="modal-title"></h5>
147
147
  <button type="button" class="btn btn_window_stack">
148
148
  <svg width="16" height="16" fill="currentColor" class="bi bi-window-stack" viewBox="0 0 16 16">
149
- <use href="#svg_window_stack"></use>
149
+ <use href="#btn_window_stack"></use>
150
150
  </svg>
151
151
  </button>
152
152
  <button type="button" class="btn btn_window">
153
153
  <svg width="16" height="16" fill="currentColor" class="bi bi-window" viewBox="0 0 16 16">
154
- <use href="#svg_window"></use>
154
+ <use href="#btn_window"></use>
155
155
  </svg>
156
156
  </button>
157
157
  <button type="button" class="btn btn_close p-0 m-0" data-bs-dismiss="modal" aria-label="Close" style="margin-left: 0px;">
@@ -179,12 +179,12 @@
179
179
  </h5>
180
180
  <button type="button" class="btn btn_window_stack">
181
181
  <svg width="16" height="16" fill="currentColor" class="bi bi-window-stack">
182
- <use href="#svg_window_stack"></use>
182
+ <use href="#btn_window_stack"></use>
183
183
  </svg>
184
184
  </button>
185
185
  <button type="button" class="btn btn_window">
186
186
  <svg width="16" height="16" fill="currentColor" class="bi bi-window">
187
- <use href="#svg_window"></use>
187
+ <use href="#btn_window"></use>
188
188
  </svg>
189
189
  </button>
190
190
  <button type="button" class="btn btn_close p-0 m-0" data-bs-dismiss="modal" aria-label="Close" style="margin-left: 0px;">
cmdbox/web/signin.html CHANGED
@@ -11,9 +11,12 @@
11
11
  <script type="text/javascript">
12
12
  const self_name = 'signin';
13
13
  var write_script_Tag = (src, type) => {
14
- const ctx_path = window.location.pathname;
15
- if (ctx_path.indexOf('dosignin') >= 0) {
16
- src = `../${ctx_path}`;
14
+ const cur_path = window.location.pathname;
15
+ if (cur_path.indexOf('dosignin') >= 0) {
16
+ src = `${cur_path.slice(0, cur_path.indexOf('dosignin'))}${src}`;
17
+ }
18
+ else if (cur_path.indexOf('signin') >= 0) {
19
+ src = `${cur_path.slice(0, cur_path.indexOf('signin'))}${src}`;
17
20
  }
18
21
  if (type === 'css') {
19
22
  const link = document.createElement('link');
@@ -31,7 +34,7 @@
31
34
  </script>
32
35
  </head>
33
36
  <body lang="ja" class="overflow-hidden p-2" style="background-color:rgb(33, 37, 41)">
34
- <script type="text/javascript">write_script_Tag("../assets/cmdbox/svgicon.js")</script>
37
+ <script type="text/javascript">write_script_Tag("assets/cmdbox/svgicon.js")</script>
35
38
  <div class="dropdown position-fixed bottom-0 end-0 mb-3 me-3 bd-mode-toggle">
36
39
  <button class="btn btn-primary py-2 dropdown-toggle d-flex align-items-center" id="bd-theme" type="button" aria-expanded="false" data-bs-toggle="dropdown" aria-label="Toggle theme (auto)">
37
40
  <svg class="bi my-1 theme-icon-active" width="1em" height="1em"><use href="#circle-half"></use></svg>
@@ -144,11 +147,11 @@
144
147
  });
145
148
  </script>
146
149
  <script type="text/javascript">
147
- write_script_Tag("../assets/bootstrap/bootstrap.min.5.3.0.css", "css");
148
- write_script_Tag("../assets/cmdbox/color_mode.css", "css");
149
- write_script_Tag("../assets/bootstrap/bootstrap.bundle.min.5.3.0.js");
150
- write_script_Tag("../assets/jquery/jquery.min.3.2.0.js");
151
- write_script_Tag("../assets/cmdbox/common.js");
152
- write_script_Tag("../assets/cmdbox/signin.js");
150
+ write_script_Tag("assets/bootstrap/bootstrap.min.5.3.0.css", "css");
151
+ write_script_Tag("assets/cmdbox/color_mode.css", "css");
152
+ write_script_Tag("assets/bootstrap/bootstrap.bundle.min.5.3.0.js");
153
+ write_script_Tag("assets/jquery/jquery.min.3.2.0.js");
154
+ write_script_Tag("assets/cmdbox/common.js");
155
+ write_script_Tag("assets/cmdbox/signin.js");
153
156
  </script>
154
157
  </html>
cmdbox/web/users.html CHANGED
@@ -118,12 +118,12 @@
118
118
  <h5 class="modal-title"></h5>
119
119
  <button type="button" class="btn btn_window_stack">
120
120
  <svg width="16" height="16" fill="currentColor" class="bi bi-window-stack" viewBox="0 0 16 16">
121
- <use href="#svg_window_stack"></use>
121
+ <use href="#btn_window_stack"></use>
122
122
  </svg>
123
123
  </button>
124
124
  <button type="button" class="btn btn_window">
125
125
  <svg width="16" height="16" fill="currentColor" class="bi bi-window" viewBox="0 0 16 16">
126
- <use href="#svg_window"></use>
126
+ <use href="#btn_window"></use>
127
127
  </svg>
128
128
  </button>
129
129
  <button type="button" class="btn btn_close p-0 m-0" data-bs-dismiss="modal" aria-label="Close" style="margin-left: 0px;">
@@ -188,12 +188,12 @@
188
188
  </h5>
189
189
  <button type="button" class="btn btn_window_stack">
190
190
  <svg width="16" height="16" fill="currentColor" class="bi bi-window-stack">
191
- <use href="#svg_window_stack"></use>
191
+ <use href="#btn_window_stack"></use>
192
192
  </svg>
193
193
  </button>
194
194
  <button type="button" class="btn btn_window">
195
195
  <svg width="16" height="16" fill="currentColor" class="bi bi-window">
196
- <use href="#svg_window"></use>
196
+ <use href="#btn_window"></use>
197
197
  </svg>
198
198
  </button>
199
199
  <button type="button" class="btn btn_close p-0 m-0" data-bs-dismiss="modal" aria-label="Close" style="margin-left: 0px;">