Sha256: 506fb1d3ccefa228a4a7749ba8dc8d47c5fe8efab934e1fb0ca259ef94157e6c

Contents?: true

Size: 1.65 KB

Versions: 6

Compression:

Stored size: 1.65 KB

Contents

/* -----------------------------------------------------------------------------
    Red Base - Basic website skel engine
    Copyright (C) 2012-2013 Yellowen

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License along
    with this program; if not, write to the Free Software Foundation, Inc.,
    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
----------------------------------------------------------------------------- */
var Logs = angular.module("Logs", []);

Logs.config(["$routeProvider", function($routeProvider){

    $routeProvider.
        when("/logs/", {
            templateUrl: template("logs/index"),
            controller: "LogsController"
        });
}]);

Logs.controller("LogsController", ["$scope", "Restangular","$sce",
                                    function($scope, API, $sce){

    API.all("logs").getList().then(function(data){
        var content = data.content;
        content = content.replace(/\n/gm, "<br />");
        content = content.replace(/\t/gm, "&nbsp;");
        content = content.replace(/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]/gm, "");
        $scope.logs = $sce.trustAsHtml(content);
    });

}]);

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
faalis-0.11.1 app/assets/javascripts/faalis/dashboard/modules/logs.js
faalis-0.11.0 app/assets/javascripts/faalis/dashboard/modules/logs.js
faalis-0.7.0 app/assets/javascripts/faalis/dashboard/modules/logs.js
red_base-0.6.0 app/assets/javascripts/red_base/dashboard/modules/logs.js
red_base-0.5.1 app/assets/javascripts/red_base/dashboard/modules/logs.js
red_base-0.5.0 app/assets/javascripts/red_base/dashboard/modules/logs.js