Showing 5,781 of 10,536 total issues
Function deps
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function ($ocLazyLoad) {
return $ocLazyLoad.load(['ui.select', 'ui.checkbox', 'daterangepicker', 'toaster']).then(
function () {
return $ocLazyLoad.load([{
serie: true,
Function refreshInterval
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
this.refreshInterval = setInterval(() => {
let isResponseOK = false;
fetch(APIBaseURL + '/reports/meterrealtime?meterid=' + this.props.meterId, {
method: 'GET',
headers: {
Function Combo
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const Combo = () => {
const { setIsOpenSidePanel } = useContext(AppContext);
return (
<Fragment>
Function on_put
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def on_put(req, resp, id_):
"""Handles PUT requests"""
admin_control(req)
try:
raw_json = req.stream.read().decode('utf-8')
Function on_post
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def on_post(req, resp):
"""Handles POST requests"""
admin_control(req)
try:
raw_json = req.stream.read().decode('utf-8')
Function on_get
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def on_get(req, resp, id_):
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)
File SentRegisterEmailMessageForm.js
has 251 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React, { useState, useEffect, useRef, useContext } from 'react';
import PropTypes from 'prop-types';
import { toast } from 'react-toastify';
import { Button, Form, FormGroup, Input, Row, Col, Label, InputGroup, InputGroupAddon } from 'reactstrap';
import withRedirect from '../../../hoc/withRedirect';
Function render
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
this.render = function(collection) {
collection = collection || {};
renderLater = false;
cachedCollection = collection;
Consider simplifying this complex logical expression. Open
Open
"pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } if (vf.v == 0 && i % 10 >= 2 && i % 10 <= 4 && (i % 100 < 12 || i % 100 > 14)) { return PLURAL_CATEGORY.FEW; } if (vf.v == 0 && i != 1 && i % 10 >= 0 && i % 10 <= 1 || vf.v == 0 && i % 10 >= 5 && i % 10 <= 9 || vf.v == 0 && i % 100 >= 12 && i % 100 <= 14) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;}
Consider simplifying this complex logical expression. Open
Open
"pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } if (vf.v == 0 && i % 10 >= 2 && i % 10 <= 4 && (i % 100 < 12 || i % 100 > 14)) { return PLURAL_CATEGORY.FEW; } if (vf.v == 0 && i != 1 && i % 10 >= 0 && i % 10 <= 1 || vf.v == 0 && i % 10 >= 5 && i % 10 <= 9 || vf.v == 0 && i % 100 >= 12 && i % 100 <= 14) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;}
Function link
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
"[": function link( text ) {
var orig = String(text);
// Inline content is possible inside `link text`
var res = Markdown.DialectHelpers.inline_until_char.call( this, text.substr(1), ']' );
Function _init
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
this._init = function _init(element) {
// this is probably useless now because we override angular.bootstrap
if (modulesToLoad.length === 0) {
var elements = [element],
names = ['ng:app', 'ng-app', 'x-ng-app', 'data-ng-app'],
Function init
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
e.name = "Footable LucidBookmarkable", e.init = function(e) {
e.options.bookmarkable.enabled && t(e.table).bind({
footable_initialized: function() {
var i = e.table.id,
o = a(i + "_f"),
Function render
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
jvm.Legend.prototype.render = function(){
var ticks = this.series.scale.getTicks(),
i,
inner = jvm.$('<div/>').addClass('jvectormap-legend-inner'),
tick,
Function editTenant
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$scope.editTenant = function (tenant) {
var modalInstance = $uibModal.open({
windowClass: "animated fadeIn",
templateUrl: 'views/settings/tenant/tenant.model.html',
controller: 'ModalEditTenantCtrl',
Function addTenant
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$scope.addTenant = function () {
var modalInstance = $uibModal.open({
templateUrl: 'views/settings/tenant/tenant.model.html',
controller: 'ModalAddTenantCtrl',
windowClass: "animated fadeIn",
Function editVirtualMeter
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$scope.editVirtualMeter = function(virtualmeter) {
var modalInstance = $uibModal.open({
windowClass: "animated fadeIn",
templateUrl: 'views/settings/meter/virtualmeter.model.html',
controller: 'ModalEditVirtualMeterCtrl',
Function refreshInterval
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
this.refreshInterval = setInterval(() => {
let isResponseOK = false;
fetch(APIBaseURL + '/reports/spaceenvironmentmonitor?sensorid=' + this.props.sensorId, {
method: 'GET',
headers: {
Function on_get
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
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)
Function generate_excel
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def generate_excel(report,
name,
reporting_start_datetime_local,
reporting_end_datetime_local,
period_type,