Fix RSS link

This commit is contained in:
Kevin Gaudin 2013-02-13 23:22:15 +01:00
parent 950914a70b
commit 4b5c4f64ac
7 changed files with 27 additions and 10 deletions

View File

@ -1,3 +1,6 @@
[
"^imgsrc"
"^imgsrc",
"^usertemplates",
"LICENSE",
"README.md"
]

View File

@ -1,3 +1,6 @@
[
"^imgsrc"
"^imgsrc",
"^usertemplates",
"LICENSE",
"README.md"
]

View File

@ -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>

View File

@ -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) {
@ -36,7 +35,7 @@ function CrashReportsCtrl($scope, ReportsStore) {
$scope.reports=[];
$scope.totalReports="";
});
}
};
$scope.loadReport = function(report) {
$scope.selectedReport = ReportsStore.reportDetails(report.id, function(data) {
@ -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);

View File

@ -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");

View File

@ -0,0 +1,7 @@
{
"_id": "org.couchdb.user:readeruser",
"name": "readeruser",
"roles": ["reader"],
"type": "user",
"password": "readerpassword"
}

View File

@ -0,0 +1,7 @@
{
"_id": "org.couchdb.user:reporteruser",
"name": "reporteruser",
"roles": ["reporter"],
"type": "user",
"password": "reporterpassword"
}