superdesk/superdesk-client-core

View on GitHub

Showing 3,654 of 3,654 total issues

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

    render() {
        const {config} = this.props;

        switch (config.source) {
        case 'manual-entry':
Severity: Minor
Found in scripts/apps/authoring-react/fields/dropdown/editor.tsx - About 1 hr to fix

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

        render() {
            const {value1, value2, config} = this.props;
            const {options} = config;
    
            const values1: Array<IDropdownOption> =

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

          render() {
              const {readOnly} = this.props;
      
              const AttachmentsEditor = CC.AuthoringAttachmentsWidget != null ?
                  CC.AuthoringAttachmentsWidget :

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

            render() {
                const Container = this.props.container;
                const {readOnly} = this.props;
        
                return (
        Severity: Minor
        Found in scripts/apps/authoring-react/fields/date/editor.tsx - About 1 hr to fix

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

                  render() {
                      const {item, onSelect} = this.props;
          
                      return (
                          <div>
          Severity: Minor
          Found in scripts/apps/authoring-react/fields/media/media-thumbnails.tsx - About 1 hr to fix

            Function edit has 33 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                this.edit = function(currentStep, displayOnlyCurrentStep) {
                    this.editGroups = {};
            
                    this.refreshGroups().then(() => {
                        var _groups = this.groups;
            Severity: Minor
            Found in scripts/apps/monitoring/controllers/AggregateCtrl.ts - About 1 hr to fix

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

                  render() {
                      const {renditions} = this.props;
                      const cropSizes =
                          sdApi.vocabularies.getAll()
                              .get('crop_sizes')

                Function saveFilter has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        $scope.saveFilter = function() {
                            delete $scope.contentFilter.article_id;
                
                            for (var i = 0; i < $scope.contentFilter.content_filter.length; i++) {
                                if (Object.keys($scope.contentFilter.content_filter[i].expression).length < 1) {

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

                      constructor(props: IProps) {
                          super(props);
                          const {svc, contact} = props;
                          const {metadata} = svc;
                  
                  
                  Severity: Minor
                  Found in scripts/apps/contacts/components/Form/ProfileDetail.tsx - About 1 hr to fix

                    Function UserListService has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    export function UserListService(api, $q, $cacheFactory) {
                        var userservice: any = {};
                    
                        var cache = $cacheFactory('userList');
                    
                    
                    Severity: Minor
                    Found in scripts/apps/users/services/UserListService.ts - About 1 hr to fix

                      Function cutoffPreviousRenditions has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      export function cutoffPreviousRenditions(update, origItem) {
                          const defaultRenditions = ['original', 'baseImage', 'thumbnail', 'viewImage'];
                          let updateRenditions = null;
                          let origRenditions = null;
                      
                      
                      Severity: Minor
                      Found in scripts/apps/authoring/authoring/helpers.ts - About 1 hr to fix

                        Function PopulateAuthorsController has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        export function PopulateAuthorsController($scope: IScope, roles: IRolesService, session: ISession) {
                            if (!$scope._editable) {
                                return;
                            }
                        
                        

                          Function themeSelectLink has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                  link: function themeSelectLink(scope, elem) {
                                      const DEFAULT_CLASS = 'main-article theme-container';
                          
                                      scope.themes = authThemes.availableThemes;
                          
                          
                          Severity: Minor
                          Found in scripts/apps/authoring/authoring/directives/ThemeSelectDirective.ts - About 1 hr to fix

                            Function interval has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                        const interval = setInterval(() => {
                                            if (Date.now() - loadingStartTimestamp > 5000) {
                                                // stop trying after 5s
                                                // there might not be inputs in authoring header configured
                                                clearInterval(interval);

                              Function bindMarkItemShortcut has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              export function bindMarkItemShortcut(label) {
                                  const currentActiveElement = document.activeElement instanceof HTMLElement ? document.activeElement : null;
                                  const keyboardManager = ng.get('keyboardManager');
                              
                                  angular.element('.active .more-activity-toggle-ref').click();
                              Severity: Minor
                              Found in scripts/apps/search/helpers.tsx - About 1 hr to fix

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

                                    constructor(props) {
                                        super(props);
                                
                                        this.state = {
                                            bindedShortcuts: [],
                                Severity: Minor
                                Found in scripts/apps/search/components/ItemList.tsx - About 1 hr to fix

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

                                      render() {
                                          if (this.props.previewOutput) {
                                              return <div data-test-id={`gform-output--${this.props.formField.field}`}>{this.props.value}</div>;
                                          }
                                  
                                  
                                  Severity: Minor
                                  Found in scripts/core/ui/components/generic-form/input-types/number.tsx - About 1 hr to fix

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

                                        render() {
                                            const keyedItems: {[key: string]: T} = keyBy(this.state.fetchedItems, (item) => item._id);
                                    
                                            return (
                                                <Select2
                                    Severity: Minor
                                    Found in scripts/core/ui/components/Autocomplete.tsx - About 1 hr to fix

                                      Function link has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                              link: function(scope, elem, attrs, ctrl) {
                                                  var invalidText = '<span id="required_span" class="sd-invalid-text">' +
                                                  gettext('This field is required') + '</span>';
                                      
                                                  scope.$watch(attrs.required, (required) => {
                                      Severity: Minor
                                      Found in scripts/core/ui/ui.ts - About 1 hr to fix

                                        Function parseTable has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            parseTable(data) {
                                                if (this.disabled.indexOf('table') > -1) {
                                                    return '';
                                                }
                                        
                                        
                                        Severity: Minor
                                        Found in scripts/core/editor3/html/to-html/AtomicBlockParser.ts - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language