Showing 754 of 2,690 total issues
Function render
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render(props, {}) {
const variableOptions = [];
props.actionsGroupsBefore.forEach((actionGroup, groupIndex) => {
actionGroup.forEach((action, index) => {
Function render
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render(props, { alarmModesOptions, houseOptions, selectedHouseOption, selectedAlarmModeOption }) {
return (
<div>
<p>
<Text id="editScene.actionsCard.alarmSetMode.description" />
Function render
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render(props, { alarmModesOptions, houseOptions, selectedHouseOption, selectedAlarmModeOption }) {
return (
<div>
<p>
<Text id="editScene.actionsCard.alarmCheckMode.description" />
Function VariableController
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function VariableController(gladys) {
/**
* @api {post} /api/service/:service_name/variable/:variable_key Save service variable
* @apiName SaveVariable
* @apiGroup Variable
Function DashboardController
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function DashboardController(gladys) {
/**
* @api {post} /api/v1/dashboard create
* @apiName createDashoard
* @apiGroup Dashboard
Function up
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
up: async (queryInterface, Sequelize) => {
const service = await db.Service.findOne({
where: {
name: 'enedis',
},
Function exports
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = (sequelize, DataTypes) => {
const deviceFeatureState = sequelize.define(
't_device_feature_state',
{
id: {
Function buildFeatures
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function buildFeatures(deviceName, deviceExternalId, broadlinkDevice) {
const { TYPE, getEnergy } = broadlinkDevice;
const features = [];
// check for number of switch features
Function createActions
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function createActions(store) {
const actions = {
async getEventsInRange(state, from, to) {
store.setState({
DeviceGetStatus: CalendarGetEventsStatus.Getting
Function getUsersKeys
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async function getUsersKeys() {
try {
const onlineUsers = await this.gladysGatewayClient.getUsersInstance();
let localUsers = await this.variable.getValue('GLADYS_GATEWAY_USERS_KEYS');
localUsers = localUsers !== null ? JSON.parse(localUsers) : [];
Function componentWillMount
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async componentWillMount() {
let { deviceSelector, peripheral } = this.props;
let device;
let loading = RequestStatus.Success;
let isRemote;
Function render
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render(
props,
{
dashboards,
currentDashboard,
Function startSync
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async startSync(state) {
store.setState({
caldavSyncStatus: CalDAVStatus.Getting,
caldavSaveSettingsStatus: null,
caldavCleanUpStatus: null
Function render
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render(
props,
{
isGladysPlus,
dashboardDropdownOpened,
Function render
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render(props, { houses }) {
return (
<BaseEditBox {...props} titleKey="dashboard.boxTitle.alarm">
<div class="form-group">
<div class="form-group">
Function render
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render(props, { scenes, status }) {
const boxTitle = props.box.name;
const loading = status === RequestStatus.Getting && !status;
return (
Function render
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render({ value, category, type, isLive = false }, {}) {
return (
<div class="btn-group" role="group">
<button
class={cx('btn btn-sm btn-secondary', {
Function getTuyaConfiguration
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async getTuyaConfiguration() {
let tuyaEndpoint = '';
let tuyaAccessKey = '';
let tuyaSecretKey = '';
let tuyaAppAccountId = '';
Function render
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render(props, {}) {
const boxData = get(props, `${DASHBOARD_BOX_DATA_KEY}TemperatureInRoom.${props.x}_${props.y}`);
const boxStatus = get(props, `${DASHBOARD_BOX_STATUS_KEY}TemperatureInRoom.${props.x}_${props.y}`);
const temperature = get(boxData, 'room.temperature.temperature');
const unit = get(boxData, 'room.temperature.unit');
Function up
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
up: async (queryInterface, Sequelize) => {
await queryInterface.createTable('t_house', {
id: {
allowNull: false,
primaryKey: true,