mirror of
https://github.com/ziirish/burp-ui.git
synced 2026-05-21 06:45:24 -06:00
handle localized status
This commit is contained in:
parent
328afb8c56
commit
d298af8efa
3 changed files with 5 additions and 3 deletions
|
|
@ -986,7 +986,7 @@ class ClientRunningStatus(Resource):
|
|||
)
|
||||
parser.add_argument('clientName', help='Client name')
|
||||
running_fields = ns.model('ClientRunningStatus', {
|
||||
'state': fields.String(required=True, description='Running state'),
|
||||
'state': fields.LocalizedString(required=True, description='Running state'),
|
||||
'percent': fields.Integer(
|
||||
required=False,
|
||||
description='Backup progress in percent',
|
||||
|
|
|
|||
|
|
@ -195,7 +195,7 @@ var refresh_status = function( is_running ) {
|
|||
var _content = '<span class="'+__icons[status.state]+'" aria-hidden="true"></span> ';
|
||||
if (status.state == 'running') {
|
||||
_client_running = true;
|
||||
_content += __translate[status.state]+' - '+status.phase;
|
||||
_content += status.state+' - '+status.phase;
|
||||
if (status.percent > 0) {
|
||||
_content += ' ('+status.percent+'%)';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,6 +18,8 @@ var __translate = {
|
|||
"server crashed": "{{ _('server crashed') }}",
|
||||
"running": "{{ _('running') }}",
|
||||
"idle": "{{ _('idle') }}",
|
||||
"never": "{{ _('never') }}",
|
||||
"now": "{{ _('now') }}",
|
||||
};
|
||||
|
||||
/***
|
||||
|
|
@ -95,7 +97,7 @@ var _clients_table = $('#table-clients').DataTable( {
|
|||
render: function ( data, type, row ) {
|
||||
var result = data.state;
|
||||
if (data.state == "{{ _('running') }}" && data.static) {
|
||||
result = __translate[data.state]+' - '+data.phase;
|
||||
result = data.state+' - '+data.phase;
|
||||
if (data.percent > 0) {
|
||||
result += ' ('+data.percent+'%)';
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue