Showing 5,781 of 10,536 total issues

Function importVirtualMeter has 34 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    $scope.importVirtualMeter = function() {
        var modalInstance = $uibModal.open({
            templateUrl: 'views/common/import.html',
            controller: 'ModalImportCtrl',
            windowClass: "animated fadeIn",

    Function importSpace has 34 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        $scope.importSpace = function() {
            var modalInstance = $uibModal.open({
                templateUrl: 'views/common/import.html',
                controller: 'ModalImportCtrl',
                windowClass: "animated fadeIn",
    Severity: Minor
    Found in myems-admin/app/controllers/settings/space/space.controller.js - About 1 hr to fix

      Function importMeter has 34 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          $scope.importMeter = function() {
              var modalInstance = $uibModal.open({
                  templateUrl: 'views/common/import.html',
                  controller: 'ModalImportCtrl',
                  windowClass: "animated fadeIn",
      Severity: Minor
      Found in myems-admin/app/controllers/settings/meter/meter.controller.js - About 1 hr to fix

        Function deleteCategory has 34 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            $scope.deleteCategory=function(category){
                SweetAlert.swal({
                        title: $translate.instant("SWEET.TITLE"),
                        text: $translate.instant("SWEET.TEXT"),
                        type: "warning",

          Function deleteKnowledgeFile has 34 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              $scope.deleteKnowledgeFile = function (knowledgefile) {
                  SweetAlert.swal({
                      title: $translate.instant("SWEET.TITLE"),
                      text: $translate.instant("SWEET.TEXT"),
                      type: "warning",

            Function deleteShopfloor has 34 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                $scope.deleteShopfloor = function (shopfloor) {
                    SweetAlert.swal({
                        title: $translate.instant("SWEET.TITLE"),
                        text: $translate.instant("SWEET.TEXT"),
                        type: "warning",

              Function deleteEnergyPlanFile has 34 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  $scope.deleteEnergyPlanFile = function(energyplanfile) {
                      SweetAlert.swal({
                          title: $translate.instant("SWEET.TITLE"),
                          text: $translate.instant("SWEET.TEXT"),
                          type: "warning",

                Function importTenant has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    $scope.importTenant = function() {
                        var modalInstance = $uibModal.open({
                            templateUrl: 'views/common/import.html',
                            controller: 'ModalImportCtrl',
                            windowClass: "animated fadeIn",
                Severity: Minor
                Found in myems-admin/app/controllers/settings/tenant/tenant.controller.js - About 1 hr to fix

                  Function deleteOfflineMeterFile has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      $scope.deleteOfflineMeterFile = function(offlinemeterfile) {
                          SweetAlert.swal({
                              title: $translate.instant("SWEET.TITLE"),
                              text: $translate.instant("SWEET.TEXT"),
                              type: "warning",

                    Function deleteEnergyStoragePowerStation has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        $scope.deleteEnergyStoragePowerStation=function(energystoragepowerstation){
                            SweetAlert.swal({
                                title: $translate.instant("SWEET.TITLE"),
                                text: $translate.instant("SWEET.TEXT"),
                                type: "warning",

                      Function deps has 34 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 deleteNonWorkingDay has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            $scope.deleteNonWorkingDay = function(nonworkingday) {
                                SweetAlert.swal({
                                        title: $translate.instant("SWEET.TITLE"),
                                        text: $translate.instant("SWEET.TEXT"),
                                        type: "warning",

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

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

                            Function deps has 34 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 deleteCostFile has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  $scope.deleteCostFile = function (costfile) {
                                      SweetAlert.swal({
                                              title: $translate.instant("SWEET.TITLE"),
                                              text: $translate.instant("SWEET.TEXT"),
                                              type: "warning",

                                Function deleteEnergyFlowDiagram has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    $scope.deleteEnergyFlowDiagram=function(energyflowdiagram){
                                        SweetAlert.swal({
                                                title: $translate.instant("SWEET.TITLE"),
                                                text: $translate.instant("SWEET.TEXT"),
                                                type: "warning",

                                  Function VerticalAlign has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

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

                                    Function getImage has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    const getImage = color => {
                                      switch (color) {
                                        case 'warning':
                                          return corner1;
                                        case 'info':
                                    Severity: Minor
                                    Found in myems-web/src/components/MyEMS/common/CardSummary.js - About 1 hr to fix

                                      Function on_get has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          def on_get(req, resp):
                                              if 'API-KEY' not in req.headers or \
                                                      not isinstance(req.headers['API-KEY'], str) or \
                                                      len(str.strip(req.headers['API-KEY'])) == 0:
                                                  access_control(req)
                                      Severity: Minor
                                      Found in myems-api/reports/offlinemeterdaily.py - About 1 hr to fix

                                        Function on_put has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            def on_put(req, resp, id_):
                                                """Handles PUT requests"""
                                                admin_control(req)
                                                try:
                                                    raw_json = req.stream.read().decode('utf-8')
                                        Severity: Minor
                                        Found in myems-api/core/virtualpowerplant.py - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language