Skip to content

Commit

Permalink
Show object via JSON.stringfy
Browse files Browse the repository at this point in the history
  • Loading branch information
k1LoW committed Dec 16, 2016
1 parent dc0c4ac commit f9dd9af
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 8 deletions.
6 changes: 3 additions & 3 deletions dist/index.bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "faultline-front",
"version": "0.0.1",
"version": "0.2.0",
"description": "faultline front",
"main": "src/index.js",
"scripts": {
Expand Down
12 changes: 11 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,22 @@ riot.route('/projects/*/*', (project, message) => {
}
})
.then((res) => {
const omitted = _.omit(res.data.meta, ['project', 'message', 'backtrace', 'event']);
const omitted = _.omit(res.data.meta, [
'project',
'message',
'type',
'backtrace',
'timestamp',
'event',
'notifications'
]);
riot.mount('app', 'overview', {
project: res.data.meta.project,
message: res.data.meta.message,
type: res.data.meta.type,
meta: omitted,
backtrace: res.data.meta.backtrace,
timestamp: res.data.meta.timestamp,
items: res.data.timeline.errors,
c3: c3,
_: _,
Expand Down
14 changes: 11 additions & 3 deletions src/tags/overview.tag
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,22 @@

<h1 class="title">{ opts.message }</h1>
<div class="container">
<div each="{ k, v in opts.meta }">
<h3>{ k }</h3>
<pre><code>{ v }</code></pre>
<div>
<h3>type</h3>
<pre><code>{ opts.type }</code></pre>
</div>
<div>
<h3>timestamp</h3>
<pre><code>{ opts.timestamp }</code></pre>
</div>
<div>
<h3>backtrace</h3>
<pre><code>{ backtrace }</code></pre>
</div>
<div each="{ k, v in opts.meta }">
<h3>{ k }</h3>
<pre><code>{ JSON.stringify(v, null, 2) }</code></pre>
</div>
</div>
<div class="container">
<h3>timeline [{opts.moment(opts.start).format('YYYY-MM-DDTHH:mm:ssZZ')} - {opts.moment(opts.end).format('YYYY-MM-DDTHH:mm:ssZZ')}]</h3>
Expand Down

0 comments on commit f9dd9af

Please sign in to comment.