Fixed for 2.1 finsl

This commit is contained in:
Adolfo Gómez García 2017-06-13 08:08:00 +02:00
parent de5e7380c4
commit e5d2c711ce
2 changed files with 27 additions and 26 deletions

View File

@ -216,29 +216,30 @@ gui.providers.link = (event) ->
prevTables.push servicesTable
prevTables.push logTable
usageAPI = api.providers.detail(id, "usage", { permission: selected[0].permission })
usage = new GuiElement(usageAPI, "usage-" + selected[0].type)
usageTable = usage.table(
icon: 'usage'
container: "usage-placeholder"
doNotLoadData: true
rowSelect: "multi"
onData: (data) ->
$.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.pool = gui.fastLink(value.pool, value.pool_id, 'gui.providers.fastLink', 'goPoolLink')
buttons: [
"delete"
"xls"
]
onDelete: gui.methods.del(usage, gettext("Delete user service"), gettext("User service deletion error"),)
scrollToTable: false
onLoad: (k) ->
gui.tools.unblockUI()
return
)
# usageAPI = api.providers.detail(id, "usage", { permission: selected[0].permission })
# usage = new GuiElement(usageAPI, "usage-" + selected[0].type)
# usageTable = usage.table(
# icon: 'usage'
# container: "usage-placeholder"
# doNotLoadData: true
# rowSelect: "multi"
#
# onData: (data) ->
# $.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.pool = gui.fastLink(value.pool, value.pool_id, 'gui.providers.fastLink', 'goPoolLink')
#
# buttons: [
# "delete"
# "xls"
# ]
# onDelete: gui.methods.del(usage, gettext("Delete user service"), gettext("User service deletion error"),)
# scrollToTable: false
# onLoad: (k) ->
# gui.tools.unblockUI()
# return
# )
# prevTables.push usageTable
return

View File

@ -29,7 +29,7 @@
<ul class="bottom_tabs nav nav-tabs">
<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="#{{ 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>
</ul>
<div class="tab-content">
@ -47,12 +47,12 @@
</div>
</div>
</div>
<div class="tab-pane fade" id="{{ usage }}_tab">
<!-- <div class="tab-pane fade" id="{{ usage }}_tab">
<div class="row">
<div class="col-xs-12" id="{{ usage }}">
</div>
</div>
</div>
</div> -->
<div class="tab-pane fade" id="{{ logs }}">...</div>
</div>
</div>