portainer/portainer

View on GitHub
app/docker/views/nodes/node-details/node-details-view-controller.js

Summary

Maintainability
B
4 hrs
Test Coverage

Function NodeDetailsViewController has 75 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  function NodeDetailsViewController($q, $stateParams, NodeService, StateManager, AgentService, Authentication, Notifications) {
    var ctrl = this;

    ctrl.$onInit = initView;

Severity: Major
Found in app/docker/views/nodes/node-details/node-details-view-controller.js - About 3 hrs to fix

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

        function initView() {
          var applicationState = StateManager.getState();
          ctrl.state.isAgent = applicationState.endpoint.mode.agentProxy;
          ctrl.state.isAdmin = Authentication.isAdmin();
          ctrl.state.enableHostManagementFeatures = ctrl.endpoint.SecuritySettings.enableHostManagementFeatures;
    Severity: Minor
    Found in app/docker/views/nodes/node-details/node-details-view-controller.js - About 1 hr to fix

      There are no issues that match your filters.

      Category
      Status