Showing 754 of 2,690 total issues
Function getUsers
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async getUsers(state) {
store.setState({
usersGetStatus: RequestStatus.Getting
});
try {
Function createActions
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function createActions(store) {
const boxActions = createBoxActions(store);
const actions = {
async getTemperatureInRoom(state, box, x, y) {
Function getDefaultState
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function getDefaultState() {
const session = config.gatewayMode ? new GatewaySession() : config.demoMode ? new DemoSession() : new Session();
const httpClient = config.demoMode
? new DemoHttpClient()
: config.gatewayMode
Function render
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render(props, {}) {
return (
<tr>
<td class={style.userNameCell}>
{props.user.name}
Function render
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render(props, { confirmBackup }) {
return (
<tr>
<td>
{dayjs(props.backup.created_at)
Function render
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render(props, { confirmBackup }) {
return (
<tr>
<td>
{dayjs(props.backup.created_at)
Function exports
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = (sequelize, DataTypes) => {
const script = sequelize.define(
't_script',
{
id: {
Function buildFeatures
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function buildFeatures(deviceName, expose, parentType) {
const { type, name, property, access, value_min: minValue, value_max: maxValue, unit: deviceUnit, values } = expose;
const { names = {}, feature, getFeatureIndexes = () => [''] } = exposesMap[type] || {};
const byName = buildByName(names, name, parentType);
Function stopStreaming
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async function stopStreaming(cameraSelector) {
const liveStream = this.liveStreams.get(cameraSelector);
if (!liveStream) {
return;
}
Function buildFeatures
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function buildFeatures(deviceName, deviceExternalId) {
return [
// temperature sensor
{
name: `${deviceName} temperature`,
Function scanPresence
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async function scanPresence() {
const devices = await this.gladys.device.get({
service: 'bluetooth',
device_feature_category: DEVICE_FEATURE_CATEGORIES.PRESENCE_SENSOR,
});
Function purgeAggregateStates
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async function purgeAggregateStates() {
logger.debug('Purging device feature aggregate states...');
const deviceAggregateStateHistoryInDays = await this.variable.getValue(
SYSTEM_VARIABLE_NAMES.DEVICE_AGGREGATE_STATE_HISTORY_IN_DAYS,
);
Function loginTwoFactor
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async loginTwoFactor(state, e) {
if (e) {
e.preventDefault();
}
store.setState({
Function ACTIONS.ECOWATT.CONDITION
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
[ACTIONS.ECOWATT.CONDITION]: async (self, action) => {
try {
const data = await self.gateway.getEcowattSignals();
const todayDate = dayjs.tz(dayjs(), self.timezone).format('YYYY-MM-DD');
const todayHour = dayjs.tz(dayjs(), self.timezone).hour();
Function checkTrigger
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function checkTrigger(event) {
logger.debug(`Trigger: new event checkTrigger "${event.type}"`);
if (!triggersFunc[event.type]) {
throw new Error(`Trigger type "${event.type}" has no checker function.`);
}
Function duplicate
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async function duplicate(selector, name, icon) {
const existingScene = await db.Scene.findOne({
where: {
selector,
},
Function saveCaldavSettings
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async saveCaldavSettings(state) {
store.setState({
caldavSaveSharingStatus: CalDAVStatus.Getting
});
try {
Function getXiaomiDevices
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async getXiaomiDevices(state) {
store.setState({
getXiaomiDevicesStatus: RequestStatus.Getting
});
try {
Function saveConfiguration
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async saveConfiguration(state) {
event.preventDefault();
store.setState({
connectEweLinkStatus: RequestStatus.Getting,
eweLinkConnected: false,
Function render
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render(props, { loading, device, peripheral, isRemote }) {
return (
<BroadlinkPage user={props.user}>
<div
class={cx('dimmer', {