superdesk/superdesk-client-core

View on GitHub

Showing 3,654 of 3,654 total issues

Function filterDataList has 28 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    filterDataList(event) {
        const {dataList, onChange, querySearch, onQuerySearch} = this.props;

        const value = event.target.value;

    Function getCriteria has 28 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        getCriteria(param) {
            let criteria: any = {};
            let params = param || this.$location.search();
            let sort = this.sort.getSort(this.sortOptions);
            let filters = [];
    Severity: Minor
    Found in scripts/apps/contacts/services/ContactsService.ts - About 1 hr to fix

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

          render() {
              const formConfig: IFormGroup = {
                  direction: 'vertical',
                  type: 'inline',
                  form: [
      Severity: Minor
      Found in scripts/apps/internal-destinations/InternalDestinations.tsx - About 1 hr to fix

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

            render() {
                const {user, displayStatus, displayAdministratorIndicator} = this.props;
        
                return (
                    <LazyOrNot {...this.props}>
        Severity: Minor
        Found in scripts/apps/users/components/UserAvatar.tsx - About 1 hr to fix

          Function uploadFile has 28 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              var uploadFile = function(item) {
                  var handleError = function(reason) {
                      if (reason && reason.data && reason.data.code) {
                          notify.error(gettext('Upload Error:') + ' ' + reason.data.code);
                      }
          Severity: Minor
          Found in scripts/apps/archive/controllers/UploadController.ts - About 1 hr to fix

            Function CommentTextDirective has 28 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function CommentTextDirective($compile) {
                return {
                    scope: {
                        comment: '=',
                    },
            Severity: Minor
            Found in scripts/apps/authoring/comments/comments.ts - About 1 hr to fix

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

                  render() {
                      const {loading, children} = this.props;
                      const style: CSSProperties = loading
                          ? {position: 'absolute', insetInlineStart: -9999, insetBlockStart: -9999, visibility: 'hidden'}
                          : {height: '100%'};
              Severity: Minor
              Found in scripts/apps/search/components/SmoothLoader.tsx - About 1 hr to fix

                Function fetchMetadataValues has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        fetchMetadataValues: function() {
                            var self = this;
                
                            return vocabularies.getAllActiveVocabularies().then((result) => {
                                _.each(result, (vocabulary) => {
                Severity: Minor
                Found in scripts/apps/authoring/metadata/metadata.ts - About 1 hr to fix

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

                      render() {
                          return (
                              <div className="sd-main-content-grid__preview open-preview">
                                  <div className="side-panel__container">
                                      <div className="side-panel side-panel--bg-00 side-panel--shadow-right">
                  Severity: Minor
                  Found in scripts/apps/master-desk/components/PreviewComponent.tsx - About 1 hr to fix

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

                        render() {
                            const props = this.props;
                    
                            const _flags = props.item.flags || {};
                            const elems = [
                    Severity: Minor
                    Found in scripts/apps/search/components/fields/flags.tsx - About 1 hr to fix

                      Function componentDidMount has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          componentDidMount() {
                              this._mounted = true;
                      
                              this.eventListenersToRemoveBeforeUnmounting.push(
                                  addWebsocketEventListener(
                      Severity: Minor
                      Found in scripts/apps/search/components/ItemListAngularWrapper.tsx - About 1 hr to fix

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

                            render() {
                                return (
                                    <React.Fragment>
                                        {this.props.item.translated_from != null && (
                                            <button
                        Severity: Minor
                        Found in scripts/apps/search/components/fields/translations.tsx - About 1 hr to fix

                          Function registerPage has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              function registerPage(page: IPage) {
                                  const params: any = {
                                      label: page.title,
                                      priority: page.priority ?? 100,
                                      adminTools: false,
                          Severity: Minor
                          Found in scripts/core/register-extensions.tsx - About 1 hr to fix

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

                                render() {
                                    const {h, v, gap, justifyContent, alignItems, noGrow, noWrap} = this.props;
                            
                                    const justifyContentDefault: IPropsSpacer['justifyContent'] = h ? 'space-between' : 'start';
                                    const alignItemsDefault: IPropsSpacer['alignItems'] = h ? 'center' : 'start';
                            Severity: Minor
                            Found in scripts/core/ui/components/Spacer.tsx - About 1 hr to fix

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

                                  render() {
                                      const {
                                          field,
                                          value,
                                          autoHeight,
                              Severity: Minor
                              Found in scripts/core/ui/components/Form/TextArea.tsx - About 1 hr to fix

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

                                        link: function(scope, elem) {
                                            var window = angular.element($window);
                                            var resize = _.debounce(calcSize, 300);
                                            var elementClass = scope.elementClass ? scope.elementClass : 'elementState';
                                
                                
                                Severity: Minor
                                Found in scripts/core/ui/ui.ts - About 1 hr to fix

                                  Function handleDown has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                                          handlers[Keys.down] = function handleDown() {
                                                              var nextElem = elem.find('button:focus')
                                                                      .parent('li')
                                                                      .next()
                                                                      .children('button'),
                                  Severity: Minor
                                  Found in scripts/core/ui/ui.ts - About 1 hr to fix

                                    Function sanitizeContent has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    export function sanitizeContent(editorState, styles = acceptedInlineStyles) {
                                        let contentState = editorState.getCurrentContent();
                                    
                                        const ignoreStyle = (style) => styles.indexOf(style) === -1;
                                        const getSelection = (block, start, end) => SelectionState.createEmpty(block.getKey()).merge({
                                    Severity: Minor
                                    Found in scripts/core/editor3/helpers/inlineStyles.ts - About 1 hr to fix

                                      Function BetaTemplateInterceptor has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      function BetaTemplateInterceptor($q, $templateCache, betaService) {
                                          var modifiedTemplates = {};
                                      
                                          var HAS_FLAGS_EXP = /sd-beta/,
                                              IS_HTML_PAGE = /\.html$|\.html\?/i;
                                      Severity: Minor
                                      Found in scripts/core/beta/beta.ts - About 1 hr to fix

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

                                            constructor(props: IPropsGenericForm<T, P> & IPropsConnected<T>) {
                                                super(props);
                                        
                                                // preview and edit mode can enabled at the same time, but only one pane will be displayed at once
                                                // if you start editing from preview mode, you shall return to preview after saving/cancelling the edit
                                        Severity: Minor
                                        Found in scripts/core/ui/components/ListPage/generic-list-page.tsx - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language