Sha256: ce81acccd3bbbcdc19e6d42d9100d5fd15e382611d14a139e5cd9fba132646a4

Contents?: true

Size: 760 Bytes

Versions: 4

Compression:

Stored size: 760 Bytes

Contents

var Logs = angular.module("Logs", ["ui.router"]);

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

    $stateProvider.
        state("logs", {
            url: "/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

4 entries across 4 versions & 1 rubygems

Version Path
faalis-1.0.0 app/assets/javascripts/faalis/dashboard/modules/logs.js
faalis-1.0.0.alpha4 app/assets/javascripts/faalis/dashboard/modules/logs.js
faalis-1.0.0.alpha3 app/assets/javascripts/faalis/dashboard/modules/logs.js
faalis-1.0.0.alpha2 app/assets/javascripts/faalis/dashboard/modules/logs.js