<commit_before>/* 
 * Copyright (c) 2016 <NAME> <<EMAIL>>.
 * Released under the MIT License
 * http://www.opensource.org/licenses/mit-license.php
 */

/**
 * Info content module
 *
 * @param {type} ko
 * @param {type} $
 * @returns {InfoViewModel}
 */
define(['knockout',
    'jquery'
        //'viewmodels/WeatherScoutView'
],
    function (ko, $,
        //WeatherScoutView
        ) {

        /**
         * The view model for the Output panel.
         * @constructor
         */
        function InfoViewModel(globe, viewElementId, viewUrl, appendToId) {
            var self = this;

            this.globe = globe;

            // Get a reference to the SelectController's selectedItem observable
            this.selectedItem = this.globe.selectController.lastSelectedItem;

            // Load the Knockout custom binding used in the #weather-scout-view-template
            //this.wxScoutView = new WeatherScoutView();

            // The viewTemplate defines the content displayed in the output pane.
            this.viewTemplateName = ko.observable(null);

            // Update the view template from the selected object.
            this.selectedItem.subscribe(function (newItem) {
                // Determine if the new item has a view template
                if (newItem !== null) {
                    if (typeof newItem.viewTemplateName !== "undefined") {
                        self.viewTemplateName(newItem.viewTemplateName);
                    } else {
                        self.viewTemplateName(null);
                    }
                }
            });

            //
            // Load the view html into the DOM and apply the Knockout bindings
            //
            $.ajax({
                async: false,
                dataType: 'html',
                url: viewUrl,
                success: function (data) {
                    // Load the view html into the specified DOM element
                    $("#" + appendToId).append(data);

                    // Update the view member
                    self.view = document.getElementById(viewElementId);

                    // Binds the view to this view model.
                    ko.applyBindings(self, self.view);
                }
            });
        }

        return InfoViewModel;
    }
);
<commit_msg>Reenabled weather graphs in InfoViewModel<commit_after>/* 
 * Copyright (c) 2016 <NAME> <<EMAIL>>.
 * Released under the MIT License
 * http://www.opensource.org/licenses/mit-license.php
 */

/**
 * Info content module
 *
 * @param {type} ko
 * @param {type} $
 * @returns {InfoViewModel}
 */
define([
    'knockout',
    'jquery',
    'viewmodels/WeatherScoutView'],
        function (ko, $, WeatherScoutView) {

            /**
             * 
             * @constructor
             * @param {Globe} globe
             * @param {String} viewElementId View element id
             * @param {String} viewUrl View fragment file
             * @param {String} appendToId View element parent id
             * @returns {InfoViewModelL#18.InfoViewModel}
             */
            function InfoViewModel(globe, viewElementId, viewUrl, appendToId) {
                var self = this;

                this.view = null;
                this.globe = globe;

                // Get a reference to the SelectController's selectedItem observable
                this.selectedItem = this.globe.selectController.lastSelectedItem;

                // Load the Knockout custom binding used in the #weather-scout-view-template
                this.wxScoutView = new WeatherScoutView();

                // The viewTemplate defines the content displayed in the output pane.
                this.viewTemplateName = ko.observable(null);

                // Update the view template from the selected object.
                this.selectedItem.subscribe(function (newItem) {
                    // Determine if the new item has a view template
                    if (newItem !== null) {
                        if (typeof newItem.viewTemplateName !== "undefined") {
                            self.viewTemplateName(newItem.viewTemplateName);
                        } else {
                            self.viewTemplateName(null);
                        }
                    }
                });

                //
                // Load the view html into the DOM and apply the Knockout bindings
                //
                $.ajax({
                    async: false,
                    dataType: 'html',
                    url: viewUrl,
                    success: function (data) {
                        // Load the view html into the specified DOM element
                        $("#" + appendToId).append(data);

                        // Update the view member
                        self.view = document.getElementById(viewElementId);

                        // Binds the view to this view model.
                        ko.applyBindings(self, self.view);
                    }
                });
            }

            return InfoViewModel;
        }
);

{'fraction_non_alphanumeric': 0.09182068423122297, 'fraction_numerical': 0.001966181675186787, 'mean_word_length': 1.3485687903970451, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2252861', 'n_tokens_mistral': 1278, 'n_tokens_neox': 1164, 'n_words': 340}