1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2024-11-01 03:54:15 +00:00

Merge pull request #628 from kuletco/work

fix bug and update translations for zh
This commit is contained in:
catborise 2023-12-13 09:30:24 +03:00 committed by GitHub
commit bbe9e54395
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 1058 additions and 1239 deletions

View file

@ -16,7 +16,7 @@
{% if not computes %}
<div class="col-lg-12">
<div class="alert alert-warning shadow-sm">
{% bs_icon 'exclamation-triangle '%} <strong>{% trans "Warning" %}:</strong> {% trans "You don't have any computes" %}
{% bs_icon 'exclamation-triangle'%} <strong>{% trans "Warning" %}:</strong> {% trans "You don't have any computes" %}
</div>
</div>
{% else %}

View file

@ -15,16 +15,17 @@ class FlavorForm(forms.ModelForm):
class ConsoleForm(forms.Form):
type = forms.ChoiceField()
listen_on = forms.ChoiceField()
generate_password = forms.BooleanField(required=False)
clear_password = forms.BooleanField(required=False)
type = forms.ChoiceField(label=_("Type"))
listen_on = forms.ChoiceField(label=_("Listen on"))
generate_password = forms.BooleanField(label=_("Generate password"), required=False)
clear_password = forms.BooleanField(label=_("Clear password"), required=False)
password = forms.CharField(
label=_("Password"),
widget=forms.PasswordInput(render_value=True),
required=False
)
clear_keymap = forms.BooleanField(required=False)
keymap = forms.ChoiceField(required=False)
clear_keymap = forms.BooleanField(label=_("Clear keymap"), required=False)
keymap = forms.ChoiceField(label=_("Keymap"), required=False)
def __init__(self, *args, **kwargs):
super(ConsoleForm, self).__init__(*args, **kwargs)
@ -32,12 +33,13 @@ class ConsoleForm(forms.Form):
(c, c)
for c in AppSettings.objects.get(key="QEMU_CONSOLE_DEFAULT_TYPE").choices_as_list()
)
keymap_choices = [("auto", "Auto")] + list((c, c) for c in QEMU_KEYMAPS)
self.fields["type"] = forms.ChoiceField(choices=type_choices)
keymap_choices = [("auto", _("Auto"))] + list((c, c) for c in QEMU_KEYMAPS)
self.fields["type"] = forms.ChoiceField(label=_("Type"), choices=type_choices)
self.fields["listen_on"] = forms.ChoiceField(
label=_("Listen on"),
choices=QEMU_CONSOLE_LISTENER_ADDRESSES
)
self.fields["keymap"] = forms.ChoiceField(choices=keymap_choices)
self.fields["keymap"] = forms.ChoiceField(label=_("Keymap"), choices=keymap_choices)
class NewVMForm(forms.ModelForm):

View file

@ -265,15 +265,15 @@
data-trigger="focus"
data-bs-toggle="popover"
data-bs-html="true"
data-bs-content="<strong>Bus:</strong> {{ disk.bus }} <br/>
<strong>Format:</strong> {{ disk.format }} <br/>
<strong>Cache:</strong> {{ disk.cache }} <br/>
<strong>Serial:</strong> {{ disk.serial }} <br/>
<strong>Readonly:</strong> {{ disk.readonly }} <br/>
<strong>Shareable:</strong> {{ disk.shareable }}</br>
<strong>IO Mode:</strong> {{ disk.io }} <br/>
<strong>Discard:</strong> {{ disk.discard }} <br/>
<strong>Detect Zeroes:</strong> {{ disk.detect_zeroes }}">
data-bs-content="<strong>{% trans 'Bus' %}:</strong> {{ disk.bus }} <br/>
<strong>{% trans 'Format' %}:</strong> {{ disk.format }} <br/>
<strong>{% trans 'Cache' %}:</strong> {{ disk.cache }} <br/>
<strong>{% trans 'Serial' %}:</strong> {{ disk.serial }} <br/>
<strong>{% trans 'Readonly' %}:</strong> {{ disk.readonly }} <br/>
<strong>{% trans 'Shareable' %}:</strong> {{ disk.shareable }}</br>
<strong>{% trans 'IO Mode' %}:</strong> {{ disk.io }} <br/>
<strong>{% trans 'Discard' %}:</strong> {{ disk.discard }} <br/>
<strong>{% trans 'Detect Zeroes' %}:</strong> {{ disk.detect_zeroes }}">
<span>{% bs_icon 'info' %} </span>
</button>
{{ disk.dev }}

Binary file not shown.

File diff suppressed because it is too large Load diff

View file

@ -6,6 +6,7 @@ Django settings for webvirtcloud project.
import ldap
import subprocess
from django_auth_ldap.config import LDAPSearch, NestedActiveDirectoryGroupType
from django.utils.translation import gettext_lazy as _
from pathlib import Path
# Build paths inside the project like this: BASE_DIR / 'subdir'.
@ -213,8 +214,8 @@ SOCKETIO_PUBLIC_PATH = "socket.io/"
# List of console listen addresses
QEMU_CONSOLE_LISTENER_ADDRESSES = (
("127.0.0.1", "Localhost"),
("0.0.0.0", "All interfaces"),
("127.0.0.1", _("Localhost")),
("0.0.0.0", _("All interfaces")),
)
# List taken from http://qemu.weilnetz.de/qemu-doc.html#sec_005finvocation