Showing 742 of 2,674 total issues
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 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,
{
isGladysPlus,
dashboardDropdownOpened,
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, { 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 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 SessionController
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function SessionController(gladys) {
/**
* @api {post} /api/v1/session/:session_id/revoke revoke
* @apiName revoke
* @apiGroup Session
Function up
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
up: async (queryInterface, Sequelize) => {
await queryInterface.createTable('t_job', {
id: {
allowNull: false,
primaryKey: true,
Function up
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
up: async (queryInterface, Sequelize) => {
const service = await db.Service.findOne({
where: {
name: 'rtsp-camera',
},
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,
Function up
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
up: async (queryInterface, Sequelize) => {
await queryInterface.createTable('t_dashboard', {
id: {
allowNull: false,
primaryKey: true,
Function up
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
up: async (queryInterface, Sequelize) => {
await queryInterface.addColumn('t_house', 'alarm_mode', {
type: Sequelize.STRING,
allowNull: false,
defaultValue: ALARM_MODES.DISARMED,
Function start
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async function start(name, podId = null) {
const serviceInDb = await db.Service.findOne({
where: {
pod_id: podId,
name,
Function login
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async login(state, e) {
if (e) {
e.preventDefault();
}
if (!validateEmail(state.gatewayLoginEmail)) {
Function getWeather
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async getWeather(state, box, x, y) {
boxActions.updateBoxStatus(state, BOX_KEY, x, y, RequestStatus.Getting);
try {
const weather = await state.httpClient.get(`/api/v1/house/${box.house}/weather`);
weather.datetime_beautiful = dayjs(weather.datetime)
Function downloadUpgrade
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async function downloadUpgrade(tag) {
// reset download upgrade status
this.downloadUpgradeError = null;
this.downloadUpgradeFinished = null;
this.downloadUpgradeLastEvent = null;
Function command
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async function command(message, classification, context) {
let temperatureResult;
const roomEntity = classification.entities.find((entity) => entity.entity === 'room');
try {
switch (classification.intent) {
Function command
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async function command(message, classification, context) {
let humidityResult;
const roomEntity = classification.entities.find((entity) => entity.entity === 'room');
try {
switch (classification.intent) {