fix : chanel test did not refresh
This commit is contained in:
@@ -44,7 +44,7 @@ function renderTimestamp(timestamp) {
|
|||||||
|
|
||||||
const ChannelsTable = () => {
|
const ChannelsTable = () => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
||||||
let type2label = undefined;
|
let type2label = undefined;
|
||||||
|
|
||||||
const renderType = (type) => {
|
const renderType = (type) => {
|
||||||
@@ -559,7 +559,7 @@ const ChannelsTable = () => {
|
|||||||
if (!enableTagMode) {
|
if (!enableTagMode) {
|
||||||
channelDates.push(channels[i]);
|
channelDates.push(channels[i]);
|
||||||
} else {
|
} else {
|
||||||
let tag = channels[i].tag?channels[i].tag:"";
|
let tag = channels[i].tag ? channels[i].tag : "";
|
||||||
// find from channelTags
|
// find from channelTags
|
||||||
let tagIndex = channelTags[tag];
|
let tagIndex = channelTags[tag];
|
||||||
let tagChannelDates = undefined;
|
let tagChannelDates = undefined;
|
||||||
@@ -805,6 +805,9 @@ const ChannelsTable = () => {
|
|||||||
record.response_time = time * 1000;
|
record.response_time = time * 1000;
|
||||||
record.test_time = Date.now() / 1000;
|
record.test_time = Date.now() / 1000;
|
||||||
showInfo(t('通道 ${name} 测试成功,耗时 ${time.toFixed(2)} 秒。').replace('${name}', record.name).replace('${time.toFixed(2)}', time.toFixed(2)));
|
showInfo(t('通道 ${name} 测试成功,耗时 ${time.toFixed(2)} 秒。').replace('${name}', record.name).replace('${time.toFixed(2)}', time.toFixed(2)));
|
||||||
|
|
||||||
|
// 刷新列表
|
||||||
|
await refresh();
|
||||||
} else {
|
} else {
|
||||||
showError(message);
|
showError(message);
|
||||||
}
|
}
|
||||||
@@ -838,6 +841,8 @@ const ChannelsTable = () => {
|
|||||||
record.balance = balance;
|
record.balance = balance;
|
||||||
record.balance_updated_time = Date.now() / 1000;
|
record.balance_updated_time = Date.now() / 1000;
|
||||||
showInfo(t('通道 ${name} 余额更新成功!').replace('${name}', record.name));
|
showInfo(t('通道 ${name} 余额更新成功!').replace('${name}', record.name));
|
||||||
|
// 刷新列表
|
||||||
|
await refresh();
|
||||||
} else {
|
} else {
|
||||||
showError(message);
|
showError(message);
|
||||||
}
|
}
|
||||||
@@ -1186,7 +1191,7 @@ const ChannelsTable = () => {
|
|||||||
</Space>
|
</Space>
|
||||||
</div>
|
</div>
|
||||||
<div style={{ marginTop: 20 }}>
|
<div style={{ marginTop: 20 }}>
|
||||||
<Space>
|
<Space>
|
||||||
<Typography.Text strong>{t('标签聚合模式')}</Typography.Text>
|
<Typography.Text strong>{t('标签聚合模式')}</Typography.Text>
|
||||||
<Switch
|
<Switch
|
||||||
checked={enableTagMode}
|
checked={enableTagMode}
|
||||||
@@ -1199,14 +1204,14 @@ const ChannelsTable = () => {
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<Button
|
<Button
|
||||||
disabled={!enableBatchDelete}
|
disabled={!enableBatchDelete}
|
||||||
theme="light"
|
theme="light"
|
||||||
type="primary"
|
type="primary"
|
||||||
style={{ marginRight: 8 }}
|
style={{ marginRight: 8 }}
|
||||||
onClick={() => setShowBatchSetTag(true)}
|
onClick={() => setShowBatchSetTag(true)}
|
||||||
>
|
>
|
||||||
{t('批量设置标签')}
|
{t('批量设置标签')}
|
||||||
</Button>
|
</Button>
|
||||||
</Space>
|
</Space>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user