Showing 3,654 of 3,654 total issues
Function MonitoringController
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
export function MonitoringController($rootScope, $scope, $location, desks, superdeskFlags,
search, $filter, preferencesService, $q) {
Function DesksFactory
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
export function DesksFactory($q, api, preferencesService, userList, notify,
session, $filter, privileges, $rootScope) {
Function VocabularyConfigController
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
export function VocabularyConfigController($scope: IScope, $route, $routeParams, vocabularies, $rootScope,
api, notify, modal, session) {
Function SearchMenuController
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
$rootScope, $scope, $filter, $location, $route, searchProviderService, api, savedSearch,
privileges,
Function tagListItem
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const tagListItem = (node: ITreeNode<ITagUi>) => {
const isRootNodeWithChildren = node.parent == null && node.children != null;
const item = node.value;
return (
Function getFields
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function getFields(superdesk: ISuperdesk) {
const {gettext} = superdesk.localization;
const {FormFieldType} = superdesk.forms;
const nameField: IFormField = {
Function render
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
return (
<LayoutContainer>
{this.props.header && (
<HeaderPanel>
Function getAssetStateLabel
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function getAssetStateLabel(assetState: ASSET_STATE) {
const {gettext} = superdeskApi.localization;
switch (assetState) {
case ASSET_STATE.INTERNAL:
Function showSelectAssetModal
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
showSelectAssetModal() {
this.props.pushSearchParams({
sizeTo: superdeskApi.instance.config.attachments_max_size / 1048576, // bytes -> MB
states: [ASSET_STATE.PUBLIC, ASSET_STATE.INTERNAL],
setIds: this.props.activeSetIds,
Function patch
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
= fieldsFlat.reduce((acc, field, index) => {
let schemaPatch = {};
let editorPatch: Partial<IContentProfileEditorConfig[0]> = {};
acc[field.id] = {
Function getOptions
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function getOptions(
config: IDropdownConfigVocabulary,
getVocabularyOptions: (vocabularyId: IVocabulary['_id']) => Array<IVocabularyItem> = getOptionsDefault,
): ITreeWithLookup<IDropdownOption> {
const vocabularyItems: Array<IVocabularyItem> = getVocabularyOptions(config.vocabularyId);
Function getReadOnlyAndArchivedFrom
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const getReadOnlyAndArchivedFrom = (): Array<ITopBarWidget<IArticle>> => {
const actions: Array<ITopBarWidget<IArticle>> = [];
if (item._type === 'archived') {
actions.push({
Function render
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const {value1, value2, config} = this.props;
const values1 = (() => {
if (value1 == null) {
Function handleUnsavedChanges
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
handleUnsavedChanges(state: IStateLoaded<T>): Promise<T> {
return new Promise((resolve, reject) => {
if (!this.hasUnsavedChanges()) {
resolve(state.itemOriginal);
return;
Function getPackagesContentProfile
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function getPackagesContentProfile<T>(
item: IArticle,
fieldsAdapter: IFieldsAdapter<T>,
): Promise<IContentProfileV2> {
const headlineField: IAuthoringFieldV2 = {
Function getCommentsWidgetGeneric
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function getCommentsWidgetGeneric<T>(
getComments: (entityId: string) => Promise<Array<IComment>>,
addComment: (entityId: string, text: string) => Promise<void>,
isAllowed: (entity: T) => boolean,
) {
Function setFilterType
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
this.setFilterType = function(filterType, filterValue, $event?) {
if (filterType === 'contentProfile') {
if (!this.activeFilters.contentProfile.includes(filterValue._id)) {
this.activeFilters.contentProfile.push(filterValue._id);
const tag = {'key': filterValue._id, 'label': gettext(filterValue.label)};
Function render
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const {profile, fieldsData, fieldPadding} = this.props;
const allFields = profile.header.merge(profile.content);
return (
Function IngestDashboardController
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function IngestDashboardController($scope, ingestSources, preferencesService, notify) {
$scope.items = [];
$scope.dashboard_items = [];
$scope.fetchItems = function() {
Function getBaseFieldsAdapter
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function getBaseFieldsAdapter(): IFieldsAdapter<IArticle> {
const adapter: IFieldsAdapter<IArticle> = {
abstract: abstract,
anpa_category: anpa_category,
anpa_take_key: anpa_take_key,