Commit d5546b23 authored by Reto Da Forno's avatar Reto Da Forno
Browse files

Merge branch 'master' of gitlab.ethz.ch:tec/research/flocklab/server

parents 82841980 7365282f
......@@ -162,6 +162,7 @@ CREATE TABLE `tbl_serv_platforms` (
`freq_868` tinyint(1) NOT NULL DEFAULT '0',
`freq_433` tinyint(1) NOT NULL DEFAULT '0',
`last_changed` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`active` TINYINT NULL DEFAULT 1,
PRIMARY KEY (`serv_platforms_key`)
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
......
......@@ -388,13 +388,13 @@ def main(argv):
errcnt = errcnt + 1
else:
# Put data into dictionary for later use:
pf = ret[0]
pf = ret[0].lower()
core = int(ret[1])
if platform == None:
platform = pf
elif platform != pf:
if not quiet:
print("Line %d: using target images of different platforms is not allowed." % (line))
print("Line %d: using target images of different platforms is not allowed (used platforms: %s, %s)." % (line, platform, pf))
errcnt = errcnt + 1
if "ALL" in obsids:
obsids.remove("ALL")
......@@ -421,12 +421,12 @@ def main(argv):
errcnt = errcnt + 1
else:
# Get os and platform and put it into dictionary for later use:
pf = imageconf[0].xpath('d:platform', namespaces=ns)[0].text
pf = imageconf[0].xpath('d:platform', namespaces=ns)[0].text.lower()
if platform == None:
platform = pf
elif platform != pf:
if not quiet:
print("Line %d: using target images of different platforms is not allowed." % (line))
print("Line %d: using target images of different platforms is not allowed (used platforms: %s, %s)." % (line, platform, pf))
errcnt = errcnt + 1
if "ALL" in obsids:
obsids.remove("ALL")
......
......@@ -285,6 +285,7 @@ function get_available_platforms() {
FROM `tbl_serv_platforms`
LEFT JOIN `tbl_serv_architectures`
ON `tbl_serv_architectures`.`platforms_fk` = `tbl_serv_platforms`.`serv_platforms_key`
WHERE `active` = 1
ORDER BY `name`, `core` ASC';
$res = mysqli_query($db, $sql) or flocklab_die('Cannot fetch available platforms because: ' . mysqli_error($db));
$num = mysqli_num_rows($res);
......
Supports Markdown
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