Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Us10.1 filter panel new design #159

Draft
wants to merge 88 commits into
base: master
Choose a base branch
from
Draft
Changes from 1 commit
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
dcd567d
frontend/LineInputList.svelte:modify the filter option list according…
hry625 Nov 8, 2022
0e55e49
frontend/FilterWidget.svelte:modify the filter option list according …
hry625 Nov 8, 2022
a06cc57
build(deps): bump loader-utils from 2.0.2 to 2.0.3 in /frontend
dependabot[bot] Nov 8, 2022
f6f5369
frontend: highlight edges of node on hover (#123)
alrapal Nov 16, 2022
9cad863
backend/event_sender: add eiffelvis vocabulary and improve sending op…
alrapal Nov 16, 2022
33187c8
backend: Update Cargo.lock (#138)
RuthgerD Nov 29, 2022
ce9a092
build(deps): bump minimatch from 3.0.4 to 3.1.2 in /frontend (#140)
dependabot[bot] Nov 29, 2022
92338be
build(deps): bump loader-utils from 2.0.3 to 2.0.4 in /frontend (#128)
dependabot[bot] Nov 29, 2022
432fce0
Frontend: Graph Legend Update (#124)
ktpa Nov 29, 2022
49594a6
backend/domain: split out filter and collection
RuthgerD Nov 20, 2022
84edf60
backend: allow client to somewhat control string matching
RuthgerD Nov 20, 2022
0380422
FrontEnd: Re-factor the overall layout (#141)
kam56 Dec 6, 2022
59654d8
Frontend:uitypes.ts: add FilterInput interface
hry625 Dec 7, 2022
85e674f
frontend/FilterWidget.svelte: implement add_filter_to_TempFilterArray…
hry625 Dec 8, 2022
55c7769
frontend/LineInputList.svelte: change the LineInputList into table
hry625 Dec 8, 2022
0466813
frontend/Panel.svelte: call filterpanel's function from Panel component
hry625 Dec 8, 2022
8728f3c
frontend/QueryForm.svelte:connect FilterWidget with QueryForm
hry625 Dec 8, 2022
fc4303a
frontend/LineInputList.svelte: change wildcard to substring
hry625 Dec 13, 2022
f38f6f2
frontend:apidefinition.ts: change event_filter_type_eq function on id…
hry625 Dec 18, 2022
aceca2a
frontend/uitypes.ts: update fixed_query_to_norm function to fit new q…
hry625 Dec 24, 2022
3cf1b42
frontend/FilterWidget.svelte:update empty filter datastructure
hry625 Dec 24, 2022
81c6d00
frontend/App.svelte: update use_selected_as_root function to fit new …
hry625 Dec 24, 2022
9f1cefe
frontend/Panel.svelte:fix bind warning
hry625 Dec 26, 2022
0dc90c9
frontend/Panel.svelte&QueryForm.svelte:remove outbound expose of filt…
hry625 Dec 26, 2022
d3923e2
frontend/LineInputList.svelte:update lineinput layout to make it thinner
hry625 Dec 26, 2022
6c6cc50
frontend/App.svelte: implement add_filter_set function
hry625 Dec 26, 2022
8e665bd
frontend/Panel.svelte: connect add_filter_set function with the button
hry625 Dec 26, 2022
755ae65
update filterWidet
hry625 Jan 2, 2023
6bb781d
frontend/QueryForm.svelte: change filter sets to sub graph filters
hry625 Jan 2, 2023
3c9c064
frontend/apidefinition.ts:remove unnecessary import
hry625 Jan 2, 2023
35a84fd
frontend/App.svelte:bind value with its child
hry625 Jan 2, 2023
e3eadca
frontend:FilterWidget.svelte:code clean up
hry625 Jan 2, 2023
f18a532
frontend/QueryForm.svelte:code clean up
hry625 Jan 2, 2023
3c33fe2
frontend/App.svelte:code clean up
hry625 Jan 2, 2023
fc1c331
build(deps): bump loader-utils from 2.0.2 to 2.0.3 in /frontend
dependabot[bot] Nov 8, 2022
2e48528
frontend: highlight edges of node on hover (#123)
alrapal Nov 16, 2022
7a95bda
backend/event_sender: add eiffelvis vocabulary and improve sending op…
alrapal Nov 16, 2022
f2a8bc2
build(deps): bump loader-utils from 2.0.3 to 2.0.4 in /frontend (#128)
dependabot[bot] Nov 29, 2022
1c12aca
Frontend: Graph Legend Update (#124)
ktpa Nov 29, 2022
efb319c
backend: allow client to somewhat control string matching
RuthgerD Nov 20, 2022
b6d0a1c
FrontEnd: Re-factor the overall layout (#141)
kam56 Dec 6, 2022
ad9521f
docs: Clarify procedure for SSL-able Docker build
AeroStun Dec 9, 2022
804bfb2
frontend: Add non-Interactive mode (#142)
Asiya-Ismail Dec 13, 2022
c8922fe
frontend: allow filter panel to be toggled from sidebar (#145)
kam56 Dec 14, 2022
8a817e2
build(deps): bump loader-utils from 2.0.2 to 2.0.3 in /frontend
dependabot[bot] Nov 8, 2022
0334b5e
frontend: highlight edges of node on hover (#123)
alrapal Nov 16, 2022
1fc2b75
backend/event_sender: add eiffelvis vocabulary and improve sending op…
alrapal Nov 16, 2022
e091850
build(deps): bump loader-utils from 2.0.3 to 2.0.4 in /frontend (#128)
dependabot[bot] Nov 29, 2022
db702ac
Frontend: Graph Legend Update (#124)
ktpa Nov 29, 2022
c8eb65c
backend/domain: split out filter and collection
RuthgerD Nov 20, 2022
3a76f47
backend: allow client to somewhat control string matching
RuthgerD Nov 20, 2022
6986433
FrontEnd: Re-factor the overall layout (#141)
kam56 Dec 6, 2022
3243655
frontend: Add non-Interactive mode (#142)
Asiya-Ismail Dec 13, 2022
d15ab68
frontend: allow filter panel to be toggled from sidebar (#145)
kam56 Dec 14, 2022
0982d13
Revert "frontend/App.svelte:code clean up"
hry625 Jan 2, 2023
dd8f21b
Revert "frontend/QueryForm.svelte:code clean up"
hry625 Jan 2, 2023
505004b
frontend:revert to latest changes on filter panel new design branch.
hry625 Jan 2, 2023
8db98e2
Revert "frontend/QueryForm.svelte:code clean up"
hry625 Jan 2, 2023
5a1726a
build(deps): bump loader-utils from 2.0.2 to 2.0.3 in /frontend
dependabot[bot] Nov 8, 2022
1ddf03c
backend/event_sender: add eiffelvis vocabulary and improve sending op…
alrapal Nov 16, 2022
b19ace1
backend: allow client to somewhat control string matching
RuthgerD Nov 20, 2022
c2500dc
frontend: Add non-Interactive mode (#142)
Asiya-Ismail Dec 13, 2022
dda6330
frontend: allow filter panel to be toggled from sidebar (#145)
kam56 Dec 14, 2022
35bf76c
Frontend: Refactor layout and implementation of setting component (#146)
alrapal Dec 23, 2022
e3ae799
frontend/App.svelte&Panel.svelte:code clean up after merge master to …
hry625 Jan 5, 2023
81a41a6
backend/event_filter.rs:fix error caused by merge
hry625 Jan 5, 2023
80c1733
frontend/QueryForm.svelte:fix the substring filter bug
hry625 Jan 5, 2023
0328f0c
frontend/QueryForm.svelte:code clean up and capitalize filters sets t…
hry625 Jan 5, 2023
cade6b4
frontend/FilterWidget.svelte&LineInputList.svelte: lineinput layout u…
hry625 Jan 5, 2023
be7d9e1
frontend/Panel.svelte: change button content so that the user could r…
hry625 Jan 5, 2023
055dac3
frontend/App.svelte&Panel.svelte&QueryForm.svelte: implement update f…
hry625 Jan 9, 2023
88ba81c
frontend/Panel.svelte:fix submit button disable bug
hry625 Jan 9, 2023
18b3639
build(deps): bump loader-utils from 2.0.2 to 2.0.3 in /frontend
dependabot[bot] Nov 8, 2022
da02322
backend/event_sender: add eiffelvis vocabulary and improve sending op…
alrapal Nov 16, 2022
389e7a5
build(deps): bump loader-utils from 2.0.3 to 2.0.4 in /frontend (#128)
dependabot[bot] Nov 29, 2022
5ec8f46
backend/domain: split out filter and collection
RuthgerD Nov 20, 2022
3dce226
backend: allow client to somewhat control string matching
RuthgerD Nov 20, 2022
1b83973
Frontend: Refactor layout and implementation of setting component (#146)
alrapal Dec 23, 2022
bf9b063
frontend: Make keyboard navigation play nice with auto scroll (#148)
Asiya-Ismail Jan 5, 2023
aaf5261
frontend: keybind and shortcut panel (#149)
ktpa Jan 9, 2023
4c9452b
fix after merge error
hry625 Jan 9, 2023
9da9ac4
Merge branch 'master' into US10.1-filter-panel-new-design
hry625 Jan 12, 2023
1c9849a
format and bug fix after merge
hry625 Jan 12, 2023
225ab3b
Frontend/QueryForm.svelte:fix typo
hry625 Jan 17, 2023
43c898f
frontend/FilterWidget.svelte: change default isWildCard value is fals…
hry625 Jan 17, 2023
49dc547
frontend/LineInputList.svelte:disable substring toggle button when fi…
hry625 Jan 17, 2023
49d987b
frontend/App.svelte:update add_selected_node_as_root_to_filter functi…
hry625 Jan 17, 2023
9846da7
frontend/LineInputlist.svelte:fix filter panel layout inconsistency w…
hry625 Jan 18, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
frontend: Add non-Interactive mode (#142)
Asiya-Ismail authored and hry625 committed Jan 2, 2023
commit 804bfb20854ef26f181648e19dbc95959d57a6bc
73 changes: 73 additions & 0 deletions frontend/src/App.svelte
Original file line number Diff line number Diff line change
@@ -30,6 +30,7 @@
let show_menu: boolean = false;
let show_legend: boolean = true;
let show_timebar: boolean = false;
$: nonInteractiveState = true;

let customTheme: Object = config.Theme.ColorBlind;
let themeMap: Map<string, any> = new Map(Object.entries(customTheme));
@@ -71,6 +72,44 @@
}
}

// non-interactive mode variables
let show_message: boolean = false;
let dayToDisplay: string = null;
let dayLastEventRecieved: number = 0;
let recievedNewNode: boolean = false;
let displayTime: string = null;
let displayDate: string = null;

const displayInfoMessage = () => {
//After 1 minute of no nodes recieved, a message is displayed.
let time: Date = new Date();
if (time.getDate() == dayLastEventRecieved) {
dayToDisplay = "TODAY";
} else if (time.getDate() - dayLastEventRecieved == 1) {
dayToDisplay = "YESTERDAY";
} else if (time.getDate() - dayLastEventRecieved > 1) {
dayToDisplay = displayDate;
}

if (recievedNewNode == false && dayToDisplay != null) {
show_message = true;
nonInteractiveState = true;
console.log("received no new node");
} else {
show_message = false;
}
};

let ms = 60000;
let interval = setInterval(displayInfoMessage, ms); // set timer to run every 1 minute

// timer function to wait 1 minute to check if nodes are still being received,
// if no new nodes after 1 minute, message for latest node received is displayed
const resetTimer = () => {
clearInterval(interval); // interval is reset every minute
interval = setInterval(displayInfoMessage, ms);
};

const consume_query = async () => {
const layout = new StatefulLayout();
awaiting_query_request = true;
@@ -83,6 +122,25 @@
layout.apply(event, graph_options);
graph_elem.push(event);

graph_elem.nonInteractiveMode(event, nonInteractiveState);

//every time a node is pushed to the graph the variables are updated
let timeJson: number = event.time;
let time: Date = new Date(timeJson);
dayLastEventRecieved = time.getDate();
displayDate = time.toLocaleDateString([], {
weekday: "short",
day: "numeric",
month: "short",
year: "numeric",
});
displayTime = time.toLocaleTimeString([], {
hour: "2-digit",
minute: "2-digit",
});
recievedNewNode = true;
show_message = false;

// TODO: Find a better way to do this
if (once) {
graph_elem.focusNode(event.id);
@@ -91,6 +149,10 @@

legend = layout.getNodeStyle();
}

recievedNewNode = false;
console.log("stoped recieving nodes");
resetTimer(); // method to reset timer
};

const submit_state_query = () => submit_query(current_query);
@@ -184,6 +246,10 @@
(show_timebar = !show_timebar), graph_elem.updateTimeBar(show_timebar);
};

const toggleInteractiveMode = () => {
nonInteractiveState = !nonInteractiveState;
};

const options = {
width: 400,
height: 400,
@@ -263,6 +329,13 @@
data={{}}
/>
</div>
<G6Graph
on:nodeselected={on_node_selected}
bind:this={graph_elem}
bind:nonInteractiveState
{options}
data={{}}
/>
</div>

<style lang="postcss" global>
5 changes: 3 additions & 2 deletions frontend/src/components/G6Graph.svelte
Original file line number Diff line number Diff line change
@@ -9,6 +9,9 @@

export let options = {};
export let data = {};
export let nonInteractiveState: boolean;

let nodePoint: number = 0;

let container: HTMLElement;
let graph: Graph | null;
@@ -235,12 +238,10 @@

graph.changeData(data);
resizeGraph();

return () => {
graph.destroy();
};
});

$: {
if (data && graph) {
graph.changeData(data);
8 changes: 8 additions & 0 deletions frontend/src/components/SideBar.svelte
Original file line number Diff line number Diff line change
@@ -4,14 +4,22 @@
export let show_menu: boolean;
export let show_legend: boolean;
export let show_timebar: boolean;
export let interactiveMode: boolean;

export let updateTimeBarPlaceholder: () => void; //it was called directly inside the div element, now: a method is created inside app.svelt
export let toggleMenuPlaceholder: () => void;
export let toggleLegendPlaceholder: () => void;
export let toggleInteractiveModePlaceholder: () => void;

</script>
<div class="flex h-screen w-16">
<ul class="menu grid justify-items-center content-end py-3 h-screen shadow-large bg-base-300">
<li>
<SvgButton onClickAction={toggleInteractiveModePlaceholder}
btnState= {interactiveMode}
data= "M12.522,10.4l-3.559,3.562c-0.172,0.173-0.451,0.176-0.625,0c-0.173-0.173-0.173-0.451,0-0.624l3.248-3.25L8.161,6.662c-0.173-0.173-0.173-0.452,0-0.624c0.172-0.175,0.451-0.175,0.624,0l3.738,3.736C12.695,9.947,12.695,10.228,12.522,10.4 M18.406,10c0,4.644-3.764,8.406-8.406,8.406c-4.644,0-8.406-3.763-8.406-8.406S5.356,1.594,10,1.594C14.643,1.594,18.406,5.356,18.406,10M17.521,10c0-4.148-3.374-7.521-7.521-7.521c-4.148,0-7.521,3.374-7.521,7.521c0,4.147,3.374,7.521,7.521,7.521C14.147,17.521,17.521,14.147,17.521,10"
/>
</li>
<li>
<SvgButton
onClickAction= {toggleMenuPlaceholder}