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":
|
if imagename == "base" and imagetype == "base":
|
||||||
return 0
|
return 0
|
||||||
if imagetype == "private":
|
if imagetype == "private":
|
||||||
imgpath = self.imgpath + "private/" + user + "/"
|
imgpath = self.imgpath + "private/" + imageowner + "/"
|
||||||
else:
|
else:
|
||||||
imgpath = self.imgpath + "public/" + imageowner + "/"
|
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):
|
def format_size(self, size_in_byte):
|
||||||
|
|
|
@ -32,8 +32,8 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="box-body">
|
<div class="box-body">
|
||||||
<div class="table table-responsive">
|
<div class="table">
|
||||||
<table class="table table-striped table-bordered table-hover table-image" >
|
<table width="100%" cellspacing="0" style="margin:0 auto;" class="table table-striped table-bordered table-hover table-history" >
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>NO</th>
|
<th>NO</th>
|
||||||
|
@ -65,17 +65,14 @@
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block script_src %}
|
{% block script_src %}
|
||||||
<script src="//cdn.bootcss.com/jquery/2.2.1/jquery.min.js"></script>
|
<script src="//cdn.bootcss.com/datatables/1.10.11/js/jquery.dataTables.min.js"></script>
|
||||||
<script src="http://cdn.bootcss.com/datatables/1.10.11/js/jquery.dataTables.js"></script>
|
<script src="//cdn.bootcss.com/datatables/1.10.11/js/dataTables.bootstrap.min.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>
|
<script>
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
$(".table-image").DataTable();
|
$(".table-history").DataTable({"scrollX":true});
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue