interface/lib/classes/quota_lib.inc.php | ●●●●● patch | view | raw | blame | history | |
interface/web/dashboard/dashlets/limits.php | ●●●●● patch | view | raw | blame | history | |
interface/web/dashboard/dashlets/templates/limits.htm | ●●●●● patch | view | raw | blame | history | |
interface/web/dashboard/dashlets/templates/mailquota.htm | ●●●●● patch | view | raw | blame | history | |
interface/web/dashboard/dashlets/templates/modules.htm | ●●●●● patch | view | raw | blame | history | |
interface/web/dashboard/dashlets/templates/quota.htm | ●●●●● patch | view | raw | blame | history | |
interface/web/dashboard/templates/dashboard.htm | ●●●●● patch | view | raw | blame | history | |
interface/web/themes/default/assets/stylesheets/ispconfig.css | ●●●●● patch | view | raw | blame | history | |
interface/web/themes/default/assets/stylesheets/ispconfig.min.css | ●●●●● patch | view | raw | blame | history | |
interface/web/themes/default/templates/main.tpl.htm | ●●●●● patch | view | raw | blame | history |
interface/lib/classes/quota_lib.inc.php
@@ -14,7 +14,7 @@ //print_r($monitor_data); // select all websites or websites belonging to client $sites = $app->db->queryAllRecords("SELECT * FROM web_domain WHERE active = 'y' AND type = 'vhost'".(($clientid != null)?" AND sys_groupid = (SELECT default_group FROM sys_user WHERE client_id=?)":''), $app->functions->intval($client_id)); $sites = $app->db->queryAllRecords("SELECT * FROM web_domain WHERE active = 'y' AND type = 'vhost'".(($clientid != null)?" AND sys_groupid = (SELECT default_group FROM sys_user WHERE client_id=?)":''), $clientid); //print_r($sites); if(is_array($sites) && !empty($sites)){ @@ -35,6 +35,12 @@ if (!is_numeric($sites[$i]['soft'])) $sites[$i]['soft']=$sites[$i]['soft'][1]; if (!is_numeric($sites[$i]['hard'])) $sites[$i]['hard']=$sites[$i]['hard'][1]; if (!is_numeric($sites[$i]['files'])) $sites[$i]['files']=$sites[$i]['files'][1]; $sites[$i]['used_raw'] = $sites[$i]['used']; $sites[$i]['soft_raw'] = $sites[$i]['soft']; $sites[$i]['hard_raw'] = $sites[$i]['hard']; $sites[$i]['files_raw'] = $sites[$i]['files']; $sites[$i]['used_percentage'] = ($sites[$i]['soft'] > 0 && $sites[$i]['used'] > 0 ? round($sites[$i]['used'] * 100 / $sites[$i]['soft']) : 0); if ($readable) { // colours @@ -109,7 +115,7 @@ //print_r($monitor_data); // select all email accounts or email accounts belonging to client $emails = $app->db->queryAllRecords("SELECT * FROM mail_user".(($clientid != null)? " WHERE sys_groupid = (SELECT default_group FROM sys_user WHERE client_id=?)" : ''), $app->functions->intval($client_id)); $emails = $app->db->queryAllRecords("SELECT * FROM mail_user".(($clientid != null)? " WHERE sys_groupid = (SELECT default_group FROM sys_user WHERE client_id=?)" : ''), $clientid); //print_r($emails); if(is_array($emails) && !empty($emails)){ @@ -120,6 +126,11 @@ if (!is_numeric($emails[$i]['used'])) $emails[$i]['used']=$emails[$i]['used'][1]; $emails[$i]['quota_raw'] = $emails[$i]['quota']; $emails[$i]['used_raw'] = $emails[$i]['used']; $emails[$i]['used_percentage'] = ($emails[$i]['quota'] > 0 && $emails[$i]['used'] > 0 ? round($emails[$i]['used'] * 100 / $emails[$i]['quota']) : 0); if ($readable) { // colours $emails[$i]['display_colour'] = '#000000'; interface/web/dashboard/dashlets/limits.php
@@ -143,10 +143,15 @@ } if($value != 0 || $value == $wb['unlimited_txt']) { $value_formatted = ($value == '-1')?$wb['unlimited_txt']:$value; $usage = $this->_get_limit_usage($limit); $percentage = ($value == '-1' || $value == 0 ? 0 : round(100 * $usage / $value)); $rows[] = array('field' => $field, 'field_txt' => $wb[$field.'_txt'], 'value' => $value_formatted, 'usage' => $this->_get_limit_usage($limit)); 'value_raw' => $value, 'usage' => $usage, 'usage_raw' => $usage, 'percentage' => $percentage); } } $tpl->setLoop('rows', $rows); interface/web/dashboard/dashlets/templates/limits.htm
@@ -1,13 +1,26 @@ <h2>{tmpl_var name='limits_txt'}</h2> <div style="width:350px;"> <div class="table-wrapper marginTop15"> <table class="table"> <div class='table-wrapper'> <table class='table'> <caption>{tmpl_var name='limits_txt'}</caption> <thead class="dark"> <tr> <th> </th> <th colspan='2'> </th> </tr> </thead> <tbody> <tmpl_loop name='rows'> <tr class="tbl_row_<tmpl_if name='__EVEN__'}even<tmpl_else>uneven</tmpl_if>"> <tr> <td>{tmpl_var name='field_txt'}</td> <td style="white-space: nowrap">{tmpl_var name='usage'} {tmpl_var name='of_txt'} {tmpl_var name='value'}</td> <td>{tmpl_var name='usage'} {tmpl_var name='of_txt'} {tmpl_var name='value'}</td> <td> <div class='progress'> <div class='progress-bar progress-bar-{tmpl_if name="percentage" op="<" value="50"}success{tmpl_elseif name="percentage" op="<" value="75"}warning{tmpl_else}danger{/tmpl_if}' role='progressbar' aria-valuemin='0' aria-valuemax='100' aria-valuenow='{tmpl_var name="percentage"}' style='width:{tmpl_var name="percentage"}%'> <span class='sr-only'>{tmpl_var name='usage'} {tmpl_var name='of_txt'} {tmpl_var name='value'}</span> </div> </div> </td> </tr> </tmpl_loop> </tbody> </table> </div> </div> interface/web/dashboard/dashlets/templates/mailquota.htm
@@ -1,31 +1,30 @@ <div style="float: left;"> <h2>{tmpl_var name='mailquota_txt'}</h2> <div style="width:350px;"> <div class="table-wrapper marginTop15"> <table class="table"> <div class='table-wrapper'> <table class='table'> <caption>{tmpl_var name='mailquota_txt'}</caption> <thead class="dark"> <tr> <td>{tmpl_var name='email_txt'}</td> <td>{tmpl_var name='name_txt'}</td> <td>{tmpl_var name='used_txt'}</td> <td>{tmpl_var name='quota_txt'}</td> <th>{tmpl_var name='email_txt'}</th> <th>{tmpl_var name='name_txt'}</th> <th>{tmpl_var name='used_txt'}</th> <th colspan="2">{tmpl_var name='quota_txt'}</th> </tr> </thead> <tmpl_if name="has_mailquota"> <tbody> <tmpl_loop name='mailquota'> <tr class="tbl_row_<tmpl_if name='__EVEN__'}even<tmpl_else>uneven</tmpl_if>"> <td style="color:{tmpl_var name='display_colour'}">{tmpl_var name='email'}</td> <td style="color:{tmpl_var name='display_colour'}">{tmpl_var name='name'}</td> <td style="color:{tmpl_var name='display_colour'}">{tmpl_var name='used'}</td> <td style="color:{tmpl_var name='display_colour'}">{tmpl_var name='quota'}</td> <tr> <td>{tmpl_var name='email'}</td> <td>{tmpl_var name='name'}</td> <td>{tmpl_var name='used'}</td> <td>{tmpl_var name='quota'}</td> <td> <div class='progress'> <div class='progress-bar progress-bar-{tmpl_if name="used_percentage" op="<" value="50"}success{tmpl_elseif name="used_percentage" op="<" value="75"}warning{tmpl_else}danger{/tmpl_if}' role='progressbar' aria-valuemin='0' aria-valuemax='100' aria-valuenow='{tmpl_var name="used_percentage"}' style='width:{tmpl_var name="used_percentage"}%'> <span class='sr-only'>{tmpl_var name='used'} {tmpl_var name='of_txt'} {tmpl_var name='quota'}</span> </div> </div> </td> </tr> </tmpl_loop> <tmpl_else> <tr> <td colspan="4" style="text-align:center;">{tmpl_var name='no_email_accounts_txt'}</td> </tr> </tmpl_if> </tbody> </table> </div> </div> </div> interface/web/dashboard/dashlets/templates/modules.htm
@@ -1,10 +1,18 @@ <h2>{tmpl_var name='available_modules_txt'}</h2> <div style="width:350px;"> <div style='margin: 0 auto;'> <ul class='modules clear'> <tmpl_loop name='modules'> <div class="dashboard-modules {tmpl_var name='modules_name'}"> <a href="#" onclick="capp('{tmpl_var name='modules_name'}')"> {tmpl_var name='modules_title'} </a> <li> <div class='clear'> <div class='icon icon-{tmpl_var name='modules_name'}'></div> <div class='left'> <div class='title'>{tmpl_var name='modules_title'}</div> </div> </div> <div class='btn btn-default button'> <a href='#' data-capp='{tmp_var name="modules_name"}'>Go to {tmpl_var name='modules_title'}</a> </div> </li> </tmpl_loop> </ul> </div> interface/web/dashboard/dashlets/templates/quota.htm
@@ -1,31 +1,30 @@ <div style="float: left;"> <h2>{tmpl_var name='quota_txt'}</h2> <div style="width:350px;"> <div class="table-wrapper marginTop15"> <table class="table"> <div class='table-wrapper'> <table class='table'> <caption>{tmpl_var name='quota_txt'}</caption> <thead class="dark"> <tr> <td>{tmpl_var name='domain_txt'}</td> <td>{tmpl_var name='used_txt'}</td> <td>{tmpl_var name='soft_txt'}</td> <td>{tmpl_var name='hard_txt'}</td> <th>{tmpl_var name='domain_txt'}</th> <th>{tmpl_var name='used_txt'}</th> <th>{tmpl_var name='soft_txt'}</th> <th colspan="2">{tmpl_var name='hard_txt'}</th> </tr> </thead> <tmpl_if name="has_quota"> <tbody> <tmpl_loop name='quota'> <tr class="tbl_row_<tmpl_if name='__EVEN__'}even<tmpl_else>uneven</tmpl_if>"> <td style="color:{tmpl_var name='display_colour'}">{tmpl_var name='domain'}</td> <td style="color:{tmpl_var name='display_colour'}">{tmpl_var name='used'}</td> <td style="color:{tmpl_var name='display_colour'}">{tmpl_var name='soft'}</td> <td style="color:{tmpl_var name='display_colour'}">{tmpl_var name='hard'}</td> <tr> <td>{tmpl_var name='domain'}</td> <td>{tmpl_var name='used'}</td> <td>{tmpl_var name='soft'}</td> <td>{tmpl_var name='hard'}</td> <td> <div class='progress'> <div class='progress-bar progress-bar-{tmpl_if name="used_percentage" op="<" value="50"}success{tmpl_elseif name="used_percentage" op="<" value="75"}warning{tmpl_else}danger{/tmpl_if}' role='progressbar' aria-valuemin='0' aria-valuemax='100' aria-valuenow='{tmpl_var name="used_percentage"}' style='width:{tmpl_var name="used_percentage"}%'> <span class='sr-only'>{tmpl_var name='used'} {tmpl_var name='of_txt'} {tmpl_var name='soft'}</span> </div> </div> </td> </tr> </tmpl_loop> <tmpl_else> <tr> <td colspan="4" style="text-align:center;">{tmpl_var name='no_sites_txt'}</td> </tr> </tmpl_if> </tbody> </table> </div> </div> </div> interface/web/dashboard/templates/dashboard.htm
@@ -1,52 +1,32 @@ <h1><tmpl_var name="welcome_user"></h1> <hr /> <div class="panel panel_dashboard"> <div> <div class='page-header'> <h1>Welcome Admin</h1> </div> <tmpl_if name='error'> <div class="systemmonitor-state state-error"> <div class="status"></div> <div class="statusMsg"> <div class="alert alert-danger"> <tmpl_loop name="error"> {tmpl_var name='error_msg'} </tmpl_loop> </div> </div> </tmpl_if> <tmpl_if name='warning'> <div class="systemmonitor-state state-warning"> <div class="status"></div> <div class="statusMsg"> <div class="alert alert-danger"> <tmpl_loop name="warning"> {tmpl_var name='warning_msg'} </tmpl_loop> </div> </div> </tmpl_if> <tmpl_if name='info'> <div class="systemmonitor-state state-info"> <div class="status"></div> <div class="statusMsg"> <div class="alert alert-notification"> <tmpl_loop name="info"> {tmpl_var name='info_msg'} </tmpl_loop> </div> </div> </tmpl_if> </div> <div style="float:left; width:350px;"> <tmpl_loop name='leftcol'> {tmpl_var name='content'} <tmpl_if name='content'> <p style="clear:left"> </p> </tmpl_if> </tmpl_loop> </div> <div style="float:right; width:350px;padding-left:15px;"> <tmpl_loop name='rightcol'> {tmpl_var name='content'} <tmpl_if name='content'> <p> </p> </tmpl_if> </tmpl_loop> </div> </div> interface/web/themes/default/assets/stylesheets/ispconfig.css
@@ -217,7 +217,7 @@ .progress { display: inline-block; margin-bottom: 0; width: 300px; width: 150px; height: 10px; } .content-tab-wrapper { interface/web/themes/default/assets/stylesheets/ispconfig.min.css
@@ -1 +1 @@ body{overflow-y:scroll}.left{float:left}.right{float:right}.clear:after{content:"";display:table;clear:both}.marginTop15{margin-top:15px}.paddingX5{padding-left:5px !important;padding-right:5px !important}.width65{width:65px}.form-group input[type='checkbox']{margin-top:10px}.control-label{font-weight:normal}.control-label:after{content:":"}.formbutton-default{padding:6px 30px;border-bottom-style:solid;border-bottom-width:2px;font-size:12px;font-weight:bold;transition:all ease 500ms}.formbutton-success{padding:6px 30px;border-style:solid;border-width:1px;border-bottom-width:solid;font-size:12px;font-weight:bold;transition:all ease 500ms}#main-wrapper{margin:0 auto;width:950px}#logo{float:left;width:200px;height:65px;background:url("../images/logo.png") no-repeat}#logo a{display:block;width:100%;height:100%}#headerbar{float:right}#searchform{float:right;margin-top:16px}#searchform>div{position:relative;display:table}#searchform>div>div{display:table-cell;padding-right:8px;vertical-align:top}#searchform .icon{padding:0 2px;font-size:16px}#logout-button{float:right;margin-top:16px;margin-left:25px;border-bottom-style:solid;border-bottom-width:2px;transition:all ease 500ms}#main-navigation{margin-top:24px}#main-navigation a{padding:0 12px;height:70px;border-bottom-style:solid;botder-bottom-width:2px;transition:all ease 500ms}#main-navigation .icon{font-size:32px}#main-navigation .title{margin-top:2px;font-weight:bold}.btn-group-justified .btn{border-right-width:0}.btn-group-justified .btn:last-of-type{border-right-width:1px}#content{width:710px}#sidebar{margin-top:27px;width:215px;border-style:solid;border-width:1px;border-radius:4px}#sidebar header{margin:1px;padding:0 10px;height:40px;line-height:40px;font-weight:bold;border-top-left-radius:2px;border-top-right-radius:2px}#sidebar ul{margin:0;padding:0;list-style:none}#sidebar li{padding:10px;border-top-style:solid;border-top-width:1px;font-size:12px}#sidebar a{text-decoration:none;transition:color ease 500ms}.page-header{margin:20px 0;padding:0}.alert-notification a{font-weight:bold;text-decoration:none;transition:color ease 500ms}.alert-label,.alert-content{display:inline-block;vertical-align:top}.alert-label{width:60px}.modules{margin:0;padding:0;list-style:none}.modules li{float:left;margin-right:15px;margin-bottom:15px;padding:8px;width:200px;border-radius:4px;border-style:solid;border-width:1px}.modules .icon{float:left;margin-right:15px;font-size:50px}.modules .left{margin-top:5px}.modules .title{margin-top:6px;margin-left:20px;font-size:16px;font-weight:bold}.modules .button{margin-top:10px;width:100%;border-bottom-style:solid;border-bottom-width:2px;font-size:12px;font-weight:bold;transition:all ease 500ms}.modules a{text-decoration:none}.table-wrapper{margin-bottom:20px;border-radius:4px;border-style:solid;border-width:1px}.table{margin-bottom:1px}.table caption{padding:5px 10px;text-align:left;font-weight:bold;font-size:18px;border-bottom-style:solid;border-bottom-width:1px}.table tbody tr{border-top-style:solid;border-top-width:1px;transition:background ease 500ms}.table tbody tr:last-child{border-radius:4px}.tfooter{margin-top:-1px;height:40px;border-top-style:solid;border-top-width:1px}.progress{display:inline-block;margin-bottom:0;width:300px;height:10px}.content-tab-wrapper{border-style:solid;border-width:1px;border-radius:4px}.content-tab-wrapper .nav-tabs>li>a{border-radius:0;border:none !important;border-right-style:solid !important;border-right-width:1px !important;outline:0;font-weight:bold;transition:background ease 500ms}.content-tab-wrapper .nav-tabs li:not(:first-child) a{margin-left:-2px}.tab-content{padding:25px 10px}.input-group-btn .icon-calendar{font-size:18px}thead.dark th{height:40px;line-height:40px;font-weight:normal}#footer{margin:20px 0;padding-top:20px;border-top-style:solid;border-top-width:1px;text-align:center;font-size:10px}.menu-btn{display:none;cursor:pointer}@media(-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){#logo{background-image:url("../images/logo@2x.png");background-size:200px 65px}} body{overflow-y:scroll}.left{float:left}.right{float:right}.clear:after{content:"";display:table;clear:both}.marginTop15{margin-top:15px}.paddingX5{padding-left:5px !important;padding-right:5px !important}.width65{width:65px}.form-group input[type='checkbox']{margin-top:10px}.control-label{font-weight:normal}.control-label:after{content:":"}.formbutton-default{padding:6px 30px;border-bottom-style:solid;border-bottom-width:2px;font-size:12px;font-weight:bold;transition:all ease 500ms}.formbutton-success{padding:6px 30px;border-style:solid;border-width:1px;border-bottom-width:solid;font-size:12px;font-weight:bold;transition:all ease 500ms}#main-wrapper{margin:0 auto;width:950px}#logo{float:left;width:200px;height:65px;background:url("../images/logo.png") no-repeat}#logo a{display:block;width:100%;height:100%}#headerbar{float:right}#searchform{float:right;margin-top:16px}#searchform>div{position:relative;display:table}#searchform>div>div{display:table-cell;padding-right:8px;vertical-align:top}#searchform .icon{padding:0 2px;font-size:16px}#logout-button{float:right;margin-top:16px;margin-left:25px;border-bottom-style:solid;border-bottom-width:2px;transition:all ease 500ms}#main-navigation{margin-top:24px}#main-navigation a{padding:0 12px;height:70px;border-bottom-style:solid;botder-bottom-width:2px;transition:all ease 500ms}#main-navigation .icon{font-size:32px}#main-navigation .title{margin-top:2px;font-weight:bold}.btn-group-justified .btn{border-right-width:0}.btn-group-justified .btn:last-of-type{border-right-width:1px}#content{width:710px}#sidebar{margin-top:27px;width:215px;border-style:solid;border-width:1px;border-radius:4px}#sidebar header{margin:1px;padding:0 10px;height:40px;line-height:40px;font-weight:bold;border-top-left-radius:2px;border-top-right-radius:2px}#sidebar ul{margin:0;padding:0;list-style:none}#sidebar li{padding:10px;border-top-style:solid;border-top-width:1px;font-size:12px}#sidebar a{text-decoration:none;transition:color ease 500ms}.page-header{margin:20px 0;padding:0}.alert-notification a{font-weight:bold;text-decoration:none;transition:color ease 500ms}.alert-label,.alert-content{display:inline-block;vertical-align:top}.alert-label{width:60px}.modules{margin:0;padding:0;list-style:none}.modules li{float:left;margin-right:15px;margin-bottom:15px;padding:8px;width:200px;border-radius:4px;border-style:solid;border-width:1px}.modules .icon{float:left;margin-right:15px;font-size:50px}.modules .left{margin-top:5px}.modules .title{margin-top:6px;margin-left:20px;font-size:16px;font-weight:bold}.modules .button{margin-top:10px;width:100%;border-bottom-style:solid;border-bottom-width:2px;font-size:12px;font-weight:bold;transition:all ease 500ms}.modules a{text-decoration:none}.table-wrapper{margin-bottom:20px;border-radius:4px;border-style:solid;border-width:1px}.table{margin-bottom:1px}.table caption{padding:5px 10px;text-align:left;font-weight:bold;font-size:18px;border-bottom-style:solid;border-bottom-width:1px}.table tbody tr{border-top-style:solid;border-top-width:1px;transition:background ease 500ms}.table tbody tr:last-child{border-radius:4px}.tfooter{margin-top:-1px;height:40px;border-top-style:solid;border-top-width:1px}.progress{display:inline-block;margin-bottom:0;width:150px;height:10px}.content-tab-wrapper{border-style:solid;border-width:1px;border-radius:4px}.content-tab-wrapper .nav-tabs>li>a{border-radius:0;border:none !important;border-right-style:solid !important;border-right-width:1px !important;outline:0;font-weight:bold;transition:background ease 500ms}.content-tab-wrapper .nav-tabs li:not(:first-child) a{margin-left:-2px}.tab-content{padding:25px 10px}.input-group-btn .icon-calendar{font-size:18px}thead.dark th{height:40px;line-height:40px;font-weight:normal}#footer{margin:20px 0;padding-top:20px;border-top-style:solid;border-top-width:1px;text-align:center;font-size:10px}.menu-btn{display:none;cursor:pointer}@media(-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){#logo{background-image:url("../images/logo@2x.png");background-size:200px 65px}} interface/web/themes/default/templates/main.tpl.htm
@@ -148,6 +148,14 @@ loadContent(content_to_load); }); $(document).on('click', 'a[data-capp],button[data-capp]', function(e) { e.preventDefault(); var content_to_load = $(this).attr('data-capp'); if(!content_to_load) return this; capp(content_to_load); }); $(document).bind("keypress", function(event) { //Use $ submit with keypress Enter in panel filterbar if (event.which == '13' && $(".panel #Filter").length > 0 && $(event.target).hasClass('ui-autocomplete-input') == false ) {