Showing 3,654 of 3,654 total issues
Function render
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const props = this.props;
if (props.item.state != null) {
let title = getStateLabel(props.item.state);
Function init
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function init() {
if (!ready) {
ready = $q.all({
ingestProvidersById: ingestSources.initialize().then(() => {
setState({ingestProvidersById: ingestSources.providersLookup});
Function getItemsToLoad
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function getItemsToLoad<T>(
loadedItems: Map<number, T>,
totalItemsCount: number,
viewportIndexStart: number,
viewportIndexEnd: number,
Function render
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const spacing = this.props.padding ?? 10;
const borderRadius = this.props.borderRadius ?? 4;
return (
Function onKeyDown
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
onKeyDown(event) {
if (event) {
switch (event.keyCode) {
case KEYCODES.ENTER:
onEventCapture(event);
Function render
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const {error} = this.state;
return (
<form onSubmit={this.onSubmit} className="embed-dialog" onKeyUp={this.onKeyUp}>
Function insertEntity
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function insertEntity(
editorState: EditorState,
draftEntityType,
mutability,
data,
Function createHighlight
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
createHighlight(type, h, highlightId) {
if (type === 'ANNOTATION') {
return (
<AnnotationPopup
annotation={h}
Function BlockRendererComponent
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const BlockRendererComponent: React.StatelessComponent<any> = (props) => {
const {block, contentState} = props;
const entityKey = block.getEntityAt(0);
if (!entityKey) {
Function showPrintableModal
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function showPrintableModal(
Component: React.ComponentType<IPropsPrintableModal>,
) {
showModal(({closeModal}) => {
return (
Function _http
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_http: function(method, url, params, data) {
var created;
var options: any = {
method: method.toLowerCase(),
Function loadItems
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
loadItems(from, to): Promise<IRestApiResponse<any>> {
const pageSize = to - from;
const page = from === 0 ? 1 : Math.ceil(from / pageSize);
const withPagination = {
Function storeValue
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
storeValue: (value, fieldId, rundownItem, config, fieldType) => {
if (fieldType === 'editor3') {
const editor3Config = config as IEditor3Config;
const rawState = (value as IEditor3ValueStorage).rawContentState;
Function getMenuItems
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
getMenuItems(): Array<IMenuGroup> {
const {gettext} = superdeskApi.localization;
const filterActiveSets = (set: ISetItem) => (
this.props.availableSetIds.includes(set._id)
);
Function handleRotateTransitionEnd
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
handleRotateTransitionEnd() {
// avoid transition rerun after set scale
if (this.hasTransitionRun === true || this.videoRef.current == null) {
return;
}
Function getTemplateEditViewAuthoringStorage
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function getTemplateEditViewAuthoringStorage(article: IArticle): IAuthoringStorage<IArticle> {
class AutoSaveTemplate implements IAuthoringAutoSave<IArticle> {
get() {
return Promise.resolve(article);
}
Function getFieldV2
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
getFieldV2: (fieldEditor, fieldSchema) => {
const vocabulary = sdApi.vocabularies.getAll().get('urgency');
// HAS TO BE SYNCED WITH styles/sass/labels.scss
var defaultUrgencyColors = {
Function preview
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function preview(item) {
if (item) {
// for items from external source or if type is undefined.
if (item._type === 'externalsource') {
select(item);
Function link
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
link: function(scope) {
var currFilter;
function init() {
scope.matchingFilters = []; // used for filter search
Function link
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
link: function($scope, elem, attrs) {
function getMenuGroups() {
let intent: any = {};
if (_.get(attrs, 'sdIntentType')) {