Skip to content

Commit

Permalink
Organized axiom-profiler-GUI/src into modules
Browse files Browse the repository at this point in the history
  • Loading branch information
oskari1 committed Nov 27, 2023
1 parent 4fe8fc6 commit 19272db
Show file tree
Hide file tree
Showing 14 changed files with 33 additions and 20 deletions.
21 changes: 12 additions & 9 deletions axiom-profiler-GUI/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,20 @@ use wasm_streams::ReadableStream;
use web_sys::{Event, HtmlInputElement};
use yew::prelude::*;
use yew_router::prelude::*;
use results::svg_result::SVGResult;

use crate::svg_result::SVGResult;
// use crate::svg_result::SVGResult;

mod filter_chain;
mod graph;
mod graph_filters;
mod input_state;
mod selected_node;
mod svg_result;
mod toggle_switch;
mod graph_container;
// mod filter_chain;
// mod graph;
// mod graph_filters;
// mod input_state;
// mod selected_node;
// mod svg_result;
// mod toggle_switch;
// mod graph_container;
mod results;
mod utils;
// mod select_dropdown;
pub enum Msg {
LoadedBytes(String, Vec<u8>),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
use crate::{
graph_filters::{Filter, GraphFilter},
svg_result::{UserPermission, NODE_LIMIT},
};
use super::graph_filters::{Filter, GraphFilter};
use super::super::svg_result::{UserPermission, NODE_LIMIT};
use gloo::console::log;
use yew::prelude::*;
// use gloo_console::log;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::{
input_state::{InputValue, UsizeInput},
selected_node::SelectedNode,
utils::input_state::{InputValue, UsizeInput},
};
use super::selected_node::SelectedNode;
use petgraph::{stable_graph::NodeIndex, Direction};
use smt_log_parser::{
items::QuantIdx,
Expand Down Expand Up @@ -110,7 +110,7 @@ pub fn graph_filter(props: &GraphFilterProps) -> Html {
label={"Render the n most expensive instantiations where n = "}
dependency={props.dependency.clone()}
input_value={max_instantiations}
default_value={crate::svg_result::NODE_LIMIT}
default_value={super::super::svg_result::NODE_LIMIT}
placeholder={""}
/>
<button onclick={add_max_insts_filter}>{"Add"}</button>
Expand Down
3 changes: 3 additions & 0 deletions axiom-profiler-GUI/src/results/filters/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
pub mod filter_chain;
pub mod graph_filters;
pub mod selected_node;
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use petgraph::Direction::{Incoming, Outgoing};
use smt_log_parser::parsers::z3::inst_graph::InstInfo;
use yew::prelude::*;

use crate::graph_filters::Filter;
use super::graph_filters::Filter;

#[derive(Properties, PartialEq)]
pub struct SelectedNodeProps {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use web_sys::Event;
use web_sys::HtmlInputElement;
use wasm_bindgen::{JsCast, UnwrapThrowExt};

use crate::graph::Graph;
use super::graph::Graph;

pub enum Msg {
SetValueTo(f32),
Expand Down
2 changes: 2 additions & 0 deletions axiom-profiler-GUI/src/results/graph/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
pub mod graph_container;
pub mod graph;
4 changes: 4 additions & 0 deletions axiom-profiler-GUI/src/results/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
pub mod svg_result;
pub mod filters;
pub mod graph;

Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
use self::colors::HSVColour;
use crate::{
use super::filters::{
filter_chain::{FilterChain, Msg as FilterChainMsg},
graph_filters::Filter, graph_container::GraphContainer,
graph_filters::Filter,
};
use super::graph::graph_container::GraphContainer;
use material_yew::WeakComponentLink;
use num_format::{Locale, ToFormattedString};
use petgraph::dot::{Config, Dot};
Expand Down
File renamed without changes.
2 changes: 2 additions & 0 deletions axiom-profiler-GUI/src/utils/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
pub mod input_state;
pub mod toggle_switch;
File renamed without changes.
File renamed without changes.

0 comments on commit 19272db

Please sign in to comment.