All new accounts created on Gitlab now require administrator approval. If you invite any collaborators, please let Flux staff know so they can approve the accounts.

Commit 499aacc2 authored by David Johnson's avatar David Johnson

Fix some breakage affecting node_attribute edit, and nodecontrol.

parent a68657fc
...@@ -251,14 +251,14 @@ foreach my $attr (keys(%attrs)) { ...@@ -251,14 +251,14 @@ foreach my $attr (keys(%attrs)) {
if ($modify_attrs) { if ($modify_attrs) {
foreach my $node (@nodes) { foreach my $node (@nodes) {
DBQueryFatal("replace into $NODEATTRS_TABLE values ". DBQueryFatal("replace into $NODEATTRS_TABLE values ".
"('$node','$attr','$value')"); "('$node','$attr','$value','0')");
} }
} }
# XXX: maybe just merge this with modify operation. # XXX: maybe just merge this with modify operation.
elsif ($add_attrs) { elsif ($add_attrs) {
foreach my $node (@nodes) { foreach my $node (@nodes) {
DBQueryFatal("insert into $NODEATTRS_TABLE values ". DBQueryFatal("insert into $NODEATTRS_TABLE values ".
"('$node','$attr','$value')"); "('$node','$attr','$value','0')");
} }
} }
elsif ($remove_attrs) { elsif ($remove_attrs) {
......
...@@ -88,7 +88,7 @@ if ($isadmin) { ...@@ -88,7 +88,7 @@ if ($isadmin) {
$osid_result = $osid_result =
DBQueryFatal("select o.osname, o.pid, o.osid as oosid, " . DBQueryFatal("select o.osname, o.pid, o.osid as oosid, " .
" o.vers as overs, " . " o.vers as overs, " .
" p.osid as posid, p.osid_vers as pvers ". " p.osid as posid, p.osid_vers as pvers, p.node_id ".
" from os_info_versions as o ". " from os_info_versions as o ".
"left join `partitions` as p on o.osid=p.osid ". "left join `partitions` as p on o.osid=p.osid ".
"where p.node_id='$node_id' or ". "where p.node_id='$node_id' or ".
...@@ -101,7 +101,7 @@ else { ...@@ -101,7 +101,7 @@ else {
$osid_result = $osid_result =
DBQueryFatal("select distinct o.osname, o.pid, o.osid as oosid," . DBQueryFatal("select distinct o.osname, o.pid, o.osid as oosid," .
" o.vers as overs, " . " o.vers as overs, " .
" p.osid as posid, p.osid_vers as pvers ". " p.osid as posid, p.osid_vers as pvers, p.node_id ".
"from os_info_versions as o ". "from os_info_versions as o ".
"left join group_membership as m on m.pid=o.pid ". "left join group_membership as m on m.pid=o.pid ".
"left join `partitions` as p on o.osid=p.osid ". "left join `partitions` as p on o.osid=p.osid ".
...@@ -254,7 +254,7 @@ if ($isadmin) { ...@@ -254,7 +254,7 @@ if ($isadmin) {
} }
else { else {
$osid = $oosid; $osid = $oosid;
$vers = $pvers; $vers = $overs;
} }
echo "<option "; echo "<option ";
......
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