@allurereport/web-allure2 3.0.0-beta.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.babelrc.cjs +18 -0
- package/.eslintrc.cjs +125 -0
- package/README.md +27 -0
- package/dist/multi/154.app-9ac9d027.js +1 -0
- package/dist/multi/216.app-9ac9d027.js +1 -0
- package/dist/multi/232.app-9ac9d027.js +1 -0
- package/dist/multi/250.app-9ac9d027.js +1 -0
- package/dist/multi/256.app-9ac9d027.js +1 -0
- package/dist/multi/301.app-9ac9d027.js +1 -0
- package/dist/multi/323.app-9ac9d027.js +1 -0
- package/dist/multi/353.app-9ac9d027.js +1 -0
- package/dist/multi/411d15fc5bb62472eea6ead4fb276ca9.ico +0 -0
- package/dist/multi/564.app-9ac9d027.js +1 -0
- package/dist/multi/594.app-9ac9d027.js +1 -0
- package/dist/multi/623.app-9ac9d027.js +1 -0
- package/dist/multi/7.app-9ac9d027.js +1 -0
- package/dist/multi/729.app-9ac9d027.js +1 -0
- package/dist/multi/783.app-9ac9d027.js +1 -0
- package/dist/multi/826.app-9ac9d027.js +1 -0
- package/dist/multi/925.app-9ac9d027.js +1 -0
- package/dist/multi/app-9ac9d027.js +2 -0
- package/dist/multi/app-9ac9d027.js.LICENSE.txt +29 -0
- package/dist/multi/checkmark-c1a9ce12.svg +8 -0
- package/dist/multi/manifest.json +27 -0
- package/dist/multi/sort-down-icon-41195b0d.svg +8 -0
- package/dist/multi/sort-icon-fddc6c81.svg +8 -0
- package/dist/multi/sort-up-icon-d5bc65f6.svg +8 -0
- package/dist/multi/sprite.svg +4 -0
- package/dist/multi/styles-9ac9d027.css +558 -0
- package/dist/multi/vertical-5e6d1df4.png +0 -0
- package/dist/single/411d15fc5bb62472eea6ead4fb276ca9.ico +0 -0
- package/dist/single/app-f726ff87.js +2 -0
- package/dist/single/app-f726ff87.js.LICENSE.txt +29 -0
- package/dist/single/checkmark-c1a9ce12.svg +8 -0
- package/dist/single/manifest.json +10 -0
- package/dist/single/sort-down-icon-41195b0d.svg +8 -0
- package/dist/single/sort-icon-fddc6c81.svg +8 -0
- package/dist/single/sort-up-icon-d5bc65f6.svg +8 -0
- package/dist/single/sprite.svg +4 -0
- package/dist/single/styles-f726ff87.css +558 -0
- package/package.json +107 -0
- package/src/app.js +69 -0
- package/src/assets/icons/allure-logo.svg +45 -0
- package/src/assets/icons/bamboo.svg +31 -0
- package/src/assets/icons/bitbucket.svg +10 -0
- package/src/assets/icons/bomb.svg +7 -0
- package/src/assets/icons/broken.svg +10 -0
- package/src/assets/icons/bug.svg +10 -0
- package/src/assets/icons/chevron-down.svg +10 -0
- package/src/assets/icons/chevron-left.svg +10 -0
- package/src/assets/icons/chevron-right-fat.svg +10 -0
- package/src/assets/icons/chevron-right.svg +10 -0
- package/src/assets/icons/chevron-up.svg +10 -0
- package/src/assets/icons/circleci.svg +1 -0
- package/src/assets/icons/close.svg +10 -0
- package/src/assets/icons/collapse.svg +5 -0
- package/src/assets/icons/compare.svg +10 -0
- package/src/assets/icons/copy.svg +11 -0
- package/src/assets/icons/csv.svg +13 -0
- package/src/assets/icons/download.svg +11 -0
- package/src/assets/icons/draggable.svg +15 -0
- package/src/assets/icons/expand.svg +5 -0
- package/src/assets/icons/failed.svg +10 -0
- package/src/assets/icons/file.svg +3 -0
- package/src/assets/icons/folder.svg +10 -0
- package/src/assets/icons/github.svg +4 -0
- package/src/assets/icons/gitlab.svg +12 -0
- package/src/assets/icons/graphs.svg +11 -0
- package/src/assets/icons/history.svg +11 -0
- package/src/assets/icons/image.svg +3 -0
- package/src/assets/icons/info.svg +12 -0
- package/src/assets/icons/jenkins.svg +327 -0
- package/src/assets/icons/jobs.svg +12 -0
- package/src/assets/icons/link.svg +11 -0
- package/src/assets/icons/list.svg +13 -0
- package/src/assets/icons/maximize.svg +11 -0
- package/src/assets/icons/new-broken.svg +6 -0
- package/src/assets/icons/new-failed.svg +6 -0
- package/src/assets/icons/new-passed.svg +5 -0
- package/src/assets/icons/overview.svg +5 -0
- package/src/assets/icons/passed.svg +10 -0
- package/src/assets/icons/pdf.svg +13 -0
- package/src/assets/icons/refresh.svg +4 -0
- package/src/assets/icons/retries.svg +11 -0
- package/src/assets/icons/save.svg +10 -0
- package/src/assets/icons/skipped.svg +3 -0
- package/src/assets/icons/sort-down.svg +10 -0
- package/src/assets/icons/sort-up.svg +10 -0
- package/src/assets/icons/sort.svg +11 -0
- package/src/assets/icons/table.svg +10 -0
- package/src/assets/icons/task.svg +11 -0
- package/src/assets/icons/teamcity.svg +40 -0
- package/src/assets/icons/timeline.svg +12 -0
- package/src/assets/icons/tree.svg +10 -0
- package/src/assets/icons/txt.svg +11 -0
- package/src/assets/icons/unknown.svg +10 -0
- package/src/behaviors/ClipboardBehavior.js +34 -0
- package/src/behaviors/DownloadBehavior.js +42 -0
- package/src/behaviors/GaBehavior.js +27 -0
- package/src/behaviors/LoadBehavior.js +18 -0
- package/src/behaviors/TooltipBehavior.js +25 -0
- package/src/behaviors/index.js +7 -0
- package/src/blocks/alert/styles.scss +8 -0
- package/src/blocks/arrow/styles.scss +21 -0
- package/src/blocks/attachment-row/attachment-row.hbs +34 -0
- package/src/blocks/attachment-row/styles.scss +71 -0
- package/src/blocks/bar/styles.scss +22 -0
- package/src/blocks/button/styles.scss +60 -0
- package/src/blocks/clipboard-copy/clipboard-copy.hbs +5 -0
- package/src/blocks/executor-icon/bamboo.svg +31 -0
- package/src/blocks/executor-icon/bitbucket.svg +10 -0
- package/src/blocks/executor-icon/circleci.svg +1 -0
- package/src/blocks/executor-icon/default-icon.png +0 -0
- package/src/blocks/executor-icon/github.svg +4 -0
- package/src/blocks/executor-icon/gitlab.svg +12 -0
- package/src/blocks/executor-icon/jenkins.svg +327 -0
- package/src/blocks/executor-icon/styles.scss +15 -0
- package/src/blocks/executor-icon/teamcity.svg +40 -0
- package/src/blocks/island/styles.scss +7 -0
- package/src/blocks/label/styles.scss +15 -0
- package/src/blocks/link/styles.scss +10 -0
- package/src/blocks/pane/styles.scss +52 -0
- package/src/blocks/pane-header/pane-header.hbs +15 -0
- package/src/blocks/parameters-table/parameters-table.hbs +10 -0
- package/src/blocks/parameters-table/styles.scss +22 -0
- package/src/blocks/spinner/styles.scss +30 -0
- package/src/blocks/splash/styles.scss +13 -0
- package/src/blocks/status-details/status-details.hbs +13 -0
- package/src/blocks/status-details/styles.scss +32 -0
- package/src/blocks/step-stats/step-stats.hbs +15 -0
- package/src/blocks/step-stats/styles.scss +19 -0
- package/src/blocks/table/sort-down-icon.svg +1 -0
- package/src/blocks/table/sort-icon.svg +1 -0
- package/src/blocks/table/sort-up-icon.svg +1 -0
- package/src/blocks/table/sortable-col.hbs +4 -0
- package/src/blocks/table/styles.scss +64 -0
- package/src/blocks/tabs/styles.scss +29 -0
- package/src/blocks/tabs/tabs.hbs +5 -0
- package/src/blocks/text/styles.scss +5 -0
- package/src/blocks/widget/draggable.svg +1 -0
- package/src/blocks/widget/styles.scss +76 -0
- package/src/components/attachment/AttachmentView.hbs +58 -0
- package/src/components/attachment/AttachmentView.js +90 -0
- package/src/components/attachment/styles.scss +78 -0
- package/src/components/empty/EmptyView.hbs +3 -0
- package/src/components/empty/EmptyView.js +18 -0
- package/src/components/empty/styles.scss +4 -0
- package/src/components/error-splash/ErrorSplashView.hbs +4 -0
- package/src/components/error-splash/ErrorSplashView.js +19 -0
- package/src/components/error-splash/styles.scss +4 -0
- package/src/components/graph-base/BaseChartView.hbs +5 -0
- package/src/components/graph-base/BaseChartView.js +78 -0
- package/src/components/graph-base/styles.scss +66 -0
- package/src/components/graph-duration-chart/DurationChartView.js +100 -0
- package/src/components/graph-pie-chart/PieChartView.js +155 -0
- package/src/components/graph-severity-chart/SeverityChartView.js +100 -0
- package/src/components/graph-trend-chart/TrendChartView.js +202 -0
- package/src/components/graph-trend-chart/styles.scss +16 -0
- package/src/components/graph-trend-chart/trend-tooltip.hbs +9 -0
- package/src/components/language-select/LanguageSelectView.hbs +5 -0
- package/src/components/language-select/LanguageSelectView.js +42 -0
- package/src/components/language-select/checkmark.svg +1 -0
- package/src/components/language-select/styles.scss +34 -0
- package/src/components/loader/LoaderView.hbs +6 -0
- package/src/components/loader/LoaderView.js +21 -0
- package/src/components/loader/styles.scss +26 -0
- package/src/components/marks-toggle/MarksToggleView.hbs +14 -0
- package/src/components/marks-toggle/MarksToggleView.js +41 -0
- package/src/components/marks-toggle/styles.scss +38 -0
- package/src/components/modal/ModalView.hbs +13 -0
- package/src/components/modal/ModalView.js +43 -0
- package/src/components/modal/styles.scss +31 -0
- package/src/components/node-search/NodeSearchView.hbs +4 -0
- package/src/components/node-search/NodeSearchView.js +32 -0
- package/src/components/node-search/styles.scss +29 -0
- package/src/components/node-sorter/NodeSorterView.hbs +22 -0
- package/src/components/node-sorter/NodeSorterView.js +43 -0
- package/src/components/node-sorter/styles.scss +26 -0
- package/src/components/popover/PopoverView.js +8 -0
- package/src/components/popover/styles.scss +32 -0
- package/src/components/side-by-side/SideBySideView.hbs +2 -0
- package/src/components/side-by-side/SideBySideView.js +42 -0
- package/src/components/side-by-side/styles.scss +59 -0
- package/src/components/side-by-side/vertical.png +0 -0
- package/src/components/side-nav/SideNavView.hbs +39 -0
- package/src/components/side-nav/SideNavView.js +81 -0
- package/src/components/side-nav/styles.scss +118 -0
- package/src/components/status-toggle/StatusToggleView.hbs +16 -0
- package/src/components/status-toggle/StatusToggleView.js +42 -0
- package/src/components/status-toggle/styles.scss +35 -0
- package/src/components/testresult/TestResultView.hbs +32 -0
- package/src/components/testresult/TestResultView.js +90 -0
- package/src/components/testresult/styles.scss +29 -0
- package/src/components/testresult-execution/TestResultExecutionView.hbs +13 -0
- package/src/components/testresult-execution/TestResultExecutionView.js +85 -0
- package/src/components/testresult-execution/stages-block.hbs +47 -0
- package/src/components/testresult-execution/steps-list.hbs +31 -0
- package/src/components/testresult-execution/styles.scss +70 -0
- package/src/components/testresult-overview/TestResultOverviewView.hbs +8 -0
- package/src/components/testresult-overview/TestResultOverviewView.js +46 -0
- package/src/components/testresult-overview/styles.scss +22 -0
- package/src/components/testresult-tree/TestResultTreeView.js +60 -0
- package/src/components/tooltip/TooltipView.js +111 -0
- package/src/components/tooltip/styles.scss +43 -0
- package/src/components/tree/TreeView.hbs +9 -0
- package/src/components/tree/TreeView.js +200 -0
- package/src/components/tree/styles.scss +141 -0
- package/src/components/tree/tree-group.hbs +36 -0
- package/src/components/tree/tree-leaf.hbs +53 -0
- package/src/components/tree/tree-time.hbs +6 -0
- package/src/components/tree-view-container/TreeViewContainer.hbs +34 -0
- package/src/components/tree-view-container/TreeViewContainer.js +103 -0
- package/src/components/tree-view-container/styles.scss +38 -0
- package/src/components/widget-status/WidgetStatusView.hbs +21 -0
- package/src/components/widget-status/WidgetStatusView.js +17 -0
- package/src/components/widgets-grid/WidgetsGridView.js +90 -0
- package/src/components/widgets-grid/styles.scss +34 -0
- package/src/data/localstorage/LocalStorageModel.js +23 -0
- package/src/data/testresult/TestResultModel.js +36 -0
- package/src/data/tree/TreeCollection.js +153 -0
- package/src/data/tree/comparator.js +63 -0
- package/src/data/tree/filter.js +66 -0
- package/src/data/trend/TrendCollection.js +36 -0
- package/src/data/widgets/WidgetsModel.js +25 -0
- package/src/decorators/index.js +53 -0
- package/src/favicon.ico +0 -0
- package/src/helpers/allure-icon.js +228 -0
- package/src/helpers/and.js +3 -0
- package/src/helpers/angle.js +15 -0
- package/src/helpers/arrow.js +17 -0
- package/src/helpers/b.js +6 -0
- package/src/helpers/concat.js +3 -0
- package/src/helpers/date.js +11 -0
- package/src/helpers/default.js +8 -0
- package/src/helpers/duration.js +60 -0
- package/src/helpers/eq.js +3 -0
- package/src/helpers/fileicon.js +5 -0
- package/src/helpers/filesize.js +8 -0
- package/src/helpers/gt.js +3 -0
- package/src/helpers/inc.js +3 -0
- package/src/helpers/is-def.js +3 -0
- package/src/helpers/job-icon.js +8 -0
- package/src/helpers/linky.js +7 -0
- package/src/helpers/not.js +3 -0
- package/src/helpers/or.js +3 -0
- package/src/helpers/sort-class.js +6 -0
- package/src/helpers/statistic-bar.js +12 -0
- package/src/helpers/status-bar.js +14 -0
- package/src/helpers/t.js +5 -0
- package/src/helpers/text-with-links.js +18 -0
- package/src/helpers/time.js +18 -0
- package/src/helpers/timeago.js +10 -0
- package/src/index.html +17 -0
- package/src/index.js +52 -0
- package/src/layouts/application/AppLayout.hbs +2 -0
- package/src/layouts/application/AppLayout.js +50 -0
- package/src/layouts/application/styles.scss +17 -0
- package/src/layouts/error/ErrorLayout.js +11 -0
- package/src/layouts/overview/OverviewLayout.js +8 -0
- package/src/layouts/testresult/TestResultLayout.js +43 -0
- package/src/layouts/tree/TreeLayout.js +45 -0
- package/src/mixins.scss +128 -0
- package/src/pluginApi.js +26 -0
- package/src/plugins/.eslintrc +5 -0
- package/src/plugins/default/index.js +11 -0
- package/src/plugins/screen-diff/index.js +186 -0
- package/src/plugins/screen-diff/styles.css +30 -0
- package/src/plugins/tab-behaviors/index.js +239 -0
- package/src/plugins/tab-category/index.js +15 -0
- package/src/plugins/tab-graph/GraphCollection.js +12 -0
- package/src/plugins/tab-graph/GraphLayout.js +17 -0
- package/src/plugins/tab-graph/index.js +8 -0
- package/src/plugins/tab-packages/index.js +137 -0
- package/src/plugins/tab-suites/index.js +15 -0
- package/src/plugins/tab-timeline/TimelineLayout.js +18 -0
- package/src/plugins/tab-timeline/TimelineView.hbs +17 -0
- package/src/plugins/tab-timeline/TimelineView.js +250 -0
- package/src/plugins/tab-timeline/index.js +12 -0
- package/src/plugins/tab-timeline/styles.scss +76 -0
- package/src/plugins/testresult-category/CategoryView.hbs +6 -0
- package/src/plugins/testresult-category/CategoryView.js +17 -0
- package/src/plugins/testresult-category/index.js +3 -0
- package/src/plugins/testresult-description/DescriptionView.hbs +4 -0
- package/src/plugins/testresult-description/DescriptionView.js +16 -0
- package/src/plugins/testresult-description/index.js +3 -0
- package/src/plugins/testresult-duration/DurationView.hbs +7 -0
- package/src/plugins/testresult-duration/DurationView.js +16 -0
- package/src/plugins/testresult-duration/index.js +3 -0
- package/src/plugins/testresult-history/HistoryView.hbs +27 -0
- package/src/plugins/testresult-history/HistoryView.js +33 -0
- package/src/plugins/testresult-history/index.js +3 -0
- package/src/plugins/testresult-history/styles.scss +10 -0
- package/src/plugins/testresult-links/LinksView.hbs +17 -0
- package/src/plugins/testresult-links/LinksView.js +17 -0
- package/src/plugins/testresult-links/index.js +3 -0
- package/src/plugins/testresult-links/styles.scss +19 -0
- package/src/plugins/testresult-owner/OwnerView.hbs +4 -0
- package/src/plugins/testresult-owner/OwnerView.js +17 -0
- package/src/plugins/testresult-owner/index.js +3 -0
- package/src/plugins/testresult-parameters/ParametersView.hbs +13 -0
- package/src/plugins/testresult-parameters/ParametersView.js +22 -0
- package/src/plugins/testresult-parameters/index.js +3 -0
- package/src/plugins/testresult-parameters/styles.scss +8 -0
- package/src/plugins/testresult-retries/RetriesView.hbs +13 -0
- package/src/plugins/testresult-retries/RetriesView.js +28 -0
- package/src/plugins/testresult-retries/index.js +3 -0
- package/src/plugins/testresult-retries/styles.scss +11 -0
- package/src/plugins/testresult-severity/SeverityView.hbs +4 -0
- package/src/plugins/testresult-severity/SeverityView.js +17 -0
- package/src/plugins/testresult-severity/index.js +3 -0
- package/src/plugins/testresult-tags/TagsView.hbs +5 -0
- package/src/plugins/testresult-tags/TagsView.js +17 -0
- package/src/plugins/testresult-tags/index.js +3 -0
- package/src/plugins/widget-categories/index.js +12 -0
- package/src/plugins/widget-categories-trend/CategoriesTrendWidgetView.hbs +4 -0
- package/src/plugins/widget-categories-trend/CategoriesTrendWidgetView.js +33 -0
- package/src/plugins/widget-categories-trend/index.js +4 -0
- package/src/plugins/widget-categories-trend/styles.scss +6 -0
- package/src/plugins/widget-duration/DurationWidgetView.hbs +4 -0
- package/src/plugins/widget-duration/DurationWidgetView.js +23 -0
- package/src/plugins/widget-duration/index.js +3 -0
- package/src/plugins/widget-duration-trend/DurationTrendWidgetView.hbs +4 -0
- package/src/plugins/widget-duration-trend/DurationTrendWidgetView.js +49 -0
- package/src/plugins/widget-duration-trend/index.js +4 -0
- package/src/plugins/widget-duration-trend/styles.scss +6 -0
- package/src/plugins/widget-environment/EnvironmentWidget.hbs +27 -0
- package/src/plugins/widget-environment/EnvironmentWidget.js +25 -0
- package/src/plugins/widget-environment/index.js +3 -0
- package/src/plugins/widget-executor/ExecutorsWidgetView.hbs +40 -0
- package/src/plugins/widget-executor/ExecutorsWidgetView.js +8 -0
- package/src/plugins/widget-executor/index.js +3 -0
- package/src/plugins/widget-history-trend/HistoryTrendWidgetView.hbs +4 -0
- package/src/plugins/widget-history-trend/HistoryTrendWidgetView.js +30 -0
- package/src/plugins/widget-history-trend/index.js +6 -0
- package/src/plugins/widget-history-trend/styles.scss +6 -0
- package/src/plugins/widget-launch/LaunchesWidgetView.hbs +23 -0
- package/src/plugins/widget-launch/LaunchesWidgetView.js +8 -0
- package/src/plugins/widget-launch/index.js +3 -0
- package/src/plugins/widget-retry-trend/RetryTrendWidgetView.hbs +4 -0
- package/src/plugins/widget-retry-trend/RetryTrendWidgetView.js +33 -0
- package/src/plugins/widget-retry-trend/index.js +4 -0
- package/src/plugins/widget-retry-trend/styles.scss +6 -0
- package/src/plugins/widget-severity/SeverityWidgetView.hbs +4 -0
- package/src/plugins/widget-severity/SeverityWidgetView.js +23 -0
- package/src/plugins/widget-severity/index.js +3 -0
- package/src/plugins/widget-status/StatusWidgetView.hbs +4 -0
- package/src/plugins/widget-status/StatusWidgetView.js +44 -0
- package/src/plugins/widget-status/index.js +3 -0
- package/src/plugins/widget-suites/index.js +12 -0
- package/src/plugins/widget-summary/SummaryWidgetView.hbs +20 -0
- package/src/plugins/widget-summary/SummaryWidgetView.js +33 -0
- package/src/plugins/widget-summary/index.js +3 -0
- package/src/plugins/widget-summary/styles.scss +14 -0
- package/src/router.js +52 -0
- package/src/rtl.scss +19 -0
- package/src/styles.scss +91 -0
- package/src/translations/az.json +217 -0
- package/src/translations/br.json +205 -0
- package/src/translations/de.json +205 -0
- package/src/translations/en.json +222 -0
- package/src/translations/es.json +209 -0
- package/src/translations/fr.json +217 -0
- package/src/translations/he.json +205 -0
- package/src/translations/isv.json +216 -0
- package/src/translations/ja.json +210 -0
- package/src/translations/kr.json +210 -0
- package/src/translations/nl.json +217 -0
- package/src/translations/pl.json +220 -0
- package/src/translations/ru.json +215 -0
- package/src/translations/sv.json +222 -0
- package/src/translations/tr.json +217 -0
- package/src/translations/zh.json +191 -0
- package/src/utils/arrays.js +3 -0
- package/src/utils/attachmentType.js +101 -0
- package/src/utils/clipboard.js +38 -0
- package/src/utils/escape.js +5 -0
- package/src/utils/gtag.js +8 -0
- package/src/utils/highlight.js +14 -0
- package/src/utils/hotkeys.js +25 -0
- package/src/utils/loading.js +9 -0
- package/src/utils/marks.js +1 -0
- package/src/utils/pluginsRegistry.js +56 -0
- package/src/utils/settings.js +4 -0
- package/src/utils/settingsFactory.js +149 -0
- package/src/utils/sorting.js +21 -0
- package/src/utils/statuses.js +1 -0
- package/src/utils/translation.js +63 -0
- package/src/variables.scss +71 -0
- package/types.d.ts +5 -0
- package/webpack/utils.js +10 -0
- package/webpack.config.js +127 -0
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import { reportDataUrl } from "@allurereport/web-commons";
|
|
2
|
+
import { Collection } from "backbone";
|
|
3
|
+
import { findWhere, flatten } from "underscore";
|
|
4
|
+
import { values } from "@/utils/statuses.js";
|
|
5
|
+
|
|
6
|
+
function updateTime(timeA, timeB, field, operation) {
|
|
7
|
+
if (timeB && timeB[field]) {
|
|
8
|
+
timeA[field] = operation(timeA[field], timeB[field]);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export default class TreeCollection extends Collection {
|
|
13
|
+
initialize(models, { url }) {
|
|
14
|
+
this.url = url;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
fetch(options) {
|
|
18
|
+
return reportDataUrl(this.url, "application/json").then((value) => super.fetch({ ...options, url: value }));
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
findLeaf(parentUid, uid) {
|
|
22
|
+
return findWhere(this.allResults, { parentUid, uid });
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
getFlattenTestResults(children) {
|
|
26
|
+
return flatten(
|
|
27
|
+
children.map((child) => {
|
|
28
|
+
if (child.children) {
|
|
29
|
+
return this.getFlattenTestResults(child.children);
|
|
30
|
+
}
|
|
31
|
+
return child;
|
|
32
|
+
}),
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
parse({ uid, children }) {
|
|
37
|
+
const items = children || [];
|
|
38
|
+
this.uid = uid;
|
|
39
|
+
this.allResults = this.getFlattenTestResults(items);
|
|
40
|
+
this.allNodes = items;
|
|
41
|
+
this.time = this.calculateTime(this.allResults);
|
|
42
|
+
this.statistic = this.calculateStatistic(this.allResults);
|
|
43
|
+
return items;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
applyFilterAndSorting(filter, sorter) {
|
|
47
|
+
const newChildren = this.getFilteredAndSortedChildren(this.allNodes, filter, sorter);
|
|
48
|
+
this.reset(newChildren);
|
|
49
|
+
this.testResults = this.getFlattenTestResults(newChildren);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
getFilteredAndSortedChildren(children, filter, sorter) {
|
|
53
|
+
return this.calculateOrder(children)
|
|
54
|
+
.map((child) => {
|
|
55
|
+
if (child.children) {
|
|
56
|
+
const newChildren = this.getFilteredAndSortedChildren(child.children, filter, sorter);
|
|
57
|
+
return {
|
|
58
|
+
...child,
|
|
59
|
+
children: newChildren,
|
|
60
|
+
statistic: this.calculateStatistic(newChildren),
|
|
61
|
+
time: this.calculateTime(newChildren),
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
return child;
|
|
65
|
+
})
|
|
66
|
+
.filter(filter)
|
|
67
|
+
.sort(sorter);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
getFirstTestResult() {
|
|
71
|
+
if (this.testResults.length > 0) {
|
|
72
|
+
return this.testResults[0];
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
getLastTestResult() {
|
|
77
|
+
if (this.testResults.length > 0) {
|
|
78
|
+
return this.testResults[this.testResults.length - 1];
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
getNextTestResult(testResultUid) {
|
|
83
|
+
const index = this.testResults.findIndex((testResult) => testResult.uid === testResultUid);
|
|
84
|
+
if (index < this.testResults.length - 1) {
|
|
85
|
+
return this.testResults[index + 1];
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
getPreviousTestResult(testResultUid) {
|
|
90
|
+
const index = this.testResults.findIndex((testResult) => testResult.uid === testResultUid);
|
|
91
|
+
if (index > 0) {
|
|
92
|
+
return this.testResults[index - 1];
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
calculateOrder(items) {
|
|
97
|
+
if (items) {
|
|
98
|
+
let index = 0;
|
|
99
|
+
items.forEach((item) => {
|
|
100
|
+
if (item.children) {
|
|
101
|
+
this.calculateOrder(item.children);
|
|
102
|
+
} else {
|
|
103
|
+
item.order = ++index;
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
return items;
|
|
107
|
+
}
|
|
108
|
+
return [];
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
calculateStatistic(items) {
|
|
112
|
+
const statistic = {};
|
|
113
|
+
values.forEach((value) => {
|
|
114
|
+
statistic[value] = 0;
|
|
115
|
+
});
|
|
116
|
+
items.forEach((item) => {
|
|
117
|
+
if (item.children) {
|
|
118
|
+
values.forEach((value) => {
|
|
119
|
+
statistic[value] += item.statistic ? item.statistic[value] : 0;
|
|
120
|
+
});
|
|
121
|
+
} else {
|
|
122
|
+
statistic[item.status]++;
|
|
123
|
+
}
|
|
124
|
+
});
|
|
125
|
+
return statistic;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
calculateTime(items) {
|
|
129
|
+
const time = {
|
|
130
|
+
maxDuration: Number.MIN_VALUE,
|
|
131
|
+
minDuration: Number.MAX_VALUE,
|
|
132
|
+
sumDuration: 0,
|
|
133
|
+
duration: 0,
|
|
134
|
+
start: Number.MAX_VALUE,
|
|
135
|
+
stop: Number.MIN_VALUE,
|
|
136
|
+
};
|
|
137
|
+
items.forEach((item) => {
|
|
138
|
+
if (item.children) {
|
|
139
|
+
updateTime(time, item.time, "maxDuration", Math.max);
|
|
140
|
+
updateTime(time, item.time, "minDuration", Math.min);
|
|
141
|
+
updateTime(time, item.time, "sumDuration", (a, b) => a + b);
|
|
142
|
+
} else if (item.time && isFinite(item.time.duration)) {
|
|
143
|
+
time.maxDuration = Math.max(time.maxDuration, item.time.duration);
|
|
144
|
+
time.minDuration = Math.min(time.minDuration, item.time.duration);
|
|
145
|
+
time.sumDuration = time.sumDuration + item.time.duration;
|
|
146
|
+
}
|
|
147
|
+
updateTime(time, item.time, "start", Math.min);
|
|
148
|
+
updateTime(time, item.time, "stop", Math.max);
|
|
149
|
+
time.duration = time.stop - time.start;
|
|
150
|
+
});
|
|
151
|
+
return time;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { values } from "@/utils/statuses.js";
|
|
2
|
+
|
|
3
|
+
function byOrder(a, b) {
|
|
4
|
+
return a.order < b.order ? -1 : 1;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
function byName(a, b) {
|
|
8
|
+
return String(a.name).toLowerCase() < String(b.name).toLowerCase() ? -1 : 1;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
function byDuration(a, b) {
|
|
12
|
+
if (a.time && a.time.duration && b.time && b.time.duration) {
|
|
13
|
+
return a.time.duration < b.time.duration ? -1 : 1;
|
|
14
|
+
}
|
|
15
|
+
return 1;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
function byMaxDuration(a, b) {
|
|
19
|
+
if (a.time && a.time.maxDuration && b.time && b.time.maxDuration) {
|
|
20
|
+
return a.time.maxDuration < b.time.maxDuration ? -1 : 1;
|
|
21
|
+
}
|
|
22
|
+
return 1;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
function byNodeStatus(a, b) {
|
|
26
|
+
return values.indexOf(a.status) > values.indexOf(b.status) ? -1 : 1;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
function byGroupStatuses(a, b) {
|
|
30
|
+
return values.reduce((all, cur) => {
|
|
31
|
+
return a.statistic[cur] !== b.statistic[cur] && all === 0 ? a.statistic[cur] - b.statistic[cur] : all;
|
|
32
|
+
}, 0);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function compare(a, b, nodeCmp, groupCmp, direction) {
|
|
36
|
+
if (a.children && !b.children) {
|
|
37
|
+
return -1;
|
|
38
|
+
} else if (!a.children && b.children) {
|
|
39
|
+
return 1;
|
|
40
|
+
} else if (a.children && b.children) {
|
|
41
|
+
return direction * groupCmp(a, b);
|
|
42
|
+
} else if (!a.children && !b.children) {
|
|
43
|
+
return direction * nodeCmp(a, b);
|
|
44
|
+
} else {
|
|
45
|
+
return 0;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export default function getComparator({ sorter, ascending }) {
|
|
50
|
+
const direction = ascending ? 1 : -1;
|
|
51
|
+
switch (sorter) {
|
|
52
|
+
case "sorter.order":
|
|
53
|
+
return (a, b) => compare(a, b, byOrder, byName, direction);
|
|
54
|
+
case "sorter.name":
|
|
55
|
+
return (a, b) => compare(a, b, byName, byName, direction);
|
|
56
|
+
case "sorter.duration":
|
|
57
|
+
return (a, b) => compare(a, b, byDuration, byMaxDuration, direction);
|
|
58
|
+
case "sorter.status":
|
|
59
|
+
return (a, b) => compare(a, b, byNodeStatus, byGroupStatuses, direction);
|
|
60
|
+
default:
|
|
61
|
+
return 0;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { values as marksValues } from "@/utils/marks.js";
|
|
2
|
+
|
|
3
|
+
function byStatuses(statuses) {
|
|
4
|
+
return (child) => {
|
|
5
|
+
if (child.children) {
|
|
6
|
+
return child.children.length > 0;
|
|
7
|
+
}
|
|
8
|
+
return statuses[child.status];
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
function byDuration(min, max) {
|
|
13
|
+
return (child) => {
|
|
14
|
+
if (child.children) {
|
|
15
|
+
return child.children.length > 0;
|
|
16
|
+
}
|
|
17
|
+
return min <= child.time.duration && child.time.duration <= max;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function byCriteria(searchQuery) {
|
|
22
|
+
if (searchQuery && searchQuery.startsWith("tag:")) {
|
|
23
|
+
return byTags(searchQuery.substring(4));
|
|
24
|
+
} else {
|
|
25
|
+
return byText(searchQuery);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
function byText(text) {
|
|
30
|
+
text = (text && text.toLowerCase()) || "";
|
|
31
|
+
return (child) => {
|
|
32
|
+
return (
|
|
33
|
+
!text || child.name.toLowerCase().indexOf(text) > -1 || (child.children && child.children.some(byText(text)))
|
|
34
|
+
);
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function byTags(tag) {
|
|
39
|
+
tag = (tag && tag.toLowerCase().trim()) || "";
|
|
40
|
+
const tags = tag.split(/\s*,\s*/).filter((t) => t);
|
|
41
|
+
return (child) => {
|
|
42
|
+
const childTags = Array.isArray(child.tags) ? child.tags.filter((t) => t).map((t) => t.toLowerCase().trim()) : [];
|
|
43
|
+
return !tag || tags.every((t) => childTags.indexOf(t) > -1) || (child.children && child.children.some(byTags(tag)));
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function byMark(marks) {
|
|
48
|
+
return (child) => {
|
|
49
|
+
if (child.children) {
|
|
50
|
+
return child.children.length > 0;
|
|
51
|
+
}
|
|
52
|
+
return marksValues.map((k) => !marks[k] || child[k]).reduce((a, b) => a && b, true);
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
function mix(...filters) {
|
|
57
|
+
return (child) => {
|
|
58
|
+
let result = true;
|
|
59
|
+
filters.forEach((filter) => {
|
|
60
|
+
result = result && filter(child);
|
|
61
|
+
});
|
|
62
|
+
return result;
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export { byStatuses, byDuration, byCriteria, byText, byTags, byMark, mix };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { reportDataUrl } from "@allurereport/web-commons";
|
|
2
|
+
import { Collection } from "backbone";
|
|
3
|
+
import { flatten, keys, omit, uniq, values } from "underscore";
|
|
4
|
+
|
|
5
|
+
export default class TrendCollection extends Collection {
|
|
6
|
+
initialize(models, options) {
|
|
7
|
+
this.options = options;
|
|
8
|
+
this.url = `widgets/${this.options.name}.json`;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
fetch(options) {
|
|
12
|
+
return reportDataUrl(this.url, "application/json").then((value) => super.fetch({ ...options, url: value }));
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
parse(response) {
|
|
16
|
+
return response.reverse().map((item, id) => {
|
|
17
|
+
return {
|
|
18
|
+
...item,
|
|
19
|
+
id,
|
|
20
|
+
name: item.buildOrder ? `#${item.buildOrder}` : "",
|
|
21
|
+
total: values(omit(item.data, "total")).reduce((prev, curr) => prev + curr, 0),
|
|
22
|
+
data: omit(item.data, "total"),
|
|
23
|
+
};
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
keys() {
|
|
28
|
+
return uniq(flatten(this.map((model) => keys(model.get("data")))));
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
sortedKeysByLastValue() {
|
|
32
|
+
const allKeys = this.keys();
|
|
33
|
+
const lastData = this.last().get("data");
|
|
34
|
+
return allKeys.sort((a, b) => (lastData[b] || 0) - (lastData[a] || 0));
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { reportDataUrl } from "@allurereport/web-commons";
|
|
2
|
+
import { Model } from "backbone";
|
|
3
|
+
|
|
4
|
+
export default class WidgetsModel extends Model {
|
|
5
|
+
initialize(model, options) {
|
|
6
|
+
this.options = options;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
url() {
|
|
10
|
+
return `widgets/${this.options.name}.json`;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
parse(data) {
|
|
14
|
+
return Array.isArray(data) ? { items: data } : data;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
fetch(options) {
|
|
18
|
+
return reportDataUrl(this.url(), "application/json").then((value) => super.fetch({ ...options, url: value }));
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
getWidgetData(name) {
|
|
22
|
+
const items = this.get(name);
|
|
23
|
+
return new Model(Array.isArray(items) ? { items } : items);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { clone, has, isFunction } from "underscore";
|
|
2
|
+
|
|
3
|
+
function onDecoratorFactory(decoratorName, propertyName) {
|
|
4
|
+
return function (eventName) {
|
|
5
|
+
return function (target, name, descriptor) {
|
|
6
|
+
if (!eventName) {
|
|
7
|
+
throw new Error(`The ${decoratorName} decorator requires an eventName argument`);
|
|
8
|
+
}
|
|
9
|
+
if (isFunction(target[propertyName])) {
|
|
10
|
+
throw new Error(`The ${decoratorName} decorator is not compatible with ${propertyName} as method form`);
|
|
11
|
+
}
|
|
12
|
+
if (target[propertyName] && !has(target, propertyName)) {
|
|
13
|
+
target[propertyName] = clone(target[propertyName]);
|
|
14
|
+
}
|
|
15
|
+
if (!target[propertyName]) {
|
|
16
|
+
target[propertyName] = {};
|
|
17
|
+
}
|
|
18
|
+
target[propertyName][eventName] = name;
|
|
19
|
+
return descriptor;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export const on = onDecoratorFactory("on", "events");
|
|
25
|
+
|
|
26
|
+
export function behavior(name, config = {}) {
|
|
27
|
+
return function (target) {
|
|
28
|
+
target.prototype.behaviors = Object.assign(
|
|
29
|
+
{
|
|
30
|
+
[name]: config,
|
|
31
|
+
},
|
|
32
|
+
target.prototype.behaviors,
|
|
33
|
+
);
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export function className(name) {
|
|
38
|
+
return function (target) {
|
|
39
|
+
target.prototype.className = name;
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export function regions(opts) {
|
|
44
|
+
return function (target) {
|
|
45
|
+
target.prototype.regions = Object.assign(opts, target.regions);
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function options(opts) {
|
|
50
|
+
return function (target) {
|
|
51
|
+
target.prototype.options = Object.assign(opts, target.options);
|
|
52
|
+
};
|
|
53
|
+
}
|
package/src/favicon.ico
ADDED
|
Binary file
|
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
import { SafeString } from "handlebars/runtime.js";
|
|
2
|
+
import allureLogo from "@/assets/icons/allure-logo.svg";
|
|
3
|
+
import bamboo from "@/assets/icons/bamboo.svg";
|
|
4
|
+
import bitbucket from "@/assets/icons/bitbucket.svg";
|
|
5
|
+
import bomb from "@/assets/icons/bomb.svg";
|
|
6
|
+
import broken from "@/assets/icons/broken.svg";
|
|
7
|
+
import bug from "@/assets/icons/bug.svg";
|
|
8
|
+
import chevronDown from "@/assets/icons/chevron-down.svg";
|
|
9
|
+
import chevronLeft from "@/assets/icons/chevron-left.svg";
|
|
10
|
+
import chevronRightFat from "@/assets/icons/chevron-right-fat.svg";
|
|
11
|
+
import chevronRight from "@/assets/icons/chevron-right.svg";
|
|
12
|
+
import chevronUp from "@/assets/icons/chevron-up.svg";
|
|
13
|
+
import circleci from "@/assets/icons/circleci.svg";
|
|
14
|
+
import close from "@/assets/icons/close.svg";
|
|
15
|
+
import collapse from "@/assets/icons/collapse.svg";
|
|
16
|
+
import compare from "@/assets/icons/compare.svg";
|
|
17
|
+
import copy from "@/assets/icons/copy.svg";
|
|
18
|
+
import csv from "@/assets/icons/csv.svg";
|
|
19
|
+
import download from "@/assets/icons/download.svg";
|
|
20
|
+
import draggable from "@/assets/icons/draggable.svg";
|
|
21
|
+
import expand from "@/assets/icons/expand.svg";
|
|
22
|
+
import failed from "@/assets/icons/failed.svg";
|
|
23
|
+
import file from "@/assets/icons/file.svg";
|
|
24
|
+
import folder from "@/assets/icons/folder.svg";
|
|
25
|
+
import github from "@/assets/icons/github.svg";
|
|
26
|
+
import gitlab from "@/assets/icons/gitlab.svg";
|
|
27
|
+
import graphs from "@/assets/icons/graphs.svg";
|
|
28
|
+
import info from "@/assets/icons/info.svg";
|
|
29
|
+
import jenkins from "@/assets/icons/jenkins.svg";
|
|
30
|
+
import jobs from "@/assets/icons/jobs.svg";
|
|
31
|
+
import link from "@/assets/icons/link.svg";
|
|
32
|
+
import list from "@/assets/icons/list.svg";
|
|
33
|
+
import maximize from "@/assets/icons/maximize.svg";
|
|
34
|
+
import newBroken from "@/assets/icons/new-broken.svg";
|
|
35
|
+
import newFailed from "@/assets/icons/new-failed.svg";
|
|
36
|
+
import newPassed from "@/assets/icons/new-passed.svg";
|
|
37
|
+
import overview from "@/assets/icons/overview.svg";
|
|
38
|
+
import passed from "@/assets/icons/passed.svg";
|
|
39
|
+
import pdf from "@/assets/icons/pdf.svg";
|
|
40
|
+
import retries from "@/assets/icons/retries.svg";
|
|
41
|
+
import save from "@/assets/icons/save.svg";
|
|
42
|
+
import skipped from "@/assets/icons/skipped.svg";
|
|
43
|
+
import sortDown from "@/assets/icons/sort-down.svg";
|
|
44
|
+
import sortUp from "@/assets/icons/sort-up.svg";
|
|
45
|
+
import sort from "@/assets/icons/sort.svg";
|
|
46
|
+
import task from "@/assets/icons/task.svg";
|
|
47
|
+
import teamcity from "@/assets/icons/teamcity.svg";
|
|
48
|
+
import timeline from "@/assets/icons/timeline.svg";
|
|
49
|
+
import tree from "@/assets/icons/tree.svg";
|
|
50
|
+
import txt from "@/assets/icons/txt.svg";
|
|
51
|
+
import unknown from "@/assets/icons/unknown.svg";
|
|
52
|
+
import translate from "./t.js";
|
|
53
|
+
|
|
54
|
+
const icons = {
|
|
55
|
+
jobs: {
|
|
56
|
+
id: jobs.id,
|
|
57
|
+
},
|
|
58
|
+
draggable: {
|
|
59
|
+
id: draggable.id,
|
|
60
|
+
},
|
|
61
|
+
github: {
|
|
62
|
+
id: github.id,
|
|
63
|
+
},
|
|
64
|
+
gitlab: {
|
|
65
|
+
id: gitlab.id,
|
|
66
|
+
},
|
|
67
|
+
teamcity: {
|
|
68
|
+
id: teamcity.id,
|
|
69
|
+
},
|
|
70
|
+
jenkins: {
|
|
71
|
+
id: jenkins.id,
|
|
72
|
+
},
|
|
73
|
+
bitbucket: {
|
|
74
|
+
id: bitbucket.id,
|
|
75
|
+
},
|
|
76
|
+
bamboo: {
|
|
77
|
+
id: bamboo.id,
|
|
78
|
+
},
|
|
79
|
+
circleci: {
|
|
80
|
+
id: circleci.id,
|
|
81
|
+
},
|
|
82
|
+
maximize: {
|
|
83
|
+
id: maximize.id,
|
|
84
|
+
},
|
|
85
|
+
expand: {
|
|
86
|
+
id: expand.id,
|
|
87
|
+
},
|
|
88
|
+
collapse: {
|
|
89
|
+
id: collapse.id,
|
|
90
|
+
},
|
|
91
|
+
close: {
|
|
92
|
+
id: close.id,
|
|
93
|
+
},
|
|
94
|
+
bug: {
|
|
95
|
+
id: bug.id,
|
|
96
|
+
},
|
|
97
|
+
compare: {
|
|
98
|
+
id: compare.id,
|
|
99
|
+
},
|
|
100
|
+
save: {
|
|
101
|
+
id: save.id,
|
|
102
|
+
},
|
|
103
|
+
link: {
|
|
104
|
+
id: link.id,
|
|
105
|
+
},
|
|
106
|
+
file: {
|
|
107
|
+
id: file.id,
|
|
108
|
+
},
|
|
109
|
+
txt: {
|
|
110
|
+
id: txt.id,
|
|
111
|
+
},
|
|
112
|
+
pdf: {
|
|
113
|
+
id: pdf.id,
|
|
114
|
+
},
|
|
115
|
+
csv: {
|
|
116
|
+
id: csv.id,
|
|
117
|
+
},
|
|
118
|
+
chevronDown: {
|
|
119
|
+
id: chevronDown.id,
|
|
120
|
+
},
|
|
121
|
+
chevronRight: {
|
|
122
|
+
id: chevronRight.id,
|
|
123
|
+
},
|
|
124
|
+
chevronRightFat: {
|
|
125
|
+
id: chevronRightFat.id,
|
|
126
|
+
},
|
|
127
|
+
chevronUp: {
|
|
128
|
+
id: chevronUp.id,
|
|
129
|
+
},
|
|
130
|
+
chevronLeft: {
|
|
131
|
+
id: chevronLeft.id,
|
|
132
|
+
},
|
|
133
|
+
sort: {
|
|
134
|
+
id: sort.id,
|
|
135
|
+
},
|
|
136
|
+
sortUp: {
|
|
137
|
+
id: sortUp.id,
|
|
138
|
+
},
|
|
139
|
+
sortDown: {
|
|
140
|
+
id: sortDown.id,
|
|
141
|
+
},
|
|
142
|
+
task: {
|
|
143
|
+
id: task.id,
|
|
144
|
+
},
|
|
145
|
+
graphs: {
|
|
146
|
+
id: graphs.id,
|
|
147
|
+
},
|
|
148
|
+
overview: {
|
|
149
|
+
id: overview.id,
|
|
150
|
+
},
|
|
151
|
+
tree: {
|
|
152
|
+
id: tree.id,
|
|
153
|
+
},
|
|
154
|
+
timeline: {
|
|
155
|
+
id: timeline.id,
|
|
156
|
+
},
|
|
157
|
+
folder: {
|
|
158
|
+
id: folder.id,
|
|
159
|
+
},
|
|
160
|
+
list: {
|
|
161
|
+
id: list.id,
|
|
162
|
+
},
|
|
163
|
+
copy: {
|
|
164
|
+
id: copy.id,
|
|
165
|
+
},
|
|
166
|
+
allureLogo: {
|
|
167
|
+
id: allureLogo.id,
|
|
168
|
+
},
|
|
169
|
+
info: {
|
|
170
|
+
id: info.id,
|
|
171
|
+
},
|
|
172
|
+
download: {
|
|
173
|
+
id: download.id,
|
|
174
|
+
},
|
|
175
|
+
flaky: {
|
|
176
|
+
id: bomb.id,
|
|
177
|
+
tooltip: "marks.flaky",
|
|
178
|
+
},
|
|
179
|
+
newFailed: {
|
|
180
|
+
id: newFailed.id,
|
|
181
|
+
tooltip: "marks.newFailed",
|
|
182
|
+
},
|
|
183
|
+
newBroken: {
|
|
184
|
+
id: newBroken.id,
|
|
185
|
+
tooltip: "marks.newBroken",
|
|
186
|
+
},
|
|
187
|
+
newPassed: {
|
|
188
|
+
id: newPassed.id,
|
|
189
|
+
tooltip: "marks.newPassed",
|
|
190
|
+
},
|
|
191
|
+
retriesStatusChange: {
|
|
192
|
+
id: retries.id,
|
|
193
|
+
tooltip: "marks.retriesStatusChange",
|
|
194
|
+
},
|
|
195
|
+
failed: {
|
|
196
|
+
id: failed.id,
|
|
197
|
+
tooltip: "status.failed",
|
|
198
|
+
},
|
|
199
|
+
broken: {
|
|
200
|
+
id: broken.id,
|
|
201
|
+
tooltip: "status.broken",
|
|
202
|
+
},
|
|
203
|
+
passed: {
|
|
204
|
+
id: passed.id,
|
|
205
|
+
tooltip: "status.passed",
|
|
206
|
+
},
|
|
207
|
+
skipped: {
|
|
208
|
+
id: skipped.id,
|
|
209
|
+
tooltip: "status.skipped",
|
|
210
|
+
},
|
|
211
|
+
unknown: {
|
|
212
|
+
id: unknown.id,
|
|
213
|
+
tooltip: "status.unknown",
|
|
214
|
+
},
|
|
215
|
+
};
|
|
216
|
+
|
|
217
|
+
export default function (value, opts) {
|
|
218
|
+
const {
|
|
219
|
+
hash: { extraClasses = "", noTooltip = false, width = "20px", height = "20px" },
|
|
220
|
+
} = opts;
|
|
221
|
+
const icon = icons[value];
|
|
222
|
+
|
|
223
|
+
return icon
|
|
224
|
+
? new SafeString(
|
|
225
|
+
`<svg width="${width}" height="${height}" class="${extraClasses}" ${noTooltip ? "" : `data-tooltip="${translate(icon.tooltip)}"`}><use xlink:href="#${icon.id}"></use></svg>`,
|
|
226
|
+
)
|
|
227
|
+
: "";
|
|
228
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { SafeString } from "handlebars/runtime.js";
|
|
2
|
+
import allureIcon from "./allure-icon.js";
|
|
3
|
+
|
|
4
|
+
export default function () {
|
|
5
|
+
const icon = allureIcon("chevronRight", {
|
|
6
|
+
hash: {
|
|
7
|
+
noTooltip: true,
|
|
8
|
+
width: "18px",
|
|
9
|
+
height: "18px",
|
|
10
|
+
},
|
|
11
|
+
});
|
|
12
|
+
const template = `<span class="angle">${icon}</span>`;
|
|
13
|
+
|
|
14
|
+
return new SafeString(template);
|
|
15
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { SafeString } from "handlebars/runtime.js";
|
|
2
|
+
import allureIcon from "./allure-icon.js";
|
|
3
|
+
|
|
4
|
+
export default function (status = "unknown", ...args) {
|
|
5
|
+
const options = args.pop();
|
|
6
|
+
const chevronIcon = options?.hash?.fat ? "chevronRightFat" : "chevronRight";
|
|
7
|
+
const icon = allureIcon(chevronIcon, {
|
|
8
|
+
hash: {
|
|
9
|
+
noTooltip: true,
|
|
10
|
+
width: "18px",
|
|
11
|
+
height: "18px",
|
|
12
|
+
},
|
|
13
|
+
});
|
|
14
|
+
const template = `<span class="text_status_${status}">${icon}</span>`;
|
|
15
|
+
|
|
16
|
+
return new SafeString(template);
|
|
17
|
+
}
|
package/src/helpers/b.js
ADDED