added usage list to providers

This commit is contained in:
Adolfo Gómez García 2017-06-20 08:11:41 +02:00
parent ac245e71e9
commit 09a48c9c5a
3 changed files with 28 additions and 29 deletions

View File

@ -14,7 +14,7 @@ gui.calendars.link = ->
return return
freqDct = freqDct =
'DAILY': [gettext('day'), gettext('days'), gettext('Dayly')] 'DAILY': [gettext('day'), gettext('days'), gettext('Daily')]
'WEEKLY': [gettext('week'), gettext('weeks'), gettext('Weekly')] 'WEEKLY': [gettext('week'), gettext('weeks'), gettext('Weekly')]
'MONTHLY': [gettext('month'), gettext('months'), gettext('Monthly')] 'MONTHLY': [gettext('month'), gettext('months'), gettext('Monthly')]
'YEARLY': [gettext('year'), gettext('years'), gettext('Yearly')] 'YEARLY': [gettext('year'), gettext('years'), gettext('Yearly')]
@ -45,7 +45,6 @@ gui.calendars.link = ->
return gettext("(no days)") return gettext("(no days)")
return res.join(', ') return res.join(', ')
renderer = (fld, data, type, record) -> renderer = (fld, data, type, record) ->
# Display "custom" fields of rules table # Display "custom" fields of rules table
if fld == "interval" if fld == "interval"

View File

@ -216,30 +216,30 @@ gui.providers.link = (event) ->
prevTables.push servicesTable prevTables.push servicesTable
prevTables.push logTable prevTables.push logTable
# usageAPI = api.providers.detail(id, "usage", { permission: selected[0].permission }) usageAPI = api.providers.detail(id, "usage", { permission: selected[0].permission })
# usage = new GuiElement(usageAPI, "usage-" + selected[0].type) usage = new GuiElement(usageAPI, "usage-" + selected[0].type)
# usageTable = usage.table( usageTable = usage.table(
# icon: 'usage' icon: 'usage'
# container: "usage-placeholder" container: "usage-placeholder"
# doNotLoadData: true doNotLoadData: true
# rowSelect: "multi" rowSelect: "multi"
#
# onData: (data) -> onData: (data) ->
# $.each data, (index, value) -> $.each data, (index, value) ->
# value.owner = gui.fastLink(value.owner.replace /@/, '<span class="text-danger">@</span>', "#{value.owner_info.auth_id},u#{value.owner_info.user_id}", 'gui.providers.fastLink', 'goAuthLink') value.owner = gui.fastLink(value.owner.replace /@/, '<span class="text-danger">@</span>', "#{value.owner_info.auth_id},u#{value.owner_info.user_id}", 'gui.providers.fastLink', 'goAuthLink')
# value.pool = gui.fastLink(value.pool, value.pool_id, 'gui.providers.fastLink', 'goPoolLink') value.pool = gui.fastLink(value.pool, value.pool_id, 'gui.providers.fastLink', 'goPoolLink')
#
# buttons: [ buttons: [
# "delete" "delete"
# "xls" "xls"
# ] ]
# onDelete: gui.methods.del(usage, gettext("Delete user service"), gettext("User service deletion error"),) onDelete: gui.methods.del(usage, gettext("Delete user service"), gettext("User service deletion error"),)
# scrollToTable: false scrollToTable: false
# onLoad: (k) -> onLoad: (k) ->
# gui.tools.unblockUI() gui.tools.unblockUI()
# return return
# ) )
# prevTables.push usageTable prevTables.push usageTable
return return

View File

@ -29,7 +29,7 @@
<ul class="bottom_tabs nav nav-tabs"> <ul class="bottom_tabs nav nav-tabs">
<li class="active"><a href="#{{ provider_info }}" data-toggle="tab">{% endverbatim %}{% trans 'Overview' %}{% verbatim %}</a></li> <li class="active"><a href="#{{ provider_info }}" data-toggle="tab">{% endverbatim %}{% trans 'Overview' %}{% verbatim %}</a></li>
<li><a href="#{{ services }}_tab" data-toggle="tab">{% endverbatim %}{% trans 'Services' %}{% verbatim %}</a></li> <li><a href="#{{ services }}_tab" data-toggle="tab">{% endverbatim %}{% trans 'Services' %}{% verbatim %}</a></li>
<!-- <li><a href="#{{ usage }}_tab" data-toggle="tab">{% endverbatim %}{% trans 'Usage' %}{% verbatim %}</a></li> --> <li><a href="#{{ usage }}_tab" data-toggle="tab">{% endverbatim %}{% trans 'Usage' %}{% verbatim %}</a></li>
<li><a href="#{{ logs }}" data-toggle="tab">{% endverbatim %}{% trans 'Logs' %}{% verbatim %}</a></li> <li><a href="#{{ logs }}" data-toggle="tab">{% endverbatim %}{% trans 'Logs' %}{% verbatim %}</a></li>
</ul> </ul>
<div class="tab-content"> <div class="tab-content">
@ -47,12 +47,12 @@
</div> </div>
</div> </div>
</div> </div>
<!-- <div class="tab-pane fade" id="{{ usage }}_tab"> <div class="tab-pane fade" id="{{ usage }}_tab">
<div class="row"> <div class="row">
<div class="col-xs-12" id="{{ usage }}"> <div class="col-xs-12" id="{{ usage }}">
</div> </div>
</div> </div>
</div> --> </div>
<div class="tab-pane fade" id="{{ logs }}">...</div> <div class="tab-pane fade" id="{{ logs }}">...</div>
</div> </div>
</div> </div>