refactor: tianji report use log rather than fmt
This commit is contained in:
parent
896170836c
commit
39b4ff9ec5
@ -3,7 +3,6 @@ package main
|
|||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"flag"
|
"flag"
|
||||||
"fmt"
|
|
||||||
jsoniter "github.com/json-iterator/go"
|
jsoniter "github.com/json-iterator/go"
|
||||||
"log"
|
"log"
|
||||||
"net"
|
"net"
|
||||||
@ -152,7 +151,7 @@ func sendHTTPRequest(_url url.URL, payload ReportData) {
|
|||||||
client := &http.Client{}
|
client := &http.Client{}
|
||||||
resp, err := client.Do(req)
|
resp, err := client.Do(req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println("Send request error:", err)
|
log.Println("Send request error:", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -162,7 +161,7 @@ func sendHTTPRequest(_url url.URL, payload ReportData) {
|
|||||||
body := new(bytes.Buffer)
|
body := new(bytes.Buffer)
|
||||||
_, err = body.ReadFrom(resp.Body)
|
_, err = body.ReadFrom(resp.Body)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println("Read response error:", err)
|
log.Println("Read response error:", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -211,7 +211,7 @@ export const ServerList: React.FC<{
|
|||||||
dataSource={dataSource}
|
dataSource={dataSource}
|
||||||
pagination={false}
|
pagination={false}
|
||||||
locale={{ emptyText: <Empty description="No server online" /> }}
|
locale={{ emptyText: <Empty description="No server online" /> }}
|
||||||
rowClassName={(record) => clsx(!isServerOnline(record) && 'opacity-80')}
|
rowClassName={(record) => clsx(!isServerOnline(record) && 'opacity-60')}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user