blob: 4b79da536aedb49b2424aded79900e74a05aa525 (
plain)
1
2
3
4
5
6
7
8
9
10
|
from config import render, db
class Feature(object):
def GET(self):
feature_count = db.query('SELECT FEATURE,COUNT(UUID) AS HOSTS FROM HOST_FEATURES NATURAL JOIN FEATURES GROUP BY FEATURE')
feature_data = dict()
for t in feature_count:
feature_data[t['FEATURE']] = {'HOSTS':t['HOSTS']}
return render.feature(feature_data)
|