superdesk/superdesk-client-core

View on GitHub

Showing 3,654 of 3,654 total issues

Function handleContentChanges has 46 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    handleContentChanges(_changes: Array<IResourceChange>) {
        const state = this.state;
        const dataInitialized = state.data != null;

        if (this.updatingRequestInProgress || dataInitialized !== true) {
Severity: Minor
Found in scripts/core/with-resources.tsx - About 1 hr to fix

    Function updateWhenImageIsReady has 46 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

                    function updateWhenImageIsReady() {
                        var $img = element.find('.image-point__image').get(0);
    
                        function drawPointsFromModel() {
                            drawPoint($img);
    Severity: Minor
    Found in scripts/core/upload/image-crop-directive.ts - About 1 hr to fix

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

          render() {
              class ItemComponent extends React.PureComponent<IPropsGenericFormItemComponent<IShow>> {
                  render() {
                      const {item, page} = this.props;
      
      
      Severity: Minor
      Found in scripts/extensions/broadcasting/src/shows/manage-shows.tsx - About 1 hr to fix

        Function toServerFormat has 45 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        export function toServerFormat(items: OrderedMap<string, ITagUi>, superdesk: ISuperdesk): IServerResponse {
            const {assertNever} = superdesk.helpers;
            const result: IServerResponse = {};
        
            items.forEach((item) => {
        Severity: Minor
        Found in scripts/extensions/auto-tagging-widget/src/adapter.ts - About 1 hr to fix

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

              render() {
                  const {gettext, longFormatDateTime, getRelativeOrAbsoluteDateTime} = superdeskApi.localization;
                  const {config} = superdeskApi.instance;
                  const {set, count, storageDestination} = this.props;
                  const storageDestinationText = storageDestination == null ?
          Severity: Minor
          Found in scripts/extensions/sams/src/components/sets/setListItem.tsx - About 1 hr to fix

            Function createTemplateFromArticle has 45 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function createTemplateFromArticle(
                // The new template will be based on this article
                sourceArticle: IArticle,
                templateName: string,
                selectedDeskId: IDesk['_id'] | null,
            Severity: Minor
            Found in scripts/api/templates.ts - About 1 hr to fix

              Function getUserTemplates has 45 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function getUserTemplates(
                  pageToFetch: number,
                  pageSize: number,
                  type: string,
                  searchString?: string,
              Severity: Minor
              Found in scripts/api/templates.ts - About 1 hr to fix

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

                    render(): JSX.Element {
                        const allDesks = sdApi.desks.getAllDesks();
                        const selectedDesks = (this.state.selectedDesks ?? []).map((id) => allDesks.get(id));
                
                        return (

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

                      render() {
                          const {field, fieldsData, canBeToggled, toggledOn} = this.props;
                          const FieldEditorConfig = getField(field.fieldType);
                  
                          const Container = this.getFieldContainer(

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

                        render() {
                            const {item, svc, flags, view, scope} = this.props;
                    
                            const contents: any = [
                                'div',
                    Severity: Minor
                    Found in scripts/apps/contacts/components/Item.tsx - About 1 hr to fix

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

                          constructor($scope, $location, pageTitle, preferencesService, metadata, privileges, contacts) {
                              this.$scope = $scope;
                              this.$location = $location;
                              this.contacts = contacts;
                      
                      
                      Severity: Minor
                      Found in scripts/apps/contacts/controllers/ContactsController.ts - About 1 hr to fix

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

                            render() {
                                const {item, page} = this.props;
                        
                                return (
                                    <ListItem
                        Severity: Minor
                        Found in scripts/apps/internal-destinations/InternalDestinations.tsx - About 1 hr to fix

                          Function rewrite has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              this.rewrite = function(item): void {
                                  var authoringWorkspace: AuthoringWorkspaceService = $injector.get('authoringWorkspace');
                          
                                  function getOnRewriteAfterMiddlewares()
                                  : Array<IExtensionActivationResult['contributions']['entities']['article']['onRewriteAfter']> {
                          Severity: Minor
                          Found in scripts/apps/authoring/authoring/services/AuthoringService.ts - About 1 hr to fix

                            Function ProductsFactory has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            export function ProductsFactory($q, api, contentFilters, $filter) {
                                /**
                                 * Recursivly returns all products
                                 *
                                 * @return {*}
                            Severity: Minor
                            Found in scripts/apps/products/services/ProductsFactory.ts - About 1 hr to fix

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

                                  render() {
                                      return (
                                          <Modal
                                              visible
                                              zIndex={1050}
                              Severity: Minor
                              Found in scripts/apps/authoring/attachments/AttachmentsEditorModal.tsx - About 1 hr to fix

                                Function RoutingWidgetController has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                function RoutingWidgetController(desks, privileges, api, notify, $scope) {
                                    this.canManage = privileges.privileges.desk_routing;
                                
                                    desks.initialize().then(() => {
                                        this.desk = desks.getCurrentDesk();
                                Severity: Minor
                                Found in scripts/apps/dashboard/closed-desk/index.ts - About 1 hr to fix

                                  Function TasksService has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  function TasksService(desks, $rootScope, api, datetimeHelper) {
                                      this.statuses = [
                                          {_id: 'todo', name: gettext('To Do')},
                                          {_id: 'in_progress', name: gettext('In Progress')},
                                          {_id: 'done', name: gettext('Done')},
                                  Severity: Minor
                                  Found in scripts/apps/dashboard/workspace-tasks/tasks.ts - About 1 hr to fix

                                    Function render has 45 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/plain-text.tsx - About 1 hr to fix

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

                                          render() {
                                              const {availableActions} = this.props;
                                      
                                              const actionsDropdownStyles: any = this.state.actionsDropdownOpen !== true ? {} : {
                                                  display: 'block',
                                      Severity: Minor
                                      Found in scripts/core/editor3/editorPopup/EditorHighlightsHeader.tsx - About 1 hr to fix

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

                                                link: function(scope, element) {
                                                    const MODEL_TIME_FORMAT = appConfig.model.timeformat;
                                                    const VIEW_TIME_FORMAT = appConfig.view.timeformat;
                                        
                                                    const POPUP = '.timepicker-popup';
                                        Severity: Minor
                                        Found in scripts/core/ui/ui.ts - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language