Merge pull request #356 from FirmlyReality/master
Fix some bugs on history.html and imagemgr
This commit is contained in:
commit
198a601eed
|
@ -387,10 +387,10 @@ class ImageMgr():
|
|||
if imagename == "base" and imagetype == "base":
|
||||
return 0
|
||||
if imagetype == "private":
|
||||
imgpath = self.imgpath + "private/" + user + "/"
|
||||
imgpath = self.imgpath + "private/" + imageowner + "/"
|
||||
else:
|
||||
imgpath = self.imgpath + "public/" + imageowner + "/"
|
||||
return os.stat(os.path.join(imgpath, imagename)).st_size // (1024*1024)
|
||||
return os.stat(os.path.join(imgpath, imagename+".tz")).st_size // (1024*1024)
|
||||
|
||||
|
||||
def format_size(self, size_in_byte):
|
||||
|
|
|
@ -32,8 +32,8 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="table table-responsive">
|
||||
<table class="table table-striped table-bordered table-hover table-image" >
|
||||
<div class="table">
|
||||
<table width="100%" cellspacing="0" style="margin:0 auto;" class="table table-striped table-bordered table-hover table-history" >
|
||||
<thead>
|
||||
<tr>
|
||||
<th>NO</th>
|
||||
|
@ -65,17 +65,14 @@
|
|||
{% endblock %}
|
||||
|
||||
{% block script_src %}
|
||||
<script src="//cdn.bootcss.com/jquery/2.2.1/jquery.min.js"></script>
|
||||
<script src="http://cdn.bootcss.com/datatables/1.10.11/js/jquery.dataTables.js"></script>
|
||||
<script src="http://cdn.bootcss.com/datatables/1.10.11/js/dataTables.bootstrap.js"></script>
|
||||
<script src="http://cdn.bootcss.com/datatables-tabletools/2.1.5/js/TableTools.min.js"></script>
|
||||
<script src="//cdn.bootcss.com/datatables/1.10.11/js/jquery.dataTables.min.js"></script>
|
||||
<script src="//cdn.bootcss.com/datatables/1.10.11/js/dataTables.bootstrap.min.js"></script>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$(".table-image").DataTable();
|
||||
$(".table-history").DataTable({"scrollX":true});
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
|
|
Loading…
Reference in New Issue