GladysProject/Gladys

View on GitHub

Showing 742 of 2,674 total issues

Function ACTIONS.CALENDAR.IS_EVENT_RUNNING has 38 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  [ACTIONS.CALENDAR.IS_EVENT_RUNNING]: async (self, action, scope, columnIndex, rowIndex) => {
    // find if one event match the condition
    const events = await self.calendar.findCurrentlyRunningEvent(
      action.calendars,
      action.calendar_event_name_comparator,
Severity: Minor
Found in server/lib/scene/scene.actions.js - About 1 hr to fix

    Function updateUser has 38 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        async updateUser(state, e) {
          e.preventDefault();
          store.setState({
            ProfilePatchStatus: RequestStatus.Getting
          });
    Severity: Minor
    Found in front/src/actions/profile.js - About 1 hr to fix

      Function get has 38 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      async function get(options) {
        const optionsWithDefault = { ...DEFAULT_OPTIONS, ...options };
      
        // add ability to get house
        const includeExpand = [];
      Severity: Minor
      Found in server/lib/user/user.get.js - About 1 hr to fix

        Function handleGoogleHomeMessage has 38 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        async function handleGoogleHomeMessage(data, rawMessage, cb) {
          const service = this.serviceManager.getService('google-actions');
          try {
            const body = {
              ...data.data,
        Severity: Minor
        Found in server/lib/gateway/gateway.handleGoogleHomeMessage.js - About 1 hr to fix

          Function login has 38 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              async login(state, e) {
                if (e) {
                  e.preventDefault();
                }
                if (!validateEmail(state.gatewayLoginEmail)) {
          Severity: Minor
          Found in front/src/actions/login/loginGateway.js - About 1 hr to fix

            Function render has 38 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              render({}, {}) {
                return (
                  <div>
                    <p>
                      <Text id="editScene.triggersCard.mqttReceived.description" />
            Severity: Minor
            Found in front/src/routes/scene/edit-scene/triggers/MQTTReceivedTrigger.jsx - About 1 hr to fix

              Function render has 38 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                render({ ipMask, disabled }) {
                  const { networkInterface, enabled, mask, name } = ipMask;
                  const editable = !networkInterface;
                  return (
                    <tr>

                Function Gateway has 12 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                  variable,
                  event,
                  system,
                  sequelize,
                  config,
                Severity: Major
                Found in server/lib/gateway/index.js - About 1 hr to fix

                  Function SceneManager has 12 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                    stateManager,
                    event,
                    device,
                    message,
                    variable,
                  Severity: Major
                  Found in server/lib/scene/index.js - About 1 hr to fix

                    Function exports has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    module.exports = (sequelize, DataTypes) => {
                      const pod = sequelize.define(
                        't_pod',
                        {
                          id: {
                    Severity: Minor
                    Found in server/models/pod.js - About 1 hr to fix

                      Function exports has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      module.exports = (sequelize, DataTypes) => {
                        const deviceParam = sequelize.define(
                          't_device_param',
                          {
                            id: {
                      Severity: Minor
                      Found in server/models/device_param.js - About 1 hr to fix

                        Function up has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          up: async (queryInterface, Sequelize) => {
                            await queryInterface.createTable('t_device_param', {
                              id: {
                                allowNull: false,
                                primaryKey: true,
                        Severity: Minor
                        Found in server/migrations/20190318084429-create-device-param.js - About 1 hr to fix

                          Function action.devices.commands.ColorAbsolute has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              'action.devices.commands.ColorAbsolute': (device, params) => {
                                const events = [];
                                const { color = {} } = params;
                                const { temperature, spectrumRGB } = color;
                          
                          

                            Function syncDeviceConverter has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            function syncDeviceConverter(device) {
                              const endpoint = {
                                endpointId: device.selector,
                                friendlyName: device.name,
                                manufacturerName: 'Gladys Assistant',
                            Severity: Minor
                            Found in server/services/alexa/lib/syncDeviceConverter.js - About 1 hr to fix

                              Function disconnect has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              async function disconnect() {
                                let container;
                              
                                // Stop backup reccurent job
                                if (this.backupScheduledJob) {
                              Severity: Minor
                              Found in server/services/zigbee2mqtt/lib/disconnect.js - About 1 hr to fix

                                Function ACTIONS.LIGHT.BLINK has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                  [ACTIONS.LIGHT.BLINK]: async (self, action, scope) => {
                                    const blinkingSpeed = action.blinking_speed;
                                    const blinkingTime = action.blinking_time * 1000 + 1;
                                    let blinkingInterval;
                                    switch (blinkingSpeed) {
                                Severity: Minor
                                Found in server/lib/scene/scene.actions.js - About 1 hr to fix

                                  Function createActions has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  function createActions(store) {
                                    const actions = {
                                      async getUsersWithLocation(state) {
                                        store.setState({
                                          GetUsersWithlocationStatus: RequestStatus.Getting
                                  Severity: Minor
                                  Found in front/src/actions/map.js - About 1 hr to fix

                                    Function getZigbee2mqttDevices has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        async getZigbee2mqttDevices(state, take, skip) {
                                          store.setState({
                                            getZigbee2mqttStatus: RequestStatus.Getting
                                          });
                                          try {
                                    Severity: Minor
                                    Found in front/src/routes/integration/all/zigbee2mqtt/device-page/actions.js - About 1 hr to fix

                                      Function render has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                        render({}, { deviceStateHistoryInDays }) {
                                          return (
                                            <div class="card">
                                              <h4 class="card-header">
                                                <Text id="systemSettings.deviceStateRetentionTime" />

                                        Function render has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                          render(props, { saving, error, variables, scene, triggersVariables, tags }) {
                                            return (
                                              scene && (
                                                <div>
                                                  <DndProvider backend={this.isTouchDevice ? TouchBackend : HTML5Backend}>
                                        Severity: Minor
                                        Found in front/src/routes/scene/edit-scene/index.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language