GithubHelp home page GithubHelp logo

Comments (3)

sagehan avatar sagehan commented on June 19, 2024

Here is my html source code:

<!DOCTYPE html>    <meta charset="utf-8" />    <h2><a href="http://catcap.cn"><img src="http://tp3.sinaimg.cn/2453988174/180/5632977800/0" id="logo"></a>>系统负载</h2>    <style>     @import url(//fonts.googleapis.com/css?family=Yanone+Kaffeesatz:400,700);    @import url(./css/style.css);     </style>    <div id="body">     <div id="example1"></div>     <script type="text/javascript" src="./js/d3.v3.js"></script>    <script type="text/javascript" src="./js/cubism.v1.js"></script>    <script type="text/javascript" src="./js/highlight.min.js"></script>      <script>
var context = cubism.context()        .serverDelay(0)
    .clientDelay(0)
    .step(1e3)
    .size(960);

var graphite = context.graphite("http://192.168.170.195:8080");    var horizon = context.horizon().metric(graphite.metric).height(50);

var metrics = [
   "system.loadavg_1min",
   "carbon.agents.Router1008_catcapstudio_com-a.cpuUsage"
]

d3.select("#example1").call(function(div) {

div.append("div")
    .attr("class", "axis")
    .call(context.axis().orient("top"));

div.selectAll(".horizon")
    .data(metrics)
  .enter().append("div")
    .attr("class", "horizon")
    .call(horizon);

div.append("div")
    .attr("class", "rule")
    .call(context.rule());
});
</script>

from cubism.

sagehan avatar sagehan commented on June 19, 2024

I had figured out that there was something wrong with griphte django :

Traceback (most recent call last):      File "/usr/lib/python2.6/site-packages/django/core/handlers/base.py", line 111, in get_response
    response = callback(request, *callback_args, **callback_kwargs)      File "/opt/graphite/webapp/graphite/render/views.py", line 104, in renderView
    seriesList = evaluateTarget(requestContext, target)
  File "/opt/graphite/webapp/graphite/render/evaluator.py", line 10, in evaluateTarget
    result = evaluateTokens(requestContext, tokens)
  File "/opt/graphite/webapp/graphite/render/evaluator.py", line 21, in evaluateTokens
    return evaluateTokens(requestContext, tokens.expression)
  File "/opt/graphite/webapp/graphite/render/evaluator.py", line 28, in evaluateTokens
    args = [evaluateTokens(requestContext, arg) for arg in tokens.call.args]
  File "/opt/graphite/webapp/graphite/render/evaluator.py", line 21, in evaluateTokens
    return evaluateTokens(requestContext, tokens.expression)
  File "/opt/graphite/webapp/graphite/render/evaluator.py", line 28, in evaluateTokens
    args = [evaluateTokens(requestContext, arg) for arg in tokens.call.args]
  File "/opt/graphite/webapp/graphite/render/evaluator.py", line 21, in evaluateTokens
    return evaluateTokens(requestContext, tokens.expression)
  File "/opt/graphite/webapp/graphite/render/evaluator.py", line 24, in evaluateTokens
    return fetchData(requestContext, tokens.pathExpression)
  File "/opt/graphite/webapp/graphite/render/datalib.py", line 224, in fetchData
    dbResults = dbFile.fetch( timestamp(startTime), timestamp(endTime) )
  File "/opt/graphite/webapp/graphite/storage.py", line 298, in fetch
    (timeInfo,values) = whisper.fetch(self.fs_path, startTime, endTime)
TypeError: 'NoneType' object is not iterable

from cubism.

mbostock avatar mbostock commented on June 19, 2024

This doesn’t appear to be a bug in Cubism. I recommend trying Stack Overflow if you want help.

Also, if your dashboard and Graphite install are on separate servers, make sure you have Access-Control-Allow-Origin: * enabled on Graphite so that the results are accessible.

from cubism.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.