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