From: dsc Date: Tue, 8 May 2012 17:07:09 +0000 (-0700) Subject: checkpoint X-Git-Url: http://git.less.ly:3516/?a=commitdiff_plain;h=a64187efbc24ca9d2120b901b806234f4ddabf7a;p=kraken-ui.git checkpoint --- diff --git a/data/graphs/ohai.json b/data/graphs/ohai.json index f27e9dc..0ed7334 100644 --- a/data/graphs/ohai.json +++ b/data/graphs/ohai.json @@ -1 +1,199 @@ -{"options":{"animatedZooms":true,"avoidMinZero":false,"axis":null,"axisLabelColor":"#666666","axisLabelFontSize":11,"axisLabelFormatter":null,"axisLabelWidth":50,"axisLineColor":"#AAAAAA","axisLineWidth":0.3,"axisTickSize":3,"colorSaturation":1,"colorValue":0.5,"colors":["#FF0097","#EF8158","#83BB32","#182B53","#4596FF","#553DC9","#AD3238","#00FFBC","#F1D950"],"connectSeparatedPoints":false,"customBars":false,"dateWindow":null,"delimiter":",","digitsAfterDecimal":2,"displayAnnotations":false,"drawPoints":true,"drawXAxis":true,"drawXGrid":true,"drawYAxis":true,"drawYGrid":true,"errorBars":false,"file":null,"fillAlpha":0.15,"fillGraph":false,"fractions":false,"gridLineColor":"#D8D8D8","gridLineWidth":0.3,"hideOverlayOnMouseOut":false,"highlightCircleSize":4,"includeZero":false,"interactionModel":null,"isZoomedIgnoreProgrammaticZoom":false,"labels":null,"labelsDiv":null,"labelsDivStyles":null,"labelsDivWidth":250,"labelsKMB":true,"labelsKMG2":false,"labelsSeparateLines":true,"labelsShowZeroValues":true,"legend":"always","logscale":true,"maxNumberWidth":30,"panEdgeFraction":null,"pixelsPerLabel":null,"pixelsPerXLabel":null,"pixelsPerYLabel":null,"pointSize":1,"rangeSelectorHeight":40,"rangeSelectorPlotFillColor":"#A7B1C4","rangeSelectorPlotStrokeColor":"#808FAB","rightGap":20,"rollPeriod":1,"showLabelsOnHighlight":true,"showRangeSelector":false,"showRoller":false,"sigFigs":null,"sigma":2,"stackedGraph":false,"stepPlot":false,"strokePattern":null,"strokeWidth":4,"ticker":null,"title":null,"titleHeight":18,"valueFormatter":null,"valueRange":null,"visibility":null,"wilsonInterval":true,"xAxisHeight":null,"xAxisLabelFormatter":null,"xAxisLabelWidth":55,"xLabelHeight":18,"xValueFormatter":null,"xValueParser":null,"xlabel":null,"y2label":null,"yAxisLabelFormatter":null,"yAxisLabelWidth":50,"yLabelWidth":18,"yValueFormatter":null,"ylabel":null},"slug":"ohai","name":"ohai~","desc":"A graph for the testing of great justice.","notes":"","width":"auto","height":250,"chartType":"dygraphs","parents":["root"],"id":"ohai","data":{"palette":null,"lines":[],"id":"ohai","metrics":[{"index":0,"label":"Total Active Editors","type":"int","timespan":{"start":null,"end":null,"step":null},"disabled":false,"source_id":"rc_active_editors_count","source_col":1,"color":"#E62F74","visible":true,"format_value":null,"format_axis":null,"transforms":[],"scale":1},{"index":0,"label":"Total Very Active Editors","type":"int","timespan":{"start":null,"end":null,"step":null},"disabled":false,"source_id":"rc_very_active_editors_count","source_col":1,"color":"#244792","visible":true,"format_value":null,"format_axis":null,"transforms":[],"scale":1},{"index":0,"label":"","type":"int","timespan":{"start":null,"end":null,"step":null},"disabled":false,"source_id":"rc_new_article_count","source_col":1,"color":"#FF6458","visible":true,"format_value":null,"format_axis":null,"transforms":[],"scale":1,"source-url":"/data/datasources/rc/rc_very_active_editors_count.csv"},{"index":3,"label":"New Editors","type":"int","timespan":{"start":null,"end":null,"step":null},"disabled":false,"source_id":"rc_new_editors_count","source_col":1,"color":"rgb(253,174,97)","visible":true,"format_value":null,"format_axis":null,"transforms":[],"scale":1,"source-url":"/data/datasources/rc/rc_very_active_editors_count.csv"},{"index":4,"label":"","type":"int","timespan":{"start":null,"end":null,"step":null},"disabled":false,"source_id":"rc_binary_files","source_col":10,"color":"rgb(254,224,139)","visible":true,"format_value":null,"format_axis":null,"transforms":[],"scale":1}]},"dataset":"/data/datasources/rc/rc_page_requests.csv"} \ No newline at end of file +{ + "options": { + "animatedZooms": true, + "avoidMinZero": false, + "axis": null, + "axisLabelColor": "#666666", + "axisLabelFontSize": 11, + "axisLabelFormatter": null, + "axisLabelWidth": 50, + "axisLineColor": "#AAAAAA", + "axisLineWidth": 0.3, + "axisTickSize": 3, + "colorSaturation": 1, + "colorValue": 0.5, + "colors": ["#FF0097", "#EF8158", "#83BB32", "#182B53", "#4596FF", "#553DC9", "#AD3238", "#00FFBC", "#F1D950"], + "connectSeparatedPoints": false, + "customBars": false, + "dateWindow": null, + "delimiter": ",", + "digitsAfterDecimal": 2, + "displayAnnotations": false, + "drawPoints": true, + "drawXAxis": true, + "drawXGrid": true, + "drawYAxis": true, + "drawYGrid": true, + "errorBars": false, + "file": null, + "fillAlpha": 0.15, + "fillGraph": false, + "fractions": false, + "gridLineColor": "#D8D8D8", + "gridLineWidth": 0.3, + "hideOverlayOnMouseOut": false, + "highlightCircleSize": 4, + "includeZero": false, + "interactionModel": null, + "isZoomedIgnoreProgrammaticZoom": false, + "labels": null, + "labelsDiv": null, + "labelsDivStyles": null, + "labelsDivWidth": 250, + "labelsKMB": true, + "labelsKMG2": false, + "labelsSeparateLines": true, + "labelsShowZeroValues": true, + "legend": "always", + "logscale": true, + "maxNumberWidth": 30, + "panEdgeFraction": null, + "pixelsPerLabel": null, + "pixelsPerXLabel": null, + "pixelsPerYLabel": null, + "pointSize": 1, + "rangeSelectorHeight": 40, + "rangeSelectorPlotFillColor": "#A7B1C4", + "rangeSelectorPlotStrokeColor": "#808FAB", + "rightGap": 20, + "rollPeriod": 1, + "showLabelsOnHighlight": true, + "showRangeSelector": false, + "showRoller": false, + "sigFigs": null, + "sigma": 2, + "stackedGraph": false, + "stepPlot": false, + "strokePattern": null, + "strokeWidth": 4, + "ticker": null, + "title": null, + "titleHeight": 18, + "valueFormatter": null, + "valueRange": null, + "visibility": null, + "wilsonInterval": true, + "xAxisHeight": null, + "xAxisLabelFormatter": null, + "xAxisLabelWidth": 55, + "xLabelHeight": 18, + "xValueFormatter": null, + "xValueParser": null, + "xlabel": null, + "y2label": null, + "yAxisLabelFormatter": null, + "yAxisLabelWidth": 50, + "yLabelWidth": 18, + "yValueFormatter": null, + "ylabel": null + }, + "id": "ohai", + "slug": "ohai", + "name": "ohai~", + "desc": "A graph for the testing of great justice.", + "notes": "", + "width": "auto", + "height": 250, + "chartType": "dygraphs", + "parents": ["root"], + "data": { + "palette": null, + "lines": [], + "id": "ohai", + "metrics": [{ + "index": 0, + "label": "Total Active Editors", + "type": "int", + "timespan": { + "start": null, + "end": null, + "step": null + }, + "disabled": false, + "source_id": "rc_active_editors_count", + "source_col": 1, + "color": "#E62F74", + "visible": true, + "format_value": null, + "format_axis": null, + "transforms": [], + "scale": 1 + }, { + "index": 0, + "label": "Total Very Active Editors", + "type": "int", + "timespan": { + "start": null, + "end": null, + "step": null + }, + "disabled": false, + "source_id": "rc_very_active_editors_count", + "source_col": 1, + "color": "#244792", + "visible": true, + "format_value": null, + "format_axis": null, + "transforms": [], + "scale": 1 + }, { + "index": 0, + "label": "", + "type": "int", + "timespan": { + "start": null, + "end": null, + "step": null + }, + "disabled": false, + "source_id": "rc_new_article_count", + "source_col": 1, + "color": "#FF6458", + "visible": true, + "format_value": null, + "format_axis": null, + "transforms": [], + "scale": 1, + "source-url": "/data/datasources/rc/rc_very_active_editors_count.csv" + }, { + "index": 3, + "label": "New Editors", + "type": "int", + "timespan": { + "start": null, + "end": null, + "step": null + }, + "disabled": false, + "source_id": "rc_new_editors_count", + "source_col": 1, + "color": "rgb(253,174,97)", + "visible": true, + "format_value": null, + "format_axis": null, + "transforms": [], + "scale": 1, + "source-url": "/data/datasources/rc/rc_very_active_editors_count.csv" + }, { + "index": 4, + "label": "", + "type": "int", + "timespan": { + "start": null, + "end": null, + "step": null + }, + "disabled": false, + "source_id": "rc_binary_files", + "source_col": 10, + "color": "rgb(254,224,139)", + "visible": true, + "format_value": null, + "format_axis": null, + "transforms": [], + "scale": 1 + }] + }, + "dataset": "/data/datasources/rc/rc_page_requests.csv", + "result": "ok" +} diff --git a/lib/dataset/dataset-model.co b/lib/dataset/dataset-model.co index 44e3a4c..c797e44 100644 --- a/lib/dataset/dataset-model.co +++ b/lib/dataset/dataset-model.co @@ -73,8 +73,12 @@ DataSet = exports.DataSet = BaseModel.extend do # {{{ # this /** - * Override to handle the case where one of our rich sub-objects is attempted - * to be overridden with a native object. + * Override to handle the case where one of our rich sub-objects + * (basically `metrics`) is set as a result of the `fetch()` call by the + * Graph object. To prevent it from blowing away the `MetricList`, we + * perform a `reset()` here. But that won't trigger a `change:metrics` event, + * so we do a little dance to set it twice, as object identity would otherwise + * cause it to think nothing has changed. */ set: (key, value, opts) -> # return DataSet.__super__.set ... unless @metrics