[DEV] update display
This commit is contained in:
parent
13d109f081
commit
cb5668b8c7
1
bdd.sql
1
bdd.sql
@ -34,6 +34,7 @@ CREATE TABLE IF NOT EXISTS `BUILD_snapshot` (
|
|||||||
`id-group` int(11) NOT NULL DEFAULT '0',
|
`id-group` int(11) NOT NULL DEFAULT '0',
|
||||||
`Linux` enum('UNKNOW','START','ERROR','OK') NOT NULL DEFAULT 'UNKNOW',
|
`Linux` enum('UNKNOW','START','ERROR','OK') NOT NULL DEFAULT 'UNKNOW',
|
||||||
`Windows` enum('UNKNOW','START','ERROR','OK') NOT NULL DEFAULT 'UNKNOW',
|
`Windows` enum('UNKNOW','START','ERROR','OK') NOT NULL DEFAULT 'UNKNOW',
|
||||||
|
`Mingw` enum('UNKNOW','START','ERROR','OK') NOT NULL DEFAULT 'UNKNOW',
|
||||||
`MacOs` enum('UNKNOW','START','ERROR','OK') NOT NULL DEFAULT 'UNKNOW',
|
`MacOs` enum('UNKNOW','START','ERROR','OK') NOT NULL DEFAULT 'UNKNOW',
|
||||||
`IOs` enum('UNKNOW','START','ERROR','OK') NOT NULL DEFAULT 'UNKNOW',
|
`IOs` enum('UNKNOW','START','ERROR','OK') NOT NULL DEFAULT 'UNKNOW',
|
||||||
`Android` enum('UNKNOW','START','ERROR','OK') NOT NULL DEFAULT 'UNKNOW'
|
`Android` enum('UNKNOW','START','ERROR','OK') NOT NULL DEFAULT 'UNKNOW'
|
||||||
|
@ -77,12 +77,12 @@ if ($result->num_rows > 0) {
|
|||||||
errorSVG("To much value");
|
errorSVG("To much value");
|
||||||
}
|
}
|
||||||
$row = $result->fetch_assoc();
|
$row = $result->fetch_assoc();
|
||||||
|
$status = $row[$tag];
|
||||||
} else {
|
} else {
|
||||||
errorSVG("No Value");
|
$status = "---";
|
||||||
|
//errorSVG("No Value");
|
||||||
}
|
}
|
||||||
|
|
||||||
$status = $row[$tag];
|
|
||||||
|
|
||||||
|
|
||||||
//some coverage value :
|
//some coverage value :
|
||||||
if ($status == "UNKNOW") {
|
if ($status == "UNKNOW") {
|
||||||
|
@ -92,26 +92,28 @@ if ($result->num_rows > 0) {
|
|||||||
errorSVG("To much value");
|
errorSVG("To much value");
|
||||||
}
|
}
|
||||||
$row = $result->fetch_assoc();
|
$row = $result->fetch_assoc();
|
||||||
|
if ($row['executable'] == 0) {
|
||||||
|
$coverage = 100;
|
||||||
|
} else {
|
||||||
|
$coverage = intval(100 * $row['executed'] / $row['executable']);
|
||||||
|
}
|
||||||
|
//some coverage value :
|
||||||
|
if ($coverage < 25 ) {
|
||||||
|
$color = "c11";
|
||||||
|
} else if ($coverage < 50 ) {
|
||||||
|
$color = "c1c";
|
||||||
|
} else if ($coverage < 75 ) {
|
||||||
|
$color = "c71";
|
||||||
|
} else {
|
||||||
|
$color = "4c1";
|
||||||
|
}
|
||||||
|
$coverage = ''.$coverage.'%';
|
||||||
} else {
|
} else {
|
||||||
errorSVG("No Value");
|
//errorSVG("No Value");
|
||||||
|
$coverage = "---";
|
||||||
|
$color = "FF0";
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($row['executable'] == 0) {
|
|
||||||
$coverage = 100;
|
|
||||||
} else {
|
|
||||||
$coverage = intval(100 * $row['executed'] / $row['executable']);
|
|
||||||
}
|
|
||||||
|
|
||||||
//some coverage value :
|
|
||||||
if ($coverage < 25 ) {
|
|
||||||
$color = "c11";
|
|
||||||
} else if ($coverage < 50 ) {
|
|
||||||
$color = "c1c";
|
|
||||||
} else if ($coverage < 75 ) {
|
|
||||||
$color = "c71";
|
|
||||||
} else {
|
|
||||||
$color = "4c1";
|
|
||||||
}
|
|
||||||
|
|
||||||
echo('<svg xmlns="http://www.w3.org/2000/svg" width="120" height="20">');
|
echo('<svg xmlns="http://www.w3.org/2000/svg" width="120" height="20">');
|
||||||
echo(' <linearGradient id="a" x2="0" y2="100%">');
|
echo(' <linearGradient id="a" x2="0" y2="100%">');
|
||||||
@ -125,8 +127,8 @@ echo(' <rect rx="3" width="120" height="20" fill="url(#a)"/>');
|
|||||||
echo(' <g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">');
|
echo(' <g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">');
|
||||||
echo(' <text x="32" y="15" fill="#010101" fill-opacity=".3">coverage</text>');
|
echo(' <text x="32" y="15" fill="#010101" fill-opacity=".3">coverage</text>');
|
||||||
echo(' <text x="32" y="14">coverage</text>');
|
echo(' <text x="32" y="14">coverage</text>');
|
||||||
echo(' <text x="92.5" y="15" fill="#010101" fill-opacity=".3">'.$coverage.'%</text>');
|
echo(' <text x="92.5" y="15" fill="#010101" fill-opacity=".3">'.$coverage.'</text>');
|
||||||
echo(' <text x="92.5" y="14">'.$coverage.'%</text>');
|
echo(' <text x="92.5" y="14">'.$coverage.'</text>');
|
||||||
echo(' </g>');
|
echo(' </g>');
|
||||||
echo('</svg>');
|
echo('</svg>');
|
||||||
|
|
||||||
|
@ -92,26 +92,28 @@ if ($result->num_rows > 0) {
|
|||||||
errorSVG("To much value");
|
errorSVG("To much value");
|
||||||
}
|
}
|
||||||
$row = $result->fetch_assoc();
|
$row = $result->fetch_assoc();
|
||||||
|
if ($row['total'] == 0) {
|
||||||
|
$testRatio = 0;
|
||||||
|
} else {
|
||||||
|
$testRatio = intval(100 * $row['passed'] / $row['total']);
|
||||||
|
}
|
||||||
|
//some testRatio value :
|
||||||
|
if ($testRatio < 25 ) {
|
||||||
|
$color = "c11";
|
||||||
|
} else if ($testRatio < 50 ) {
|
||||||
|
$color = "c1c";
|
||||||
|
} else if ($testRatio < 100 ) {
|
||||||
|
$color = "c71";
|
||||||
|
} else {
|
||||||
|
$color = "4c1";
|
||||||
|
}
|
||||||
|
$testRatio = ''.$testRatio.'%';
|
||||||
} else {
|
} else {
|
||||||
errorSVG("No Value");
|
//errorSVG("No Value");
|
||||||
|
$testRatio = "---";
|
||||||
|
$color = "FF0";
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($row['total'] == 0) {
|
|
||||||
$testRatio = 0;
|
|
||||||
} else {
|
|
||||||
$testRatio = intval(100 * $row['passed'] / $row['total']);
|
|
||||||
}
|
|
||||||
|
|
||||||
//some testRatio value :
|
|
||||||
if ($testRatio < 25 ) {
|
|
||||||
$color = "c11";
|
|
||||||
} else if ($testRatio < 50 ) {
|
|
||||||
$color = "c1c";
|
|
||||||
} else if ($testRatio < 100 ) {
|
|
||||||
$color = "c71";
|
|
||||||
} else {
|
|
||||||
$color = "4c1";
|
|
||||||
}
|
|
||||||
|
|
||||||
echo('<svg xmlns="http://www.w3.org/2000/svg" width="120" height="20">');
|
echo('<svg xmlns="http://www.w3.org/2000/svg" width="120" height="20">');
|
||||||
echo(' <linearGradient id="a" x2="0" y2="100%">');
|
echo(' <linearGradient id="a" x2="0" y2="100%">');
|
||||||
@ -125,8 +127,8 @@ echo(' <rect rx="3" width="120" height="20" fill="url(#a)"/>');
|
|||||||
echo(' <g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">');
|
echo(' <g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">');
|
||||||
echo(' <text x="32" y="15" fill="#010101" fill-opacity=".3">test</text>');
|
echo(' <text x="32" y="15" fill="#010101" fill-opacity=".3">test</text>');
|
||||||
echo(' <text x="32" y="14">test</text>');
|
echo(' <text x="32" y="14">test</text>');
|
||||||
echo(' <text x="92.5" y="15" fill="#010101" fill-opacity=".3">'.$testRatio.'%</text>');
|
echo(' <text x="92.5" y="15" fill="#010101" fill-opacity=".3">'.$testRatio.'</text>');
|
||||||
echo(' <text x="92.5" y="14">'.$testRatio.'%</text>');
|
echo(' <text x="92.5" y="14">'.$testRatio.'</text>');
|
||||||
echo(' </g>');
|
echo(' </g>');
|
||||||
echo('</svg>');
|
echo('</svg>');
|
||||||
|
|
||||||
|
@ -92,21 +92,21 @@ if ($result->num_rows > 0) {
|
|||||||
errorSVG("To much value");
|
errorSVG("To much value");
|
||||||
}
|
}
|
||||||
$row = $result->fetch_assoc();
|
$row = $result->fetch_assoc();
|
||||||
|
$warningCount = $row['warning'] + $row['error'];
|
||||||
|
//some warningCount value :
|
||||||
|
if ($warningCount < 5 ) {
|
||||||
|
$color = "4c1";
|
||||||
|
} else if ($warningCount < 20 ) {
|
||||||
|
$color = "c71";
|
||||||
|
} else if ($warningCount < 50 ) {
|
||||||
|
$color = "c1c";
|
||||||
|
} else {
|
||||||
|
$color = "c11";
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
errorSVG("No Value");
|
//errorSVG("No Value");
|
||||||
}
|
$warningCount = "---";
|
||||||
|
$color = "FF0";
|
||||||
$warningCount = $row['warning'] + $row['error'];
|
|
||||||
|
|
||||||
//some warningCount value :
|
|
||||||
if ($warningCount < 5 ) {
|
|
||||||
$color = "4c1";
|
|
||||||
} else if ($warningCount < 20 ) {
|
|
||||||
$color = "c71";
|
|
||||||
} else if ($warningCount < 50 ) {
|
|
||||||
$color = "c1c";
|
|
||||||
} else {
|
|
||||||
$color = "c11";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
echo('<svg xmlns="http://www.w3.org/2000/svg" width="120" height="20">');
|
echo('<svg xmlns="http://www.w3.org/2000/svg" width="120" height="20">');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user