superdesk/superdesk-client-core

View on GitHub
scripts/apps/dashboard/grid/grid.ts

Summary

Maintainability
A
2 hrs
Test Coverage

Function link has 39 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        link: function(scope, element, attrs) {
            scope.syncWidgets = function() {
                angular.forEach(scope.widgets, (widget) => {
                    if (widget.active) {
                        var sizes = scope.gridster.serialize(widget.el);
Severity: Minor
Found in scripts/apps/dashboard/grid/grid.ts - About 1 hr to fix

    Function link has 29 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            link: function(scope, element, attrs, sdGrid) {
                sdGrid.addWidget(scope.widget, element);
    
                scope.removeWidget = function() {
                    sdGrid.removeWidget(scope.widget, element);
    Severity: Minor
    Found in scripts/apps/dashboard/grid/grid.ts - About 1 hr to fix

      There are no issues that match your filters.

      Category
      Status