8000 GitHub - Hessevalentino/ICT-log-Viewer: ICT Log Analyzer is a web application for analyzing logs from printed circuit board tests (ICT - In-Circuit Test). The application can process log files generated by the tester and display clear test results including failure details, display of tested components, and other important information.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

ICT Log Analyzer is a web application for analyzing logs from printed circuit board tests (ICT - In-Circuit Test). The application can process log files generated by the tester and display clear test results including failure details, display of tested components, and other important information.

Notifications You must be signed in to change notification settings

Hessevalentino/ICT-log-Viewer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ICT Log Analyzer

ICT Log Analyzer Logo

Web application for analyzing logs from printed circuit board tests with multilingual support (Czech, English, Chinese).

Table of Contents

Application Description

ICT Log Analyzer is a web application for analyzing logs from printed circuit board tests (ICT - In-Circuit Test). The application can process log files generated by the tester and display clear test results including failure details, display of tested components, and other important information.

Main Features:

  • Drag & drop log file upload
  • Automatic log type detection
  • Extraction and display of all important test information
  • Clear display of test results
  • Display of test failure details
  • Filtered display of tested components
  • Multilingual support (Czech, English, Chinese)
  • Screenshot functionality

Installation

Requirements

  • Web server with PHP support (e.g., Apache, XAMPP, WAMP)
  • Browser with support for modern JavaScript and CSS

Installation Process

  1. Clone or extract the application files to a folder accessible by the web server
  2. Make sure the folder and files have the correct read permissions
  3. Access the application via a web browser (e.g., http://localhost/ICT/)

Usage Guide

Uploading a Log File

There are three ways to upload a log file:

  1. Drag & drop - Drag a file with .log or .txt extension to the designated area
  2. Click on the area - Click on the "Drag log file here or click to select" area and select a file
  3. Manual insertion - Paste the contents of the log file directly into the text field

Data Analysis

After uploading the log, click the "View Log" button. The application will automatically:

  1. Detect the log type (short/long)
  2. Analyze the log content
  3. Extract all relevant data
  4. Display a clear result

Viewing Results

The analysis results are divided into the following sections:

  1. Test Result Summary - Basic information about whether the test passed or failed
  2. Basic Test Information - Details about the tested board, revision, etc.
  3. Time Data - Start time, end time, and test duration
  4. Individual Test Results - Overview of results of all subtests (pretest, component test, etc.)
  5. Component Failure Details - If the test failed, details about the component that caused the failure are displayed here
  6. Tested Component Details - Table of all tested components with filtering options

Changing Language

You can change the application language using the dropdown menu in the top left corner. The application supports Czech, English, and Chinese. The language selection is stored in the browser's localStorage and persists between sessions.

Creating a Screenshot

You can create a screenshot of the analysis results by clicking the "Save Screenshot" button in the top right corner. The screenshot will be saved as a PNG file.

Supported Log Types

The application supports two types of logs:

  1. Short log (.txt files) - Contains basic information about the test and results
  2. Long log (.log files) - Contains detailed information including test results of individual components

The application automatically detects the log type and processes it accordingly.

Multilingual Support

The application supports multiple languages. Currently implemented languages are:

  • Czech (cs) - Default language
  • English (en)
  • Chinese (zh)

Language Implementation

The application uses a language manager to handle translations. All text in the application is stored in language files and loaded dynamically based on the selected language. The language selection is stored in the browser's localStorage and persists between sessions.

Language Files Structure

Language files are located in the lang/ directory:

  • cs.js - Czech translations
  • en.js - English translations
  • zh.js - Chinese translations
  • language-manager.js - Language management functionality

Translation Implementation

HTML elements that need to be translated have a data-i18n attribute with a key that corresponds to a translation in the language files. The language manager replaces the content of these elements with the appropriate translation when the language is changed.

Example of an HTML element with translation:

<button data-i18n="analyze_log"></button>

Example of a translation in a language file:

// In cs.js
const csTranslations = {
    analyze_log: 'Prohlédnout Log',
    // other translations...
};

Application Structure

File/Directory Description
index.php Main application file containing the HTML structure
css/styles.css Cascading style sheets for the application appearance
js/script.js JavaScript functions for log analysis and data display
js/html2canvas.min.js Library for creating screenshots
lang/cs.js Czech language translations
lang/en.js English language translations
lang/zh.js Chinese language translations
lang/language-manager.js Language management functionality
amelogo.svg Application logo
readme.md This documentation file

Technical Details

  • Runtime Environment: The application runs on the client side (in the browser)
  • Technologies Used: HTML5, CSS3, JavaScript, PHP
  • Data Processing: Data analysis is performed in JavaScript without the need to send data to the server
  • Compatibility: The application is optimized for modern browsers (Chrome, Firefox, Safari, Brave)
  • Multilingual Support: The application uses a custom language manager to handle translations
  • Screenshot Functionality: The application uses the html2canvas library to create screenshots

Application Flow Diagram

+---------------------+     +----------------------+     +------------------------+
|                     |     |                      |     |                        |
|  Log Input Methods  |     |   Log Processing     |     |   Results Display      |
|                     |     |                      |     |                        |
+---------------------+     +----------------------+     +------------------------+
|                     |     |                      |     |                        |
| 1. Drag & Drop      | --> | 1. Log Type Detection| --> | 1. Test Result Summary |
| 2. File Selection   |     | 2. Data Extraction   |     | 2. Basic Information   |
| 3. Manual Paste     |     | 3. Data Analysis     |     | 3. Time Data           |
|                     |     | 4. Component Parsing |     | 4. Test Results Table  |
|                     |     |                      |     | 5. Component Details   |
|                     |     |                      |     | 6. Failure Details     |
+---------------------+     +----------------------+     +------------------------+
          ^                            |                            |
          |                            |                            |
          |                            v                            v
+---------------------+     +----------------------+     +------------------------+
|                     |     |                      |     |                        |
|  User Interactions  |     |   Language System    |     |   Export Options       |
|                     |     |                      |     |                        |
+---------------------+     +----------------------+     +------------------------+
|                     |     |                      |     |                        |
| 1. Language Change  | <-> | 1. Language Files    | <-> | 1. Screenshot Creation |
| 2. Component Filter |     | 2. Translation Keys  |     |                        |
| 3. Clear Input      |     | 3. Dynamic UI Update |     |                        |
|                     |     |                      |     |                        |
+---------------------+     +----------------------+     +------------------------+

Application Flow Description

  1. Log Input

    • User provides log data through one of three methods: drag & drop, file selection, or manual paste
    • The application accept A675 s .log and .txt files
  2. Log Processing

    • The application automatically detects the log type (short/long)
    • Data is extracted from the log according to its format
    • Component information is parsed and organized
  3. Results Display

    • Results are presented in a structured format with multiple sections
    • Failed components are highlighted
    • Component table allows filtering by type
  4. User Interactions

    • Language can be changed at any time using the dropdown menu
    • Component table can be filtered by category
    • Input can be cleared for new analysis
  5. Language System

    • Translations are loaded from language files
    • UI elements are updated dynamically based on selected language
    • Language preference is stored in browser's localStorage
  6. Export Options

    • Analysis results can be saved as a screenshot

Language Manager

The language manager is responsible for loading and applying translations. It provides the following functions:

  • initLanguageManager() - Initializes the language manager and loads translations
  • changeLanguage(lang) - Changes the current language
  • updateUILanguage() - Updates all UI elements with translations for the current language
  • getTranslation(key) - Gets a translation for a specific key
  • getTestNameTranslation(testName) - Gets a translation for a specific test name

Code Examples

HTML Element with Translation

<button onclick="analyzeLog()" data-i18n="analyze_log"></button>

Language File Structure

// Czech translations (cs.js)
const csTranslations = {
    // Basic UI elements
    screenshot: 'Uložit screenshot',
    analyze_log: 'Prohlédnout Log',
    clear_text: 'Vymazat text',

    // Test results
    test_failed: 'TEST SELHAL',
    test_passed: 'TEST ÚSPĚŠNÝ',

    // Other translations...
};

// Test name translations
const csTestNameTranslations = {
    'Pretest': 'Pretest',
    'Discharge': 'Vybití',
    'Open': 'Test rozpojených spojů',
    // Other test name translations...
};

Language Manager Usage

// Change language
changeLanguage('en');

// Get translation
const translatedText = getTranslation('analyze_log');

// Update UI with translations
updateUILanguage();

Log Analysis Function

function analyzeLog() {
    const logText = document.getElementById('log-input').value.trim();
    if (!logText) {
        alert(getTranslation('please_insert_log'));
        return;
    }

    // Reset component table
    componentData = [];

    try {
        // Determine log type automatically
        let logType;
        if (logText.includes('// Component_Data')) {
            logType = 'long';
        } else {
            logType = 'short';
        }

        // Show detected log type
        document.getElementById('log-type-info').style.display = 'block';

        // Set the appropriate data-i18n attribute
        const logTypeElement = document.getElementById('detected-log-type');
        logTypeElement.setAttribute('data-i18n', logType === 'short' ? 'short_log' : 'long_log');

        // Update the text content
        logTypeElement.textContent = logType === 'short' ?
            getTranslation('short_log') :
            getTranslation('long_log');

        // Parse log based on type
        if (logType === 'long') {
            analyzeLongLog(logText);
        } else {
            analyzeShortLog(logText);
        }
    } catch (error) {
        console.error("Error analyzing log:", error);
        alert(getTranslation('error_log_analysis') + ": " + error.message);
    }
}

Contact

  • Author: Hesse Valentino
  • Email: hessevalentino@gmail.com
  • Web: https://www.hardwired.dev
  • Copyright: © 2025 Hesse Valentino - Inventec Automotive
  • License: Apache License 2.0
  • SPDX License Identifier: Apache-2.0
  • License Terms: You are free to use, modify, and distribute this software under the terms of the Apache License 2.0, which requires preservation of copyright and license notices, and attribution to the original author
  • Version: 2.0

Valentino Hesse 2025 - With ❤ to Quality Dept. - Per ardua ad astra

About

ICT Log Analyzer is a web application for analyzing logs from printed circuit board tests (ICT - In-Circuit Test). The application can process log files generated by the tester and display clear test results including failure details, display of tested components, and other important information.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0