superdesk/superdesk-client-core

View on GitHub

Showing 3,654 of 3,654 total issues

Function MediaMetadata has 51 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export function MediaMetadata(userList, archiveService, metadata, $timeout) {
    return {
        scope: {
            item: '=',
        },
Severity: Major
Found in scripts/apps/archive/directives/MediaMetadata.ts - About 2 hrs to fix

    Function generateCrops has 51 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        function generateCrops(data) {
            const item = _.cloneDeep($scope.data.item);
            const renditions = _.cloneDeep($scope.data.renditions);
            const renditionNames = [];
            const savingImagePromises = [];
    Severity: Major
    Found in scripts/apps/authoring/authoring/controllers/ChangeImageController.ts - About 2 hrs to fix

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

          render() {
              return (
                  <div className="sd-kanban-list sd-pdding-x--2 sd-padding-t--2">
                      {
                          this.props.desks.map((desk) => {
      Severity: Major
      Found in scripts/apps/master-desk/components/UsersComponent.tsx - About 2 hrs to fix

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

            render() {
                const {item, page} = this.props;
                const formConfig = getFormConfig();
        
                return (
        Severity: Major
        Found in scripts/apps/system-messages/components/system-messages-settings.tsx - About 2 hrs to fix

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

              render() {
                  var listItems;
                  var className;
          
                  const articleDisplayWidgets = flatMap(
          Severity: Major
          Found in scripts/apps/search/components/ListItemInfo.tsx - About 2 hrs to fix

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

                render() {
                    const {label, value, labelKey, allowCustom, readOnly, invalid, required, onFocus, ...props} = this.props;
            
                    return (
                        <div>
            Severity: Major
            Found in scripts/core/ui/components/Form/SelectTagInput/index.tsx - About 2 hrs to fix

              Function onDrop has 51 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  onDrop(event) {
                      this.setState({over: false});
              
                      let handled = false;
                      const block = getEditorBlock(event);
              Severity: Major
              Found in scripts/core/editor3/components/BaseUnstyledComponent.tsx - About 2 hrs to fix

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

                    constructor() {
                        this.previewTitle = element(by.className('lightbox-title'));
                
                        this.switchToTab = function(name) {
                            element(by.id(name)).click();
                Severity: Major
                Found in e2e/client/specs/helpers/master_desks.ts - About 2 hrs to fix

                  File multi-edit-modal.tsx has 251 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  import {sdApi} from 'api';
                  import {Spacer} from 'core/ui/components/Spacer';
                  import {getArticleLabel, gettext} from 'core/utils';
                  import React from 'react';
                  import {IArticle, IAuthoringOptions, ITopBarWidget} from 'superdesk-api';
                  Severity: Minor
                  Found in scripts/apps/authoring-react/multi-edit-modal.tsx - About 2 hrs to fix

                    File search_spec.ts has 251 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    /* eslint-disable newline-per-chained-call */
                    
                    import {element, browser, protractor, by} from 'protractor';
                    
                    import {monitoring} from './helpers/monitoring';
                    Severity: Minor
                    Found in e2e/client/specs/search_spec.ts - About 2 hrs to fix

                      File content_filters_spec.ts has 251 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      /* tslint:disable:max-line-length */
                      
                      import {browser, protractor} from 'protractor';
                      
                      import {filterConditions} from './helpers/filter_conditions';
                      Severity: Minor
                      Found in e2e/client/specs/content_filters_spec.ts - About 2 hrs to fix

                        File users_spec.ts has 251 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        /* eslint-disable newline-per-chained-call */
                        
                        import {element, browser, protractor, by, $} from 'protractor';
                        import {el, els, ECE} from '@superdesk/end-to-end-testing-helpers';
                        
                        
                        Severity: Minor
                        Found in e2e/client/specs/users_spec.ts - About 2 hrs to fix

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

                              render() {
                                  const {gettext} = superdeskApi.localization;
                                  const {assertNever} = superdeskApi.helpers;
                          
                                  if (this.props.assets.length === 0) {
                          Severity: Minor
                          Found in scripts/extensions/sams/src/components/assets/assetListPanel.tsx - About 2 hrs to fix

                            Function getItemTemplate has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            function getItemTemplate(that: Editor) {
                                return class SortableItemComponent extends React.PureComponent<{item: IArticle}> {
                                    render() {
                                        const {item} = this.props;
                                        const {readOnly} = that.props;
                            Severity: Minor
                            Found in scripts/apps/authoring-react/fields/package-items/editor.tsx - About 2 hrs to fix

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

                                  render() {
                                      const {contentProfile} = this.props;
                                      const allFields = contentProfile.header.merge(contentProfile.content);
                                      const resolvedSuggestions = this.getResolvedSuggestions();
                              
                              
                              Severity: Minor
                              Found in scripts/apps/authoring-react/article-widgets/suggestions.tsx - About 2 hrs to fix

                                Function save has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    save(state: IStateLoaded<T>): Promise<T> {
                                        const {authoringStorage} = this.props;
                                
                                        if ((this.props.validateBeforeSaving ?? true) === true) {
                                            const {profile} = state;
                                Severity: Minor
                                Found in scripts/apps/authoring-react/authoring-react.tsx - About 2 hrs to fix

                                  Function getItemTemplate has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  function getItemTemplate(that: Editor) {
                                      return class SortableItemComponent extends React.PureComponent<{item: IArticle}> {
                                          render() {
                                              const {item} = this.props;
                                              const {readOnly} = that.props;
                                  Severity: Minor
                                  Found in scripts/apps/authoring-react/fields/linked-items/editor.tsx - About 2 hrs to fix

                                    Function LegalArchiveController has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    export function LegalArchiveController($scope, $location, legal, preferencesService) {
                                        var viewUpdate = {'archive:view': {
                                            allowed: ['mgrid', 'compact'],
                                            category: 'archive',
                                            view: 'mgrid',
                                    Severity: Minor
                                    Found in scripts/apps/legal-archive/controllers/LegalArchiveController.ts - About 2 hrs to fix

                                      Function getVersions has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          this.getVersions = function(item, deskService, versionType) {
                                              if (this.isLegal(item)) {
                                                  return api.find('legal_archive', item._id, {version: 'all', max_results: 200})
                                                      .then((result) => {
                                                          _.each(result._items, (version) => {
                                      Severity: Minor
                                      Found in scripts/apps/archive/services/ArchiveService.ts - About 2 hrs to fix

                                        Function WorkqueueCtrl has 16 arguments (exceeds 4 allowed). Consider refactoring.
                                        Open

                                            $scope,
                                            $rootScope,
                                            $route,
                                            workqueue: WorkqueueService,
                                            authoringWorkspace: AuthoringWorkspaceService,
                                        Severity: Major
                                        Found in scripts/apps/authoring/workqueue/workqueue.ts - About 2 hrs to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language