Activity instead of History

New: Renamed history to activity
New: Queue is default tab of activity
pull/4/head
Mark McDowall 10 years ago
parent f8fb37bae8
commit 1225bbe8dc

@ -34,12 +34,12 @@ namespace NzbDrone.Automation.Test
} }
[Test] [Test]
public void history_page() public void activity_page()
{ {
page.HistoryNavIcon.Click(); page.ActivityNavIcon.Click();
page.WaitForNoSpinner(); page.WaitForNoSpinner();
page.FindByClass("iv-history-historylayout").Should().NotBeNull(); page.FindByClass("iv-activity-activitylayout").Should().NotBeNull();
} }
[Test] [Test]

@ -63,11 +63,11 @@ namespace NzbDrone.Automation.Test.PageModel
} }
} }
public IWebElement HistoryNavIcon public IWebElement ActivityNavIcon
{ {
get get
{ {
return FindByClass("x-history-nav"); return FindByClass("x-activity-nav");
} }
} }

@ -4,29 +4,29 @@ define(
'marionette', 'marionette',
'backbone', 'backbone',
'backgrid', 'backgrid',
'History/Table/HistoryTableLayout', 'Activity/History/HistoryLayout',
'History/Blacklist/BlacklistLayout', 'Activity/Blacklist/BlacklistLayout',
'History/Queue/QueueLayout' 'Activity/Queue/QueueLayout'
], function (Marionette, Backbone, Backgrid, HistoryTableLayout, BlacklistLayout, QueueLayout) { ], function (Marionette, Backbone, Backgrid, HistoryLayout, BlacklistLayout, QueueLayout) {
return Marionette.Layout.extend({ return Marionette.Layout.extend({
template: 'History/HistoryLayoutTemplate', template: 'Activity/ActivityLayoutTemplate',
regions: { regions: {
history : '#history', queueRegion : '#queue',
blacklist : '#blacklist', history : '#history',
queueRegion: '#queue' blacklist : '#blacklist'
}, },
ui: { ui: {
historyTab: '.x-history-tab', queueTab : '.x-queue-tab',
blacklistTab: '.x-blacklist-tab', historyTab : '.x-history-tab',
queueTab : '.x-queue-tab' blacklistTab : '.x-blacklist-tab'
}, },
events: { events: {
'click .x-queue-tab' : '_showQueue',
'click .x-history-tab' : '_showHistory', 'click .x-history-tab' : '_showHistory',
'click .x-blacklist-tab' : '_showBlacklist', 'click .x-blacklist-tab' : '_showBlacklist'
'click .x-queue-tab' : '_showQueue'
}, },
initialize: function (options) { initialize: function (options) {
@ -37,11 +37,14 @@ define(
onShow: function () { onShow: function () {
switch (this.action) { switch (this.action) {
case 'queue': case 'history':
this._showQueue(); this._showHistory();
break;
case 'blacklist':
this._showBlacklist();
break; break;
default: default:
this._showHistory(); this._showQueue();
} }
}, },
@ -54,9 +57,9 @@ define(
e.preventDefault(); e.preventDefault();
} }
this.history.show(new HistoryTableLayout()); this.history.show(new HistoryLayout());
this.ui.historyTab.tab('show'); this.ui.historyTab.tab('show');
this._navigate('/history'); this._navigate('/activity/history');
}, },
_showBlacklist: function (e) { _showBlacklist: function (e) {
@ -66,7 +69,7 @@ define(
this.blacklist.show(new BlacklistLayout()); this.blacklist.show(new BlacklistLayout());
this.ui.blacklistTab.tab('show'); this.ui.blacklistTab.tab('show');
this._navigate('/history/blacklist'); this._navigate('/activity/blacklist');
}, },
_showQueue: function (e) { _showQueue: function (e) {
@ -76,7 +79,7 @@ define(
this.queueRegion.show(new QueueLayout()); this.queueRegion.show(new QueueLayout());
this.ui.queueTab.tab('show'); this.ui.queueTab.tab('show');
this._navigate('/history/queue'); this._navigate('/activity/queue');
} }
}); });
}); });

@ -1,11 +1,11 @@
<ul class="nav nav-tabs"> <ul class="nav nav-tabs">
<li><a href="#queue" class="x-queue-tab no-router">Queue</a></li>
<li><a href="#history" class="x-history-tab no-router">History</a></li> <li><a href="#history" class="x-history-tab no-router">History</a></li>
<li><a href="#blacklist" class="x-blacklist-tab no-router">Blacklist</a></li> <li><a href="#blacklist" class="x-blacklist-tab no-router">Blacklist</a></li>
<li><a href="#queue" class="x-queue-tab no-router">Queue</a></li>
</ul> </ul>
<div class="tab-content"> <div class="tab-content">
<div class="tab-pane" id="queue"></div>
<div class="tab-pane" id="history"></div> <div class="tab-pane" id="history"></div>
<div class="tab-pane" id="blacklist"></div> <div class="tab-pane" id="blacklist"></div>
<div class="tab-pane" id="queue"></div>
</div> </div>

@ -1,7 +1,7 @@
'use strict'; 'use strict';
define( define(
[ [
'History/Blacklist/BlacklistModel', 'Activity/Blacklist/BlacklistModel',
'backbone.pageable', 'backbone.pageable',
'Mixins/AsSortedCollection', 'Mixins/AsSortedCollection',
'Mixins/AsPersistedStateCollection' 'Mixins/AsPersistedStateCollection'

@ -4,11 +4,11 @@ define(
'vent', 'vent',
'marionette', 'marionette',
'backgrid', 'backgrid',
'History/Blacklist/BlacklistCollection', 'Activity/Blacklist/BlacklistCollection',
'Cells/SeriesTitleCell', 'Cells/SeriesTitleCell',
'Cells/QualityCell', 'Cells/QualityCell',
'Cells/RelativeDateCell', 'Cells/RelativeDateCell',
'History/Blacklist/BlacklistActionsCell', 'Activity/Blacklist/BlacklistActionsCell',
'Shared/Grid/Pager', 'Shared/Grid/Pager',
'Shared/LoadingView', 'Shared/LoadingView',
'Shared/Toolbar/ToolbarLayout' 'Shared/Toolbar/ToolbarLayout'
@ -24,7 +24,7 @@ define(
LoadingView, LoadingView,
ToolbarLayout) { ToolbarLayout) {
return Marionette.Layout.extend({ return Marionette.Layout.extend({
template: 'History/Blacklist/BlacklistLayoutTemplate', template: 'Activity/Blacklist/BlacklistLayoutTemplate',
regions: { regions: {
blacklist : '#x-blacklist', blacklist : '#x-blacklist',

@ -4,11 +4,11 @@ define(
'jquery', 'jquery',
'vent', 'vent',
'marionette', 'marionette',
'History/Details/HistoryDetailsView' 'Activity/History/Details/HistoryDetailsView'
], function ($, vent, Marionette, HistoryDetailsView) { ], function ($, vent, Marionette, HistoryDetailsView) {
return Marionette.Layout.extend({ return Marionette.Layout.extend({
template: 'History/Details/HistoryDetailsLayoutTemplate', template: 'Activity/History/Details/HistoryDetailsLayoutTemplate',
regions: { regions: {
bodyRegion: '.modal-body' bodyRegion: '.modal-body'

@ -2,10 +2,10 @@
define( define(
[ [
'marionette', 'marionette',
'History/Details/HistoryDetailsAge' 'Activity/History/Details/HistoryDetailsAge'
], function (Marionette) { ], function (Marionette) {
return Marionette.ItemView.extend({ return Marionette.ItemView.extend({
template: 'History/Details/HistoryDetailsViewTemplate' template: 'Activity/History/Details/HistoryDetailsViewTemplate'
}); });
}); });

@ -1,7 +1,7 @@
'use strict'; 'use strict';
define( define(
[ [
'History/HistoryModel', 'Activity/History/HistoryModel',
'backbone.pageable', 'backbone.pageable',
'Mixins/AsFilteredCollection', 'Mixins/AsFilteredCollection',
'Mixins/AsSortedCollection', 'Mixins/AsSortedCollection',

@ -3,14 +3,14 @@ define(
[ [
'marionette', 'marionette',
'backgrid', 'backgrid',
'History/HistoryCollection', 'Activity/History/HistoryCollection',
'Cells/EventTypeCell', 'Cells/EventTypeCell',
'Cells/SeriesTitleCell', 'Cells/SeriesTitleCell',
'Cells/EpisodeNumberCell', 'Cells/EpisodeNumberCell',
'Cells/EpisodeTitleCell', 'Cells/EpisodeTitleCell',
'History/Table/HistoryQualityCell', 'Activity/History/HistoryQualityCell',
'Cells/RelativeDateCell', 'Cells/RelativeDateCell',
'History/Table/HistoryDetailsCell', 'Activity/History/HistoryDetailsCell',
'Shared/Grid/Pager', 'Shared/Grid/Pager',
'Shared/Toolbar/ToolbarLayout', 'Shared/Toolbar/ToolbarLayout',
'Shared/LoadingView' 'Shared/LoadingView'
@ -28,7 +28,7 @@ define(
ToolbarLayout, ToolbarLayout,
LoadingView) { LoadingView) {
return Marionette.Layout.extend({ return Marionette.Layout.extend({
template: 'History/Table/HistoryTableLayoutTemplate', template: 'Activity/History/HistoryLayoutTemplate',
regions: { regions: {
history: '#x-history', history: '#x-history',

@ -4,7 +4,7 @@ define(
'underscore', 'underscore',
'backbone', 'backbone',
'backbone.pageable', 'backbone.pageable',
'History/Queue/QueueModel', 'Activity/Queue/QueueModel',
'Mixins/backbone.signalr.mixin' 'Mixins/backbone.signalr.mixin'
], function (_, Backbone, PageableCollection, QueueModel) { ], function (_, Backbone, PageableCollection, QueueModel) {
var QueueCollection = PageableCollection.extend({ var QueueCollection = PageableCollection.extend({

@ -3,13 +3,13 @@ define(
[ [
'marionette', 'marionette',
'backgrid', 'backgrid',
'History/Queue/QueueCollection', 'Activity/Queue/QueueCollection',
'Cells/SeriesTitleCell', 'Cells/SeriesTitleCell',
'Cells/EpisodeNumberCell', 'Cells/EpisodeNumberCell',
'Cells/EpisodeTitleCell', 'Cells/EpisodeTitleCell',
'Cells/QualityCell', 'Cells/QualityCell',
'History/Queue/QueueStatusCell', 'Activity/Queue/QueueStatusCell',
'History/Queue/TimeleftCell', 'Activity/Queue/TimeleftCell',
'Shared/Grid/Pager' 'Shared/Grid/Pager'
], function (Marionette, ], function (Marionette,
Backgrid, Backgrid,
@ -22,7 +22,7 @@ define(
TimeleftCell, TimeleftCell,
GridPager) { GridPager) {
return Marionette.Layout.extend({ return Marionette.Layout.extend({
template: 'History/Queue/QueueLayoutTemplate', template: 'Activity/Queue/QueueLayoutTemplate',
regions: { regions: {
table: '#x-queue', table: '#x-queue',

@ -8,7 +8,7 @@ define(
return NzbDroneCell.extend({ return NzbDroneCell.extend({
className : 'queue-status-cell', className : 'queue-status-cell',
template : 'History/Queue/QueueStatusCellTemplate', template : 'Activity/Queue/QueueStatusCellTemplate',
render: function () { render: function () {
this.$el.empty(); this.$el.empty();

@ -3,7 +3,7 @@ define(
[ [
'underscore', 'underscore',
'marionette', 'marionette',
'History/Queue/QueueCollection' 'Activity/Queue/QueueCollection'
], function (_, Marionette, QueueCollection) { ], function (_, Marionette, QueueCollection) {
return Marionette.ItemView.extend({ return Marionette.ItemView.extend({
tagName: 'span', tagName: 'span',

@ -8,7 +8,7 @@ define(
'moment', 'moment',
'Calendar/Collection', 'Calendar/Collection',
'Shared/UiSettingsModel', 'Shared/UiSettingsModel',
'History/Queue/QueueCollection', 'Activity/Queue/QueueCollection',
'Config', 'Config',
'Mixins/backbone.signalr.mixin', 'Mixins/backbone.signalr.mixin',
'fullcalendar', 'fullcalendar',

@ -5,7 +5,7 @@ define(
'reqres', 'reqres',
'backbone', 'backbone',
'Cells/NzbDroneCell', 'Cells/NzbDroneCell',
'History/Queue/QueueCollection', 'Activity/Queue/QueueCollection',
'moment', 'moment',
'Shared/FormatHelpers' 'Shared/FormatHelpers'
], function (reqres, Backbone, NzbDroneCell, QueueCollection, moment, FormatHelpers) { ], function (reqres, Backbone, NzbDroneCell, QueueCollection, moment, FormatHelpers) {

@ -4,7 +4,7 @@ define(
'Shared/NzbDroneController', 'Shared/NzbDroneController',
'AppLayout', 'AppLayout',
'marionette', 'marionette',
'History/HistoryLayout', 'Activity/ActivityLayout',
'Settings/SettingsLayout', 'Settings/SettingsLayout',
'AddSeries/AddSeriesLayout', 'AddSeries/AddSeriesLayout',
'Wanted/WantedLayout', 'Wanted/WantedLayout',
@ -16,7 +16,7 @@ define(
], function (NzbDroneController, ], function (NzbDroneController,
AppLayout, AppLayout,
Marionette, Marionette,
HistoryLayout, ActivityLayout,
SettingsLayout, SettingsLayout,
AddSeriesLayout, AddSeriesLayout,
WantedLayout, WantedLayout,
@ -48,10 +48,10 @@ define(
this.showMainRegion(new WantedLayout({ action: action })); this.showMainRegion(new WantedLayout({ action: action }));
}, },
history: function (action) { activity: function (action) {
this.setTitle('History'); this.setTitle('Activity');
this.showMainRegion(new HistoryLayout({ action: action })); this.showMainRegion(new ActivityLayout({ action: action }));
}, },
rss: function () { rss: function () {
@ -73,7 +73,5 @@ define(
this.setTitle('Series Editor'); this.setTitle('Series Editor');
this.showMainRegion(new SeriesEditorLayout()); this.showMainRegion(new SeriesEditorLayout());
} }
}); });
}); });

@ -6,7 +6,7 @@ define(
'vent', 'vent',
'marionette', 'marionette',
'Cells/NzbDroneCell', 'Cells/NzbDroneCell',
'History/Details/HistoryDetailsView', 'Activity/History/Details/HistoryDetailsView',
'bootstrap' 'bootstrap'
], function ($, vent, Marionette, NzbDroneCell, HistoryDetailsView) { ], function ($, vent, Marionette, NzbDroneCell, HistoryDetailsView) {
return NzbDroneCell.extend({ return NzbDroneCell.extend({

@ -3,7 +3,7 @@ define(
[ [
'marionette', 'marionette',
'backgrid', 'backgrid',
'History/HistoryCollection', 'Activity/History/HistoryCollection',
'Cells/EventTypeCell', 'Cells/EventTypeCell',
'Cells/QualityCell', 'Cells/QualityCell',
'Cells/RelativeDateCell', 'Cells/RelativeDateCell',

@ -24,7 +24,7 @@ define(
Handlebars.registerHelper('StatusLevel', function () { Handlebars.registerHelper('StatusLevel', function () {
var hasFile = this.hasFile; var hasFile = this.hasFile;
var downloading = require('History/Queue/QueueCollection').findEpisode(this.id) || this.downloading; var downloading = require('Activity/Queue/QueueCollection').findEpisode(this.id) || this.downloading;
var currentTime = moment(); var currentTime = moment();
var start = moment(this.airDateUtc); var start = moment(this.airDateUtc);
var end = moment(this.end); var end = moment(this.end);

@ -4,7 +4,7 @@ define(
'marionette', 'marionette',
'jquery', 'jquery',
'Health/HealthView', 'Health/HealthView',
'History/Queue/QueueView', 'Activity/Queue/QueueView',
'Navbar/Search' 'Navbar/Search'
], function (Marionette, $, HealthView, QueueView) { ], function (Marionette, $, HealthView, QueueView) {
return Marionette.Layout.extend({ return Marionette.Layout.extend({

@ -23,7 +23,7 @@
<ul class="nav navbar-nav"> <ul class="nav navbar-nav">
<li><a href="{{UrlBase}}/" class="x-series-nav"><i class="icon-play"></i> Series</a></li> <li><a href="{{UrlBase}}/" class="x-series-nav"><i class="icon-play"></i> Series</a></li>
<li><a href="{{UrlBase}}/calendar" class="x-calendar-nav"><i class="icon-calendar"></i> Calendar</a></li> <li><a href="{{UrlBase}}/calendar" class="x-calendar-nav"><i class="icon-calendar"></i> Calendar</a></li>
<li><a href="{{UrlBase}}/history" class="x-history-nav"><i class="icon-time"></i> History<span id="x-queue-count" class="navbar-info"></span></a></li> <li><a href="{{UrlBase}}/activity" class="x-activity-nav"><i class="icon-time"></i> Activity<span id="x-queue-count" class="navbar-info"></span></a></li>
<li><a href="{{UrlBase}}/wanted" class="x-wanted-nav"><i class="icon-warning-sign"></i> Wanted</a></li> <li><a href="{{UrlBase}}/wanted" class="x-wanted-nav"><i class="icon-warning-sign"></i> Wanted</a></li>
<li><a href="{{UrlBase}}/settings" class="x-settings-nav"><i class="icon-cogs"></i> Settings</a></li> <li><a href="{{UrlBase}}/settings" class="x-settings-nav"><i class="icon-cogs"></i> Settings</a></li>
<li><a href="{{UrlBase}}/system" class="x-system-nav"><i class="icon-laptop"></i> System<span id="x-health" class="navbar-info"></span></a></li> <li><a href="{{UrlBase}}/system" class="x-system-nav"><i class="icon-laptop"></i> System<span id="x-health" class="navbar-info"></span></a></li>

@ -16,8 +16,10 @@ define(
'settings/:action(/:query)' : 'settings', 'settings/:action(/:query)' : 'settings',
'wanted' : 'wanted', 'wanted' : 'wanted',
'wanted/:action' : 'wanted', 'wanted/:action' : 'wanted',
'history' : 'history', 'history' : 'activity',
'history/:action' : 'history', 'history/:action' : 'activity',
'activity' : 'activity',
'activity/:action' : 'activity',
'rss' : 'rss', 'rss' : 'rss',
'system' : 'system', 'system' : 'system',
'system/:action' : 'system', 'system/:action' : 'system',

@ -7,7 +7,7 @@ define(
'Series/Edit/EditSeriesView', 'Series/Edit/EditSeriesView',
'Series/Delete/DeleteSeriesView', 'Series/Delete/DeleteSeriesView',
'Episode/EpisodeDetailsLayout', 'Episode/EpisodeDetailsLayout',
'History/Details/HistoryDetailsLayout', 'Activity/History/Details/HistoryDetailsLayout',
'System/Logs/Table/Details/LogDetailsView', 'System/Logs/Table/Details/LogDetailsView',
'Rename/RenamePreviewLayout' 'Rename/RenamePreviewLayout'
], function (vent, AppLayout, Marionette, EditSeriesView, DeleteSeriesView, EpisodeDetailsLayout, HistoryDetailsLayout, LogDetailsView, RenamePreviewLayout) { ], function (vent, AppLayout, Marionette, EditSeriesView, DeleteSeriesView, EpisodeDetailsLayout, HistoryDetailsLayout, LogDetailsView, RenamePreviewLayout) {

Loading…
Cancel
Save