-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathhub.html
More file actions
148 lines (124 loc) · 4.55 KB
/
hub.html
File metadata and controls
148 lines (124 loc) · 4.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
---
layout: default
title: Hub
---
<header>
<h1>Operaton Hub</h1>
<p class="content">
This is the central hub for Operaton-related resources, including service extensions, plugins, applications, and more.
</p>
</header>
{% assign types = "Solution|Plugin|Add-on|Tool|Miscallaneous" | split: "|" %}
{% assign licenses = "Commercial|AGPL|Apache 2.0|BSD|EPL 2.0|LGPL|GPL|MIT|Other Open Source" | split: "|" %}
<div class="wrapper">
<noscript>
<em>
You can enable JavaScript to filter the table below.
</em>
</noscript>
<div id="filters" hidden>
<br>
<strong>Filter by offering</strong>
<fieldset>
<label for="type">Type</label>
<select id="type" name="type" onchange="filter_table(event)">
<option value="">any</option>
{% for t in types %}
<option value="{{ t | strip }}">{{ t }}</option>
{% endfor %}
</select>
<label for="license">License</label>
<select id="license" name="license" onchange="filter_table(event)">
<option value="">any</option>
<option value="Commercial">Commercial</option>
<option value="Open Source">Open Source</option>
</select>
</fieldset>
</div>
<br>
<table>
<caption>List of Operaton 3rd party solutions</caption>
<thead>
<tr>
<th scope="col">Name</th>
<th scope="col">Description</th>
<th scope="col">Type</th>
<th scope="col">License</th>
<th scope="col">Links</th>
</tr>
</thead>
<tbody id="results">
{% assign sorted_items = site.data.hub-items | sort: "name" %}
{% for item in sorted_items %}
<tr id="{{ item.name | slugify }}">
<td>
{% assign website_link = nil %}
{% for link in item.links %}
{% if link.label == "Website" %}
{% assign website_link = link %}
{% endif %}
{% endfor %}
{% if website_link %}
<a href="{{ website_link.url }}">{{ item.name }}</a>
{% else %}
{{ item.name }}
{% endif %}
</td>
<td class="description">{{ item.description }}</td>
<td class="tags">
<span>
{{ types[item.type] }}
</span>
</td>
<td class="tags">
<span>
{{ licenses[item.license] }}
</span>
</td>
<td>
{% for link in item.links %}
<a href="{{ link.url }}">{{ link.label }}</a>{% if forloop.last == false %}, {% endif %}
{% endfor %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
<br>
<p class="content"><b>Disclaimer</b>: Operaton is not responsible for the listed solutions to be compatible or functionally working. The vendors of the listed components are responsible for assuring the quality of their offering.
Please raise an issue when you think a component should be removed from this list.
</p>
<p class="content">If you would like to add your solution to appear on this list, please start a pull request with our <a href="https://github.com/operaton/operaton.org/issues/new?template=request-hub-entry.yml">issue template on GitHub</a>. </p>
<script>
const
filters = document.getElementById('filters'),
results = document.getElementById('results'),
tag_cells = document.querySelectorAll('.tags'),
show_type = document.getElementById('type'),
show_license = document.getElementById('license')
filters.hidden = false;
const filter_table = (e) => {
if (e) e.preventDefault()
const typeFilter = show_type.value.trim()
const licenseFilter = show_license.value.trim()
const rows = results.querySelectorAll('tr')
rows.forEach((row) => {
const tagTds = row.querySelectorAll('td.tags')
const typeText = tagTds[0] ? tagTds[0].textContent.replaceAll(/\s+/g, ' ').trim() : ''
const licenseText = tagTds[1] ? tagTds[1].textContent.replaceAll(/\s+/g, ' ').trim() : ''
const matchType = !typeFilter || typeText === typeFilter
let matchLicense = false
if (!licenseFilter) {
matchLicense = true
} else if (licenseFilter === 'Commercial') {
matchLicense = licenseText.includes('Commercial')
} else if (licenseFilter === 'Open Source') {
matchLicense = !licenseText.includes('Commercial') && licenseText.length > 0
}
row.style.display = (matchType && matchLicense) ? '' : 'none'
})
}
show_license.addEventListener('change', filter_table)
show_type.addEventListener('change', filter_table)
</script>