/
amesk
/
gitlab-analyzer
Обзор
Документация
Войти
/
amesk
/
gitlab-analyzer
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
jquery
help.html
274 строки
10 KB
amesk
Help extended by new features description.
15 фев 2025, 14:33
15 фев 2025, 14:33
c0be457
Код
Авторство
О чём код?
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Help - GitLab Analyzer</title> <link href="node_modules/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet"> <link href="node_modules/bootstrap-icons/font/bootstrap-icons.min.css" rel="stylesheet"> <link href="./styles.css" rel="stylesheet"> <style> body { background-color: #f0f0f0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; } .container { background-color: #ffffff; padding: 2rem; border-radius: 8px; box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); margin-top: 2rem; } h1, h2, h3 { color: #292961; } h1 { margin-bottom: 1.5rem; } h2 { margin-top: 2rem; margin-bottom: 1rem; } h3 { margin-top: 1.5rem; margin-bottom: 0.5rem; } ul { padding-left: 1.5rem; } li { margin-bottom: 0.5rem; } code { background-color: #f8f9fa; padding: 0.2rem 0.4rem; border-radius: 4px; color: #d63384; } .example { margin-top: 1.5rem; background-color: #f8f9fa; padding: 1rem; border-radius: 4px; margin-bottom: 1rem; } .example strong { color: #292961; } </style> </head> <body> <div class="container-fluid"> <div class="row align-items-center mb-3"> <div class="col-md-12"> <div id="pagetitle" class="d-flex align-items-center p-3 bg-primary text-white rounded"> <!-- <i class="bi bi-gitlab fs-3 me-3"></i> --> <div class="small-space"> <image src="icon.svg" alt="GitLab Logo" class="img-fluid" /> </div> <div> <h1 class="h4 mb-0">GitLab Analyzer</h1> <small class="text-white-50">Manage your GitLab issues with ease</small> </div> </div> </div> </div> <div class="scrollable-container-help"> <h1>Help</h1> <p>This is the help page for the GitLab Analyzer application.</p> <p>Here you can find information on how to use the application:</p> <ul> <li>Enter the Project ID to load issues.</li> <li>Use the search bar to filter issues by title, labels, or ID.</li> <li>Select issues modify their labels, close them using the form at the right side.</li> </ul> <h1>Advanced Issues Filtering</h1> <p>This functionality is designed to filter a list of issues (or tasks) based on a custom condition that can include logical operators (AND, OR, NOT) and regular expressions. The class provides methods to tokenize the input condition, parse it into a JavaScript expression, and evaluate the condition against each issue in the list.</p> <h2>Key Features:</h2> <ul> <li><strong>Logical Operators:</strong> Supports &&, ||, and ! operators for complex filtering.</li> <li><strong>Advanced time functions:</strong>Time and interval analysis may use hours, days, weeks and months.</li> <li><strong>Regular Expressions:</strong> Allows filtering based on regex patterns in issue titles, labels, or IDs.</li> <li><strong>Sorting:</strong>Query output may be sorted by a number of columns in ascending or descending order.</li> <li><strong>Error Handling:</strong> Gracefully handles invalid syntax or errors during filtering.</li> </ul> <h1>Available columns</h1> <p>The following columns are available for filtering queries:</p> <ul> <li>iid</li> <li>title</li> <li>labels</li> <li>assignee</li> <li>priority</li> <li>milestone</li> <li>estimation</li> <li>time_spent</li> <li>age</li> <li>updated</li> </ul> <h1>Issues Sorting</h1> <p>This functionality provides multi-field sorting of a search query output.</p> <p>After the query you may specify "sort by" keyword followed by a list of columns and optional "asc"/"desc" to indicate sort direction.</p> <p>Some examples:</p> <ul> <li> <strong>Show most important INS issues we are working on</strong>: <div class="example"> labels.any(["in progress", "testing"]) && labels.has("INS") sort by priority desc </div> </li> <li> <strong>Show INS issues sorted by assignee, then by priority</strong>: <div class="example"> labels.has("INS") sort by assignee, priority desc </div> </li> </ul> <h1>Excel export</h1> <p>The application provides an Excel export feature that can be used to export selected issues to Excel.</p> <p>report.xlsx file is generated in the current directory and opened through shell integration.</p> <h1>Jexl Query Language Reference</h1> <p>Jexl (JavaScript Expression Language) is a powerful tool for evaluating expressions in JavaScript. Below is a reference for writing queries using Jexl.</p> <p>Full reference is available at <a href="https://commons.apache.org/proper/commons-jexl/reference/syntax.html">https://commons.apache.org/proper/commons-jexl/reference/syntax.html</a>.</p> <h2>Basic Syntax</h2> <p>Jexl expressions are similar to JavaScript expressions. Here are some basic examples:</p> <ul> <li> <strong>Equality Check</strong>: <div class="example"> assignee == "Alexei Eskenazi" </div> </li> <li> <strong>Inequality Check</strong>: <div class="example"> assignee != "Anton Miniuk" </div> </li> <li> <strong>Logical AND</strong>: <div class="example"> assignee == "Alexei Eskenazi" && labelsHas(labels, "todo") </div> </li> <li> <strong>Logical OR</strong>: <div class="example"> assignee == "Alexei Eskenazi" || labelsHas(labels, "done") </div> </li> </ul> <h2>Time oriented functions</h2> <p>For every time-oriented columns, such as <strong>Age, Updated, Estimation, Time Spent</strong>, there are several properties that allow time conversion to the desired form:</p> <ul> <li>.seconds</li> <li>.hours</li> <li>.days</li> <li>.weeks</li> <li>.months</li> </ul> <h2>Examples:</h2> <ul> <li> <strong>Show old issues to be purged from GitLab</strong>: <div class="example"> age.months >= 6 && !labels.has("KEEP!") </div> </li> <li> <strong>Show bugs that need our attention</strong>: <div class="example"> updated.months >= 2 && labels.has(["bug", "crush"]) sort by priority desc </div> </li> </ul> <h2>Functions</h2> There is one dedicated function <strong>empty()</strong> which can be used to check if an object is empty. <h2>Examples</h2> <p>Here are some practical examples of Jexl queries:</p> <ul> <li> <strong>Filter issues with the label "todo"</strong>: <div class="example"> has(labels, "todo") </div> </li> <li> <strong>Filter issues assigned to "Alexei Eskenazi"</strong>: <div class="example"> assignee == "Alexei Eskenazi" </div> </li> <li> <strong>Filter issues with the label "ecdis"</strong>: <div class="example"> has(labels, "ecdis") </div> </li> <li> <strong>Filter issues with the label "done" and assigned to "Alexei Eskenazi"</strong>: <div class="example"> has(labels, "done") && assignee == "Alexei Eskenazi" </div> </li> <li> <strong>Filter issues with priority > 70 and age > 6 months</strong>: <div class="example"> priority > 70 && age.months > 6 </div> </li> <li> <strong>Filter issues with priority = 100 and no assignee defined</strong>: <div class="example"> priority == 100 && empty(assignee) </div> </li> </ul> <h2>Notes</h2> <ul> <li>Jexl supports most JavaScript-like expressions, including arithmetic operations, comparisons, and logical operators.</li> <li>Custom functions must be added to the Jexl instance before they can be used in expressions.</li> <li>Expressions are evaluated in the context of the provided data object (e.g., <code>issue</code> in the examples).</li> </ul> <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script> </body> </html>