Showing 5,781 of 10,536 total issues

Function unlockUser has 32 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    $scope.unlockUser = function (user){
        SweetAlert.swal({
            title: $translate.instant("SWEET.UNLOCK_TITLE"),
            type: "warning",
            showCancelButton: true,
Severity: Minor
Found in myems-admin/app/controllers/users/user/user.controller.js - About 1 hr to fix

    Function c has 32 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

                    var c = q(function() {
                      G &&
                        P < Q &&
                        ((cb = 0),
                        (ha = 2),
    Severity: Minor
    Found in myems-admin/js/jcui/angular.integralui.treeview.min.js - About 1 hr to fix

      Function changeCheckValue has 32 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

            this.changeCheckValue = function(d) {
              if (
                1 == b.options.autoCheck ||
                1 == b.options.checkBoxSettings.autoCheck
              ) {
      Severity: Minor
      Found in myems-admin/js/jcui/angular.integralui.treeview.min.js - About 1 hr to fix

        Function refresh has 32 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                  a.refresh = function(b, c, d) {
                    if (b)
                      switch (b.type) {
                        case "item":
                          v &&
        Severity: Minor
        Found in myems-admin/js/jcui/angular.integralui.treeview.min.js - About 1 hr to fix

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

                                          function ($ocLazyLoad) {
                                              return $ocLazyLoad.load(['ui.checkbox', 'ui.select', '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 32 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                                            function ($ocLazyLoad) {
                                                return $ocLazyLoad.load(['ui.checkbox', 'ui.select', '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 handleSubmit has 32 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                const handleSubmit = e => {
                  e.preventDefault();
                  let isResponseOK = false;
                  fetch(APIBaseURL + '/users/forgotpassword', {
                    method: 'PUT',

                Function onSpaceCascaderChange has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  let onSpaceCascaderChange = (value, selectedOptions) => {
                    setSelectedSpaceName(selectedOptions.map(o => o.label).join('/'));
                    let selectedSpaceID = value[value.length - 1];
                    setSpinnerHidden(false);
                    //begin of getting sensors of the selected space
                Severity: Minor
                Found in myems-web/src/components/MyEMS/Space/SpaceEnvironmentMonitor.js - About 1 hr to fix

                  Function LockScreen has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  const LockScreen = () => {
                    return (
                      <AuthCardLayout
                        leftSideContent={
                          <p className="mb-0 mt-4 mt-md-5 fs--1 font-weight-semi-bold text-300">
                  Severity: Minor
                  Found in myems-web/src/components/auth/card/LockScreen.js - About 1 hr to fix

                    Function onSpaceCascaderChange has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      let onSpaceCascaderChange = (value, selectedOptions) => {
                        setSelectedSpaceName(selectedOptions.map(o => o.label).join('/'));
                        let selectedSpaceID = value[value.length - 1];
                        setSpinnerHidden(false);
                        //begin of getting meters of the selected space
                    Severity: Minor
                    Found in myems-web/src/components/MyEMS/Meter/MeterRealtime.js - About 1 hr to fix

                      Function ModalActivityContent has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      const ModalActivityContent = () => {
                        return (
                          <>
                            <Media className="mb-3">
                              <Link to="pages/profile">
                      Severity: Minor
                      Found in myems-web/src/components/kanban/ModalActivityContent.js - About 1 hr to fix

                        Function withAuthSplit has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        const withAuthSplit = OriginalComponent => {
                          const UpdatedComponent = props => {
                            // State
                            const [bgProps, setBgProps] = useState(null);
                        
                        
                        Severity: Minor
                        Found in myems-web/src/hoc/withAuthSplit.js - About 1 hr to fix

                          Function worker has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          def worker(tenant):
                              ####################################################################################################################
                              # Step 1: get all input meters associated with the tenant
                              ####################################################################################################################
                              print("Step 1: get all input meters associated with the tenant " + str(tenant['name']))
                          Severity: Minor
                          Found in myems-aggregation/tenant_energy_input_category.py - About 1 hr to fix

                            Function worker has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            def worker(equipment):
                                ####################################################################################################################
                                # Step 1: get all input meters associated with the equipment
                                ####################################################################################################################
                                print("Step 1: get all input meters associated with the equipment " + str(equipment['name']))
                            Severity: Minor
                            Found in myems-aggregation/equipment_energy_input_item.py - About 1 hr to fix

                              Function worker has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              def worker(tenant):
                                  ####################################################################################################################
                                  # Step 1: get all input meters associated with the tenant
                                  ####################################################################################################################
                                  print("Step 1: get all input meters associated with the tenant " + str(tenant['name']))
                              Severity: Minor
                              Found in myems-aggregation/tenant_energy_input_item.py - About 1 hr to fix

                                Function worker has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                def worker(equipment):
                                    ####################################################################################################################
                                    # Step 1: get all output meters associated with the equipment
                                    ####################################################################################################################
                                    print("Step 1: get all output meters associated with the equipment " + str(equipment['name']))
                                Severity: Minor
                                Found in myems-aggregation/equipment_energy_output_category.py - About 1 hr to fix

                                  Function worker has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  def worker(store):
                                      ####################################################################################################################
                                      # Step 1: get all input meters associated with the store
                                      ####################################################################################################################
                                      print("Step 1: get all input meters associated with the store " + str(store['name']))
                                  Severity: Minor
                                  Found in myems-aggregation/store_energy_input_category.py - About 1 hr to fix

                                    Function worker has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    def worker(store):
                                        ####################################################################################################################
                                        # Step 1: get all input meters associated with the store
                                        ####################################################################################################################
                                        print("Step 1: get all input meters associated with the store " + str(store['name']))
                                    Severity: Minor
                                    Found in myems-aggregation/store_energy_input_item.py - About 1 hr to fix

                                      Function worker has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      def worker(equipment):
                                          ####################################################################################################################
                                          # Step 1: get all input meters associated with the equipment
                                          ####################################################################################################################
                                          print("Step 1: get all input meters associated with the equipment " + str(equipment['name']))
                                      Severity: Minor
                                      Found in myems-aggregation/equipment_energy_input_category.py - About 1 hr to fix

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

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