Skip to content

Commit

Permalink
Add missing projects; gracefully fail when data isn't on replicas
Browse files Browse the repository at this point in the history
  • Loading branch information
MusikAnimal committed Nov 21, 2022
1 parent 7a09780 commit fb68aba
Show file tree
Hide file tree
Showing 22 changed files with 98 additions and 65 deletions.
4 changes: 3 additions & 1 deletion javascripts/pageviews/pageviews.js
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,9 @@ class PageViews extends mix(Pv).with(ChartHelpers) {
// But make sure we have editing totals first. We have to re-query to ensure an
// accurate number of "unique" editors.
this.getEditData(Object.keys(this.entityInfo.entities)).done(editData => {
Object.assign(this.entityInfo.totals, editData.totals);
if (editData.totals) {
Object.assign(this.entityInfo.totals, editData.totals);
}
this.updateChart();
});
} else if (this.initialQuery) {
Expand Down
6 changes: 6 additions & 0 deletions javascripts/pageviews/templates.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ const templates = {
const dataList = (entity, multiEntity = false) => {
let editsLink;

if (!$.isNumeric(entity.num_edits)) {
$('.legend-block--revisions .legend-block--body').html(
`<span class='text-muted'>${$.i18n('data-unavailable')}</span>`
);
}

if (multiEntity) {
editsLink = scope.formatNumber(entity.num_edits);
} else {
Expand Down
14 changes: 13 additions & 1 deletion javascripts/shared/site_map.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ const siteMap = {
'bawiki': 'ba.wikipedia.org',
'bawikibooks': 'ba.wikibooks.org',
'bclwiki': 'bcl.wikipedia.org',
'bclwikiquote': 'bcl.wikiquote.org',
'bclwiktionary': 'bcl.wiktionary.org',
'bdwikimedia': 'bd.wikimedia.org',
'be_x_oldwiki': 'be-tarask.wikipedia.org',
Expand All @@ -97,12 +98,15 @@ const siteMap = {
'biwikibooks': 'bi.wikibooks.org',
'biwiktionary': 'bi.wiktionary.org',
'bjnwiki': 'bjn.wikipedia.org',
'bjnwiktionary': 'bjn.wiktionary.org',
'blkwiki': 'blk.wikipedia.org',
'bmwiki': 'bm.wikipedia.org',
'bmwikibooks': 'bm.wikibooks.org',
'bmwikiquote': 'bm.wikiquote.org',
'bmwiktionary': 'bm.wiktionary.org',
'bnwiki': 'bn.wikipedia.org',
'bnwikibooks': 'bn.wikibooks.org',
'bnwikiquote': 'bn.wikiquote.org',
'bnwikisource': 'bn.wikisource.org',
'bnwikivoyage': 'bn.wikivoyage.org',
'bnwiktionary': 'bn.wiktionary.org',
Expand Down Expand Up @@ -306,6 +310,8 @@ const siteMap = {
'guwikiquote': 'gu.wikiquote.org',
'guwikisource': 'gu.wikisource.org',
'guwiktionary': 'gu.wiktionary.org',
'guwwiki': 'guw.wikipedia.org',
'guwwiktionary': 'guw.wiktionary.org',
'gvwiki': 'gv.wikipedia.org',
'gvwiktionary': 'gv.wiktionary.org',
'hakwiki': 'hak.wikipedia.org',
Expand Down Expand Up @@ -366,6 +372,8 @@ const siteMap = {
'iewikibooks': 'ie.wikibooks.org',
'iewiktionary': 'ie.wiktionary.org',
'igwiki': 'ig.wikipedia.org',
'igwikiquote': 'ig.wikiquote.org',
'igwiktionary': 'ig.wiktionary.org',
'iiwiki': 'ii.wikipedia.org',
'ikwiki': 'ik.wikipedia.org',
'ikwiktionary': 'ik.wiktionary.org',
Expand Down Expand Up @@ -411,6 +419,7 @@ const siteMap = {
'kawikiquote': 'ka.wikiquote.org',
'kawiktionary': 'ka.wiktionary.org',
'kbdwiki': 'kbd.wikipedia.org',
'kcgwiki': 'kcg.wikipedia.org',
'kgwiki': 'kg.wikipedia.org',
'kiwiki': 'ki.wikipedia.org',
'kjwiki': 'kj.wikipedia.org',
Expand Down Expand Up @@ -622,6 +631,7 @@ const siteMap = {
'pawikisource': 'pa.wikisource.org',
'pawiktionary': 'pa.wiktionary.org',
'pcdwiki': 'pcd.wikipedia.org',
'pcmwiki': 'pcm.wikipedia.org',
'pdcwiki': 'pdc.wikipedia.org',
'pflwiki': 'pfl.wikipedia.org',
'pihwiki': 'pih.wikipedia.org',
Expand Down Expand Up @@ -711,8 +721,9 @@ const siteMap = {
'sgwiktionary': 'sg.wiktionary.org',
'shiwiki': 'shi.wikipedia.org',
'shwiki': 'sh.wikipedia.org',
'shwiktionary': 'sh.wiktionary.org',
'shnwikivoyage': 'shn.wikivoyage.org',
'shnwiktionary': 'shn.wiktionary.org',
'shwiktionary': 'sh.wiktionary.org',
'shywiktionary': 'shy.wiktionary.org',
'simplewiki': 'simple.wikipedia.org',
'simplewikibooks': 'simple.wikibooks.org',
Expand Down Expand Up @@ -812,6 +823,7 @@ const siteMap = {
'tkwiktionary': 'tk.wiktionary.org',
'tlwiki': 'tl.wikipedia.org',
'tlwikibooks': 'tl.wikibooks.org',
'tlwikiquote': 'tl.wikiquote.org',
'tlwiktionary': 'tl.wiktionary.org',
'tnwiki': 'tn.wikipedia.org',
'tnwiktionary': 'tn.wiktionary.org',
Expand Down

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public_html/langviews/rev-manifest.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"application.css": "application-f47767145f.css",
"application.js": "application-bece282344.js"
"application.js": "application-9326102bd0.js"
}

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public_html/massviews/rev-manifest.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"application.css": "application-7286d337f9.css",
"application.js": "application-1263ed730c.js"
"application.js": "application-8821d7577b.js"
}

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public_html/mediaviews/rev-manifest.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"application.css": "application-3bf1ec0560.css",
"application.js": "application-e8dde1292e.js"
"application.js": "application-8827d2ce92.js"
}

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public_html/metaviews/rev-manifest.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"application.css": "application-f5bdd697bb.css",
"application.js": "application-baad805526.js"
"application.js": "application-409ba4eec0.js"
}

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public_html/pageviews/rev-manifest.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"application.css": "application-3dcd6fb5f1.css",
"application.js": "application-f3e320f008.js"
"application.js": "application-1879894cdb.js"
}

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public_html/redirectviews/rev-manifest.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"application.css": "application-fdf1362408.css",
"application.js": "application-1137330200.js"
"application.js": "application-e3d42010f6.js"
}

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public_html/siteviews/rev-manifest.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"application.css": "application-2601eddf2d.css",
"application.js": "application-b0027af6ce.js"
"application.js": "application-c30f84573f.js"
}

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public_html/topviews/rev-manifest.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"application.css": "application-bb96688189.css",
"application.js": "application-6f4672523f.js"
"application.js": "application-30acc7448b.js"
}

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public_html/userviews/rev-manifest.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"application.css": "application-2a788cbc1b.css",
"application.js": "application-98544b183f.js"
"application.js": "application-82a153572a.js"
}
12 changes: 12 additions & 0 deletions site_map.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
"bar.wikipedia.org": "barwiki",
"bat-smg.wikipedia.org": "bat_smgwiki",
"bcl.wikipedia.org": "bclwiki",
"bcl.wikiquote.org": "bclwikiquote",
"bcl.wiktionary.org": "bclwiktionary",
"bd.wikimedia.org": "bdwikimedia",
"be-tarask.wikipedia.org": "be_x_oldwiki",
Expand All @@ -93,11 +94,14 @@
"bi.wikipedia.org": "biwiki",
"bi.wiktionary.org": "biwiktionary",
"bjn.wikipedia.org": "bjnwiki",
"bjn.wiktionary.org": "bjnwiktionary",
"blk.wikipedia.org": "blkwiki",
"bm.wikibooks.org": "bmwikibooks",
"bm.wikipedia.org": "bmwiki",
"bm.wikiquote.org": "bmwikiquote",
"bm.wiktionary.org": "bmwiktionary",
"bn.wikibooks.org": "bnwikibooks",
"bn.wikiquote.org": "bnwikiquote",
"bn.wikipedia.org": "bnwiki",
"bn.wikisource.org": "bnwikisource",
"bn.wikivoyage.org": "bnwikivoyage",
Expand Down Expand Up @@ -302,6 +306,8 @@
"gu.wikiquote.org": "guwikiquote",
"gu.wikisource.org": "guwikisource",
"gu.wiktionary.org": "guwiktionary",
"guw.wikipedia.org": "guwwiki",
"guw.wiktionary.org": "guwwiktionary",
"gv.wikipedia.org": "gvwiki",
"gv.wiktionary.org": "gvwiktionary",
"ha.wikipedia.org": "hawiki",
Expand Down Expand Up @@ -362,6 +368,8 @@
"ie.wiktionary.org": "iewiktionary",
"iegcom.wikimedia.org": "iegcomwiki",
"ig.wikipedia.org": "igwiki",
"ig.wikiquote.org": "igwikiquote",
"ig.wiktionary.org": "igwiktionary",
"ii.wikipedia.org": "iiwiki",
"ik.wikipedia.org": "ikwiki",
"ik.wiktionary.org": "ikwiktionary",
Expand Down Expand Up @@ -408,6 +416,7 @@
"kab.wikipedia.org": "kabwiki",
"kbd.wikipedia.org": "kbdwiki",
"kbp.wikipedia.org": "kbpwiki",
"kcg.wikipedia.org": "kcgwiki",
"kg.wikipedia.org": "kgwiki",
"ki.wikipedia.org": "kiwiki",
"kj.wikipedia.org": "kjwiki",
Expand Down Expand Up @@ -618,6 +627,7 @@
"pam.wikipedia.org": "pamwiki",
"pap.wikipedia.org": "papwiki",
"pcd.wikipedia.org": "pcdwiki",
"pcm.wikipedia.org": "pcmwiki",
"pdc.wikipedia.org": "pdcwiki",
"pfl.wikipedia.org": "pflwiki",
"pi.wikipedia.org": "piwiki",
Expand Down Expand Up @@ -708,6 +718,7 @@
"sh.wikipedia.org": "shwiki",
"sh.wiktionary.org": "shwiktionary",
"shi.wikipedia.org": "shiwiki",
"shn.wikivoyage.org": "shnwikivoyage",
"shn.wiktionary.org": "shnwiktionary",
"shy.wiktionary.org": "shywiktionary",
"si.wikibooks.org": "siwikibooks",
Expand Down Expand Up @@ -807,6 +818,7 @@
"tk.wiktionary.org": "tkwiktionary",
"tl.wikibooks.org": "tlwikibooks",
"tl.wikipedia.org": "tlwiki",
"tl.wikiquote.org": "tlwikiquote",
"tl.wiktionary.org": "tlwiktionary",
"tn.wikipedia.org": "tnwiki",
"tn.wiktionary.org": "tnwiktionary",
Expand Down

0 comments on commit fb68aba

Please sign in to comment.