Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
}
// Templates are not passed as a Firehose item since we only request template metadata.
if (projectTemplateMetadata) {
projectTemplateItems = this.normalizeTemplates(projectTemplateMetadata);
}
const items = [
...clusterServiceClassItems,
...imageStreamItems,
...templateItems,
...extensionItems,
...projectTemplateItems,
];
return _.sortBy(items, 'tileName');
}
render() {
// The content that will be shown below the "New Analysis" form.
let listContent;
if (this.props.analyses.length) {
// The components that detail individual analyses.
listContent = map(sortBy(this.props.analyses, "created_at").reverse(), (document, index) => (
));
} else {
listContent = ;
}
return (
<div>
{listContent}
this.setState({ show: false })}</div>
var detectDenseSmallSlices = function (finishedData) {
// This constant determines how many slices to use to calculate the
// average small slice percentage. The smaller the constant, the more it
// focuses on the smallest slices within the pie.
//
// Empirically, using a sample size of 2 works very well.
var smallSliceSampleSize = 2;
var sortedData = sortBy(finishedData, "percent");
var startIndex = 0;
var endIndex = Math.min(smallSliceSampleSize, sortedData.length);
var largestSlicePercent = last(sortedData).percent;
var averageSmallSlicesPercent = sortedData.slice(startIndex, endIndex).reduce(function(p,d) {
return d.percent / (endIndex - startIndex) + p;
}, 0);
// When slices smaller than 2.75 percent are concentrated in any location,
// there is a high probability of label intersections.
//
// However, empirical label intersect evidence has demonstrated that this
// threshold must be increased to 5% when there are multiple small slices
// from the 5 o'clock to 7 o'clock positions
if (averageSmallSlicesPercent <= 2.75) {
return true;
category: 'channel',
identifier: value.hashTagId,
name: value.orgName,
};
});
} else {
const frameworkTerms = _.get(_.find(this.categoryMasterList, { code: formFieldCategory.code }), 'terms');
formFieldCategory.range = _.union(formFieldCategory.range, frameworkTerms);
}
if (this.selectedLanguage !== 'en') {
formFieldCategory = this.utilService.translateLabel(formFieldCategory, this.selectedLanguage);
formFieldCategory.range = this.utilService.translateValues(formFieldCategory.range, this.selectedLanguage);
}
return true;
});
formFieldProperties = _.sortBy(_.uniqBy(formFieldProperties, 'code'), 'index');
return formFieldProperties;
}));
}
sortAndCapitaliseFilters (object) {
return _.sortBy(object, [(sort) => {
return sort.name = _.capitalize(sort.name); }]);
}
getEntries() {
let editorSession = this.context.editorSession
let resources = editorSession.resources
let entries = sortBy(resources, ['entityType', 'name'])
return entries
}
render() {
const docs = sortBy(
this.props.data.allDocumentationJs.edges.map(({ node }) => node),
docs => docs.name
)
return (
<title>Node API helpers</title>
<h1 id="gatsby-node-helpers-apis">
Gatsby Node API helpers
</h1>
function* saveOrder() {
try {
const state = yield select()
yield all(
_.map(
_.sortBy(
_.filter(
state.collections.items,
(item)=>item.parentId?true:false
),
({sort})=>sort
),
(item, index)=>(
put({
type: COLLECTION_UPDATE_REQ,
_id: item._id,
set: {
sort: parseInt(index)
}
})
)