superdesk/superdesk-client-core

View on GitHub

Showing 3,654 of 3,654 total issues

Function redo has 29 lines of code (exceeds 25 allowed). Consider refactoring.
Open

      this.redo = function redo(exp, scope) {
        scope = scope || $rootScope;
        var id = scope.$id,
          stack = history[id][exp],
          values,
Severity: Minor
Found in scripts/libs/angular-history/history.js - About 1 hr to fix

    Function intervalCheckVideo has 29 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            this.intervalCheckVideo = window.setInterval(() => {
                this.props.superdesk.dataApi
                    .findOne<IVideoProject>('video_edit', this.state.article._id)
                    .then((result) => {
                        const processing = result.project.processing;
    Severity: Minor
    Found in scripts/extensions/videoEditor/src/VideoEditor.tsx - About 1 hr to fix

      Function focusFirstChildInput has 29 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      export function focusFirstChildInput(parent: HTMLElement) {
          const loadingStartTimestamp = Date.now();
          let lastElementCount = null;
      
          /**
      Severity: Minor
      Found in scripts/utils/focus-first-child-input.ts - About 1 hr to fix

        Function getFieldV2 has 29 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                    getFieldV2: (fieldEditor, fieldSchema) => {
                        const fieldConfig: IDropdownConfigRemoteSource = {
                            source: 'remote-source',
                            searchOptions: (searchTerm, language, callback) => {
                                httpRequestJsonLocal<IRestApiResponse<IGeoName>>({
        Severity: Minor
        Found in scripts/apps/authoring-react/field-adapters/place.ts - About 1 hr to fix

          Function config has 29 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  const config = (() => {
                      if (this.state.source === 'manual-entry') {
                          const defaults: IDropdownConfigManualSource = {
                              source: 'manual-entry',
                              type: 'text',
          Severity: Minor
          Found in scripts/apps/authoring-react/fields/dropdown/config-main.tsx - About 1 hr to fix

            Function Package has 29 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            export function Package() {
                var solveRefs = function(item, groups) {
                    var items = {childId: '_items', childData: []};
                    var tree = [items];
            
            
            Severity: Minor
            Found in scripts/apps/packaging/directives/Package.ts - About 1 hr to fix

              Function ContentFiltersService has 29 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              export function ContentFiltersService(api, $filter) {
                  this.productionTestFilter = function(filter) {
                      return filter;
                  };
              
              
              Severity: Minor
              Found in scripts/apps/content-filters/services/ContentFiltersService.ts - About 1 hr to fix

                Function initSpikeGroups has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    function initSpikeGroups(isDesk) {
                        var spikeDesks: any = {};
                
                        if (self.spikeGroups.length > 0) {
                            self.spikeGroups.length = 0;
                Severity: Minor
                Found in scripts/apps/monitoring/controllers/AggregateCtrl.ts - About 1 hr to fix

                  Function _getFilters has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      _getFilters(params) {
                          let filters = [];
                  
                          // set filters for parameters
                          if (params.subject) {
                  Severity: Minor
                  Found in scripts/apps/content-api/services/ContentAPISearchService.ts - About 1 hr to fix

                    Function validateField has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        validateField(fieldName, value, e, diff) {
                            const fieldValidationErrors = this.state.errors;
                    
                            if (e && e.target.type === 'email') {
                                if (e.target.validity.typeMismatch) {
                    Severity: Minor
                    Found in scripts/apps/contacts/components/Form/ContactFormContainer.tsx - About 1 hr to fix

                      Function constructor has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          constructor($scope, $location, search, desks) {
                              this.lastQueryParams = {};
                              this.$location = $location;
                              this.search = search;
                              this.desks = desks;
                      Severity: Minor
                      Found in scripts/apps/archive/controllers/BaseListController.ts - About 1 hr to fix

                        Function buildPreferences has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                    function buildPreferences(data) {
                                        var buckets, // names of the needed metadata buckets
                                            initNeeded; // metadata service init needed?
                        
                                        scope.preferences = {};
                        Severity: Minor
                        Found in scripts/apps/users/directives/UserPreferencesDirective.ts - About 1 hr to fix

                          Function ProfilingController has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          export function ProfilingController($scope, api) {
                              $scope.profiling_data = [];
                              $scope.current_profile = null;
                              $scope.profiles = ['rest', 'publish:enqueue', 'publish:transmit'];
                              $scope.profile_names = {
                          Severity: Minor
                          Found in scripts/apps/profiling/controllers/ProfilingController.ts - About 1 hr to fix

                            Function ProfileService has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            export function ProfileService(api) {
                                var RESOURCE = 'activity';
                            
                                /**
                                 * Get all activity of single user, being it content related or not
                            Severity: Minor
                            Found in scripts/apps/users/services/ProfileService.ts - About 1 hr to fix

                              Function _updateDeskActions has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  this._updateDeskActions = function(currentItem, oldAction, userDesks) {
                                      let action = oldAction;
                                      let userPrivileges = privileges.privileges;
                              
                                      if (currentItem.task && currentItem.task.desk) {
                              Severity: Minor
                              Found in scripts/apps/authoring/authoring/services/AuthoringService.ts - About 1 hr to fix

                                Function SuggestionsCtrl has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                function SuggestionsCtrl($scope, userList, content) {
                                    getLabelNameResolver().then((getLabelForFieldId) => {
                                        const suggestions = Object.keys($scope.item[META_FIELD_NAME])
                                            .map((contentKey) => ({
                                                contentKey: contentKey,
                                Severity: Minor
                                Found in scripts/apps/authoring/track-changes/suggestions.ts - About 1 hr to fix

                                  Function PreviewFormattedDirective has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  export function PreviewFormattedDirective(api, notify, storage) {
                                      return {
                                          templateUrl: 'scripts/apps/authoring/views/preview-formatted.html',
                                          link: function(scope) {
                                              scope.loading = false;

                                    Function HistoryController has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    export function HistoryController(
                                        $scope,
                                        desks,
                                        api,
                                        highlightsService,
                                    Severity: Minor
                                    Found in scripts/apps/authoring/versioning/history/HistoryController.ts - About 1 hr to fix

                                      Function select has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                                  scope.select = function(item) {
                                                      var fieldObject: {[fieldId: string]: any} = {};
                                                      const isMultiInputField = scope.multiInputFields.includes(scope.field);
                                      
                                                      if (item) {
                                      Severity: Minor
                                      Found in scripts/apps/authoring/metadata/metadata.ts - About 1 hr to fix

                                        Function constructor has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            constructor(props) {
                                                super(props);
                                        
                                                this.services = {
                                                    $anchorScroll: ng.get('$anchorScroll'),
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language