Skip to content

Commit

Permalink
Support screenshots from IVRE
Browse files Browse the repository at this point in the history
  • Loading branch information
p-l- committed Jan 28, 2023
1 parent 9567384 commit 3a6b9fb
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ interface IvrePort {
service_product?: string;
service_version?: string;
service_extrainfo?: string;
screenshot?: string;
screendata?: string;
}

interface IvreTag {
Expand Down Expand Up @@ -649,9 +651,16 @@ class IvreSearchView extends IvreSearch {
);
}
});
if (port.screenshot === "field" && port.screendata) {
tmp_answer += `\n![](data:image/png;base64,${port.screendata})\n`;
}
tmp_answer += "\n";
});
if (tmp_answer) {
answer += `\n## Ports ##\n${tmp_answer}`;
answer += `\n## Ports ##\n${tmp_answer.substring(
0,
tmp_answer.length - 1
)}`;
}
return answer;
}
Expand Down

0 comments on commit 3a6b9fb

Please sign in to comment.