working filtering. All that needs updating is the CSS cascading in the build process!
This commit is contained in:
parent
9316c299f4
commit
dfae48f943
7 changed files with 253 additions and 242 deletions
|
@ -1,13 +1,10 @@
|
|||
<script>
|
||||
import tabler from 'yesvelte/css/tabler.min.css?url';
|
||||
import daisyui from 'yesvelte/css/daisyui.min.css?url';
|
||||
import { Navbar, NavbarItem } from 'yesvelte'
|
||||
import { Navbar, NavbarItem } from 'yesvelte';
|
||||
import '../app.css';
|
||||
|
||||
|
||||
// you can change theme of your project from here.
|
||||
let theme = 'tabler';
|
||||
// let theme = 'daisyui';
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
|
|
|
@ -366,20 +366,30 @@
|
|||
technologies.forEach(function (tech) {
|
||||
var to_include = false;
|
||||
if (hasInstances(tech)) {
|
||||
console.log('instances: ', tech.instances);
|
||||
for (let instance in tech.instances) {
|
||||
console.log('instance = ', instance);
|
||||
//console.log('instances: ', tech.instances);
|
||||
for (let id in tech.instances) {
|
||||
console.log('id = ', id);
|
||||
console.log('field = ', field);
|
||||
let instance = tech.instances[id];
|
||||
let value = instance[field];
|
||||
console.log('field value = ', value);
|
||||
console.log('list = ', list);
|
||||
if (instance.hasOwnProperty(field)) {
|
||||
const intersection = inCommon([instance[field]], list);
|
||||
//const intersection = inCommon([instance[field]], list);
|
||||
const intersection = inCommon([value], list);
|
||||
if (intersection && intersection.constructor === Array) {
|
||||
console.log('intersection length: ', intersection.length);
|
||||
// if any one instance belonging to the tech is in the set, add the tech.
|
||||
if (intersection.length > 0) {
|
||||
console.log('setting to include ',instance.domain);
|
||||
if (instance.hasOwnProperty('domain')) {
|
||||
console.log('setting to include ',instance.domain);
|
||||
}
|
||||
to_include = true;
|
||||
} else {
|
||||
// if an instance doesn't belong in the set, remove it.
|
||||
tech.instances[instance.domain].pop();
|
||||
/*if (instance.hasOwnProperty('domain')) {
|
||||
tech.instances[instance.domain].pop();
|
||||
}*/
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
@ -482,21 +492,21 @@
|
|||
filteredTechnologies.length +
|
||||
' technologies...'
|
||||
);
|
||||
/*filteredTechnologies = filterTechnologiesByInstanceValue(
|
||||
filteredTechnologies = filterTechnologiesByInstanceValue(
|
||||
filteredTechnologies,
|
||||
'status',
|
||||
flattenFilter($statusFilter)
|
||||
)
|
||||
/*filteredTechnologies = filterTechnologiesByInstanceValue(
|
||||
filteredTechnologies = filterTechnologiesByInstanceValue(
|
||||
filteredTechnologies,
|
||||
'affiliate',
|
||||
'affiliation',
|
||||
flattenFilter($affiliateFilter)
|
||||
)
|
||||
filteredTechnologies = filterTechnologiesByInstanceValue(
|
||||
filteredTechnologies,
|
||||
'host',
|
||||
flattenFilter($hostFilter)
|
||||
)*/
|
||||
)
|
||||
|
||||
//filteredTechnologies = filterTechnologiesByCategoryList(results.all_services, flattenFilter($categoryFilter));
|
||||
console.log(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue