Showing 5,781 of 10,536 total issues
Function getTextInfo
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Canvas.prototype.getTextInfo = function(layer, text, font, angle, width) {
var textStyle, layerCache, styleCache, info;
// Cast the value to a string, in case we were given a number or such
Function start
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
start: function(ev, ui) {
trigger('eventDragStart', eventElement, event, ev, ui);
hideEvents(event, eventElement);
origWidth = eventElement.width();
hoverListener.start(function(cell, origCell) {
Function tickFormatter
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
axis.tickFormatter = function (v, axis) {
var d = dateGenerator(v, axis.options);
// first check global format
Function addCombinedEquipment
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$scope.addCombinedEquipment = function () {
var modalInstance = $uibModal.open({
templateUrl: 'views/settings/combinedequipment/combinedequipment.model.html',
controller: 'ModalAddCombinedEquipmentCtrl',
windowClass: "animated fadeIn",
Function addEquipment
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$scope.addEquipment = function() {
var modalInstance = $uibModal.open({
templateUrl: 'views/settings/equipment/equipment.model.html',
controller: 'ModalAddEquipmentCtrl',
windowClass: "animated fadeIn",
Function addEnergyStoragePowerStation
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$scope.addEnergyStoragePowerStation = function() {
var modalInstance = $uibModal.open({
templateUrl: 'views/settings/energystoragepowerstation/energystoragepowerstation.model.html',
controller: 'ModalAddEnergyStoragePowerStationCtrl',
windowClass: "animated fadeIn",
Function editWindFarm
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$scope.editWindFarm = function(windfarm) {
var modalInstance = $uibModal.open({
windowClass: "animated fadeIn",
templateUrl: 'views/settings/windfarm/windfarm.model.html',
controller: 'ModalEditWindFarmCtrl',
Function editPhotovoltaicPowerStation
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$scope.editPhotovoltaicPowerStation = function(photovoltaicpowerstation) {
var modalInstance = $uibModal.open({
windowClass: "animated fadeIn",
templateUrl: 'views/settings/photovoltaicpowerstation/photovoltaicpowerstation.model.html',
controller: 'ModalEditPhotovoltaicPowerStationCtrl',
Function addMicrogrid
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$scope.addMicrogrid = function() {
var modalInstance = $uibModal.open({
templateUrl: 'views/settings/microgrid/microgrid.model.html',
controller: 'ModalAddMicrogridCtrl',
windowClass: "animated fadeIn",
Function addMicrogridHeatpump
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$scope.addMicrogridHeatpump = function() {
var modalInstance = $uibModal.open({
templateUrl: 'views/settings/microgrid/microgridheatpump.model.html',
controller: 'ModalAddMicrogridHeatpumpCtrl',
Function deps
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
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']
Function editMicrogridGrid
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$scope.editMicrogridGrid = function(microgridgrid) {
var modalInstance = $uibModal.open({
templateUrl: 'views/settings/microgrid/microgridgrid.model.html',
controller: 'ModalEditMicrogridGridCtrl',
windowClass: "animated fadeIn",
Function render
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const { t } = this.props;
return (
<Card className="mb-3 overflow-hidden" style={{ minWidth: '12rem', maxWidth: '25%' }}>
Function on_get
has 41 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 on_get
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def on_get(req, resp):
access_control(req)
# Get user inforamtion
user_uuid = str.strip(req.headers['USER-UUID'])
cnx_user_db = mysql.connector.connect(**config.myems_user_db)
Function on_get
has 41 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 on_get
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def on_get(req, resp):
access_control(req)
# Get user inforamtion
user_uuid = str.strip(req.headers['USER-UUID'])
cnx_user_db = mysql.connector.connect(**config.myems_user_db)
Function on_get
has 41 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 on_post
has 41 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_post
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def on_post(req, resp, id_):
"""Handles POST requests"""
admin_control(req)
try:
raw_json = req.stream.read().decode('utf-8')