Showing 12,628 of 12,628 total issues
Function createPages
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function createPages(
labels,
maxColumns,
maxRows,
divisor,
Function useScroll
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function useScroll (elementRef) {
const scroll = reactive({
x: 0,
y: 0
})
Function makeInitialState
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function makeInitialState() {
return {
settings: {
loadingRows: false,
loadingColumns: false,
Function bind_radio_buttons
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
bind_radio_buttons: function () { // for regex match table
$('.select_dates').click(function () {
// selector not working
var start_date = $(this).parent().parent('.extract_row').children('.start_date_value').text();
var end_date = $(this).parent().parent('.extract_row').children('.end_date_value').text();
Function addToPinboard
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
addToPinboard(object) {
const insertedItem = this.getInsertedPin(object)
const pinboardItemElement = this.createPinboardItem(object)
let sectionElement = document.querySelector(
`[data-pinboard-section="${object.pinned_object_section}"]`
Function saveAssertedDistribution
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async saveAssertedDistribution() {
if (!this.isSaveAvailable) return
const assertedDistribution = makeAssertedDistributionPayload({
ad: this.assertedDistribution,
Function handleClickCategoryFilter
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function handleClickCategoryFilter(e) {
const element = e.target
const elementFilter = element.getAttribute('data-filter-category')
const activated = element.classList.contains('activated')
const allBtns = [
Function init
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function init(element) {
const model = element.getAttribute('data-smart-selector-model')
const target = element.getAttribute('data-smart-selector-target')
const klass = element.getAttribute('data-smart-selector-klass')
const fieldObject = element.getAttribute('data-smart-selector-field-object')
Method syncronize_otus
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def syncronize_otus(taxon_name_id: nil, user_id: nil, mode: :all_valid)
return false if mode.nil? || taxon_name_id.nil? || user_id.nil?
t = TaxonName.find(taxon_name_id)
i = 0
names = case mode
Method related_summary
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def related_summary(ids)
h = { restrict: {}, destroy: {} }
objects = self.where(id: ids)
base = self.table_name.to_sym
Method api_index
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def api_index
q = ::Queries::BiologicalAssociation::Filter.new(params.merge!(api: true)).all
.where(project_id: sessions_current_project_id)
.order('biological_associations.id')
Method batch_create_match_georeferences
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def batch_create_match_georeferences
message = ''
respond_to do |format|
format.json {
# we want to repackage the checkmarks we get from the client side into an array of ids with which
Method drawn_collecting_events
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def drawn_collecting_events
message = ''
value = params['ce_geographic_item_attributes_shape']
if value.blank?
@collecting_events = CollectingEvent.where('false')
Method drawn_georeferences
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def drawn_georeferences
message = ''
value = params['gr_geographic_item_attributes_shape']
if value.blank?
@georeferences = Georeference.where('false')
Method build_descriptors
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def build_descriptors
i = 0
csv.each do |row|
parse_result = BatchLoad::RowParse.new
Method data_class_summary
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def data_class_summary
@klass = params.require(:klass)&.safe_constantize
@time_span = params.require(:time_span)
@target = params.require(:target)
@projects = params[:project_id].blank? ? Project.all : Project.where(id: params[:project_id])
Method build_otus
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def build_otus
@total_data_lines = 0
i = 0
# loop through rows
Method autocomplete
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def autocomplete
return [] if query_string.blank?
queries = [
autocomplete_recipient_email,
Method initialize
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def initialize(query_params = {})
super
@active_after_year = params[:active_after_year]
@active_before_year = params[:active_before_year]
Method generate
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def self.generate(otus, project_members, reference_csv = nil )
::CSV.generate(col_sep: "\t") do |csv|
csv << %w{
taxonID