Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 1 addition & 11 deletions pontoon/insights/chs.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
ALL_CONTRIBUTOR_STRING_THRESHOLD,
COMPLETION_POINTS,
ENABLED_PROJECT_POINTS,
KEY_PROJECT_SLUGS,
MANAGER_POINTS,
MANAGER_STRING_THRESHOLD,
NEW_SIGNUP_POINTS,
Expand All @@ -27,17 +28,6 @@
)


KEY_PROJECT_SLUGS = [
"firefox-for-android",
"firefox-for-ios",
"mozilla-monitor-website",
"firefox-relay-website",
"firefox",
"mozilla-accounts",
"mozilla-vpn-client",
]


def get_completion_by_locale(locales) -> dict[int, float]:
"""Locale-level completion %: (approved + warnings) / total * 100."""

Expand Down
20 changes: 16 additions & 4 deletions pontoon/insights/static/css/insights.css
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,22 @@
background: var(--black-3);
}

.cell {
vertical-align: bottom;
height: 44px;

a {
color: var(--status-translated-alt);
}

div {
margin-bottom: 6px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
}

&.show-score-view {
.info-container.base-view {
display: none;
Expand Down Expand Up @@ -141,10 +157,6 @@
color: var(--status-error);
}

&.equal {
color: var(--grey-1);
}

.fa-caret-up,
.fa-caret-down {
font-size: 1.4em;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<th class="new-signups" title="New Signups" data-sort="">
New<i class="fas"></i>
</th>
<th class="enabled-projects" title="Enabled Projects" data-sort="">
<th class="enabled-projects" title="Key Projects" data-sort="">
Projects<i class="fas"></i>
</th>
<th class="completion" title="Project Completion" data-sort="">
Expand All @@ -36,13 +36,11 @@
{% endmacro %}

{% macro delta_span(delta, percent=False) %}
{% if delta is not none %}
<span class="prev {% if delta > 0 %}up{% elif delta < 0 %}down{% else %}equal{% endif %}">
<i class="fas {% if delta > 0 %}fa-caret-up{% elif delta < 0 %}fa-caret-down{% else %}fa-minus{% endif %}"></i>
{% if delta != 0 %}
<span class="prev-string">{{ '+' if delta > 0 }}{{ delta }}{{ '%' if percent }}</span>
{% endif %}
</span>
{% if delta %}
<span class="prev {% if delta > 0 %}up{% else %}down{% endif %}">
<i class="fas {% if delta > 0 %}fa-caret-up{% else %}fa-caret-down{% endif %}"></i>
<span class="prev-string">{{ '+' if delta > 0 }}{{ delta }}{{ '%' if percent }}</span>
</span>
{% endif %}
{% endmacro %}

Expand Down Expand Up @@ -77,7 +75,7 @@

{% macro item(locale, main_link, curr_snapshot=None, base_deltas=None, score_deltas=None, columns=None, class='limited') %}
<tr class="{{ class }}">
<td class="code">
<td class="cell">
<div>
<a href="{{ main_link }}">{{ locale.code }}</a>
</div>
Expand Down
11 changes: 11 additions & 0 deletions pontoon/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1296,6 +1296,17 @@ def account_username(user):
ENABLED_PROJECT_POINTS = float(os.environ.get("ENABLED_PROJECT_POINTS", 4.0))
COMPLETION_POINTS = float(os.environ.get("COMPLETION_POINTS", 46.0))

KEY_PROJECT_SLUGS = os.environ.get(
"KEY_PROJECT_SLUGS",
"firefox-for-android,"
"firefox-for-ios,"
"mozilla-monitor-website,"
"firefox-relay-website,"
"firefox,"
"mozilla-accounts,"
"mozilla-vpn-client",
).split(",")

DEFAULT_AUTO_FIELD = "django.db.models.AutoField"

# Used in the header of the Terminology (.TBX) files.
Expand Down
Loading