define('app/models/graph', ['ember'],
    //
    //  Graph Model
    //
    //  @returns Class
    //
    function () {

        'use strict';

        return Ember.Object.extend(Ember.Evented, {


            //
            //
            //  Properties
            //
            //


            id: null,
            view: null,
            title: null,
            isEmpty: null,
            isBuiltIn: null,
            datasources: null,


            //
            //
            //  Computed Properties
            //
            //


            unit: function () {
                return this.datasources && this.datasources.length ?
                    this.datasources[0].metric.unit : '';
            }.property('datasources'),


            //
            //
            // Initialization
            //
            //


            load: function () {
                this.set('id', 'graph-' + parseInt(Math.random() * 10000));
                this.set('datasources',
                    this.datasources.length ? this.datasources : []);
                this.set('isEmpty', true);
            }.on('init'),


            //
            //
            //  Methods
            //
            //


            addDatasource: function (datasource) {
                Ember.run(this, function () {
                    this.datasources.addObject(datasource);
                    this.trigger('onDatasourceAdd');
                });
            },


            removeDatasource: function (datasource) {
                Ember.run(this, function () {
                    this.datasources.removeObject(datasource);
                    this.trigger('onDatasourceRemove');
                });
            }
        });
    }
);

@@ -382,37 +382,8 @@
 ll,%0A
-            isBuiltIn: null,%0A
     
@@ -409,16 +409,16 @@
 : null,%0A
+
 %0A%0A      
@@ -610,16 +610,16 @@
 ength ?%0A
-
         
@@ -705,24 +705,304 @@
 ources'),%0A%0A%0A
+            isBuiltIn: function () %7B%0A                return this.datasources && this.datasources.length ?%0A                    !!Mist.metricsController.builtInMetrics.findBy('id', this.datasources%5B0%5D.metric.id)%0A                    : false;%0A            %7D.property('datasources'),%0A%0A%0A
             

Fix built in graphs