Showing 49 of 49 total issues
File actions.js
has 482 lines of code (exceeds 250 allowed). Consider refactoring. Open
import Ember from 'ember';
import modal from './modal';
import ComplexModel from '../privateclasses/complexmodel';
const exportData = function(component, format, joinchar) {
let data = [];
- Create a ticketCreate a ticket
Function confirm
has 90 lines of code (exceeds 25 allowed). Consider refactoring. Open
confirm() {
let validate = function() {
try {
return document.querySelector("#crudatable-update-data").checkValidity();
} catch (e) {
- Create a ticketCreate a ticket
`` has 28 functions (exceeds 20 allowed). Consider refactoring. Open
actions: Ember.Object.create({
internal_filterset() {
this.filterset.init();
this.set('filtercreation', true);
},
- Create a ticketCreate a ticket
Function init
has 80 lines of code (exceeds 25 allowed). Consider refactoring. Open
init: function() {
component = this;
component.set('paginator', component.get('paginator')());
if (component.get('parent')) {
var ct = component.get('parent').get('crud-table');
- Create a ticketCreate a ticket
Function dateFormat
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
const dateFormat = (function () {
let token = /d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,
timezone = /\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,
timezoneClip = /[^-+\dA-Z]/g,
pad = function (val, len) {
- Create a ticketCreate a ticket
Function internal_map
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
internal_map(record, kind) {
if (google === undefined) {
return;
}
- Create a ticketCreate a ticket
Function TypeAdjustments
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
const TypeAdjustments = function (component, Type, field, data, cfield, row) {
let fobj = component.get('fields')[field];
switch (Type) {
case 'check':
if (fobj.Value) {
- Create a ticketCreate a ticket
Function confirm
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
confirm() {
let validate = function() {
try {
return document.querySelector("#crudatable-update-data").checkValidity();
} catch (e) {
- Read upRead up
- Create a ticketCreate a ticket
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function generateLinks
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
generateLinks() {
const slots = 1;
const siblings = 3;
let cur = this.get('current');
let pages = this.get('pages');
- Create a ticketCreate a ticket
Function generateLinks
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
generateLinks() {
const slots = 1;
const siblings = 3;
let cur = this.get('current');
let pages = this.get('pages');
- Read upRead up
- Create a ticketCreate a ticket
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function default
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function (model) {
return Ember.Mixin.create({
isEditing: false,
actions: {
FetchData:function(query,deferred){
- Create a ticketCreate a ticket
Function init
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
init(component) {
let that = this;
this.target = $('#CrudTableDeleteRecordModal');
$('#CrudTableDeleteRecordModal').on('shown.bs.modal', function () {
that.promise.resolve();
- Create a ticketCreate a ticket
Function gen
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
gen() {
const string = "abcdefghijklmnopqrstuvwxyz"; //to upper
const numeric = '0123456789';
let punctuation = '!@#$%^&*()_+~`|}{[]\:;?><,./-=';
this.restrict_chars.forEach(function (char) {
- Create a ticketCreate a ticket
Function update
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
update(component) {
const trytest = component.get('value').get('isLoaded') === true ? component.get('value') : component.get('value').get('content');
let ComplexModel = [];
trytest.forEach(function (row) {
let CustomProperties = [];
- Create a ticketCreate a ticket
Function TypeAdjustments
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
const TypeAdjustments = function (component, Type, field, data, cfield, row) {
let fobj = component.get('fields')[field];
switch (Type) {
case 'check':
if (fobj.Value) {
- Read upRead up
- Create a ticketCreate a ticket
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function newCustomField
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
let newCustomField = function (component, field, data,row) {
return CustomField.create({
PlaceHolder:component.fields[field].PlaceHolder || null,
IsRequired:component.fields[field].IsRequired || false,
Pattern:component.fields[field].Pattern || null,
- Create a ticketCreate a ticket
Function toJSONObject
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
toJSONObject() {
let data = [];
this.get('ComplexModel').forEach(function(model) {
let row = {};
model.forEach(function(field) {
- Create a ticketCreate a ticket
Function exportData
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
const exportData = function(component, format, joinchar) {
let data = [];
let row = [];
component.labels.forEach(function(field) {
row.push(field.Display);
- Create a ticketCreate a ticket
Function internal_search
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
internal_search() {
let component = this;
let field = $("#SearchField").val();
Object.keys(component.fields).forEach(function(fieldname) {
if (component.fields[fieldname].Label === field) {
- Create a ticketCreate a ticket
Function gen
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
gen() {
const string = "abcdefghijklmnopqrstuvwxyz"; //to upper
const numeric = '0123456789';
let punctuation = '!@#$%^&*()_+~`|}{[]\:;?><,./-=';
this.restrict_chars.forEach(function (char) {
- Read upRead up
- Create a ticketCreate a ticket
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"