diff --git a/dashboards/static/dashboards/.sass-cache/d1f4112ca6d0e14bdf64d22b0b14a2322f24cc83/general.sassc b/dashboards/static/dashboards/.sass-cache/d1f4112ca6d0e14bdf64d22b0b14a2322f24cc83/general.sassc index 4e9f622..e0da2bc 100644 Binary files a/dashboards/static/dashboards/.sass-cache/d1f4112ca6d0e14bdf64d22b0b14a2322f24cc83/general.sassc and b/dashboards/static/dashboards/.sass-cache/d1f4112ca6d0e14bdf64d22b0b14a2322f24cc83/general.sassc differ diff --git a/dashboards/static/dashboards/css/dataTables.bootstrap.min.css b/dashboards/static/dashboards/css/dataTables.bootstrap.min.css new file mode 100644 index 0000000..66a70ab --- /dev/null +++ b/dashboards/static/dashboards/css/dataTables.bootstrap.min.css @@ -0,0 +1 @@ +table.dataTable{clear:both;margin-top:6px !important;margin-bottom:6px !important;max-width:none !important;border-collapse:separate !important}table.dataTable td,table.dataTable th{-webkit-box-sizing:content-box;box-sizing:content-box}table.dataTable td.dataTables_empty,table.dataTable th.dataTables_empty{text-align:center}table.dataTable.nowrap th,table.dataTable.nowrap td{white-space:nowrap}div.dataTables_wrapper div.dataTables_length label{font-weight:normal;text-align:left;white-space:nowrap}div.dataTables_wrapper div.dataTables_length select{width:75px;display:inline-block}div.dataTables_wrapper div.dataTables_filter{text-align:right}div.dataTables_wrapper div.dataTables_filter label{font-weight:normal;white-space:nowrap;text-align:left}div.dataTables_wrapper div.dataTables_filter input{margin-left:0.5em;display:inline-block;width:auto}div.dataTables_wrapper div.dataTables_info{padding-top:8px;white-space:nowrap}div.dataTables_wrapper div.dataTables_paginate{margin:0;white-space:nowrap;text-align:right}div.dataTables_wrapper div.dataTables_paginate ul.pagination{margin:2px 0;white-space:nowrap}div.dataTables_wrapper div.dataTables_processing{position:absolute;top:50%;left:50%;width:200px;margin-left:-100px;margin-top:-26px;text-align:center;padding:1em 0}table.dataTable thead>tr>th.sorting_asc,table.dataTable thead>tr>th.sorting_desc,table.dataTable thead>tr>th.sorting,table.dataTable thead>tr>td.sorting_asc,table.dataTable thead>tr>td.sorting_desc,table.dataTable thead>tr>td.sorting{padding-right:30px}table.dataTable thead>tr>th:active,table.dataTable thead>tr>td:active{outline:none}table.dataTable thead .sorting,table.dataTable thead .sorting_asc,table.dataTable thead .sorting_desc,table.dataTable thead .sorting_asc_disabled,table.dataTable thead .sorting_desc_disabled{cursor:pointer;position:relative}table.dataTable thead .sorting:after,table.dataTable thead .sorting_asc:after,table.dataTable thead .sorting_desc:after,table.dataTable thead .sorting_asc_disabled:after,table.dataTable thead .sorting_desc_disabled:after{position:absolute;bottom:8px;right:8px;display:block;font-family:'Glyphicons Halflings';opacity:0.5}table.dataTable thead .sorting:after{opacity:0.2;content:"\e150"}table.dataTable thead .sorting_asc:after{content:"\e155"}table.dataTable thead .sorting_desc:after{content:"\e156"}table.dataTable thead .sorting_asc_disabled:after,table.dataTable thead .sorting_desc_disabled:after{color:#eee}div.dataTables_scrollHead table.dataTable{margin-bottom:0 !important}div.dataTables_scrollBody>table{border-top:none;margin-top:0 !important;margin-bottom:0 !important}div.dataTables_scrollBody>table>thead .sorting:after,div.dataTables_scrollBody>table>thead .sorting_asc:after,div.dataTables_scrollBody>table>thead .sorting_desc:after{display:none}div.dataTables_scrollBody>table>tbody>tr:first-child>th,div.dataTables_scrollBody>table>tbody>tr:first-child>td{border-top:none}div.dataTables_scrollFoot>table{margin-top:0 !important;border-top:none}@media screen and (max-width: 767px){div.dataTables_wrapper div.dataTables_length,div.dataTables_wrapper div.dataTables_filter,div.dataTables_wrapper div.dataTables_info,div.dataTables_wrapper div.dataTables_paginate{text-align:center}}table.dataTable.table-condensed>thead>tr>th{padding-right:20px}table.dataTable.table-condensed .sorting:after,table.dataTable.table-condensed .sorting_asc:after,table.dataTable.table-condensed .sorting_desc:after{top:6px;right:6px}table.table-bordered.dataTable th,table.table-bordered.dataTable td{border-left-width:0}table.table-bordered.dataTable th:last-child,table.table-bordered.dataTable th:last-child,table.table-bordered.dataTable td:last-child,table.table-bordered.dataTable td:last-child{border-right-width:0}table.table-bordered.dataTable tbody th,table.table-bordered.dataTable tbody td{border-bottom-width:0}div.dataTables_scrollHead table.table-bordered{border-bottom-width:0}div.table-responsive>div.dataTables_wrapper>div.row{margin:0}div.table-responsive>div.dataTables_wrapper>div.row>div[class^="col-"]:first-child{padding-left:0}div.table-responsive>div.dataTables_wrapper>div.row>div[class^="col-"]:last-child{padding-right:0} diff --git a/dashboards/static/dashboards/css/general.css b/dashboards/static/dashboards/css/general.css index 5d34b9f..6bee4c0 100644 --- a/dashboards/static/dashboards/css/general.css +++ b/dashboards/static/dashboards/css/general.css @@ -17,7 +17,8 @@ width: 50%; margin-bottom: 0px; } #general-report-header ul a { - width: 100%; } + width: 100%; + text-decoration: none; } li.tab-option { margin-right: 2%; @@ -28,6 +29,8 @@ li.tab-option { text-align: center; border-radius: 20px; height: 30px; } + li.tab-option:hover { + background-color: #bdbdbd; } li.selected { background-color: #4dcfbd; diff --git a/dashboards/static/dashboards/css/general.css.map b/dashboards/static/dashboards/css/general.css.map index 87cd739..3cf0477 100644 --- a/dashboards/static/dashboards/css/general.css.map +++ b/dashboards/static/dashboards/css/general.css.map @@ -1,6 +1,6 @@ { "version": 3, -"mappings": "AAEA,YAAY;EACR,MAAM,EAAE,iBAAiB;EACzB,aAAa,EAAE,IAAI;EACnB,OAAO,EAAE,IAAI;EACb,QAAQ,EAAE,IAAI;EACd,KAAK,EAAE,IAAI;EACX,gBAAgB,EAAE,OAAO;;AAE7B,sBAAsB;EAClB,MAAM,EAAE,GAAG;EACX,OAAO,EAAE,KAAK;EACd,yBAAE;IACE,KAAK,EAdC,OAAO;EAgBjB,yBAAE;IACE,KAAK,EAAE,KAAK;IACZ,OAAO,EAAE,WAAW;IACpB,KAAK,EAAE,GAAG;IACV,aAAa,EAAE,GAAG;IAElB,2BAAC;MACG,KAAK,EAAE,IAAI;;AAGvB,aAAa;EACT,YAAY,EAAE,EAAE;EAChB,KAAK,EAAE,KAAK;EACZ,SAAS,EAAE,IA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E,IAAI;;AAGxB,0BAA0B;EACtB,YAAY,EAAE,IAAI;EAClB,WAAW,EAAE,IAAI;EACjB,YAAY,EAAE,sBAAsB;EACpC,mBAAmB,EAAE,OAAO;;AAEhC,yBAAyB;EACrB,gBAAgB,EAAE,OAAO;;AAG7B,mBAAmB;EACf,UAAU,EAAE,MAAM;EAClB,KAAK,EAAE,OAAO;;AAElB,aAAa;EACT,KAAK,EAAE,IAAI;EACX,MAAM,EAAE,IAAI;EACZ,UAAU,EAAE,OAAO;EACnB,KAAK,EAAE,KAAK;EACZ,UAAU,EAAE,MAAM;;AAKtB,gBAAgB;EACZ,OAAO,EAAE,IAAI;;AAIjB,UAAU;EACN,KAAK,EAAE,IAAI;EACX,MAAM,EAAE,iBAAiB;EACzB,aAAE;IACE,MAAM,EAAE,IAAI;IACZ,4BAAgB;MACZ,gBAAgB,EAAE,OAAO;IAC7B,6BAAiB;MACb,gBAAgB,EAAE,KAAK;IAE3B,gBAAE;MACE,YAAY,EAAE,EAAE;MAChB,aAAa,EAAE,EAAE;;AAE7B,UAAU;EACN,UAAU,EAAE,MAAM;;AAEtB,WAAW;EACP,OAAO,EAAE,YAAY;EACrB,aAAC;IACG,KAAK,EAAE,KAAK;IACZ,KAAK,EAAE,IAAI;IACX,OAAO,EAAE,QAAQ;IACjB,eAAe,EAAE,IAAI;EAEzB,oBAAQ;IACJ,gBAAgB,EAAE,OAAO;IACzB,KAAK,EAAE,KAAK;EAEhB,gCAAoB;IAChB,gBAAgB,EAAE,IAAI", "sources": ["general.sass"], "names": [], "file": "general.css" diff --git a/dashboards/static/dashboards/css/general.sass b/dashboards/static/dashboards/css/general.sass index 7aee78f..63efc0c 100644 --- a/dashboards/static/dashboards/css/general.sass +++ b/dashboards/static/dashboards/css/general.sass @@ -22,7 +22,8 @@ $title-color: #009688 a width: 100% - + text-decoration: none + li.tab-option margin-right: 2% @@ -33,7 +34,8 @@ li.tab-option text-align: center border-radius: 20px height: 30px - + &:hover + background-color: #bdbdbd li.selected background-color: #4dcfbd diff --git a/dashboards/static/dashboards/js/behavior.js b/dashboards/static/dashboards/js/behavior.js index cfc31c6..393939c 100644 --- a/dashboards/static/dashboards/js/behavior.js +++ b/dashboards/static/dashboards/js/behavior.js @@ -114,7 +114,7 @@ var selectors_options = { $(e).after(string_build); var new_elem = $(e).next(); new_elem.slideDown({easing: 'easeInOutSine'}, 5000); - $(e).attr("opened", true); + $(e).attr("opened"); }, deleteChildren: function(e){ diff --git a/dashboards/static/dashboards/js/logbehavior.js b/dashboards/static/dashboards/js/logbehavior.js index 3730554..4c0e924 100644 --- a/dashboards/static/dashboards/js/logbehavior.js +++ b/dashboards/static/dashboards/js/logbehavior.js @@ -1,10 +1,17 @@ $(document).ready(function(){ - $('#init_date').datetimepicker(); + d = new Date(); + d.setDate(d.getDate() - 30); + $('#init_date').datetimepicker({ + defaultDate: d, + }); $('#end_date').datetimepicker({ - useCurrent: false //Important! See issue #1075 + useCurrent: false, //Important! See issue #1075 + defaultDate: new Date() }); $("#init_date").on("dp.change", function (e) { $('#end_date').data("DateTimePicker").minDate(e.date); + end_date = $("#end_date").data("DateTimePicker").date(); + log.refresh_log_data(e.date, end_date); }); $("#end_date").on("dp.change", function (e) { $('#init_date').data("DateTimePicker").maxDate(e.date); @@ -12,8 +19,10 @@ $(document).ready(function(){ init_date = $("#init_date").data("DateTimePicker").date(); log.refresh_log_data(init_date, e.date); }); - - + //initialize the table with log from last 30 days + init_date = $("#init_date").data("DateTimePicker").date(); + end_date = $("#end_date").data("DateTimePicker").date(); + log.refresh_log_data(init_date, end_date); }); @@ -29,15 +38,13 @@ var log = { render_table: function(target_id, data){ table_body = $('#' + target_id); + tables = $('#log-table_wrapper'); + if (tables.length > 0){ + $(tables).remove(); + } content = "
Datetime | Usuário | Components | Recurso | Ação | " + "Categoria | Assunto | Contexto | " diff --git a/dashboards/templates/dashboards/general.html b/dashboards/templates/dashboards/general.html index 798e1b8..b390671 100644 --- a/dashboards/templates/dashboards/general.html +++ b/dashboards/templates/dashboards/general.html @@ -10,6 +10,7 @@ {% endblock style %} {% block javascript %} + {% for file in javascript_files %} {% endfor %} diff --git a/dashboards/templates/dashboards/log.html b/dashboards/templates/dashboards/log.html index 43614bf..887d5f7 100644 --- a/dashboards/templates/dashboards/log.html +++ b/dashboards/templates/dashboards/log.html @@ -2,21 +2,9 @@ {% load django_bootstrap_breadcrumbs %}
---|