From f523eb2e0f25e934c96c642808f11817f7063752 Mon Sep 17 00:00:00 2001
From: Charan Girijala <82193104+charangirijala@users.noreply.github.com>
Date: Wed, 8 Jan 2025 11:46:49 +0530
Subject: [PATCH] =?UTF-8?q?filterpanel=20UI=20implemented=F0=9F=91=A8?=
=?UTF-8?q?=E2=80=8D=F0=9F=92=BB?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/modules/example/app/app.css | 10 -
src/modules/example/app/app.html | 5 -
src/modules/example/app/app.js | 3 -
.../main/logFileProcessor/logFileProcessor.js | 209 ++++----
src/modules/main/logViewer/logViewer.css | 15 +-
src/modules/main/logViewer/logViewer.html | 108 +----
src/modules/main/logViewer/logViewer.js | 455 +++++++++---------
.../my/appNavigation/appNavigation.html | 5 +-
src/modules/services/filters/filters.js | 0
.../ui/filFieldCombobox/filFieldCombobox.html | 89 ++++
.../ui/filFieldCombobox/filFieldCombobox.js | 125 +++++
.../filOperatorCombobox.html | 90 ++++
.../filOperatorCombobox.js | 159 ++++++
.../filValueInputCombobox.html | 119 +++++
.../filValueInputCombobox.js | 210 ++++++++
.../multiSelectCombobox.css | 36 --
.../multiSelectCombobox.html | 77 ---
.../multiSelectCombobox.js | 244 ----------
.../multiSelectComboboxItem.css | 3 -
.../multiSelectComboboxItem.html | 40 --
.../multiSelectComboboxItem.js | 30 --
src/modules/ui/pasteLog/pasteLog.js | 6 +-
src/modules/ui/utilityPanel/utilityPanel.js | 78 +--
23 files changed, 1197 insertions(+), 919 deletions(-)
delete mode 100644 src/modules/example/app/app.css
delete mode 100644 src/modules/example/app/app.html
delete mode 100644 src/modules/example/app/app.js
create mode 100644 src/modules/services/filters/filters.js
create mode 100644 src/modules/ui/filFieldCombobox/filFieldCombobox.html
create mode 100644 src/modules/ui/filFieldCombobox/filFieldCombobox.js
create mode 100644 src/modules/ui/filOperatorCombobox/filOperatorCombobox.html
create mode 100644 src/modules/ui/filOperatorCombobox/filOperatorCombobox.js
create mode 100644 src/modules/ui/filValueInputCombobox/filValueInputCombobox.html
create mode 100644 src/modules/ui/filValueInputCombobox/filValueInputCombobox.js
delete mode 100644 src/modules/ui/multiSelectCombobox/multiSelectCombobox.css
delete mode 100644 src/modules/ui/multiSelectCombobox/multiSelectCombobox.html
delete mode 100644 src/modules/ui/multiSelectCombobox/multiSelectCombobox.js
delete mode 100644 src/modules/ui/multiSelectComboboxItem/multiSelectComboboxItem.css
delete mode 100644 src/modules/ui/multiSelectComboboxItem/multiSelectComboboxItem.html
delete mode 100644 src/modules/ui/multiSelectComboboxItem/multiSelectComboboxItem.js
diff --git a/src/modules/example/app/app.css b/src/modules/example/app/app.css
deleted file mode 100644
index 58841e5..0000000
--- a/src/modules/example/app/app.css
+++ /dev/null
@@ -1,10 +0,0 @@
-main {
- margin: 30px;
- display: flex;
- flex-direction: column;
- align-items: center;
-}
-
-h1 {
- color: #1798c1;
-}
\ No newline at end of file
diff --git a/src/modules/example/app/app.html b/src/modules/example/app/app.html
deleted file mode 100644
index 810d40c..0000000
--- a/src/modules/example/app/app.html
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
- Hello World
-
-
diff --git a/src/modules/example/app/app.js b/src/modules/example/app/app.js
deleted file mode 100644
index 8096649..0000000
--- a/src/modules/example/app/app.js
+++ /dev/null
@@ -1,3 +0,0 @@
-import { LightningElement } from 'lwc';
-
-export default class HelloWorldApp extends LightningElement {}
diff --git a/src/modules/main/logFileProcessor/logFileProcessor.js b/src/modules/main/logFileProcessor/logFileProcessor.js
index be211f5..bc74e0d 100644
--- a/src/modules/main/logFileProcessor/logFileProcessor.js
+++ b/src/modules/main/logFileProcessor/logFileProcessor.js
@@ -123,6 +123,7 @@ export default class LogFileProcessor extends LightningElement {
'[fileUploader.js] No.of Lines: ',
this.fileData.length
);
+
this.processLogData();
};
reader.onerror = (e) => {
@@ -132,105 +133,129 @@ export default class LogFileProcessor extends LightningElement {
}
processLogData() {
this.resetVars();
- let isSoql = false;
- let isDml = false;
- this.fileData.forEach((line, idx) => {
- if (this.STD_EXP_MATCHER.test(line)) {
- this.stdExpCount++;
- const lineEvent = line.split('|')[1];
- this.eventsPicklistValues.add(lineEvent);
- /*
- * If the current line is only codeunit or Methodunit then
- * process regex else directly push the line to corresponding * CU / MU
- */
- if (lineEvent === 'CODE_UNIT_STARTED') {
- const RegexMap = eventsRegexMain.get(lineEvent);
- for (let [key, value] of RegexMap) {
- if (key.test(line)) {
- this.createCodeUnit(line, value, idx + 1);
- break;
- }
- }
- } else if (lineEvent === 'CODE_UNIT_FINISHED') {
- //process codeunit finish logic
- try {
- this.exitCodeUnit(idx + 1, line);
- } catch (err) {
- console.error(e);
- }
- } else if (lineEvent === 'METHOD_ENTRY') {
- const RegexMap = eventsRegexMain.get(lineEvent);
- for (let [key, value] of RegexMap) {
- if (key.test(line)) {
- // console.log(value, "=>", key.test(line), "=>", line);
- this.createMethodUnit(line, value, idx + 1);
- break;
- }
- }
- } else if (lineEvent === 'METHOD_EXIT') {
- //process methodunit finish logic
- try {
- this.exitMethodUnit(idx + 1, line);
- } catch (e) {
- console.error(e);
- }
- } else {
- if (lineEvent === 'EXCEPTION_THROWN') {
- if (expThrownRegex.test(line)) {
- let errStr = line.split('|').pop().trim();
- this.createErrorObject(
- idx + 1,
- 'EXCEPTION_THROWN',
- errStr
- );
- // console.log('Exception Thrown: ', errStr);
- }
- } else if (lineEvent === 'FATAL_ERROR') {
- if (fatalErrRegex.test(line)) {
- let errStr = line.split('|').pop().trim();
- // console.log('Fatal Error: ', errStr);
- this.createErrorObject(
- idx + 1,
- 'FATAL_ERROR',
- errStr
+ if (this.fileData.length > 0) {
+ let isSoql = false;
+ let isDml = false;
+ this.fileData.forEach((line, idx) => {
+ let isOrphan = true;
+ if (this.STD_EXP_MATCHER.test(line)) {
+ this.stdExpCount++;
+ const lineEvent = line.split('|')[1];
+ // console.log('lineEvent: ', lineEvent, 'line: ', line);
+ if (lineEvent !== undefined && lineEvent !== null) {
+ isOrphan = false;
+ this.eventsPicklistValues.add(lineEvent);
+ /*
+ * If the current line is only codeunit or Methodunit then
+ * process regex else directly push the line to corresponding * CU / MU
+ */
+ if (lineEvent === 'CODE_UNIT_STARTED') {
+ const RegexMap = eventsRegexMain.get(lineEvent);
+ for (let [key, value] of RegexMap) {
+ if (key.test(line)) {
+ this.createCodeUnit(line, value, idx + 1);
+ break;
+ }
+ }
+ } else if (lineEvent === 'CODE_UNIT_FINISHED') {
+ //process codeunit finish logic
+ try {
+ this.exitCodeUnit(idx + 1, line);
+ } catch (err) {
+ console.error(e);
+ }
+ } else if (lineEvent === 'METHOD_ENTRY') {
+ const RegexMap = eventsRegexMain.get(lineEvent);
+ for (let [key, value] of RegexMap) {
+ if (key.test(line)) {
+ // console.log(value, "=>", key.test(line), "=>", line);
+ this.createMethodUnit(line, value, idx + 1);
+ break;
+ }
+ }
+ } else if (lineEvent === 'METHOD_EXIT') {
+ //process methodunit finish logic
+ try {
+ this.exitMethodUnit(idx + 1, line);
+ } catch (e) {
+ console.error(e);
+ }
+ } else {
+ if (lineEvent === 'EXCEPTION_THROWN') {
+ if (expThrownRegex.test(line)) {
+ let errStr = line.split('|').pop().trim();
+ this.createErrorObject(
+ idx + 1,
+ 'EXCEPTION_THROWN',
+ errStr
+ );
+ // console.log('Exception Thrown: ', errStr);
+ }
+ } else if (lineEvent === 'FATAL_ERROR') {
+ if (fatalErrRegex.test(line)) {
+ let errStr = line.split('|').pop().trim();
+ // console.log('Fatal Error: ', errStr);
+ this.createErrorObject(
+ idx + 1,
+ 'FATAL_ERROR',
+ errStr
+ );
+ }
+ } else if (lineEvent === 'SOQL_EXECUTE_BEGIN') {
+ this.soqlCount++;
+ isSoql = true;
+ } else if (lineEvent === 'DML_BEGIN') {
+ this.dmlCount++;
+ isDml = true;
+ }
+ this.addLinetoCUorMU(
+ line,
+ lineEvent,
+ idx,
+ isSoql,
+ isDml
);
+ isDml = false;
+ isSoql = false;
}
- } else if (lineEvent === 'SOQL_EXECUTE_BEGIN') {
- this.soqlCount++;
- isSoql = true;
- } else if (lineEvent === 'DML_BEGIN') {
- this.dmlCount++;
- isDml = true;
+
+ this.addToFileDataPartial(line, lineEvent, idx + 1);
}
- this.addLinetoCUorMU(line, lineEvent, idx, isSoql, isDml);
- isDml = false;
- isSoql = false;
+ } else if (this.EXE_ANONYMOUS_MATCHER.test(line)) {
+ isOrphan = false;
+ this.execAnonyCount++;
+ this.addToFileDataPartial(
+ line,
+ 'EXECUTE_ANONYMOUS',
+ idx + 1
+ );
+ }
+ if (isOrphan === true) {
+ // console.log(' Orphans:', line);
+ this.addToFileDataPartial(line, 'ORPHAN', idx + 1);
}
+ });
- this.addToFileDataPartial(line, lineEvent, idx + 1);
- } else if (this.EXE_ANONYMOUS_MATCHER.test(line)) {
- this.execAnonyCount++;
- this.addToFileDataPartial(line, 'EXECUTE_ANONYMOUS', idx + 1);
- } else {
- // console.log("[fileUploader.js] Skipping line: ", line);
- this.addToFileDataPartial(line, 'ORPHAN', idx + 1);
- }
- });
+ //publish fileData to MessageChannel
+ this.publishFileMetadata();
+ // parseResultToTree(this.result);
- //publish fileData to MessageChannel
- this.publishFileMetadata();
- // parseResultToTree(this.result);
+ //navigate to log viewer
- //navigate to log viewer
- publish('appChannel', { activeApp: 'Log Viewer' });
- console.log('Total stdExps: ', this.stdExpCount);
- console.log('Total exeAnonys: ', this.execAnonyCount);
- console.log('Total CodeUnits Count: ', this.codeUnitsCount);
- console.log('Total MethodUnits Count: ', this.methodUnitsCount);
- console.log('Final Result after processing res: ', this.result);
- console.log('codeUnitsStack count: ', this.codeUnitsStack.length);
- console.log('methodUnitsStack count: ', this.methodUnitsStack.length);
- // console.log('treeNodes: ', this.treeNodes);
+ publish('appChannel', { activeApp: 'Log Viewer' });
+
+ console.log('Total stdExps: ', this.stdExpCount);
+ console.log('Total exeAnonys: ', this.execAnonyCount);
+ console.log('Total CodeUnits Count: ', this.codeUnitsCount);
+ console.log('Total MethodUnits Count: ', this.methodUnitsCount);
+ console.log('Final Result after processing res: ', this.result);
+ console.log('codeUnitsStack count: ', this.codeUnitsStack.length);
+ console.log(
+ 'methodUnitsStack count: ',
+ this.methodUnitsStack.length
+ );
+ // console.log('treeNodes: ', this.treeNodes);
+ }
}
/*
diff --git a/src/modules/main/logViewer/logViewer.css b/src/modules/main/logViewer/logViewer.css
index fdd7ebf..016dec9 100644
--- a/src/modules/main/logViewer/logViewer.css
+++ b/src/modules/main/logViewer/logViewer.css
@@ -327,8 +327,8 @@ th {
}
.filter-panel {
- height: auto;
overflow: visible;
+ box-shadow: none;
}
.slds-button:hover {
@@ -371,6 +371,8 @@ th {
.widgets {
display: flex;
flex-direction: row-reverse;
+ max-height: calc(100vh - 156px);
+ overflow: auto;
}
.filter-being-edited {
@@ -425,3 +427,14 @@ th {
.dashboard-widget {
background-color: white;
}
+
+.icon-active-filters {
+ background-color: #0176d3;
+ border-color: #0176d3;
+ color: #fff;
+}
+
+.widget-container {
+ border-right: 0.1px solid #c9c9c9;
+ /* border-left: 0.1px solid grey; */
+}
diff --git a/src/modules/main/logViewer/logViewer.html b/src/modules/main/logViewer/logViewer.html
index b76cad2..dfe66a4 100644
--- a/src/modules/main/logViewer/logViewer.html
+++ b/src/modules/main/logViewer/logViewer.html
@@ -50,7 +50,6 @@
class="slds-m-left--xx-small search-button"
>
@@ -99,33 +98,6 @@
-
-
-
@@ -149,7 +121,7 @@
aria-pressed="false"
aria-controls="filterPanel"
aria-expanded="false"
- class="action-bar-action-toggleFilter reportAction report-action-toggleFilter filtersButton slds-button slds-not-selected slds-button_icon-border"
+ class={filterIconStyle}
type="button"
onclick={openFilter}
>
@@ -307,7 +279,6 @@
>