mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-10-17 05:41:25 +02:00
Fixed resource usage display in domain list
This commit is contained in:
@@ -104,10 +104,28 @@
|
||||
<DNSStatusChip :status="item.dns_global_status" />
|
||||
</td>
|
||||
<td>
|
||||
<v-progress-linear v-model="item.allocated_quota_in_percent" />
|
||||
<v-progress-linear
|
||||
v-if="item.message_limit"
|
||||
:color="
|
||||
item.sent_messages_in_percent < 80 ? 'primary' : 'warning'
|
||||
"
|
||||
:model-value="item.sent_messages_in_percent"
|
||||
/>
|
||||
<span v-else>
|
||||
{{ $gettext('Unlimited') }}
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<v-progress-linear v-model="item.allocated_quota_in_percent" />
|
||||
<v-progress-linear
|
||||
v-if="item.quota !== '0'"
|
||||
:color="
|
||||
item.allocated_quota_in_percent < 80 ? 'primary' : 'warning'
|
||||
"
|
||||
:model-value="item.allocated_quota_in_percent"
|
||||
/>
|
||||
<span v-else>
|
||||
{{ $gettext('Unlimited') }}
|
||||
</span>
|
||||
</td>
|
||||
<td v-if="canSetRole">
|
||||
<div class="text-right">
|
||||
|
||||
@@ -26,11 +26,18 @@
|
||||
}}</v-col>
|
||||
<v-col v-else cols="6">{{ domain.default_mailbox_quota }} MB</v-col>
|
||||
</v-row>
|
||||
<v-row v-if="domain.message_limit !== undefined">
|
||||
<v-row>
|
||||
<v-col cols="6">{{ $gettext('Daily sending limit') }}</v-col>
|
||||
<v-col cols="6"
|
||||
<v-col
|
||||
v-if="
|
||||
domain.message_limit !== undefined && domain.message_limit !== null
|
||||
"
|
||||
cols="6"
|
||||
>{{ domain.message_limit }} {{ $gettext('messages') }}</v-col
|
||||
>
|
||||
<v-col v-else cols="6">
|
||||
{{ $gettext('Unlimited') }}
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row>
|
||||
<v-col cols="6">{{ $gettext('Mailboxes') }}</v-col>
|
||||
|
||||
@@ -68,12 +68,18 @@ class DomainSerializer(serializers.ModelSerializer):
|
||||
"message_limit",
|
||||
"creation",
|
||||
"last_modification",
|
||||
"allocated_quota_in_percent",
|
||||
"mailbox_count",
|
||||
"mbalias_count",
|
||||
"domainalias_count",
|
||||
"enable_dns_checks",
|
||||
)
|
||||
read_only_fields = (
|
||||
"pk",
|
||||
"dkim_public_key",
|
||||
"dns_global_status",
|
||||
"allocated_quota_in_percent" "mailbox_count",
|
||||
"allocated_quota_in_percent",
|
||||
"mailbox_count",
|
||||
"mbalias_count",
|
||||
"domainalias_count",
|
||||
"enable_dns_checks",
|
||||
|
||||
@@ -61,6 +61,8 @@ class DomainSerializer(v1_serializers.DomainSerializer):
|
||||
"domain_admin",
|
||||
"transport",
|
||||
"opened_alarms_count",
|
||||
"sent_messages",
|
||||
"sent_messages_in_percent",
|
||||
)
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
|
||||
Reference in New Issue
Block a user