Skip to content

Commit

Permalink
Tiny fixes
Browse files Browse the repository at this point in the history
Fixed broken resolution picker (value for 4 Days resolution was
missing).
Fixed dbqry command prettyprinting.
Fixed clear filter button
Fixed readme overview.png link
  • Loading branch information
nerudaj committed Jul 28, 2017
1 parent 1f71af6 commit 43438d9
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ and manage export profiles of the ipfixcol.
## <a name="screen"></a> Screenshots
### Workbench tab
#### Overview
![Overview](/screen/overview.png)
![Overview](/screens/overview.png)

#### Graphs section
![Graphs](/screens/graph.png)
Expand Down
15 changes: 14 additions & 1 deletion web/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,20 @@
/* CONSTANTS */
/* ========= */
var USERSTAMP = "<?php echo $USERSTAMP; ?>";
var ARR_RESOLUTION = [ 0.25 * 24, 0.5 * 24, 24, 2 * 24, 7 * 24, 14 * 24, 30 * 24, (2 * 30 + 1) * 24, (6 * 30 + 3) * 24, (8 * 30 + 4) * 24, 365 * 24 ];
var ARR_RESOLUTION = [
0.25 * 24, // 6 Hours
0.5 * 24, // 12 Hours
24, // 1 Day
2 * 24, // 2 Days
4 * 24, // 4 Days
7 * 24, // 1 Week
14 * 24, // 2 Weeks
30 * 24, // 1 Month
(2 * 30 + 1) * 24, // 2 Months
(6 * 30 + 3) * 24, // 6 Months
(8 * 30 + 4) * 24, // 8 Months
365 * 24 // 1 Year
];
var PROFILE = <?php echo "\"$PROFILE\""; ?>;
var ARR_SOURCES = [<?php $size = sizeof($ARR_SOURCES); for($i = 0; $i < $size; $i++) echo "\"$ARR_SOURCES[$i]\", "; ?>];
var ARR_GRAPH_VARS = [<?php $size = sizeof($ARR_GRAPH_VARS); for($i = 0; $i < $size; $i++) echo "\"$ARR_GRAPH_VARS[$i]\", "; ?>];
Expand Down
16 changes: 14 additions & 2 deletions web/php/async/dbqry.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,12 @@ function execDbRequest() { // This gets called when this thread is
}
unset($path);

// What will be printed to user
$cmdBackup = "$MPIEXEC_CMD $MPIEXEC_ARGS -env OMP_NUM_THREADS 4 ";
$cmdBackup .= "$FDISTDUMP_CMD $filter $opts ";
$cmdBackup .= implode(" ", $pathsArr);

// What will be executed
$cmd = "$MPIEXEC_CMD $MPIEXEC_ARGS -env OMP_NUM_THREADS 4 ";
$cmd .= "$FDISTDUMP_CMD $filter $opts --progress-bar-type=json --progress-bar-dest=".$TMP_DIR.$stamp.".$tab.json ";
$cmd .= implode(" ", $pathsArr);
Expand All @@ -93,7 +99,13 @@ function execDbRequest() { // This gets called when this thread is
}
unset($path);

$cmd = "$FDISTDUMP_HA_CMD ".implode(" ", $pathsArr)." --verbose ";
// What will be printed to user
$cmdBackup = "$FDISTDUMP_HA_CMD ".implode(" ", $pathsArr)." ";
$cmdBackup .= "$MPIEXEC_CMD -env OMP_NUM_THREADS 4 ";
$cmdBackup .= "$FDISTDUMP_CMD $filter $opts";

// What will be executed
$cmd = "$FDISTDUMP_HA_CMD ".implode(" ", $pathsArr)." "; // NOTE: add --verbose for debug
$cmd .= "$MPIEXEC_CMD -env OMP_NUM_THREADS 4 ";
$cmd .= "$FDISTDUMP_CMD $filter $opts --progress-bar-type=json --progress-bar-dest=".$TMP_DIR.$stamp.".$tab.json";
}
Expand Down Expand Up @@ -174,7 +186,7 @@ function execDbRequest() { // This gets called when this thread is
// BOOTSTRAP CODE:
echo '<div class=\'panel panel-info\'>';
echo '<div class=\'panel-heading\'><div class=\'row\'><div class=\'col-md-11\'>Output</div><div class=\'col-md-1\'><a href=\'#\' onclick=\'Local_clearTab("1");\'>Clear results</a></div></div></div>';
echo '<div class=\'panel-body\'><pre>',$cmd,'</pre><pre>';
echo '<div class=\'panel-body\'><pre>',$cmdBackup,'</pre><pre>';

if (strlen($buffer) > 0) {
$auxbuf = "";
Expand Down
2 changes: 1 addition & 1 deletion web/php/dbqry/dbqry.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script>
function Local_clearTextarea(tab) {
document.getElementById("Filter_"+tab).value = "";
document.getElementById("Dbqry_Filter_" + tab).value = "";
}

function generateCustomOptions (tab) {
Expand Down

0 comments on commit 43438d9

Please sign in to comment.