superdesk/superdesk-client-core

View on GitHub

Showing 3,654 of 3,654 total issues

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

        link: function(scope, elem, attrs, ctrl) {
            const views = {};

            views[''] = {label: gettext('None')};
            views['list'] = {label: gettext('List View'), icon: 'list-view'};
Severity: Minor
Found in scripts/apps/desks/directives/DeskConfigModal.ts - About 1 hr to fix

    Function fetchProviders has 27 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

                    function fetchProviders() {
                        var criteria = criteria || {};
    
                        criteria.max_results = $location.search().max_results || 200;
                        criteria.page = $scope.searchPage || $location.search().page || 1;
    Severity: Minor
    Found in scripts/apps/ingest/directives/IngestSourcesContent.ts - About 1 hr to fix

      Function openPreviewForItem has 27 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          openPreviewForItem(subscriberId, format, endpointUrl) {
              const {itemId} = this.props;
              const urls = ng.get('urls');
      
              const nextWindow = window.open();
      Severity: Minor
      Found in scripts/apps/publish-preview/previewModal.tsx - About 1 hr to fix

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

            render() {
                const {selectedItemLabel, options, language, tabIndex, disabled} = this.props;
        
                const optionsWithTranslations = options.map((option) =>
                    ({label: getVocabularyItemNameTranslated(option, language), value: option.qcode, option}));

          Function getSortedFields has 27 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          export const getSortedFields = (
              section: 'header' | 'content',
              editor: any,
              item: IArticle,
              hideMedia: boolean,
          Severity: Minor
          Found in scripts/apps/authoring/preview/utils.ts - About 1 hr to fix

            Function mergeItems has 27 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                this.mergeItems = function(newItems, scopeItems, append, force) {
                    if (this.getElasticHighlight()) {
                        newItems._items = _.map(newItems._items, this.mergeHighlightFields);
                    }
            
            
            Severity: Minor
            Found in scripts/apps/search/services/SearchService.ts - About 1 hr to fix

              Function gettextReact has 27 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              const gettextReact = (
                  text: string,
                  params: {[placeholder: string]: string | number | React.ComponentType},
              ): Array<JSX.Element> => {
                  let matches: Array<{index: number, str: string, placeholder: string}> = [];
              Severity: Minor
              Found in scripts/core/utils.tsx - About 1 hr to fix

                Function query has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    query: (searchString: string, props) => {
                        const deskId = props.formValues[props.formField.component_parameters['deskField']];
                        const deskFilter = {desk: deskId};
                
                        if (deskId == null) {

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

                      render() {
                          const {field, value, readOnly, onFocus} = this.props;
                  
                          return (
                              <Row>
                  Severity: Minor
                  Found in scripts/core/ui/components/Form/FileInput.tsx - About 1 hr to fix

                    Function AuthExpiredInterceptor has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    function AuthExpiredInterceptor(session, $q, $injector, $browser, _) {
                        function handleAuthExpired(response) {
                            $browser.$$completeOutstandingRequest(angular.noop);
                            session.expire();
                            return session.getIdentity().then(() => {
                    Severity: Minor
                    Found in scripts/core/auth/auth.ts - About 1 hr to fix

                      Function onmessage has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              ws.onmessage = function(event) {
                                  var msg = angular.fromJson(event.data);
                      
                                  // Delay all websocket events to avoid getting old data.
                                  // The server is sending websocket events before it is able to return updated data.
                      Severity: Minor
                      Found in scripts/core/notification/notification.ts - About 1 hr to fix

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

                            render() {
                                return (
                                    <div>
                                        <select
                                            multiple
                        Severity: Minor
                        Found in scripts/core/ui/components/MultiSelect.tsx - About 1 hr to fix

                          Function entityStyleFn has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                  entityStyleFn: (entity: Draft.EntityInstance) => {
                                      if (entity.getType() === 'LINK') {
                                          const data = entity.getData();
                          
                                          if (data.url) {
                          Severity: Minor
                          Found in scripts/core/editor3/html/to-html/editor3StateToHtml.ts - About 1 hr to fix

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

                                render() {
                                    const {children, editorState} = this.props;
                                    const propsExcludingOwn = Object.keys(this.props)
                                        .filter((key) => (key !== 'children'))
                                        .reduce((obj, key) => {
                            Severity: Minor
                            Found in scripts/core/editor3/components/MultipleHighlights.tsx - About 1 hr to fix

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

                                  constructor(props) {
                                      super(props);
                              
                                      // when non-null, holds the entity whos URL is being edited
                                      this.entity = null;
                              Severity: Minor
                              Found in scripts/core/editor3/components/links/LinkInput.tsx - About 1 hr to fix

                                Function AllowedService has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                function AllowedService(_, api, $q) {
                                    var values;
                                
                                    function fetch() {
                                        if (values) {
                                Severity: Minor
                                Found in scripts/core/api/allowed.ts - About 1 hr to fix

                                  Function KeyEventBroadcast has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                          function KeyEventBroadcast($rootScope, $document, Keys, shiftNums) {
                                              var ignoreNodes = {
                                                  INPUT: true,
                                                  TEXTAREA: true,
                                                  BUTTON: true,
                                  Severity: Minor
                                  Found in scripts/core/keyboard/keyboard.ts - About 1 hr to fix

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

                                            link: function(scope, elem) {
                                                function setProgress(val) {
                                                    if (scope.progressWidth !== undefined) {
                                                        scope.progressWidth = val;
                                                    }
                                    Severity: Minor
                                    Found in scripts/core/upload/image-preview-directive.ts - About 1 hr to fix

                                      Function onload has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                                              img.onload = function() {
                                                                  scope.progressWidth = 80;
                                                                  var size = [this['width'], this['height']];
                                      
                                                                  if (size[0] < 200 || size[1] < 200) {
                                      Severity: Minor
                                      Found in scripts/core/upload/crop-directive.ts - About 1 hr to fix

                                        Function setupAuthoringReact has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        export const setupAuthoringReact = (url: string) => {
                                            const extensionUrls = flatMap(
                                                Object.values(extensions).map(({activationResult}) => activationResult),
                                                (activationResult) => activationResult.contributions?.pages ?? [],
                                            ).map((page) => page.url);
                                        Severity: Minor
                                        Found in scripts/core/menu/authoring-switch.ts - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language