Просмотр исходного кода

Ticket #4678 - Studio: Update blocks on Dashboard. Host tools and Cache.

AntonLV 2 лет назад
Родитель
Сommit
bf8e647491

+ 1 - 1
inc/js/functions.js

@@ -438,7 +438,7 @@ function bx_menu_popup_inline (jSel, e, options) {
     else {
         var options = options || {};
         var o = $.extend({}, $.fn.dolPopupDefaultOptions, options, {
-            pointer:{el:$(e)}, 
+            pointer: e != undefined && $(e).length != 0 ? {el:$(e)} : false, 
             cssClass: 'bx-popup-menu',
             onShow: function(oPopup) {
                 oPopup.find('a').each(function () {

+ 4 - 0
modules/boonex/developer/template/css/main.css

@@ -7,6 +7,10 @@ body.bx-dev-page-body-columns div.bx-std-page-menu {
     background-color: #4c6678;
     box-shadow: inset -1px 0px 0px rgba(240, 240, 240, 0.2);
 }
+div.bx-std-page-menu div.bx-std-page-column-cnt {
+    padding-left: 0;
+    padding-right: 0;
+}
 body.bx-dev-page-body-columns div.bx-std-page-column.bx-std-page-content {
     overflow-x: visible;
 }

+ 1 - 1
modules/boonex/english/data/langs/system/en.xml

@@ -629,7 +629,6 @@
         <string name="_adm_btn_settings_mix_publish"><![CDATA[Publish]]></string>
 	<string name="_adm_btn_store_search"><![CDATA[Search]]></string>
 	<string name="_adm_dbd_btn_update"><![CDATA[Update]]></string>
-	<string name="_adm_dbd_txt_htools_status"><![CDATA[{0} - <b>{1}</b>]]></string>
         <string name="_adm_dbd_txt_available"><![CDATA[Available:]]></string>
 	<string name="_adm_dbd_txt_installed"><![CDATA[Installed:]]></string>
 	<string name="_adm_dbd_txt_updated"><![CDATA[Updated:]]></string>
@@ -637,6 +636,7 @@
 	<string name="_adm_dbd_txt_su_database"><![CDATA[Database]]></string>
 	<string name="_adm_dbd_txt_su_system"><![CDATA[System]]></string>
 	<string name="_adm_dbd_txt_su_system_media"><![CDATA[System Media]]></string>
+        <string name="_adm_dbd_txt_c_select"><![CDATA[Select...]]></string>
 	<string name="_adm_dbd_txt_c_clear_all"><![CDATA[Clear all caches]]></string>
 	<string name="_adm_dbd_txt_c_db"><![CDATA[DB]]></string>
 	<string name="_adm_dbd_txt_c_clear_db"><![CDATA[Clear DB cache]]></string>

+ 1 - 1
modules/boonex/russian/data/langs/system/ru.xml

@@ -627,7 +627,6 @@
         <string name="_adm_btn_settings_mix_publish"><![CDATA[Публиковать]]></string>
 	<string name="_adm_btn_store_search"><![CDATA[Поиск]]></string>
 	<string name="_adm_dbd_btn_update"><![CDATA[Обновить]]></string>
-	<string name="_adm_dbd_txt_htools_status"><![CDATA[{0} - <b>{1}</b>]]></string>
         <string name="_adm_dbd_txt_available"><![CDATA[Доступна:]]></string>
 	<string name="_adm_dbd_txt_installed"><![CDATA[Установлено:]]></string>
         <string name="_adm_dbd_txt_updated"><![CDATA[Обновлено:]]></string>
@@ -635,6 +634,7 @@
 	<string name="_adm_dbd_txt_su_database"><![CDATA[База данных]]></string>
 	<string name="_adm_dbd_txt_su_system"><![CDATA[Система]]></string>
 	<string name="_adm_dbd_txt_su_system_media"><![CDATA[Системные медиа]]></string>
+        <string name="_adm_dbd_txt_c_select"><![CDATA[Выбрать...]]></string>
 	<string name="_adm_dbd_txt_c_clear_all"><![CDATA[Очистить весь кэш]]></string>
 	<string name="_adm_dbd_txt_c_db"><![CDATA[БД]]></string>
 	<string name="_adm_dbd_txt_c_clear_db"><![CDATA[Очистить кэш БД]]></string>

+ 8 - 1
plugins_public/tailwind/css/tailwind.css

@@ -1242,9 +1242,16 @@
         @apply ring-1 ring-gray-600;
     }
 
-    .bx-menu-top-center .bx-menu-tab-active .bx-mi-icon {
+    .bx-std .bx-menu-top-center .bx-menu-tab-active .bx-mi-icon {
         @apply ring ring-blue-600 ring-offset-2 ring-offset-black;
     }
+    
+    .bx-std .bx-stg-icon-gray-bg {
+        @apply h-8 w-8;
+        @apply bg-gray-200 bg-no-repeat bg-center;
+        @apply rounded-lg;
+    }
+
 
     /* Modules: Timeline */
     .bx-artificer .group\/item:hover .bx-tl-item-text .bx-tl-content.bx-tl-overflow .bx-tl-content-overflow {

Разница между файлами не показана из-за своего большого размера
+ 0 - 0
plugins_public/tailwind/css/tailwind.min.css


+ 1 - 1
studio/classes/BxDolStudioDashboard.php

@@ -57,7 +57,7 @@ class BxDolStudioDashboard extends BxTemplStudioWidget
                     if(!isset($this->aBlocks[$sValue]))
                         break;
 
-                    $aBlock = $this->{$this->aBlocks[$sValue]}(false);
+                    $aBlock = $this->{$this->aBlocks[$sValue]}(true);
                     if(!empty($aBlock['content']))
                         $aResult = array('code' => 0, 'data' => $aBlock['content']);
 

+ 79 - 59
studio/js/dashboard.js

@@ -20,82 +20,102 @@ function BxDolStudioDashboard(oOptions) {
 }
 
 BxDolStudioDashboard.prototype.checkForUpgrade = function() {
-	var $this = this;
-	var oDate = new Date();
-	var sDivId = 'bx-dbd-version';
+    var $this = this;
+    var oDate = new Date();
+    var sDivId = 'bx-dbd-version';
 
-	bx_loading(sDivId, true);
+    bx_loading(sDivId, true);
 
-	$.get(
-		this.sActionsUrl,
-		{
-                    dbd_action: 'check_for_upgrade',
-                    _t: oDate.getTime()
-		},
-		function(oData) {
-                    bx_loading(sDivId, false);
+    $.get(
+        this.sActionsUrl,
+        {
+            dbd_action: 'check_for_upgrade',
+            _t: oDate.getTime()
+        },
+        function(oData) {
+            bx_loading(sDivId, false);
 
-                    if(!oData.data)
-                        return;
+            if(!oData.data)
+                return;
 
-                    $('#' + sDivId + ' .bx-dbd-version-available b').html(oData.data.version).parents('.bx-dbd-version-available:hidden').show();
-                    
-                    if(oData.data.upgrade != undefined && parseInt(oData.data.upgrade) == 1)
-                        $('#' + sDivId + ' .bx-dbd-block-actions').show()
-		},
-		'json'
-	);
+            $('#' + sDivId + ' .bx-dbd-version-available b').html(oData.data.version).parents('.bx-dbd-version-available:hidden').show();
+
+            if(oData.data.upgrade != undefined && parseInt(oData.data.upgrade) == 1)
+                $('#' + sDivId + ' .bx-dbd-block-actions').show()
+        },
+        'json'
+    );
 };
 
 BxDolStudioDashboard.prototype.performUpgrade = function() {
-	var $this = this;
-	var oDate = new Date();
-	var sDivId = 'bx-dbd-version';
+    var $this = this;
+    var oDate = new Date();
+    var sDivId = 'bx-dbd-version';
 
-	bx_loading(sDivId, true);
+    bx_loading(sDivId, true);
 
-	$.get(
-		this.sActionsUrl,
-		{
-			dbd_action: 'perform_upgrade',
-			_t: oDate.getTime()
-		},
-		function(oData) {
-			bx_loading(sDivId, false);
+    $.get(
+        this.sActionsUrl,
+        {
+            dbd_action: 'perform_upgrade',
+            _t: oDate.getTime()
+        },
+        function(oData) {
+            bx_loading(sDivId, false);
 
-			if(!oData.message)
-			    return;
+            if(!oData.message)
+                return;
 
-			$this.popup(oData.message);
-		},
-		'json'
-	);
+            $this.popup(oData.message);
+        },
+        'json'
+    );
 };
 
-BxDolStudioDashboard.prototype.getBlockContent = function(sType) {
-	var $this = this;
-	var oDate = new Date();
-	var sDivId = 'bx-dbd-' + sType;
+BxDolStudioDashboard.prototype.checkHostParams = function() {
+    var sType = 'htools';
+    var sDivId = 'bx-dbd-' + sType;
 
-	bx_loading(sDivId, true);
+    this.getBlockContent(sType, function(oData) {
+        if(!oData.data)
+            return;
 
-	$.get(
-		this.sActionsUrl,
-		{
-			dbd_action: 'get_block',
-			dbd_value: sType,
-			_t: oDate.getTime()
-		},
-		function(oData) {
-			bx_loading(sDivId, false);
+        $('#' + sDivId).replaceWith(oData.data);
+        $('#' + sDivId + ' .bx-dbd-block-actions').show();
+    });
+};
 
-			if(!oData.data)
-			    return;
+BxDolStudioDashboard.prototype.clearCacheSelect = function(oElement) {
+    bx_menu_popup_inline('#bx-std-cc-select-popup', oElement, {moveToDocRoot: false});
+};
 
-			$('#' + sDivId).replaceWith(oData.data);
-		},
-		'json'
-	);
+BxDolStudioDashboard.prototype.getBlockContent = function(sType, onComplete) {
+    var $this = this;
+    var oDate = new Date();
+    var sDivId = 'bx-dbd-' + sType;
+
+    bx_loading(sDivId, true);
+
+    $.get(
+        this.sActionsUrl,
+        {
+            dbd_action: 'get_block',
+            dbd_value: sType,
+            _t: oDate.getTime()
+        },
+        function(oData) {
+            bx_loading(sDivId, false);
+
+            if(typeof onComplete == 'function')
+                return onComplete(oData);
+
+            if(!oData.data)
+                return;
+
+            $('#' + sDivId).replaceWith(oData.data);
+        },
+        'json'
+    );
 };
 
 BxDolStudioDashboard.prototype.initChart = function(sType, oData) {

+ 6 - 2
studio/template/css/dashboard.css

@@ -38,8 +38,12 @@ div.bx-dbd-htools .bx-btn {
 }
 
 div.bx-dbd-htools .bx-dbd-htools-item {
-    float: left;
-    width: 50%;
+    display: -webkit-flex;
+    display: flex;
+    -webkit-align-items: center;
+    align-items: center;
+    -webkit-flex-wrap: nowrap;
+    flex-wrap: nowrap;
 }
 
 /*--- Queues block ---*/

+ 17 - 8
studio/template/dbd_cache.html

@@ -1,10 +1,19 @@
-<div id="bx-dbd-cache" class="bx-dbd-block-content bx-clearfix">
-    <bx_if:show_chart>
-        <div class="bx-dbd-chart bx-def-border"></div>
+<div id="bx-dbd-cache">
+    <div class="bx-dbd-block-content bx-def-margin-bottom">
+        <bx_if:show_chart>
+            <div class="bx-dbd-chart bx-def-border"></div>
 
-        <script language="javascript">
-            __js_object__.initChart('cache', __chart_data__);
-        </script>
-    </bx_if:show_chart>
-    <bx_if:show_empty>__message__</bx_if:show_empty>
+            <script language="javascript">
+                __js_object__.initChart('cache', __chart_data__);
+            </script>
+        </bx_if:show_chart>
+        <bx_if:show_empty>__message__</bx_if:show_empty>
+    </div>
+    <bx_if:show_actions>
+        <div class="bx-dbd-block-actions border-t border-b-zinc-200 space-x-4">
+            <a class="bx-btn" href="javascript:void(0)" onclick="javascript:__js_object__.clearCache('all')"><bx_text:_adm_dbd_txt_c_clear_all /></a>
+            <a class="bx-btn" href="javascript:void(0)" onclick="javascript:__js_object__.clearCacheSelect(this)"><bx_text:_adm_dbd_txt_c_select /></a>
+        </div>
+        __menu__
+    </bx_if:show_actions>
 </div>

+ 6 - 5
studio/template/dbd_htools.html

@@ -1,21 +1,22 @@
 <div id="bx-dbd-htools">
-    <div class="bx-dbd-block-content">
+    <div class="bx-dbd-block-content bx-def-margin-bottom">
         <bx_if:show_content>
             <div class="bx-dbd-htools bx-clearfix">
                 <bx_repeat:items>
-                    <div class="bx-dbd-htools-item bx-def-margin-sec-bottom">__status__ __msg__</div>
+                    <div class="bx-dbd-htools-item bx-def-margin-sec-top-auto"><img class="bx-stg-icon-gray-bg mr-4" src="<bx_image_url:bx-std-spacer.gif />" style="background-image: url('__icon__')" />__title__:<b class="pl-2">__value__</b></div>
                 </bx_repeat:items>
             </div>
         </bx_if:show_content>
     </div>
-    <div class="bx-dbd-block-actions border-t border-b-zinc-200 space-x-4">
+    <div class="bx-dbd-block-actions border-t border-b-zinc-200 space-x-4" style="display:none">
         <a class="bx-btn" href="javascript:void(0)" onclick="javascript:__js_object__.serverAudit()"><bx_text:_sys_inst_server_audit /></a>
         <a class="bx-btn" href="javascript:void(0)" onclick="javascript:__js_object__.permissions()"><bx_text:_sys_audit_permissions /></a>
     </div>
     <bx_if:show_loader>
         <script language="javascript">
             $(document).ready(function() {
-                __js_object__.getBlockContent('htools');
+                __js_object__.checkHostParams();
             });
         </script>
-    </bx_if:show_loader>
+    </bx_if:show_loader>
+</div>

+ 3 - 3
studio/template/dbd_versions.html

@@ -7,12 +7,12 @@
             <div class="bx-dbd-vi-title bx-def-margin-sec-topbottom text-2xl font-semibold">__domain__ __version__</div>
             <div class="bx-dbd-vi-info space-y-4">
                 <div class="bx-dbd-vii-row">
-                    <img class="pr-4" src="<bx_icon_url:db-vi-installed.svg />" /><bx_text:_adm_dbd_txt_installed /><b class="pl-2">__installed__</b>
+                    <img class="bx-stg-icon-gray-bg mr-4" src="<bx_image_url:bx-std-spacer.gif />" style="background-image: url('<bx_icon_url:db-vi-installed.svg />')" /><bx_text:_adm_dbd_txt_installed /><b class="pl-2">__installed__</b>
                 </div>
                 <bx_if:show_update_info>
-                    <div class="bx-dbd-vii-row"><img class="pr-4" src="<bx_icon_url:db-vi-updated.svg />" /><bx_text:_adm_dbd_txt_updated /><b class="pl-2">__updated__</b></div>
+                    <div class="bx-dbd-vii-row"><img class="bx-stg-icon-gray-bg mr-4" src="<bx_image_url:bx-std-spacer.gif />" style="background-image: url('<bx_icon_url:db-vi-updated.svg />')" /><bx_text:_adm_dbd_txt_updated /><b class="pl-2">__updated__</b></div>
                 </bx_if:show_update_info>
-                <div class="bx-dbd-vii-row bx-dbd-version-available" style="display:none"><img class="pr-4" src="<bx_icon_url:db-vi-available.svg />" /><bx_text:_adm_dbd_txt_available /><b class="pl-2"></b></div>
+                <div class="bx-dbd-vii-row bx-dbd-version-available" style="display:none"><img class="bx-stg-icon-gray-bg mr-4" src="<bx_image_url:bx-std-spacer.gif />" style="background-image: url('<bx_icon_url:db-vi-available.svg />')" /><bx_text:_adm_dbd_txt_available /><b class="pl-2"></b></div>
             </div>
         </div>
     </div>

+ 4 - 0
studio/template/images/icons/db-ht-fail.svg

@@ -0,0 +1,4 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="32" height="32" color="currentColor" fill="none">
+    <path d="M15.7494 15L9.75 9M9.75064 15L15.75 9" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
+    <path d="M22.75 12C22.75 6.47715 18.2728 2 12.75 2C7.22715 2 2.75 6.47715 2.75 12C2.75 17.5228 7.22715 22 12.75 22C18.2728 22 22.75 17.5228 22.75 12Z" stroke="currentColor" stroke-width="1.5" />
+</svg>

+ 11 - 0
studio/template/images/icons/db-ht-ok.svg

@@ -0,0 +1,11 @@
+<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
+<g clip-path="url(#clip0_20_191)">
+<path d="M3 12C3 13.1819 3.23279 14.3522 3.68508 15.4442C4.13738 16.5361 4.80031 17.5282 5.63604 18.364C6.47177 19.1997 7.46392 19.8626 8.55585 20.3149C9.64778 20.7672 10.8181 21 12 21C13.1819 21 14.3522 20.7672 15.4442 20.3149C16.5361 19.8626 17.5282 19.1997 18.364 18.364C19.1997 17.5282 19.8626 16.5361 20.3149 15.4442C20.7672 14.3522 21 13.1819 21 12C21 10.8181 20.7672 9.64778 20.3149 8.55585C19.8626 7.46392 19.1997 6.47177 18.364 5.63604C17.5282 4.80031 16.5361 4.13738 15.4442 3.68508C14.3522 3.23279 13.1819 3 12 3C10.8181 3 9.64778 3.23279 8.55585 3.68508C7.46392 4.13738 6.47177 4.80031 5.63604 5.63604C4.80031 6.47177 4.13738 7.46392 3.68508 8.55585C3.23279 9.64778 3 10.8181 3 12Z" stroke="#27272A" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
+<path d="M9 12L11 14L15 10" stroke="#27272A" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
+</g>
+<defs>
+<clipPath id="clip0_20_191">
+<rect width="24" height="24" fill="white"/>
+</clipPath>
+</defs>
+</svg>

+ 3 - 0
studio/template/images/icons/db-ht-undef.svg

@@ -0,0 +1,3 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="32" height="32" color="currentColor" fill="none">
+    <circle cx="12" cy="12" r="10" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round" />
+</svg>

+ 5 - 0
studio/template/images/icons/db-ht-warn.svg

@@ -0,0 +1,5 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="32" height="32" color="currentColor" fill="none">
+    <circle cx="12" cy="12" r="10" stroke="currentColor" stroke-width="1.5" />
+    <path d="M11.992 15H12.001" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
+    <path d="M12 12L12 8" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
+</svg>

+ 7 - 8
studio/template/images/icons/db-vi-available.svg

@@ -1,13 +1,12 @@
-<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
-<rect width="32" height="32" rx="8" fill="#E4E4E7"/>
-<g clip-path="url(#clip0_20_209)">
-<path d="M7 16C7 17.1819 7.23279 18.3522 7.68508 19.4442C8.13738 20.5361 8.80031 21.5282 9.63604 22.364C10.4718 23.1997 11.4639 23.8626 12.5558 24.3149C13.6478 24.7672 14.8181 25 16 25C17.1819 25 18.3522 24.7672 19.4442 24.3149C20.5361 23.8626 21.5282 23.1997 22.364 22.364C23.1997 21.5282 23.8626 20.5361 24.3149 19.4442C24.7672 18.3522 25 17.1819 25 16C25 14.8181 24.7672 13.6478 24.3149 12.5558C23.8626 11.4639 23.1997 10.4718 22.364 9.63604C21.5282 8.80031 20.5361 8.13738 19.4442 7.68508C18.3522 7.23279 17.1819 7 16 7C14.8181 7 13.6478 7.23279 12.5558 7.68508C11.4639 8.13738 10.4718 8.80031 9.63604 9.63604C8.80031 10.4718 8.13738 11.4639 7.68508 12.5558C7.23279 13.6478 7 14.8181 7 16Z" stroke="black" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
-<path d="M16 13V17" stroke="black" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
-<path d="M16 20V20.01" stroke="black" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
+<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
+<g clip-path="url(#clip0_20_210)">
+<path d="M3 12C3 13.1819 3.23279 14.3522 3.68508 15.4442C4.13738 16.5361 4.80031 17.5282 5.63604 18.364C6.47177 19.1997 7.46392 19.8626 8.55585 20.3149C9.64778 20.7672 10.8181 21 12 21C13.1819 21 14.3522 20.7672 15.4442 20.3149C16.5361 19.8626 17.5282 19.1997 18.364 18.364C19.1997 17.5282 19.8626 16.5361 20.3149 15.4442C20.7672 14.3522 21 13.1819 21 12C21 10.8181 20.7672 9.64778 20.3149 8.55585C19.8626 7.46392 19.1997 6.47177 18.364 5.63604C17.5282 4.80031 16.5361 4.13738 15.4442 3.68508C14.3522 3.23279 13.1819 3 12 3C10.8181 3 9.64778 3.23279 8.55585 3.68508C7.46392 4.13738 6.47177 4.80031 5.63604 5.63604C4.80031 6.47177 4.13738 7.46392 3.68508 8.55585C3.23279 9.64778 3 10.8181 3 12Z" stroke="black" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
+<path d="M12 9V13" stroke="black" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
+<path d="M12 16V16.01" stroke="black" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
 </g>
 <defs>
-<clipPath id="clip0_20_209">
-<rect width="24" height="24" fill="white" transform="translate(4 4)"/>
+<clipPath id="clip0_20_210">
+<rect width="24" height="24" fill="white"/>
 </clipPath>
 </defs>
 </svg>

+ 6 - 7
studio/template/images/icons/db-vi-installed.svg

@@ -1,12 +1,11 @@
-<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
-<rect width="32" height="32" rx="8" fill="#E4E4E7"/>
-<g clip-path="url(#clip0_20_190)">
-<path d="M7 16C7 17.1819 7.23279 18.3522 7.68508 19.4442C8.13738 20.5361 8.80031 21.5282 9.63604 22.364C10.4718 23.1997 11.4639 23.8626 12.5558 24.3149C13.6478 24.7672 14.8181 25 16 25C17.1819 25 18.3522 24.7672 19.4442 24.3149C20.5361 23.8626 21.5282 23.1997 22.364 22.364C23.1997 21.5282 23.8626 20.5361 24.3149 19.4442C24.7672 18.3522 25 17.1819 25 16C25 14.8181 24.7672 13.6478 24.3149 12.5558C23.8626 11.4639 23.1997 10.4718 22.364 9.63604C21.5282 8.80031 20.5361 8.13738 19.4442 7.68508C18.3522 7.23279 17.1819 7 16 7C14.8181 7 13.6478 7.23279 12.5558 7.68508C11.4639 8.13738 10.4718 8.80031 9.63604 9.63604C8.80031 10.4718 8.13738 11.4639 7.68508 12.5558C7.23279 13.6478 7 14.8181 7 16Z" stroke="#27272A" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
-<path d="M13 16L15 18L19 14" stroke="#27272A" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
+<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
+<g clip-path="url(#clip0_20_191)">
+<path d="M3 12C3 13.1819 3.23279 14.3522 3.68508 15.4442C4.13738 16.5361 4.80031 17.5282 5.63604 18.364C6.47177 19.1997 7.46392 19.8626 8.55585 20.3149C9.64778 20.7672 10.8181 21 12 21C13.1819 21 14.3522 20.7672 15.4442 20.3149C16.5361 19.8626 17.5282 19.1997 18.364 18.364C19.1997 17.5282 19.8626 16.5361 20.3149 15.4442C20.7672 14.3522 21 13.1819 21 12C21 10.8181 20.7672 9.64778 20.3149 8.55585C19.8626 7.46392 19.1997 6.47177 18.364 5.63604C17.5282 4.80031 16.5361 4.13738 15.4442 3.68508C14.3522 3.23279 13.1819 3 12 3C10.8181 3 9.64778 3.23279 8.55585 3.68508C7.46392 4.13738 6.47177 4.80031 5.63604 5.63604C4.80031 6.47177 4.13738 7.46392 3.68508 8.55585C3.23279 9.64778 3 10.8181 3 12Z" stroke="#27272A" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
+<path d="M9 12L11 14L15 10" stroke="#27272A" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
 </g>
 <defs>
-<clipPath id="clip0_20_190">
-<rect width="24" height="24" fill="white" transform="translate(4 4)"/>
+<clipPath id="clip0_20_191">
+<rect width="24" height="24" fill="white"/>
 </clipPath>
 </defs>
 </svg>

+ 5 - 6
studio/template/images/icons/db-vi-updated.svg

@@ -1,11 +1,10 @@
-<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
-<rect width="32" height="32" rx="8" fill="#E4E4E7"/>
-<g clip-path="url(#clip0_20_200)">
-<path d="M23.95 15C23.6971 13.0707 22.7498 11.2998 21.2853 10.0186C19.8209 8.73746 17.9397 8.03395 15.9939 8.03977C14.0482 8.04558 12.1712 8.76034 10.7145 10.0502C9.25771 11.3401 8.32098 13.1167 8.07963 15.0475C7.83829 16.9782 8.30888 18.9307 9.40332 20.5395C10.4978 22.1483 12.141 23.3031 14.0254 23.7877C15.9099 24.2722 17.9064 24.0534 19.6411 23.1722C21.3759 22.2909 22.73 20.8076 23.45 19M23.95 24V19H18.95" stroke="#27272A" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
+<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
+<g clip-path="url(#clip0_20_201)">
+<path d="M19.95 11C19.6971 9.07074 18.7498 7.29977 17.2853 6.01862C15.8209 4.73746 13.9397 4.03395 11.9939 4.03977C10.0482 4.04558 8.17124 4.76034 6.71448 6.05023C5.25771 7.34012 4.32098 9.11672 4.07963 11.0475C3.83829 12.9782 4.30888 14.9307 5.40332 16.5395C6.49775 18.1483 8.141 19.3031 10.0254 19.7877C11.9099 20.2722 13.9064 20.0534 15.6411 19.1722C17.3759 18.2909 18.73 16.8076 19.45 15M19.95 20V15H14.95" stroke="#27272A" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
 </g>
 <defs>
-<clipPath id="clip0_20_200">
-<rect width="24" height="24" fill="white" transform="translate(4 4)"/>
+<clipPath id="clip0_20_201">
+<rect width="24" height="24" fill="white"/>
 </clipPath>
 </defs>
 </svg>

+ 80 - 72
studio/template/scripts/BxBaseStudioDashboard.php

@@ -182,65 +182,61 @@ class BxBaseStudioDashboard extends BxDolStudioDashboard
         return array('content' => $sContent);
     }
 
-	public function serviceGetBlockHostTools($bDynamic = true)
+	public function serviceGetBlockHostTools($bDynamic = false)
 	{
-		$sJsObject = $this->getPageJsObject();
-/*
-		$aMenu = array(
-			array(
-				'name' => 'audit', 
-				'title' => _t('_sys_inst_server_audit'), 
-				'link' => 'javascript:void(0)',
-                'onclick' => $sJsObject . '.serverAudit()',
-            ),
-			array(
-				'name' => 'permissions',
-				'title' => _t('_sys_audit_permissions'), 
-				'link' => 'javascript:void(0)',
-				'onclick' => $sJsObject . '.permissions()'
-			)
-		);
- */
-
-		$oAudit = new BxDolStudioToolsAudit();
-
-		$aTmplVarsItems = array();
-		if(!$bDynamic) {
-
-	        $oFunc = BxTemplFunctions::getInstance();
-
-	        $aLevels = array (BX_DOL_AUDIT_FAIL, BX_DOL_AUDIT_WARN, BX_DOL_AUDIT_UNDEF);
+            $sJsObject = $this->getPageJsObject();
 
-	        $aTmplVarsItems = array();
-	        foreach ($this->aItemsHTools as $sTitle => $sFunc) {
-	            $sStatus = BX_DOL_AUDIT_OK;
-	            foreach ($aLevels as $sLevel) { 
-	                $a = $oAudit->checkRequirements($sLevel, $sFunc);
-	                if (!empty($a)) {
-	                    $sStatus = $sLevel;
-	                    break;
-	                }
-	            }
-	            $aTmplVarsItems[] = array('status' => $oFunc->statusOnOff($sStatus), 'msg' => _t('_adm_dbd_txt_htools_status', $sTitle, $oAudit->typeToTitle($sStatus)));
-	        }
-		}
+            $oTemplate = BxDolStudioTemplate::getInstance();
+            $oAudit = new BxDolStudioToolsAudit();
+
+            $aTmplVarsItems = [];
+            if($bDynamic) {
+                $oFunc = BxTemplStudioFunctions::getInstance();
+
+                $aLevels = [BX_DOL_AUDIT_FAIL, BX_DOL_AUDIT_WARN, BX_DOL_AUDIT_UNDEF];
+                $aIcons = [
+                    'fail' => 'db-ht-fail.svg',
+                    'warn' => 'db-ht-warn.svg',
+                    'undef' => 'db-ht-undef.svg',
+                    'ok' => 'db-ht-ok.svg'
+                ];
+
+                $aTmplVarsItems = [];
+                foreach ($this->aItemsHTools as $sTitle => $sFunc) {
+                    $sStatus = BX_DOL_AUDIT_OK;
+                    foreach ($aLevels as $sLevel) { 
+                        $a = $oAudit->checkRequirements($sLevel, $sFunc);
+                        if (!empty($a)) {
+                            $sStatus = $sLevel;
+                            break;
+                        }
+                    }
+
+                    $aTmplVarsItems[] = [
+                        'icon' => $oTemplate->getIconUrl($aIcons[$sStatus]),
+                        'title' => $sTitle,
+                        'value' => $oAudit->typeToTitle($sStatus)
+                    ];
+                }
+            }
 
-        $sContent = BxDolStudioTemplate::getInstance()->parseHtmlByName('dbd_htools.html', array(
-        	'bx_if:show_content' => array(
-        		'condition' => !$bDynamic,
-        		'content' => array(
-	    			'bx_repeat:items' => $aTmplVarsItems,
-       			)
-        	),
-        	'bx_if:show_loader' => array(
-       			'condition' => $bDynamic,
-       			'content' => array(
-       				'js_object' => $sJsObject,
-       			)
-       		)
-	    ));
+            $sContent = $oTemplate->parseHtmlByName('dbd_htools.html', [
+                'js_object' => $sJsObject,
+                'bx_if:show_content' => [
+                    'condition' => $bDynamic,
+                    'content' => [
+                        'bx_repeat:items' => $aTmplVarsItems,
+                    ]
+                ],
+                'bx_if:show_loader' => [
+                    'condition' => !$bDynamic,
+                    'content' => [
+                        'js_object' => $sJsObject,
+                    ]
+                ]
+            ]);
 
-		return array('content' => $sContent);
+            return ['content' => $sContent];
 	}
 
 	public function serviceGetBlockCache()
@@ -251,39 +247,51 @@ class BxBaseStudioDashboard extends BxDolStudioDashboard
             $sChartData = $this->getCacheChartData();
             $bChartData = $sChartData !== false;
 
-            $aMenu = array();
+            $aMenu = [];
             foreach($this->aItemsCache as $aItem){
-                if($aItem['name'] != 'all' && !$oCacheUtilities->isEnabled($aItem['name']))
+                if($aItem['name'] == 'all' || !$oCacheUtilities->isEnabled($aItem['name']))
                     continue;
 
-                $aMenu[] = array(
+                $aMenu[] = [
                     'name' => $aItem['name'], 
                     'title' => _t('_adm_dbd_txt_c_clear_' . $aItem['name']), 
                     'link' => 'javascript:void(0)', 
                     'onclick' => $sJsObject . ".clearCache('" . $aItem['name'] . "')"
-                );
+                ];
             }
 
-            if(count($aMenu) == 2)
-                array_shift($aMenu);
+            $sMenuCode = '';
+            if(!empty($aMenu)) {
+                $sMenu = 'bx-std-cc-select-';
+                $oMenu = new BxTemplMenuInteractive(['template' => 'menu_vertical.html', 'menu_id' => $sMenu . 'menu', 'menu_items' => $aMenu]);
 
-            $sContent = BxDolStudioTemplate::getInstance()->parseHtmlByName('dbd_cache.html', array(
-                'bx_if:show_chart' => array(
+                $sMenuCode = BxTemplStudioFunctions::getInstance()->transBox($sMenu . 'popup', $oMenu->getCode(), true);
+            }
+
+            $sContent = BxDolStudioTemplate::getInstance()->parseHtmlByName('dbd_cache.html', [
+                'bx_if:show_chart' => [
                     'condition' => $bChartData,
-                    'content' => array(
+                    'content' => [
                         'js_object' => $sJsObject,
                         'chart_data' => $sChartData,
-                    )
-                ),
-                'bx_if:show_empty' => array(
+                    ]
+                ],
+                'bx_if:show_empty' => [
                     'condition' => !$bChartData,
-                    'content' => array(
+                    'content' => [
                         'message' => MsgBox(_t('_adm_dbd_msg_c_all_disabled'))
-                    )
-                ),
-            ));
+                    ]
+                ],
+                'bx_if:show_actions' => [
+                    'condition' => !empty($sMenuCode),
+                    'content' => [
+                        'js_object' => $sJsObject,
+                        'menu' => $sMenuCode
+                    ]
+                ],
+            ]);
 
-            return array('content' => $sContent, 'menu' => $aMenu);
+            return ['content' => $sContent];
 	}
 
 	public function serviceGetBlockQueues()

Некоторые файлы не были показаны из-за большого количества измененных файлов