Skip to content

Commit

Permalink
Fix RSS link
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinGaudin committed Feb 13, 2013
1 parent 950914a commit 4b5c4f6
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 10 deletions.
5 changes: 4 additions & 1 deletion .couchappignore
@@ -1,3 +1,6 @@
[
"^imgsrc"
"^imgsrc",
"^usertemplates",
"LICENSE",
"README.md"
]
5 changes: 4 additions & 1 deletion .ericaignore
@@ -1,3 +1,6 @@
[
"^imgsrc"
"^imgsrc",
"^usertemplates",
"LICENSE",
"README.md"
]
2 changes: 1 addition & 1 deletion _attachments/partials/dashboard.html
Expand Up @@ -16,7 +16,7 @@

<div class="row-fluid">
<div id="content" ng-controller="CrashReportsCtrl" class="span12">
<div class="rss"><a href="{{rsslink}}"><img src="img/rss.png"></a></div>
<div class="rss"><a href="/acra-{{acralyzer.app}}/_design/acra-storage/_list/rss/recent-items?descending=true"><img src="img/rss.png"></a></div>
<span ng-bind-template="{{reports.length}} latest reports (out of {{totalReports}}):">Loading...</span>
<ul>
<li ng-repeat="report in reports" ng-cloak>
Expand Down
5 changes: 2 additions & 3 deletions _attachments/script/DashboardControllers.js
Expand Up @@ -19,7 +19,6 @@

function CrashReportsCtrl($scope, ReportsStore) {
$scope.selectedReport = "";
$scope.rsslink = "/acra-storage/_design/acra-storage/_list/rss/recent-items?descending=true";

$scope.getData = function() {
ReportsStore.recentReports(function(data) {
Expand All @@ -36,7 +35,7 @@ function CrashReportsCtrl($scope, ReportsStore) {
$scope.reports=[];
$scope.totalReports="";
});
}
};

$scope.loadReport = function(report) {
$scope.selectedReport = ReportsStore.reportDetails(report.id, function(data) {
Expand All @@ -48,7 +47,7 @@ function CrashReportsCtrl($scope, ReportsStore) {
data.formatedCrashDate = moment(data.USER_CRASH_DATE).format('LLL');
data.formatedTimestamp = moment(data.timestamp).format('LLL');
});
}
};

$scope.getData();
$scope.$on("refresh", $scope.getData);
Expand Down
6 changes: 2 additions & 4 deletions _attachments/script/acra-storage.js
Expand Up @@ -19,20 +19,18 @@

angular.module('acra-storage', ['ngResource']).
factory('ReportsStore', function($resource, $http) {
var appName = acralyzerConfig.defaultApp;
var dbName = acralyzerConfig.appDBPrefix + appName;
var lastseq = 0;
// ReportsStore service instance
var ReportsStore = {};

ReportsStore.setApp = function(newAppName) {
appName = newAppName;
var dbName = acralyzerConfig.appDBPrefix + newAppName;
ReportsStore.views = $resource('/' + dbName + '/_design/acra-storage/_view/:view');
ReportsStore.details = $resource('/' + dbName + '/:reportid');
ReportsStore.dbstate = $resource('/' + dbName + '/');
ReportsStore.changes = $resource('/' + dbName + '/_changes');
}
ReportsStore.setApp(appName);
ReportsStore.setApp(acralyzerConfig.defaultApp);

ReportsStore.listApps = function(cb, errorHandler) {
console.log("get _all_dbs");
Expand Down
7 changes: 7 additions & 0 deletions usertemplates/reader.json
@@ -0,0 +1,7 @@
{
"_id": "org.couchdb.user:readeruser",
"name": "readeruser",
"roles": ["reader"],
"type": "user",
"password": "readerpassword"
}
7 changes: 7 additions & 0 deletions usertemplates/reporter.json
@@ -0,0 +1,7 @@
{
"_id": "org.couchdb.user:reporteruser",
"name": "reporteruser",
"roles": ["reporter"],
"type": "user",
"password": "reporterpassword"
}

0 comments on commit 4b5c4f6

Please sign in to comment.