diff --git a/sysom_web/src/pages/security/List/index.jsx b/sysom_web/src/pages/security/List/index.jsx
index 7b3473af3cd58e80e7d219cf53633691750f197d..af76ca284e5b1f1d296370d9e6a4145b401d1e26 100644
--- a/sysom_web/src/pages/security/List/index.jsx
+++ b/sysom_web/src/pages/security/List/index.jsx
@@ -165,7 +165,7 @@ const List=(props)=> {
return (
-
+
[
diff --git a/sysom_web/src/pages/security/components/ListCard.jsx b/sysom_web/src/pages/security/components/ListCard.jsx
index 4c65ce41bbc00fc64b38adc69df4df7a98d5094f..507effe70191a8a12bbed5882e151ac626c465e8 100644
--- a/sysom_web/src/pages/security/components/ListCard.jsx
+++ b/sysom_web/src/pages/security/components/ListCard.jsx
@@ -11,28 +11,29 @@ import { size } from 'lodash-es';
const ListCard=(props)=> {
const intl = useIntl();
- const [responsive, setResponsive] = useState(false);
- const [complete, setComplete] = useState(false);
- const [StatisticList, setStatisticList] = useState()
- const getSummary = async() => {
- setComplete(true);
- let msg=await summaryApi();
- if(msg){
- setComplete(false);
- if(msg.success){
- message.success(intl.formatMessage({id:'component.ListCard.success',defaultMessage:'Scan success'}));
- setStatisticList(msg.data.fixed_cve)
- props.refreshTable();
- }else{
- message.error(intl.formatMessage({id:'component.ListCard.failed',defaultMessage:'Scan failed'}));
- }
+ const [responsive, setResponsive] = useState(false);
+ const [complete, setComplete] = useState(false);
+ const [StatisticList, setStatisticList] = useState()
+ const Scan = async () => {
+ setComplete(true);
+ let res=await updataApi();
+ if(res){
+ setComplete(false);
+ if(res.success){
+ message.success(intl.formatMessage({id:'component.ListCard.success',defaultMessage:'Scan success'}));
+ setTimeout(()=>{
+ window.location.reload();
+ },1000)
+ }else{
+ message.error(intl.formatMessage({id:'component.ListCard.failed',defaultMessage:'Scan failed'}));
}
}
- useEffect(async() => {
- let msg=await summaryApi();
- if(msg.success)
- setStatisticList(msg.data.fixed_cve)
- }, []);
+ }
+ useEffect(async() => {
+ let msg=await summaryApi();
+ if(msg.success)
+ setStatisticList(msg.data.fixed_cve)
+ }, []);
return (
{
value={StatisticList?.latest_scan_time} valueStyle={{ color: "white",fontSize:13,whiteSpace:'nowrap',textAlign:'center' }} />
-
+