2020-08-11 09:54:03 +00:00
< table id = "ssh_enable_table" class = "overview" >
< tr class = "overviewHead" style = "width: 50%;" >
2021-06-11 15:18:33 +00:00
< td class = "padding10 first-collumn" style = "width: 15%;" class = "help_cursor" >
2023-02-13 14:45:45 +00:00
< span title = "It's just name alias. This alias will be use in 'Servers' page for choose credentials" > {{lang.words.name|title()}}< span >
2020-08-11 09:54:03 +00:00
< / td >
2023-04-09 13:11:16 +00:00
< td class = "first-collumn" style = "width: 25%;" class = "help_cursor" id = "ssh-key-enabled-td" >
2023-02-13 14:45:45 +00:00
< span title = "If it is enabled, the key will be used, if turned off - the password. Do not forget to download the keys to all servers or install the sudo without a password" > SSH {{lang.words.key}}< / span >
2020-08-11 09:54:03 +00:00
< / td >
{% if page != "servers.py" %}
2023-02-13 14:45:45 +00:00
< td style = "width: 25%;" > {{lang.words.group|title()}}< / td >
2020-08-11 09:54:03 +00:00
{% endif %}
2022-11-28 07:47:18 +00:00
< td style = "width: 100%;" class = "help_cursor" id = "ssh-user-name-td" >
2023-02-13 14:45:45 +00:00
< span title = "Enter SSH user name. If SSH key disabled, enter password for SSH user" > {{lang.words.username|title()}}< / span >
2020-08-11 09:54:03 +00:00
< / td >
< td > < / td >
< / tr >
{% for ssh in sshs %}
2021-08-02 08:19:22 +00:00
< tr style = "width: 50%;" id = "ssh-table-{{ssh.id}}" class = "{{ loop.cycle('odd', 'even') }}" >
2023-04-09 13:11:16 +00:00
< td class = "first-collumn padding10" >
2021-08-02 08:19:22 +00:00
{% set id = 'ssh_name-' + ssh.id|string() %}
{{ input(id, value=ssh.name, size='15') }}
2020-08-11 09:54:03 +00:00
< / td >
< td class = "first-collumn" valign = "top" style = "padding-top: 15px;" >
2021-08-02 08:19:22 +00:00
{% if ssh.enable == 1 %}
2023-02-13 14:45:45 +00:00
< label for = "ssh_enable-{{ssh.id}}" > {{lang.words.enable|title()}} SSH {{lang.words.key}}< / label > < input type = "checkbox" id = "ssh_enable-{{ssh.id}}" checked >
2020-08-11 09:54:03 +00:00
{% else %}
2023-02-13 14:45:45 +00:00
< label for = "ssh_enable-{{ssh.id}}" > {{lang.words.enable|title()}} SSH {{lang.words.key}}< / label > < input type = "checkbox" id = "ssh_enable-{{ssh.id}}" >
2020-08-11 09:54:03 +00:00
{% endif %}
< / td >
{% if page != "servers.py" %}
< td >
2021-08-02 08:19:22 +00:00
< select id = "sshgroup-{{ssh.id}}" name = "sshgroup-{{ssh.id}}" >
2020-08-11 09:54:03 +00:00
{% for group in groups %}
2023-02-22 07:36:20 +00:00
{% if ssh.groups == group.group_id %}
2021-08-02 08:19:22 +00:00
< option value = "{{ group.group_id }}" selected > {{ group.name }}< / option >
2020-08-11 09:54:03 +00:00
{% else %}
2021-08-02 08:19:22 +00:00
< option value = "{{ group.group_id }}" > {{ group.name }}< / option >
2020-08-11 09:54:03 +00:00
{% endif %}
{% endfor %}
< / select >
< / td >
{% endif %}
< td style = "padding-top: 15px;" >
< p >
2021-08-02 08:19:22 +00:00
{% set id = 'ssh_user-' + ssh.id|string() %}
{{ input(id, value=ssh.username, title='SSH user name') }}
2020-08-11 09:54:03 +00:00
< / p >
2021-08-02 08:19:22 +00:00
{% if ssh.enable == 1 %}
2022-06-15 07:34:20 +00:00
< input type = "password" id = "ssh_pass-{{ssh.id}}" class = "form-control" title = "User password, if SSH key is disabled" placeholder = "*****" style = "display: none;" autocomplete = "new-password" >
2020-08-11 09:54:03 +00:00
{% else %}
2022-06-15 07:34:20 +00:00
< input type = "password" id = "ssh_pass-{{ssh.id}}" class = "form-control" title = "User password, if SSH key is disabled" placeholder = "*****" autocomplete = "new-password" >
2020-08-11 09:54:03 +00:00
{% endif %}
< br >
< / td >
< td >
2023-02-13 14:45:45 +00:00
< a class = "delete" onclick = "confirmDeleteSsh({{ssh.id}})" title = "{{lang.words.delete|title()}} SSH {{lang.words.creds}} {{ssh.name}}" style = "cursor: pointer;" > < / a >
2020-08-11 09:54:03 +00:00
< / td >
< / tr >
{% endfor %}
< / table >
2023-02-13 14:45:45 +00:00
< br / > < span class = "add-button" title = "{{lang.words.add|title()}} SSH" id = "add-ssh-button" > + {{lang.words.add|title()}}< / span >
2020-08-11 09:54:03 +00:00
< br / > < br / >
< table id = "ssh_key" >
2024-02-04 07:28:17 +00:00
< tr class = "overviewHead" >
< td class = "padding10 first-collumn" > {{lang.words.upload|title()}} SSH {{lang.words.key}}< / td >
< td style = "width: 25%;" > {{lang.phrases.ssh_passphrase}}< / td >
2021-06-11 15:18:33 +00:00
< td class = "help_cursor" >
2023-02-13 14:45:45 +00:00
< span title = "{{lang.phrases.private_key_note}}" > {{lang.words.key|title()}}< / span >
2020-08-11 09:54:03 +00:00
< / td >
< td > < / td >
< / tr >
2024-02-04 07:28:17 +00:00
< tr >
< td class = "first-collumn padding10" style = "padding-top: 15px;" >
2020-08-11 09:54:03 +00:00
< select id = "ssh-key-name" >
2023-02-13 14:45:45 +00:00
< option disabled selected > ------< / option >
2020-08-11 09:54:03 +00:00
{% for ssh in sshs %}
2021-08-02 08:19:22 +00:00
< option value = {{ssh.name}} > {{ssh.name}}< / option >
2020-08-11 09:54:03 +00:00
{% endfor %}
< / select >
< / td >
2024-02-04 07:28:17 +00:00
< td > {{ input('ssh-key-pass', title=lang.phrases.ssh_passphrase, type='password') }}< / td >
2020-08-11 09:54:03 +00:00
< td style = "padding-top: 15px;" >
< textarea id = "ssh_cert" cols = "50" rows = "5" > < / textarea > < br / > < br / >
2023-02-13 14:45:45 +00:00
< a class = "ui-button ui-widget ui-corner-all" id = "ssh_key_upload" title = "{{lang.words.upload|title()}} SSH {{lang.words.key}}" onclick = "uploadSsh()" > {{lang.words.upload|title()}}< / a >
2020-08-11 09:54:03 +00:00
< / td >
< td > < / td >
< / tr >
< / table >
< div id = "ajax-ssh" > < / div >
2021-06-02 07:28:07 +00:00
< div class = "add-note alert addName alert-info" style = "width: inherit; margin-right: 15px;" >
2023-02-13 14:45:45 +00:00
{{lang.phrases.read_about_parameters}} < a href = "https://roxy-wi.org/description/creds" title = "Servers description" target = "_blank" > {{lang.words.here}}< / a > .
{{lang.phrases.read_howto}} < a href = "https://roxy-wi.org/howto/setup" title = "How to setup servers, group and SSH credentials" target = "_blank" > {{lang.words.article}}< / a >
2022-07-30 17:00:36 +00:00
< / div >