Skip to content

Commit

Permalink
fix: log
Browse files Browse the repository at this point in the history
  • Loading branch information
youngster-yj committed May 16, 2024
1 parent 83bfd5c commit 780139d
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/yakit-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ jobs:
run: |
yarn add -D dmg-license && yarn electron-publish-se
# 社区版
- run: yarn build-render
- run: yarn build-test-render
if: ${{ startsWith(github.ref, 'refs/tags/v') || startsWith(github.ref, 'refs/heads/ci/community-') }}
working-directory: ./
name: "Build Community"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ export default function useHoldBatchGRPCStream(params: HoldBatchGRPCStreamParams
useEffect(() => {
const processDataId = "main"
ipcRenderer.on(`${token}-data`, async (e: any, res: PluginBatchExecutorResult) => {
console.log("批量执行流式响应---",res)
if (res.ScanConfig) {
inputValueRef.current.cache = res.ScanConfig
}
Expand Down
12 changes: 12 additions & 0 deletions app/renderer/src/main/src/pages/plugins/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1389,6 +1389,8 @@ export const apiHybridScan: (params: HybridScanControlAfterRequest, token: strin
.then(() => {
info(`启动成功,任务ID: ${token}`)
// send target / plugin
console.log("批量执行启动---","grpc-HybridScan",executeParams);

ipcRenderer.invoke("HybridScan", executeParams, token).then(() => {
info("发送扫描目标与插件成功")
})
Expand Down Expand Up @@ -1501,9 +1503,11 @@ export const apiGetYakScriptById: (Id: string | number) => Promise<YakScript> =
/**本地获取插件组数据 */
export const apiFetchQueryYakScriptGroupLocal: (All?: boolean, ExcludeType?: string[]) => Promise<GroupCount[]> = (All = true, ExcludeType = ['yak', 'codec']) => {
return new Promise((resolve, reject) => {
console.log("本地获取插件组请求---","grpc-QueryYakScriptGroup",{All, ExcludeType});
ipcRenderer
.invoke("QueryYakScriptGroup", {All, ExcludeType})
.then((res: QueryYakScriptGroupResponse) => {
console.log("本地获取插件组响应---",res);
resolve(res.Group)
})
.catch((e) => {
Expand Down Expand Up @@ -1566,9 +1570,12 @@ export const apiFetchGetYakScriptGroupLocal: (params: QueryYakScriptRequest) =>
/**本地更新插件所在组&新增插件组 */
export const apiFetchSaveYakScriptGroupLocal: (params: SaveYakScriptGroupRequest) => Promise<null> = (params) => {
return new Promise((resolve, reject) => {
console.log("更新本地分组请求","grpc-SaveYakScriptGroup",params);

ipcRenderer
.invoke("SaveYakScriptGroup", params)
.then((res: null) => {
console.log("更新本地分组请求","此处响应无实际内容,为直接刷新本地管理分组列表");
resolve(null)
})
.catch((e) => {
Expand All @@ -1595,13 +1602,16 @@ export const apiFetchResetYakScriptGroup: (params: ResetYakScriptGroupRequest) =

/** 线上获取插件组数据 */
export const apiFetchQueryYakScriptGroupOnline: () => Promise<API.GroupResponse> = () => {
console.log("线上获取插件组请求---","接口-group","请求方式-get");

return new Promise((resolve, reject) => {
try {
NetWorkApi<any, API.GroupResponse>({
method: "get",
url: "group"
})
.then((res) => {
console.log("线上获取插件组响应---",res);
resolve(res)
})
.catch((err) => {
Expand Down Expand Up @@ -1700,13 +1710,15 @@ export const apiFetchSaveYakScriptGroupOnline: (params: API.GroupRequest) => Pro
params
) => {
return new Promise((resolve, reject) => {
console.log("更新线上分组请求","接口-group","请求方式-get",params);
try {
NetWorkApi<API.GroupRequest, API.ActionSucceeded>({
method: "post",
url: "group",
data: params
})
.then((res) => {
console.log("更新线上分组响应","此处响应无实际内容,为直接刷新线上管理分组列表");
resolve(res)
})
.catch((err) => {
Expand Down

0 comments on commit 780139d

Please sign in to comment.