codecombat/app/templates/editor/campaign/campaign-editor-view.jade
Matt Lott 3fd5f49220 Analytics data revamp
Add analytics per-day aggregation collection.
Add analytics strings collection.
Add per-day aggregation mongo insertion script.
Update campaign editor to use aggregation collection.
Update queries to use _id instead of created field.
2015-01-14 11:09:01 -08:00

75 lines
2.9 KiB
Text

extends /templates/base
block header
if campaign.loading
nav.navbar.navbar-default(role='navigation')#campaign-editor-top-nav
.container-fluid
ul.nav.navbar-nav
li
a(href="/")
span.glyphicon-home.glyphicon
else
nav.navbar.navbar-default(role='navigation')#campaign-editor-top-nav
ul.nav.navbar-nav
li
a(href="/")
span.glyphicon-home.glyphicon
ul.nav.navbar-nav.navbar-right
if me.isAdmin()
li#save-button
a
span.glyphicon-floppy-disk.glyphicon
li.dropdown
a(data-toggle='dropdown')
span.glyphicon-chevron-down.glyphicon
ul.dropdown-menu
li.dropdown-header(data-i18n="common.actions") Actions
li(class=anonymous ? "disabled": "")
a(data-toggle="coco-modal", data-target="modal/RevertModal", data-i18n="editor.revert")#revert-button Revert
li(class=anonymous ? "disabled": "")
a(data-i18n="editor.pop_i18n")#pop-level-i18n-button Populate i18n
li.divider
li.dropdown-header(data-i18n="common.info") Info
block outer_content
.outer-content
#left-column
#campaign-treema
#right-column
#campaign-view
#campaign-level-view.hidden
if campaignCompletions
button.btn.btn-default#analytics-button(title="Analytics", data-toggle="modal" data-target="#analytics-modal") Analytics
.modal.fade#analytics-modal(tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true")
.modal-dialog
.modal-content
.modal-header
button.close(type="button", data-dismiss="modal", aria-label="Close")
span(aria-hidden="true") ×
h4.modal-title Analytics
.modal-body
if campaignCompletions.startDay
if campaignCompletions.endDay
div #{campaignCompletions.startDay} to #{campaignCompletions.endDay}
else
div #{campaignCompletions.startDay} to yesterday
table.table.table-bordered.table-condensed.table-hover(style='font-size:10pt')
thead
tr
td Level
td Started
td Finished
td Completion %
tbody
- for (var i = 0; i < campaignCompletions.levels.length; i++)
tr
td= campaignCompletions.levels[i].level
td= campaignCompletions.levels[i].started
td= campaignCompletions.levels[i].finished
td= campaignCompletions.levels[i].completionRate
else
button.btn.btn-default.disabled#analytics-button Analytics Loading...
block footer