Skip to content

Commit

Permalink
Merge pull request #3528 from apinf/apinf/Display-version-information…
Browse files Browse the repository at this point in the history
…-t0-administrators-3520

Display version information to administrators
  • Loading branch information
matleppa authored Jul 23, 2018
2 parents 527c7ee + 0b5cfc8 commit 2a28808
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 0 deletions.
20 changes: 20 additions & 0 deletions apinf_packages/about/client/about.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,26 @@ <h3>
<dd>
0.13
</dd>
<dt>
Version
</dt>
<dd id="show_version">
</dd>
<dt>
Branch
</dt>
<dd id="show_branch">
</dd>
<dt>
Commit
</dt>
<dd id="show_commit">
</dd>
<dt>
Tag
</dt>
<dd id="show_tag">
</dd>
</dl>
<h3>
{{_ "aboutApinf_copyrightLicense" }}
Expand Down
12 changes: 12 additions & 0 deletions apinf_packages/about/client/about.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// Meteor packages imports
import { Meteor } from 'meteor/meteor';
import { Template } from 'meteor/templating';

Template.aboutApinf.onRendered(() => {
Meteor.call('fetchVersionData', (error, result) => {
$('#show_version').text(result.version);
$('#show_branch').text(result.branch);
$('#show_commit').text(result.commit);
$('#show_tag').text(result.tag);
});
});
10 changes: 10 additions & 0 deletions apinf_packages/about/server/methods.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// Meteor packages imports
import { Meteor } from 'meteor/meteor';

Meteor.methods({
fetchVersionData () {
/* global Assets */
const myFile = JSON.parse(Assets.getText('versions.json'));
return myFile;
},
});
6 changes: 6 additions & 0 deletions private/versions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"version": "3.4",
"branch": "master",
"commit": "3332f6dcbde57105a8dc353e5e878651cab89856",
"tag": "1.2"
}

0 comments on commit 2a28808

Please sign in to comment.