mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Updated phantomjs render script and wercker link in readme
This commit is contained in:
parent
397dfc54cd
commit
9cadf0aa97
@ -10,7 +10,7 @@ Graphite, InfluxDB & OpenTSDB.
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
# Grafana 2.0 Alpha branch [](https://app.wercker.com/project/bykey/0f109051cfaf2a6d94c0eebdc0dcaeae)
|
# Grafana 2.0 Alpha branch [](https://app.wercker.com/project/bykey/1de5ea38f93fd2dfa2eb8b8ba58b6df1)
|
||||||
|
|
||||||
Grafana 2.0 comes with a backend written in Go. It is not ready for production use yet as there is still a lot of small
|
Grafana 2.0 comes with a backend written in Go. It is not ready for production use yet as there is still a lot of small
|
||||||
issues to fix and polish missing. But feedback on what is done and bug reports would be greatly appreciated.
|
issues to fix and polish missing. But feedback on what is done and bug reports would be greatly appreciated.
|
||||||
|
5
vendor/phantomjs/render.js
vendored
5
vendor/phantomjs/render.js
vendored
@ -21,6 +21,8 @@ page.viewportSize = {
|
|||||||
height: params.height || '400'
|
height: params.height || '400'
|
||||||
};
|
};
|
||||||
|
|
||||||
|
var tries = 0;
|
||||||
|
|
||||||
page.open(params.url, function (status) {
|
page.open(params.url, function (status) {
|
||||||
console.log('Loading a web page: ' + params.url);
|
console.log('Loading a web page: ' + params.url);
|
||||||
|
|
||||||
@ -29,11 +31,12 @@ page.open(params.url, function (status) {
|
|||||||
return $('canvas').length > 0;
|
return $('canvas').length > 0;
|
||||||
});
|
});
|
||||||
|
|
||||||
if (canvas) {
|
if (canvas || tries === 5) {
|
||||||
page.render(params.png);
|
page.render(params.png);
|
||||||
phantom.exit();
|
phantom.exit();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
tries++;
|
||||||
setTimeout(checkIsReady, 10);
|
setTimeout(checkIsReady, 10);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user