diff --git a/config_copy.yml b/config_copy.yml
new file mode 100644
index 0000000..f972a46
--- /dev/null
+++ b/config_copy.yml
@@ -0,0 +1,25 @@
+name: ControlModelM2_sim
+max_time: 100
+num_trials: 2
+network_params:
+ generator: barabasi_albert_graph
+ n: 100
+ m: 2
+network_agents:
+ - agent_type: ControlModelM2
+ weight: 0.1
+ state:
+ id: 1
+ - agent_type: SpreadModelM2
+ weight: 0.9
+ state:
+ id: 0
+environment_params:
+ prob_neutral_making_denier: 0.035
+ prob_infect: 0.075
+ prob_cured_healing_infected: 0.035
+ prob_cured_vaccinate_neutral: 0.035
+ prob_vaccinated_healing_infected: 0.035
+ prob_vaccinated_vaccinate_neutral: 0.035
+ prob_generate_anti_rumor: 0.035
+ standard_variance: 0.055
diff --git a/templates/css/main.css b/templates/css/main.css
index f67a731..e329697 100644
--- a/templates/css/main.css
+++ b/templates/css/main.css
@@ -17,7 +17,16 @@ html, body {
}
.navbar {
- box-shadow: 0px -2px 5px 3px rgba(0, 0, 0, .3);
+ box-shadow: 0px 0px 5px 2px rgba(0, 0, 0, .2)
+}
+
+.nav.navbar-right {
+ margin-right: 10px !important;
+}
+
+.dropdown-menu > li > a:hover {
+ background-color: #d4d3d3;
+ cursor: pointer;
}
.node {
@@ -49,6 +58,10 @@ svg#graph, #configuration {
padding: 15px;
border-left: none !important;
overflow: auto;
+ display: flex;
+ flex-direction: column;
+ align-items: inherit;
+ justify-content: space-evenly;
}
button {
@@ -86,8 +99,14 @@ button.pressed {
background-color: white;
}
-.config-item {
+hr {
margin-top: 15px !important;
+ margin-bottom: 15px !important;
+ width: 100%;
+}
+
+#update .config-item {
+ margin-top: 15px !important;
}
/** LOADER **/
@@ -203,6 +222,16 @@ button.pressed {
padding: 5px 2px;
}
+#percentTable .no-data-table {
+ font-size: 10px;
+ justify-content: center;
+ align-items: center;
+ display: flex;
+ flex: 1;
+ height: 100%;
+ font-weight: 100;
+}
+
hr {
margin-top: 15px !important;
margin-bottom: 15px !important;
@@ -304,6 +333,19 @@ table#link-distance .max {
padding: 15px !important;
height: 100%;
overflow-y: auto;
+ overflow-x: hidden;
+}
+
+#wrapper-settings.none {
+ font-weight: bold;
+ display: flex;
+ flex: 1;
+ justify-content: center;
+ align-items: center;
+}
+
+#wrapper-settings.none:before {
+ content: 'No configuration provided';
}
#wrapper-settings .btn-group button:focus {
@@ -329,3 +371,30 @@ table#link-distance .max {
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,.3);
background-color: #ccc;
}
+
+/** CHARTS **/
+#charts {
+ height: 100%;
+ padding-left: 0 !important;
+ padding-top: 15px !important;
+ padding-bottom: 15px !important;
+}
+
+.chart {
+ height: 50%;
+}
+
+.chart.no-data:before {
+ content: 'No data';
+ position: absolute;
+ font-size: 10px;
+ padding-bottom: 35px;
+}
+
+.chart.no-data {
+ font-weight: bold;
+ display: flex;
+ flex: 1;
+ justify-content: center;
+ align-items: center;
+}
diff --git a/templates/index.html b/templates/index.html
index 20ddfeb..c81c55d 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -20,6 +20,10 @@
+
+
+
+
@@ -41,6 +45,11 @@
play,
slider;
+ var width_chart = (window.innerWidth - 30) / 2 - 15,
+ height_chart = (window.innerHeight - 230) / 2,
+ chart_nodes,
+ chart_attrs;
+
window.onload = function() {
"use strict";
@@ -56,6 +65,7 @@
$('#update #file').change(function() {
var file = $('#file')[0].files[0];
+ $('.console').append('
');
self.GraphVisualization.reset();
$('#load').show();
@@ -83,11 +93,6 @@
});
- // Select 'trials'
- $('.config-item #trials').change(function() {
- _socket.send($(this).val(), 'get_trial');
- });
-
// Select 'attributes'
$('.config-item #properties').change(function() {
self.GraphVisualization.update_graph($(this).val(), slider.value(), function() {
@@ -95,8 +100,38 @@
})
});
- $('[data-toggle="tooltip"]').tooltip()
-
+ chart_nodes = c3.generate({
+ size: {
+ width: width_chart,
+ height: height_chart
+ },
+ data: {
+ columns: [],
+ type: 'area-spline'
+ },
+ axis: {
+ x: { label: 'Time' },
+ y: { label: 'Number of nodes' }
+ },
+ point: { show: false },
+ bindto: '#chart_nodes'
+ });
+ chart_attrs = c3.generate({
+ size: {
+ width: width_chart,
+ height: height_chart
+ },
+ data: {
+ columns: [],
+ type: 'area-spline'
+ },
+ axis: {
+ x: { label: 'Time' },
+ y: { label: 'Attributes' }
+ },
+ point: { show: false },
+ bindto: '#chart_attrs'
+ });
}
///]]
@@ -113,7 +148,7 @@