Skip to content

Commit

Permalink
fix: local ui app details page snippet count fixed (daxa-ai#240)
Browse files Browse the repository at this point in the history
  • Loading branch information
KumarNitin19 committed Feb 28, 2024
1 parent 1cc691a commit 6ee3884
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 8 deletions.
4 changes: 2 additions & 2 deletions pebblo/app/pebblo-ui/src/components/snippetDetails.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ export function SnippetDetails(props) {
item?.labelName
}</div>
<div class="surface-10-opacity-50 font-12">Showing ${
item?.snippetCount
} out of ${item?.findings}</div>
item?.snippets?.length
} out of ${item?.snippetCount}</div>
</div>
${item?.snippets?.myMap(
(snipp) => `
Expand Down
40 changes: 37 additions & 3 deletions pebblo/app/pebblo-ui/src/constants/constant.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ export const TABLE_DATA_FOR_APPLICATIONS = [
title: "Download Icon",
variant: "right",
}),
align: "end",
align: "start",
// render: /*html*/ `
// <div class="flex gap-4 justify-end">
// <img id="download_icon" class="cursor-pointer" src="${MEDIA_URL}/static/download-icon.png" alt="Download Icon" />
Expand Down Expand Up @@ -265,6 +265,37 @@ export const TABLE_DATA_FOR_DATA_SOURCE = [
},
];

export const TABLE_DATA_FOR_DATA_SOURCE_APP_DETAILS = [
{
label: "Data Source Name",
field: "name",
render: (item) => /*html*/ `
<div class="flex flex-col inter">
<div class="surface-10 font-13">${item.name || "-"}</div>
<div class="surface-10-opacity-50 font-12">${item.sourceSize} | ${
item.sourcePath
}</div>
</div>
`,
align: "start",
},
{
label: "Findings-Topics",
render:()=>APP_DATA?.reportSummary?.findingsTopics,
align: "end",
},
{
label: "Findings-Entities",
render:()=> APP_DATA?.reportSummary?.findingsEntities,
align: "end",
},
{
label: "Application",
render:()=> APP_DATA?.name,
align: "start",
},
];

export const TABS_ARR_FOR_APPLICATIONS = [
{
label: "Applications With Findings",
Expand Down Expand Up @@ -361,8 +392,11 @@ export const TABS_ARR_FOR_APPLICATION_DETAILS = [
{
label: "Snippets",
critical: APP_DATA?.dataSources
? APP_DATA?.dataSources[0]?.findingsDetails?.length
? APP_DATA?.dataSources[0]?.displayedSnippetCount
: 0,
outOf: APP_DATA?.dataSources
? APP_DATA?.dataSources[0]?.totalSnippetCount
: 0,
value: 3,
isCritical: false,
},
Expand Down Expand Up @@ -394,7 +428,7 @@ export const TAB_PANEL_ARR_FOR_APPLICATION_DETAILS = [
{
value: {
title: "Data Source",
tableCol: TABLE_DATA_FOR_DATA_SOURCE,
tableCol: TABLE_DATA_FOR_DATA_SOURCE_APP_DETAILS,
tableData: APP_DATA?.dataSources ? APP_DATA?.dataSources : [],
searchField: ["labelName", "findingsType"],
isSorting: true,
Expand Down
3 changes: 0 additions & 3 deletions pebblo/app/pebblo-ui/static/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -1000,9 +1000,6 @@ dialog::backdrop {
text-overflow: ellipsis;
}

.tooltip {
width: fit-content;
}
.tooltip-wrapper-top {
position: absolute;
visibility: hidden;
Expand Down

0 comments on commit 6ee3884

Please sign in to comment.