* Fix delist metric in view page.

This commit is contained in:
qixinzhi
2024-03-27 17:23:13 +08:00
committed by liyang
parent e0756c2a35
commit d0eb29a21c
3 changed files with 21 additions and 17 deletions
+1 -16
View File
@@ -1,19 +1,4 @@
/**
* 提示并下架度量项。
* Delist metric with tips.
*
* @param int metricID
* @param string metricName
* @access public
* @return void
*/
window.confirmDelist = function(metricID, metricName)
{
zui.Modal.confirm(confirmDelist.replace('%s', metricName)).then((res) =>
{
if(res) $.ajaxSubmit({url: $.createLink('metric', 'delist', 'metricID=' + metricID)});
});
};
window.onRenderCell = function(result, {row, col})
{
+17
View File
@@ -30,3 +30,20 @@ window.renderDTableCell = function(result, {row, col})
return result;
}
/**
* 提示并下架度量项。
* Delist metric with tips.
*
* @param int metricID
* @param string metricName
* @access public
* @return void
*/
window.confirmDelist = function(metricID, metricName)
{
zui.Modal.confirm(confirmDelist.replace('%s', metricName)).then((res) =>
{
if(res) $.ajaxSubmit({url: $.createLink('metric', 'delist', 'metricID=' + metricID)});
});
};
+3 -1
View File
@@ -11,7 +11,9 @@ declare(strict_types=1);
*/
namespace zin;
if($isOldMetric)
jsVar('confirmDelist', $lang->metric->confirmDelist);
if($isOldMetric)
{
include 'viewsqlmetric.html.php';
}