Commit 508c3f8a authored by dani rusdan's avatar dani rusdan

dashboard

parent 65a7b1ce
......@@ -107,5 +107,6 @@ urlpatterns = [
path('pointBangunan', views.pointBangunan),
path('pointBangunan_', views.pointBangunan_),
path('editperb', views.editperb),
path('loaddashboard', views.loadDashboard, name='loaddashboard'),
]
\ No newline at end of file
......@@ -4638,3 +4638,49 @@ def editperb(request):
respon={'data':data, 'info': info, 'status':status}
return Response(respon)
@api_view(('GET',))
def loadDashboard(request):
sql = "select * from z_total_data_dash_oku()"
with conn.cursor() as load:
load.execute(sql)
ret = load.fetchall()
columns = load.description
load.close()
colll = []
for i in ret:
column = {}
for n,k in enumerate(columns):
column[k.name] = i[n]
colll.append(column)
if ret:
y = {
'code' : 0,
'info' : 'success',
'data' : colll,
}
else:
y = {
'code' : 1,
'info' : 'not found',
'data' : colll,
}
return Response(y)
......@@ -48,6 +48,11 @@ background: none;border-color: transparent;">
<i class="icon-pie-chart5"></i>
</a>
</li>
<li id="dashboard_e" onmouseover="tooltipOver('Dashboard')" onmouseout="tooltipOut('')">
<a href="#panel-sm3" data-toggle="tab" aria-expanded="false" class="side-bar-but" id="e_dashboard">
<i class="icon-pie-chart5"></i>
</a>
</li>
{% endif %}
<li style="margin-top: 60vh;position: absolute;">
<a href="#" id="btn-hide-all" class="side-bar-but" style="position: absolute; margin-top: 0px; display: block;">
......@@ -861,5 +866,74 @@ background: none;border-color: transparent;">
</div>
<div id="panel-sm3" class="sidebar-2" style="display: none;">
<div style="background: #1B1F2D;position: absolute;z-index: 9;width: 23%;height:100vh;left: 0%;transition: all 0.5s ease;">
<div style="margin-left: 50px;background: #1B1F2D;">
<div class="header" style="margin-top: 25px;background: #2F3445;">
<h6 class="panel-title" style="font-family: 'gilroysemibold';
color: #ffff;
margin-left: 20px;
font-size: 16px;
line-height: 17px;
padding-top: 9px;
padding-bottom: 9px;">Dashboard<a class="heading-elements-toggle"><i class="icon-more"></i></a></h6>
</div>
<div class="bod" style="display : none;margin-top: 10px;margin-left:6px;font-size: 12px;">
<div style="color: white;">
<span>Filter:</span>
</div>
<div class="form-group" style="margin-top: 15px;width: 98%;">
<select name="select" id="sel-kec" class="form-control input-sm" style="background-color: #393E54;border-radius: 8px;border-color: #393E54;color: white;">
<option value="all_kecamatan">Pilih Kecamatan</option>
{% for nama_kecamatan in kecamatan %}
<option value="{{nama_kecamatan.administrasi.f1}}">{{nama_kecamatan.administrasi.f2}}</option>
{% endfor %}
</select>
</div>
<div class="form-group" style="margin-top: 15px;width: 98%;">
<select name="select" id="sel-desa" class="form-control input-sm" style="background-color: #393E54;border-radius: 8px;border-color: #393E54;color: white;">
<option value="opt1">Pilih Desa</option>
</select>
</div>
</div>
</div>
</div>
<div class="panel panel-flat " id="perbaikan-dashboards" style="background: #181B27;position: absolute;z-index: 9;width: 77%;height:100vh;left: 23%;transition: all 0.5s ease;color: white; border: none; overflow-y: scroll; ">
<div class="panel-body " style="padding:14px 0px;">
<table class="table table-responsive datatable-show-all table-sm bg-slate-610 list_perb" id="list_perbaikan" style="font-size : 8pt;padding:0px;border-top:0.5pt solid #343434;border-bottom:0.5pt solid #343434;margin-bottom: 10px;">
<div class="container-detached">
<div class="content-detached" style="margin-top: 30px;">
<div class="chart-container">
<div class="col-md-6">
<span id="connect_columnBatasWilayah" class="chart has-fixed-height " style="height: 100%;display: block;"></span>
</div>
<div class="col-md-6">
<span id="connect_columnBangunanJalan" class="chart has-fixed-height " style="height: 100%;display: block;"></span>
</div>
<div class="col-md-12" style="margin-top: 30px;">
<span id="connect_columnFasilitasUmum" class="chart has-fixed-height " style="height: 100%;display: block;"></span>
</div>
<div class="col-md-12" style="margin-top: 30px;">
<span id="connect_columnKantorPemerintahan" class="chart has-fixed-height " style="height: 100%;display: block;"></span>
</div>
</div>
</div>
</div>
</table>
</div>
</div>
</div>
<div id="panel-sm-kosong " class="sidebar-2 " style="display:none;background: #1B1F2D;position: absolute;z-index: 1;left: 0%;transition: all 0.5s ease; ">
</div>
\ No newline at end of file
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment