Showing 5,781 of 10,536 total issues

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

    $scope.refreshSpaceTree = function () {
        let headers = { "User-UUID": $scope.cur_user.uuid, "Token": $scope.cur_user.token };
        SpaceService.getAllSpaces(headers, function (response) {
            if (angular.isDefined(response.status) && response.status === 200) {
                $scope.spaces = response.data;
Severity: Minor
Found in myems-admin/app/controllers/settings/space/space.controller.js - About 1 hr to fix

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

        $scope.getAllSpaces = function() {
        let headers = { "User-UUID": $scope.cur_user.uuid, "Token": $scope.cur_user.token };
        SpaceService.getAllSpaces(headers, function (response) {
          if (angular.isDefined(response.status) && response.status === 200) {
            $scope.spaces = response.data;

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

          $scope.getAllSpaces = function() {
          let headers = { "User-UUID": $scope.cur_user.uuid, "Token": $scope.cur_user.token };
          SpaceService.getAllSpaces(headers, function (response) {
            if (angular.isDefined(response.status) && response.status === 200) {
              $scope.spaces = response.data;

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

            $scope.getAllSpaces = function() {
            let headers = { "User-UUID": $scope.cur_user.uuid, "Token": $scope.cur_user.token };
            SpaceService.getAllSpaces(headers, function (response) {
              if (angular.isDefined(response.status) && response.status === 200) {
                $scope.spaces = response.data;
        Severity: Minor
        Found in myems-admin/app/controllers/settings/space/spacestore.controller.js - About 1 hr to fix

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

              $scope.refreshMeterTree = function() {
                  let headers = { "User-UUID": $scope.cur_user.uuid, "Token": $scope.cur_user.token };
                  MeterService.getAllMeters(headers, function (response) {
                      if (angular.isDefined(response.status) && response.status === 200) {
                          $scope.meters = response.data;
          Severity: Minor
          Found in myems-admin/app/controllers/settings/meter/meter.controller.js - About 1 hr to fix

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

                $scope.getAllSpaces = function() {
                let headers = { "User-UUID": $scope.cur_user.uuid, "Token": $scope.cur_user.token };
                SpaceService.getAllSpaces(headers, function (response) {
                  if (angular.isDefined(response.status) && response.status === 200) {
                    $scope.spaces = response.data;

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

                  $scope.getAllSpaces = function() {
                  let headers = { "User-UUID": $scope.cur_user.uuid, "Token": $scope.cur_user.token };
                  SpaceService.getAllSpaces(headers, function (response) {
                    if (angular.isDefined(response.status) && response.status === 200) {
                      $scope.spaces = response.data;

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

                    $scope.getAllSpaces = function() {
                      let headers = { "User-UUID": $scope.cur_user.uuid, "Token": $scope.cur_user.token };
                      SpaceService.getAllSpaces(headers, function (response) {
                        if (angular.isDefined(response.status) && response.status === 200) {
                          $scope.spaces = response.data;
                Severity: Minor
                Found in myems-admin/app/controllers/settings/space/spacepoint.controller.js - About 1 hr to fix

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

                      $scope.addEnergyFlowDiagram = function() {
                          var modalInstance = $uibModal.open({
                              templateUrl: 'views/settings/energyflowdiagram/energyflowdiagram.model.html',
                              controller: 'ModalAddEnergyFlowDiagramCtrl',
                              windowClass: "animated fadeIn",

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

                                                    function ($ocLazyLoad) {
                                                        return $ocLazyLoad.load(['ui.select', 'ui.checkbox', 'daterangepicker','toaster']).then(
                                                            function () {
                                                                return $ocLazyLoad.load([{
                                                                    serie: true,
                    Severity: Minor
                    Found in myems-admin/app/config.router.js - About 1 hr to fix

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

                          $scope.addCostCenter = function() {
                              var modalInstance = $uibModal.open({
                                  templateUrl: 'views/settings/costcenter/costcenter.model.html',
                                  controller: 'ModalAddCostCenterCtrl',
                                  windowClass: "animated fadeIn",

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

                                                        function ($ocLazyLoad) {
                                                            return $ocLazyLoad.load(['ui.select', 'ui.checkbox', 'toaster']).then(
                                                                function () {
                                                                    return $ocLazyLoad.load([{
                                                                        files: ['js/plugins/sweetalert/sweetalert.min.js', 'css/plugins/sweetalert/sweetalert.css']
                        Severity: Minor
                        Found in myems-admin/app/config.router.js - About 1 hr to fix

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

                                                          function ($ocLazyLoad) {
                                                              return $ocLazyLoad.load(['ui.select', 'ui.checkbox', 'toaster']).then(
                                                                  function () {
                                                                      return $ocLazyLoad.load([{
                                                                          files: ['js/plugins/sweetalert/sweetalert.min.js', 'css/plugins/sweetalert/sweetalert.css']
                          Severity: Minor
                          Found in myems-admin/app/config.router.js - About 1 hr to fix

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

                              render() {
                                const chartData = {
                                  ...this.state.chartData,
                                  datasets: [
                                    {
                            Severity: Minor
                            Found in myems-web/src/components/MyEMS/Shopfloor/ActiveUsersBarChart.js - About 1 hr to fix

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

                                render() {
                                  const chartData = {
                                    ...this.state.chartData,
                                    datasets: [
                                      {
                              Severity: Minor
                              Found in myems-web/src/components/MyEMS/Tenant/ActiveUsersBarChart.js - About 1 hr to fix

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

                                const ShoppingCart = () => {
                                  const { shoppingCart } = useContext(ProductContext);
                                
                                  return (
                                    <Card>
                                Severity: Minor
                                Found in myems-web/src/components/e-commerce/ShoppingCart.js - About 1 hr to fix

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

                                    render() {
                                      const chartData = {
                                        ...this.state.chartData,
                                        datasets: [
                                          {
                                  Severity: Minor
                                  Found in myems-web/src/components/MyEMS/Store/ActiveUsersBarChart.js - About 1 hr to fix

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

                                    const Tabs = () => {
                                      return (
                                        <>
                                          <PageHeader
                                            title="Tabs"
                                    Severity: Minor
                                    Found in myems-web/src/components/bootstrap-components/Tabs.js - About 1 hr to fix

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

                                        const fetchPCSDetails = () => {
                                          let url = APIBaseURL + '/reports/energystoragepowerstationdetails/' + selectedStation + '/pcs'
                                          console.log('fetchPCSDetails with url:' + url);
                                      
                                          let isResponseOK = false;

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

                                          const fetchBMSDetails = () => {
                                            let url = APIBaseURL + '/reports/energystoragepowerstationdetails/' + selectedStation + '/bms'
                                            console.log('fetchBMSDetails with url:' + url);
                                            let isResponseOK = false;
                                            fetch(url, {
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language