Skip to content

Commit

Permalink
minor UI tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
huangjien committed Nov 15, 2024
1 parent 25be5e2 commit 6bb8bb0
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 22 deletions.
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "jenkins-log-reader",
"displayName": "AI Log Reader",
"description": "Read jenkins log, analyse with local AI.",
"version": "0.8.12",
"version": "0.8.13",
"engines": {
"vscode": "^1.95.0"
},
Expand Down Expand Up @@ -235,24 +235,24 @@
"glob": "^11.0.0",
"husky": "^9.1.6",
"normalize.css": "^8.0.1",
"postcss": "^8.4.47",
"postcss": "^8.4.49",
"prettier": "^3.3.3",
"react": "18.3.1",
"react-dom": "18.3.1",
"typescript": "^5.6.3",
"typescript-eslint": "^8.13.0"
"typescript-eslint": "^8.14.0"
},
"dependencies": {
"@tailwindcss/typography": "^0.5.15",
"@vscode/webview-ui-toolkit": "^1.4.0",
"autoprefixer": "^10.4.20",
"axios": "^1.7.7",
"crypto": "^1.0.1",
"marked": "^14.1.4",
"ollama": "^0.5.9",
"openai": "^4.71.1",
"marked": "^15.0.0",
"ollama": "^0.5.10",
"openai": "^4.72.0",
"p-limit": "^6.1.0",
"tailwindcss": "^3.4.14"
"tailwindcss": "^3.4.15"
},
"files": [
"out/**/*",
Expand Down
2 changes: 1 addition & 1 deletion python/analyse_video.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def process_video(video_path, target_keyword="target_object"):
clean_up(temp_folder)

# Example usage
video_path = "/Users/huangjien/temp/test/test_video1.mov"
video_path = "/Users/jhuang/temp/test/test_video1.mov"
target_keyword = """
[Role]You are a QA.
[Task]Your task is checking the screen shots generated by an automation tool.
Expand Down
2 changes: 1 addition & 1 deletion src/JenkinsPanel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export class JenkinsPanel {
<title>Jenkins Logs Analysis</title>
</head>
<body>
<div class="container mx-auto">
<div class="container mx-auto divide-y">
<div class="grid grid-cols-4 gap-1 " >
<h2 class="col-span-2 text-xl text-center font-bold mx-8 text-inherit">Jobs - Builds</h2>
<vscode-button class="hover:animate-tada col-span-1 text-xs text-center h-6 w-20 place-self-end rounded" id="refresh">Refresh</vscode-button>
Expand Down
17 changes: 9 additions & 8 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ function registerCommandOfReadVideo(
fs.rmSync(output_temp_dir, { recursive: true });
fs.mkdirSync(output_temp_dir, { recursive: true });
}
let tasks: any[]= [];
let tasks: any[] = [];
if (uri) {
const command = `ffmpeg -i ${uri.fsPath} -r 1/1 ${output_temp_dir}frame-%04d.png`;
console.log(command);
Expand All @@ -223,14 +223,15 @@ function registerCommandOfReadVideo(
// for each file under the output_temp_dir, call analyse_image

fs.readdirSync(output_temp_dir).forEach((file) => {

console.log("file: " + output_temp_dir + file)
const base64String = fs.readFileSync(output_temp_dir + file).toString("base64");
const long_task = limit(() => analyse_image(base64String, provider, imageAiModel, videoPrompt)) ;
tasks.push(long_task)
console.log("file: " + output_temp_dir + file);
const base64String = fs.readFileSync(output_temp_dir + file).toString("base64");
const long_task = limit(() =>
analyse_image(base64String, provider, imageAiModel, videoPrompt)
);
tasks.push(long_task);
});
showStatusBarProgress(Promise.all(tasks), 'Analysing the video...');

showStatusBarProgress(Promise.all(tasks), "Analysing the video...");
console.log("after analysing finished, delete the output_temp_dir");
// after analysing finished, delete the output_temp_dir ???
}
Expand Down
10 changes: 5 additions & 5 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -267,11 +267,11 @@ function displayGridData() {
const basicGrid = document.getElementById("basic-grid") as DataGrid;

basicGrid.columnDefinitions = [
{ columnDataKey: "url", title: "build url" },
{ columnDataKey: "result", title: "result" },
{ columnDataKey: "timestamp", title: "time stamp" },
{ columnDataKey: "hash", title: "hash" },
{ columnDataKey: "duration", title: "duration" },
{ columnDataKey: "url", title: "Build" },
{ columnDataKey: "result", title: "Result" },
{ columnDataKey: "timestamp", title: "Timestamp" },
{ columnDataKey: "hash", title: "Hash" },
{ columnDataKey: "duration", title: "Duration" },
];

if (basicGrid) {
Expand Down

0 comments on commit 6bb8bb0

Please sign in to comment.