mirror of
https://github.com/discourse/discourse-rewind.git
synced 2025-07-07 22:32:11 +00:00
simple word cloud
This commit is contained in:
parent
5b916dcf1c
commit
e9e6d80eac
@ -27,7 +27,7 @@ module DiscourseRewind
|
||||
ndoc DESC,
|
||||
word
|
||||
LIMIT
|
||||
100
|
||||
5
|
||||
), lex AS (
|
||||
SELECT
|
||||
DISTINCT ON (lexeme) to_tsvector('english', word) as lexeme,
|
||||
|
@ -2,8 +2,16 @@ import Component from "@glimmer/component";
|
||||
|
||||
export default class WordCloud extends Component {
|
||||
<template>
|
||||
<div class="rewind-report-page">
|
||||
Word cloud
|
||||
<div class="rewind-report-page -word-cloud">
|
||||
<h3 class="rewind-report-title">Most used words</h3>
|
||||
<div class="rewind-report-container">
|
||||
{{#each-in @report.data as |word count|}}
|
||||
<div class="rewind-card">
|
||||
<span>{{word}}</span>
|
||||
<span>{{count}} times</span>
|
||||
</div>
|
||||
{{/each-in}}
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
}
|
||||
|
@ -113,16 +113,10 @@ export default class Rewind extends Component {
|
||||
<div class={{concatClass "rewind-report" report.identifier}}>
|
||||
{{#if (eq report.identifier "reactions")}}
|
||||
<Reactions @report={{report}} />
|
||||
<Reactions @report={{report}} />
|
||||
<Reactions @report={{report}} />
|
||||
<Reactions @report={{report}} />
|
||||
|
||||
{{else if (eq report.identifier "word-cloud")}}
|
||||
<WordCloud @report={{report}} />
|
||||
{{else if (eq report.identifier "activity-calendar")}}
|
||||
<ActivityCalendar @report={{report}} />
|
||||
<ActivityCalendar @report={{report}} />
|
||||
<ActivityCalendar @report={{report}} />
|
||||
<ActivityCalendar @report={{report}} />
|
||||
|
||||
{{/if}}
|
||||
{{!-- {{else if (eq report.identifier "fbff")}}
|
||||
<FBFF @report={{report}} />
|
||||
|
Loading…
x
Reference in New Issue
Block a user