Commit 50a30cbd authored by Ziwen Su's avatar Ziwen Su

Little corrections.

parent d0cd9e35
......@@ -18,7 +18,7 @@
'NODENAME' => ['(NODELIST LIKE :node1 OR CPULIST LIKE :node2)', [':node1', ':node2']],
'TAGS' => ['TAGS = :tag0', '( TAGS & :tag0 ) = :tag0', '( TAGS & :tag1 ) = :tag1', '( TAGS & :tag2 ) = :tag2', '( TAGS & :tag3 ) = :tag3', '( TAGS & :tag4 ) = :tag4', [':tag0', ':tag1', ':tag2', ':tag3', ':tag4']],
'TAGS' => ['TAGS = :tag0', '( TAGS & :tag0 ) = :tag0', '( TAGS & :tag1 ) = :tag1', '( TAGS & :tag2 ) = :tag2', '( TAGS & :tag3 ) = :tag3', '( TAGS & :tag4 ) = :tag4', [':option', ':tag0', ':tag1', ':tag2', ':tag3', ':tag4']],
'NUM_NODES_INT' => ['NUM_NODES BETWEEN :min_nodes AND :max_nodes', 'NUM_NODES >=:min_nodes', 'NUM_NODES <=:max_nodes', [':min_nodes', ':max_nodes']],
'NUM_CORES_INT' => ['NUM_CORES BETWEEN :min_cores AND :max_cores', 'NUM_CORES >=:min_cores', 'NUM_CORES <=:max_cores', [':min_cores', ':max_cores']],
'WALLTIME_INT' => ['WALLTIME BETWEEN :min_walltime AND :max_walltime', 'WALLTIME >=:min_walltime', 'WALLTIME <=:max_walltime', [':min_walltime', ':max_walltime']],
......@@ -72,14 +72,14 @@
} else if ( $key == "TAGS" ) {
$items = explode(" ", $value);
$n = sizeof($items);
if ( $n > 1 ) {
for ( $i=0; $i<$n; $i++ ){
$sql .= "AND ".$filterArray[$key][$i+1]." ";
if ( $items[0] == "and" ) {
$sql .= "AND ".$filterArray[$key][0]." ";
$attributes[$filterArray[$key][6][1]] = $items[1];
} elseif ( $items[0] == "or" ) {
for ( $i=1; $i<$n; $i++ ){
$sql .= "AND ".$filterArray[$key][$i]." ";
$attributes[$filterArray[$key][6][$i]] = $items[$i];
}
} else {
$sql .= "AND ".$filterArray[$key][0]." ";
$attributes[$filterArray[$key][6][0]] = $items[0];
}
} elseif ( strpos($key, '_INT') !== false ) {
$items = explode(" ", $value);
......
......@@ -517,6 +517,7 @@ export class SearchComponent implements OnInit {
else {
this.jobtag_value= (Number(this.jobtag_bool[0]) + Number(this.jobtag_bool[1])*2 + Number(this.jobtag_bool[2])*4 + Number(this.jobtag_bool[3])*8 + Number(this.jobtag_bool[4])*16).toString();
}
this.jobtag_value = this.selected_jobtag_option + " " + this.jobtag_value;
var jobtag_display;
if ( this.jobtag_bool[0] ) {
jobtag_display = "memory-bound";
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment