From a92f2fcc7bd2b67c4ee5910b4f66edcadd5c9589 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Tue, 23 Jan 2018 09:29:11 +0100 Subject: web-scripts/build-slaves.php new for directly retrieving status of build slaves from the database --- web-scripts/build-slaves.php | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 web-scripts/build-slaves.php (limited to 'web-scripts') diff --git a/web-scripts/build-slaves.php b/web-scripts/build-slaves.php new file mode 100644 index 0000000..0b8ae6a --- /dev/null +++ b/web-scripts/build-slaves.php @@ -0,0 +1,44 @@ +list of build slaves +connect_error) { + die("Connection to mysql database failed: " . $conn->connect_error); + } + + $result = + $conn->query( + "SELECT" . + " `build_slaves`.`name`," . + "`build_slaves`.`operator`," . + "`package_sources`.`pkgbase`," . + "`build_slaves`.`last_connection`" . + " FROM `build_slaves`" . + " LEFT JOIN `build_assignments` ON" . + " `build_slaves`.`currently_building`=`build_assignments`.`id`" . + " LEFT JOIN `package_sources` ON" . + " `build_assignments`.`package_source`=`package_sources`.`id`" . + " ORDER BY `build_slaves`.`last_connection`" + ); + + print "\n"; + if ($result->num_rows > 0) { + print "\n"; + while ($row = $result -> fetch_assoc()) { + foreach ($row as $key => $value) { + if ($value=="") { + $row[$key]=" "; + } + } + print ""; + print ""; + print ""; + print ""; + print ""; + print "\n"; + } + } + print "
nameoperatorcurrently buildinglast connection
".$row["name"]."".$row["operator"]."".$row["pkgbase"]."".$row["last_connection"]."
\n"; + +?> + -- cgit v1.2.3-70-g09d2 From 763134d4eaabd357b7c908a5b5e8f3c3283651c6 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Tue, 23 Jan 2018 09:33:52 +0100 Subject: web-scripts/statistics.php, web-scripts/packages.php new in git --- web-scripts/packages.php | 20 +++++ web-scripts/statistics.php | 179 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 199 insertions(+) create mode 100644 web-scripts/packages.php create mode 100644 web-scripts/statistics.php (limited to 'web-scripts') diff --git a/web-scripts/packages.php b/web-scripts/packages.php new file mode 100644 index 0000000..5f04979 --- /dev/null +++ b/web-scripts/packages.php @@ -0,0 +1,20 @@ +connect_error) { + die("Connection failed: " . $mysql->connect_error); +} + +$result = $mysql -> query("SELECT * FROM buildmaster.binary_packages"); +if ($result -> num_rows > 0) { + while($row = $result->fetch_assoc()) { + foreach ($row as $key => $val) { + print $key .": ".$val." - "; + } + print "
\n"; + } +} + +print 'OK'; + +?> diff --git a/web-scripts/statistics.php b/web-scripts/statistics.php new file mode 100644 index 0000000..279aa39 --- /dev/null +++ b/web-scripts/statistics.php @@ -0,0 +1,179 @@ + $val[0])) + $t_min = $val[0]; + if (($t_max == -1) || ($t_max < $val[0])) + $t_max = $val[0]; + foreach ($columns as $id => $column) { + if (count($val) > $id+1) + $values[$column][$val[0]] = $val[$id+1]; + }; + foreach ($print_columns as $column) { + if (array_key_exists($column,$values)) + if (($val_max == -1) || ($val_max < $values[$column][$val[0]])) + $val_max = $values[$column][$val[0]]; + } +}; + +$max_len = 0; +foreach ($print_columns as $column) { + $len = strlen($values[$column][$t_max])+1; + if ($len > $max_len) + $max_len = $len; +} + +$width = 1600; +$height = 600; +$border = 5; +$legend_line_length = 10; +$legend_height = 3 * ImageFontHeight(5) + $legend_line_length; + +$im = @ImageCreate ($width + $legend_line_length + $max_len * ImageFontWidth(5), $height + $legend_height) + or die ("Cannot create new gd-image-stream"); + +$background_color = ImageColorAllocate ($im, 255, 255, 255); +$foreground_color = ImageColorAllocate ($im, 0, 0, 0); + +$colors['stable'] = ImageColorAllocate ($im, 0, 0, 0); +$colors['tasks'] = ImageColorAllocate ($im, 0, 0, 128); +$colors['pending_packages'] = ImageColorAllocate ($im, 0, 0, 255); +$colors['staging'] = ImageColorAllocate ($im, 0, 100, 0); +$colors['testing'] = ImageColorAllocate ($im, 0, 200, 0); +$colors['tested'] = ImageColorAllocate ($im, 100, 255, 0); +$colors['broken'] = ImageColorAllocate ($im, 255, 0, 0); +$colors['loops'] = ImageColorAllocate ($im, 128, 128, 0); +$colors['looped_packages'] = ImageColorAllocate ($im, 255, 128, 128); +$colors['locked'] = ImageColorAllocate ($im, 128, 128, 128); +$colors['blocked'] = ImageColorAllocate ($im, 128, 0, 0); +$colors['next_pending'] = ImageColorAllocate ($im, 0, 255, 255); + +function scale($x, $x_min, $x_max, $scale, $log) { + if ($log) { + $x = log($x + 10); + $x_min = log($x_min + 10); + $x_max = log($x_max + 10); + }; + if ($x_max == $x_min) + $frac = 0; + else + $frac = ($x - $x_min)/($x_max - $x_min); + if ($scale < 0) + return ($frac-1) * $scale; + else + return $frac * $scale; +}; + +function print_graph($data, $color) { + global $width, $height, $im, $t_min, $t_max, $val_max, $border, $legend_line_length; + ksort($data); + $last_t = -1; + $last_val = -1; + foreach ($data as $t => $val) { + if ($last_t != -1) + ImageLine( + $im, + scale($last_t,$t_min,$t_max,$width-2*$border,false)+$border+$legend_line_length, + scale($last_val,0,$val_max,-$height+2*$border,isset($_GET["log"]))+$border, + scale($t,$t_min,$t_max,$width-2*$border,false)+$border+$legend_line_length, + scale($val,0,$val_max,-$height+2*$border,isset($_GET["log"]))+$border, + $color + ); + $last_t = $t; + $last_val = $val; + } + ImageString( + $im, + 5, + $width+$legend_line_length, + scale($last_val,0,$val_max,-$height+2*$border,isset($_GET["log"]))+$border - ImageFontHeight(5)/2, + " ".$data[$t_max], + $color + ); +}; + +ImageRectangle($im, $legend_line_length, 0, $width-1+$legend_line_length, $height-1, $foreground_color); + +ImageString($im, 5, $legend_line_length, $height + $legend_line_length + 2*ImageFontHeight(5), "( ".trim(shell_exec("uptime | sed 's|^.*\\s\\(load\\)|\\1|'"))." )", $foreground_color); + +$xpos = $legend_line_length; +foreach ($print_columns as $column) { + print_graph($values[$column], $colors[$column]); + ImageString($im, 5, $xpos, $height + $legend_line_length + ImageFontHeight(5), $column, $colors[$column]); + $xpos += (strlen($column) + 1.75) * ImageFontWidth(5); +} + +ImageString($im, 5, $legend_line_length, $height + $legend_line_length, date('Y-m-d H:i', $t_min), $foreground_color); +$s = date('Y-m-d H:i', $t_max); +ImageString($im, 5, $width+$legend_line_length - strlen($s)*ImageFontWidth(5), $height + $legend_line_length, $s, $foreground_color); + +for ($t=ceil($t_min/24/60/60); $t<=floor($t_max/24/60/60); $t++) + ImageLine( + $im, + scale($t*24*60*60,$t_min,$t_max,$width-2*$border,false)+$border+$legend_line_length, + $height, + scale($t*24*60*60,$t_min,$t_max,$width-2*$border,false)+$border+$legend_line_length, + $height+$legend_line_length, + $foreground_color + ); + +for ($val=0; $val<=$val_max;) { + ImageLine( + $im, + 0, + scale($val,0,$val_max,-$height+2*$border,isset($_GET["log"]))+$border, + $legend_line_length, + scale($val,0,$val_max,-$height+2*$border,isset($_GET["log"]))+$border, + $foreground_color + ); + if (! isset($_GET["log"])) + $val+=pow(10,round(log($val_max)/log(10))-1); + elseif ($val==0) + $val++; + else + $val=$val*10; +} + +// ImageString ($im, 1, 5, 5, "Test-String ".rand(), $foreground_color); + +header ("Content-type: image/png"); + +ImagePNG ($im); + +// passthru('wc -l /srv/http/statistics'); + +?> -- cgit v1.2.3-70-g09d2 From 25c3af1f1af84f79a44155078c1cbc1705c723b2 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Tue, 23 Jan 2018 09:37:31 +0100 Subject: web-scripts/packages.php: use same user as other scripts --- web-scripts/packages.php | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'web-scripts') diff --git a/web-scripts/packages.php b/web-scripts/packages.php index 5f04979..b8b5dda 100644 --- a/web-scripts/packages.php +++ b/web-scripts/packages.php @@ -1,20 +1,20 @@ connect_error) { - die("Connection failed: " . $mysql->connect_error); -} + $mysql = new mysqli("localhost", "http", "http"); + if ($mysql->connect_error) { + die("Connection to mysql database failed: " . $mysql->connect_error); + } -$result = $mysql -> query("SELECT * FROM buildmaster.binary_packages"); -if ($result -> num_rows > 0) { - while($row = $result->fetch_assoc()) { - foreach ($row as $key => $val) { - print $key .": ".$val." - "; + $result = $mysql -> query("SELECT * FROM buildmaster.binary_packages"); + if ($result -> num_rows > 0) { + while($row = $result->fetch_assoc()) { + foreach ($row as $key => $val) { + print $key .": ".$val." - "; + } + print "
\n"; } - print "
\n"; } -} -print 'OK'; + print 'OK'; ?> -- cgit v1.2.3-70-g09d2 From f4c214680e7c8fd2082ce57689993ccc4ad08c97 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Tue, 23 Jan 2018 09:50:50 +0100 Subject: web-scripts/broken-packages.php: rudimentary included in git now --- web-scripts/broken-packages.php | 59 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 web-scripts/broken-packages.php (limited to 'web-scripts') diff --git a/web-scripts/broken-packages.php b/web-scripts/broken-packages.php new file mode 100644 index 0000000..f8a9eab --- /dev/null +++ b/web-scripts/broken-packages.php @@ -0,0 +1,59 @@ + + +List of broken package builds + + + +build logs
+connect_error) { + die("Connection failed: " . $mysql->connect_error); +} + +$result = $mysql -> query( + "SELECT " . + "`package_sources`.`pkgbase`," . + "`package_sources`.`git_revision`," . + "`package_sources`.`mod_git_revision`," . + "`upstream_repositories`.`name` " . + "FROM `build_assignments` " . + "JOIN `package_sources` ON `build_assignments`.`package_source` = `package_sources`.`id` " . + "JOIN `upstream_repositories` ON `package_sources`.`upstream_package_repository` = `upstream_repositories`.`id` " . + "WHERE `build_assignments`.`is_broken`" +); +if ($result -> num_rows > 0) { + print "\n"; + print ""; + print ""; + print ""; + print ""; + print ""; +// print ""; +// print ""; +// print ""; +// print ""; + print "\n"; + + while($row = $result->fetch_assoc()) { + print ""; + + print ""; + print ""; + print ""; + print ""; +// +// +// +// + + print "\n"; + } + + print "
packagegit revisionmodification git revisionpackage repositorycompilationsdependentbuild errorblocked
".$row["pkgbase"]."

".$row["git_revision"]."

".$row["mod_git_revision"]."

".$row["name"]."20build()wait for FS32#20
\n"; +} + +?> + + -- cgit v1.2.3-70-g09d2 From b7d3486e4c401294182f38917dede3e48616df5e Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Tue, 23 Jan 2018 11:42:16 +0100 Subject: web-scripts/broken-packages.php: much more functionality now --- web-scripts/broken-packages.php | 64 ++++++++++++++++++++++++++++++++++++----- 1 file changed, 57 insertions(+), 7 deletions(-) (limited to 'web-scripts') diff --git a/web-scripts/broken-packages.php b/web-scripts/broken-packages.php index f8a9eab..cccf18b 100644 --- a/web-scripts/broken-packages.php +++ b/web-scripts/broken-packages.php @@ -14,6 +14,8 @@ if ($mysql->connect_error) { $result = $mysql -> query( "SELECT " . + "`build_assignments`.`id`," . + "`build_assignments`.`is_blocked`," . "`package_sources`.`pkgbase`," . "`package_sources`.`git_revision`," . "`package_sources`.`mod_git_revision`," . @@ -21,7 +23,7 @@ $result = $mysql -> query( "FROM `build_assignments` " . "JOIN `package_sources` ON `build_assignments`.`package_source` = `package_sources`.`id` " . "JOIN `upstream_repositories` ON `package_sources`.`upstream_package_repository` = `upstream_repositories`.`id` " . - "WHERE `build_assignments`.`is_broken`" + "WHERE `build_assignments`.`is_broken` OR `build_assignments`.`is_blocked` IS NOT NULL" ); if ($result -> num_rows > 0) { print "\n"; @@ -30,23 +32,71 @@ if ($result -> num_rows > 0) { print ""; print ""; print ""; -// print ""; + print ""; // print ""; -// print ""; -// print ""; + print ""; + print ""; print "\n"; while($row = $result->fetch_assoc()) { + + $fail_result = $mysql -> query( + "SELECT " . + "`fail_reasons`.`name`, " . + "`failed_builds`.`log_file` " . + "FROM `failed_builds` " . + "JOIN `build_assignments` ON `failed_builds`.`build_assignment`=`build_assignments`.`id` ". + "JOIN `fail_reasons` ON `failed_builds`.`reason`=`fail_reasons`.`id` ". + "WHERE `build_assignments`.`id`=".$row["id"]." " . + "ORDER BY `failed_builds`.`date`" + ); + + unset($reasons); + unset($last_log); + $trials = $fail_result -> num_rows; + if ($trials > 0) { + while($fail_row = $fail_result->fetch_assoc()) { + $reasons[$fail_row["name"]]=$fail_row["name"]; + $last_log=$fail_row["log_file"]; + } + } + if (isset($reasons)) { + $to_print=""; + foreach ($reasons as $reason) { + $to_print=$to_print.", ".$reason; + } + $fail_reasons=substr($to_print,2); + } else { + $fail_reasons=" "; + } + print ""; print ""; print ""; print ""; print ""; -// + if (isset($last_log)) + print ""; + else + print ""; // -// -// + print ""; + if ($row["is_blocked"]=="") { + $row["is_blocked"]=" "; + } + $row["is_blocked"] = preg_replace( + array ( + "/FS32#(\\d+)/", + "/FS#(\\d+)/" + ), + array ( + "$0", + "$0" + ), + $row["is_blocked"] + ); + print ""; print "\n"; } -- cgit v1.2.3-70-g09d2 From 20e678cae2d84021bdbe36b20de252f91e181f47 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Tue, 23 Jan 2018 22:29:58 +0100 Subject: web-scripts/broken-packages.php: sort broken packages --- web-scripts/broken-packages.php | 98 ++++++++++++++++++++++++++--------------- 1 file changed, 62 insertions(+), 36 deletions(-) (limited to 'web-scripts') diff --git a/web-scripts/broken-packages.php b/web-scripts/broken-packages.php index cccf18b..866c96b 100644 --- a/web-scripts/broken-packages.php +++ b/web-scripts/broken-packages.php @@ -26,17 +26,8 @@ $result = $mysql -> query( "WHERE `build_assignments`.`is_broken` OR `build_assignments`.`is_blocked` IS NOT NULL" ); if ($result -> num_rows > 0) { - print "
git revisionmodification git revisionpackage repositorycompilationscompilationsdependentbuild errorblockedbuild errorblocked
".$row["pkgbase"]."

".$row["git_revision"]."

".$row["mod_git_revision"]."

".$row["name"]."2". $trials ."". $trials ."0build()wait for FS32#20".$fail_reasons."".$row["is_blocked"]."
\n"; - print ""; - print ""; - print ""; - print ""; - print ""; - print ""; -// print ""; - print ""; - print ""; - print "\n"; + + $count = 0; while($row = $result->fetch_assoc()) { @@ -53,11 +44,11 @@ if ($result -> num_rows > 0) { unset($reasons); unset($last_log); - $trials = $fail_result -> num_rows; - if ($trials > 0) { + $rows[$count]["trials"] = $fail_result -> num_rows; + if ($rows[$count]["trials"] > 0) { while($fail_row = $fail_result->fetch_assoc()) { - $reasons[$fail_row["name"]]=$fail_row["name"]; - $last_log=$fail_row["log_file"]; + $reasons[$fail_row["name"]] = $fail_row["name"]; + $last_log = $fail_row["log_file"]; } } if (isset($reasons)) { @@ -65,37 +56,72 @@ if ($result -> num_rows > 0) { foreach ($reasons as $reason) { $to_print=$to_print.", ".$reason; } - $fail_reasons=substr($to_print,2); + $rows[$count]["fail_reasons"]=substr($to_print,2); } else { - $fail_reasons=" "; + $rows[$count]["fail_reasons"]=" "; } + $rows[$count]["pkgbase"] = $row["pkgbase"]; + $rows[$count]["git_revision"] = $row["git_revision"]; + $rows[$count]["mod_git_revision"] = $row["mod_git_revision"]; + $rows[$count]["name"] = $row["name"]; + if (isset($rows[$count]["last_log"])) + $rows[$count]["print_trials"]="". $rows[$count]["trials"] .""; + else + $rows[$count]["print_trials"]=$rows[$count]["trials"]; + if ($row["is_blocked"]=="") { + $rows[$count]["is_blocked"]=" "; + } + else { + $rows[$count]["is_blocked"] = preg_replace( + array ( + "/FS32#(\\d+)/", + "/FS#(\\d+)/" + ), + array ( + "$0", + "$0" + ), + $row["is_blocked"] + ); + } + $count++; + } + + usort( + $rows, + function (array $a, array $b) { + if ($a["trials"] < $b["trials"]) + return -1; + if ($a["trials"] > $b["trials"]) + return 1; + return strcmp($a["pkgbase"],$b["pkgbase"]); + } + ); + + print "
packagegit revisionmodification git revisionpackage repositorycompilationsdependentbuild errorblocked
\n"; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; +// print ""; + print ""; + print ""; + print "\n"; + + foreach($rows as $row) { + print ""; print ""; print ""; print ""; print ""; - if (isset($last_log)) - print ""; - else - print ""; + print ""; // - print ""; - if ($row["is_blocked"]=="") { - $row["is_blocked"]=" "; - } - $row["is_blocked"] = preg_replace( - array ( - "/FS32#(\\d+)/", - "/FS#(\\d+)/" - ), - array ( - "$0", - "$0" - ), - $row["is_blocked"] - ); + print ""; print ""; print "\n"; -- cgit v1.2.3-70-g09d2 From 5c7b1b07048858b24cad0a5b91abdb91cb142ae6 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Wed, 24 Jan 2018 10:13:03 +0100 Subject: web-scripts/broken-packages.php: fix typo --- web-scripts/broken-packages.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'web-scripts') diff --git a/web-scripts/broken-packages.php b/web-scripts/broken-packages.php index 866c96b..515f19a 100644 --- a/web-scripts/broken-packages.php +++ b/web-scripts/broken-packages.php @@ -65,7 +65,7 @@ if ($result -> num_rows > 0) { $rows[$count]["git_revision"] = $row["git_revision"]; $rows[$count]["mod_git_revision"] = $row["mod_git_revision"]; $rows[$count]["name"] = $row["name"]; - if (isset($rows[$count]["last_log"])) + if (isset($last_log)) $rows[$count]["print_trials"]="". $rows[$count]["trials"] .""; else $rows[$count]["print_trials"]=$rows[$count]["trials"]; -- cgit v1.2.3-70-g09d2 From cb4eedcdca4fc5f58e83abe2aadc9abb59b4918c Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Wed, 24 Jan 2018 13:31:57 +0100 Subject: web-scripts/broken-packages.php: count loops and check if dependencies are met --- web-scripts/broken-packages.php | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) (limited to 'web-scripts') diff --git a/web-scripts/broken-packages.php b/web-scripts/broken-packages.php index 515f19a..268e296 100644 --- a/web-scripts/broken-packages.php +++ b/web-scripts/broken-packages.php @@ -19,7 +19,20 @@ $result = $mysql -> query( "`package_sources`.`pkgbase`," . "`package_sources`.`git_revision`," . "`package_sources`.`mod_git_revision`," . - "`upstream_repositories`.`name` " . + "`upstream_repositories`.`name`," . + "EXISTS (SELECT * " . + "FROM `binary_packages` `broken_bin` " . + "JOIN `dependencies` ON `dependencies`.`dependent` = `broken_bin`.`id` " . + "JOIN `install_target_providers` ON `install_target_providers`.`install_target` = `dependencies`.`depending_on` " . + "JOIN `binary_packages` `to_be_built` ON `to_be_built`.`id` = `install_target_providers`.`package` " . + "JOIN `repositories` ON `to_be_built`.`repository` = `repositories`.`id` " . + "WHERE `broken_bin`.`build_assignment`=`build_assignments`.`id` ". + "AND `repositories`.`name`=\"community-testing\"" . + ") AS `dependencies_pending`," . + "(SELECT count(*) " . + "FROM `build_dependency_loops` " . + "WHERE `build_dependency_loops`.`build_assignment`=`build_assignments`.`id`" . + ") AS `loops` " . "FROM `build_assignments` " . "JOIN `package_sources` ON `build_assignments`.`package_source` = `package_sources`.`id` " . "JOIN `upstream_repositories` ON `package_sources`.`upstream_package_repository` = `upstream_repositories`.`id` " . @@ -31,6 +44,8 @@ if ($result -> num_rows > 0) { while($row = $result->fetch_assoc()) { +foreach ($row as $key => $val) + $fail_result = $mysql -> query( "SELECT " . "`fail_reasons`.`name`, " . @@ -61,7 +76,12 @@ if ($result -> num_rows > 0) { $rows[$count]["fail_reasons"]=" "; } + $rows[$count]["loops"] = $row["loops"]; $rows[$count]["pkgbase"] = $row["pkgbase"]; + if ($row["dependencies_pending"]=="1") + $rows[$count]["pkgbase_print"] = "(" . $rows[$count]["pkgbase"] . ")"; + else + $rows[$count]["pkgbase_print"] = $rows[$count]["pkgbase"]; $rows[$count]["git_revision"] = $row["git_revision"]; $rows[$count]["mod_git_revision"] = $row["mod_git_revision"]; $rows[$count]["name"] = $row["name"]; @@ -106,6 +126,7 @@ if ($result -> num_rows > 0) { print ""; print ""; print ""; + print ""; // print ""; print ""; print ""; @@ -115,11 +136,12 @@ if ($result -> num_rows > 0) { print ""; - print ""; + print ""; print ""; print ""; print ""; print ""; + print ""; // print ""; print ""; -- cgit v1.2.3-70-g09d2
packagegit revisionmodification git revisionpackage repositorycompilationsdependentbuild errorblocked
".$row["pkgbase"]."

".$row["git_revision"]."

".$row["mod_git_revision"]."

".$row["name"]."". $trials ."". $trials ."".$row["print_trials"]."0".$fail_reasons."".$row["fail_reasons"]."".$row["is_blocked"]."
modification git revisionpackage repositorycompilationsloopsdependentbuild errorblocked
".$row["pkgbase"]."".$row["pkgbase_print"]."

".$row["git_revision"]."

".$row["mod_git_revision"]."

".$row["name"]."".$row["print_trials"]."".$row["loops"]."0".$row["fail_reasons"]."".$row["is_blocked"]."