-
Notifications
You must be signed in to change notification settings - Fork 16
Feat/status board #198
base: develop
Are you sure you want to change the base?
Feat/status board #198
Changes from 129 commits
50bfbbd
0abc8c0
47d05aa
073d30f
97d4f03
5bdc40d
34d1e9e
744ce08
f2ea136
27d7f42
ee78278
83695b9
f72f806
c5a36bc
92372f3
70e3bec
fbf8e50
c3ac197
07d63eb
47aff3c
80c7284
ddc61b9
1159356
1f3e4b2
8114d89
d37b284
436d7c8
6305c8f
a8c0408
a70c6af
8408df6
479a15e
1cbc3f7
8c2f4a6
2f7adde
cb57c2c
4cb237a
ca0a583
02dea09
025f308
c19644e
53a081f
066df52
7190420
21c1ad9
5096e72
3d0f4a2
d734236
6deb59a
7a755c0
bc5ac37
57776f7
e6099d5
7cb1f80
27eebf9
d96d1a6
e630348
ad7699f
f5b1062
75df8fa
8e37e88
6078501
ca5bc32
8dbbe97
c74b3b8
31a2caf
a1dd5de
89bcf3c
71553e7
49e7133
d164cda
563a37c
659573a
1d0bada
fe91082
21deaa0
f6ac824
8c21f4f
f173f1b
613a228
17139f9
0219a09
bd2c996
45281f1
7ff6639
5602dc9
edadda6
44a13a4
3d80855
c68ba27
7321f34
551ca79
021ec72
48641e9
fb7dd5b
f604a97
598e039
837445e
a58b753
b79c54a
5f3b170
2763f2a
faff348
ded57f1
a19e3c0
25955d8
26ad252
9776516
ff5eabb
fcad2b7
01bd867
b58a54d
5c44719
87f55a8
8b30a9e
da1083e
ca89fdc
bde57e2
98db056
dd957d4
4525c4a
19d9e72
6412a79
d32cb42
15fc823
3f8da3c
3f2cae7
31ce206
9b6628e
a1e5d92
0b22837
63432c1
af4ef01
4387e54
b1b2c0e
1224fb1
0c5967a
18b5887
71815f1
87eb5e9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| module.exports = { | ||
| root: true, | ||
| parserOptions: { | ||
| ecmaVersion: 2017, | ||
| sourceType: 'module' | ||
| }, | ||
| extends: 'eslint:recommended', | ||
| env: { | ||
| browser: true | ||
| }, | ||
| rules: { | ||
| } | ||
| }; | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| import ApplicationAdapter from './application'; | ||
|
|
||
| export default ApplicationAdapter.extend({ | ||
| pathForType() { | ||
| return 'HarvestLog'; | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. update to match api (and remove this adapter probably) |
||
| }, | ||
| ajax(url, type, options) { | ||
| if (options) { | ||
| options.traditional = true; | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. remove, probably |
||
| } | ||
| return this._super(...arguments); | ||
| } | ||
| }); | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| import ApplicationAdapter from './application'; | ||
|
|
||
| export default ApplicationAdapter.extend({ | ||
| pathForType() { | ||
| return 'SourceConfig'; | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. remove this adapter (probably) |
||
| } | ||
| }); | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| import ApplicationAdapter from './application'; | ||
|
|
||
| export default ApplicationAdapter.extend({ | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. remove this adapter probably |
||
| pathForType() { | ||
| return 'sources'; | ||
| } | ||
| }); | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| import Ember from 'ember'; | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
|
||
| export default Ember.Component.extend({ | ||
| }); | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| import Ember from 'ember'; | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
|
||
| export default Ember.Component.extend({ | ||
| }); | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| import Ember from 'ember'; | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. delete empty component.js files also replace this component with a simple list of breadcrumbs, for now |
||
|
|
||
| export default Ember.Component.extend({ | ||
| }); | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| import Ember from 'ember'; | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. delete empty component.js |
||
|
|
||
| export default Ember.Component.extend({ | ||
|
|
||
| }); | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| import Ember from 'ember'; | ||
|
|
||
| export default Ember.Component.extend({ | ||
|
|
||
| store: Ember.inject.service(), | ||
|
|
||
| recentHarvest: Ember.computed('sourceConfig.id', 'status', function(){ | ||
| return this.get('store').query('harvest-log', { source_config_id: this.get('sourceConfig.id'), status: [2,3]} ); | ||
| }), | ||
|
|
||
| }); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| import Ember from 'ember'; | ||
|
|
||
| export default Ember.Component.extend({ | ||
| }); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| import Ember from 'ember'; | ||
|
|
||
| export default Ember.Component.extend({ | ||
| tagName: 'span', | ||
| }); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| import Ember from 'ember'; | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. delete |
||
|
|
||
| export default Ember.Component.extend({ | ||
| tagName: 'span', | ||
| }); | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| import Ember from 'ember'; | ||
|
|
||
| export default Ember.Controller.extend({ | ||
| queryParams: [ | ||
| 'page', | ||
| ], | ||
| page: 1, | ||
| atFirstPage: Ember.computed.equal('page', 1), | ||
| atLastPage: Ember.computed('page', 'meta.pagination.pages', function(){ | ||
| return this.get('page') === this.get('meta.pagination.pages'); | ||
| }), | ||
| actions: { | ||
| nextPage() { | ||
| let page = this.get('page'); | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. use |
||
| this.set('page', page + 1); | ||
| }, | ||
| prevPage() { | ||
| this.set('page', this.get('page') - 1); | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| } | ||
| } | ||
|
|
||
| }); | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| import Ember from 'ember'; | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. delete empty controller |
||
|
|
||
| export default Ember.Controller.extend({ | ||
|
|
||
| }); | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| import Ember from 'ember'; | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. delete empty controller |
||
|
|
||
| export default Ember.Controller.extend({ | ||
| }); | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| import Ember from 'ember'; | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. use |
||
|
|
||
| const equals = (params) => params[0] === params[1]; | ||
| export default Ember.Helper.helper(equals); | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| import DS from 'ember-data'; | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. delete |
||
|
|
||
| export default DS.Model.extend({ | ||
|
|
||
| }); | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| import DS from 'ember-data'; | ||
| import Model from 'ember-data/model'; | ||
|
|
||
| const { | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. prefer not this |
||
| attr, | ||
| } = DS; | ||
|
|
||
|
|
||
| export default Model.extend({ | ||
| sourceConfig: DS.belongsTo('source-config', {async: true}), | ||
|
|
||
| status: attr('string'), | ||
| context: attr('string'), | ||
| completions: attr('string'), | ||
| dateStarted: attr('string'), | ||
| endDate: attr('string'), | ||
| startDate: attr('string'), | ||
| harvesterVersion: attr('string'), | ||
| }); | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| import DS from 'ember-data'; | ||
| import Model from 'ember-data/model'; | ||
|
|
||
| const{ | ||
| attr, | ||
| }= DS; | ||
|
|
||
| export default Model.extend({ | ||
| harvestLog: DS.hasMany('harvest-log', {async: true}), | ||
|
|
||
| label: attr('string'), | ||
| base_url: attr('string'), | ||
| }); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| import DS from 'ember-data'; | ||
| import Model from 'ember-data/model'; | ||
|
|
||
| const { | ||
| attr, | ||
| } = DS; | ||
|
|
||
| export default Model.extend({ | ||
|
|
||
| long_Title: attr('string'), | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| name: attr('string'), | ||
| home_Page: attr('string'), | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| icon: attr('string') | ||
| }); | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,22 +21,29 @@ const Router = Ember.Router.extend({ | |
| }); | ||
|
|
||
| Router.map(function() { | ||
| this.route('changes'); | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. indentation |
||
| this.route('discover'); | ||
| this.route('profile'); | ||
| this.route('settings'); | ||
| this.route('sources'); | ||
| this.route('registration', function() { | ||
| this.route('form', { path: '/' }); | ||
| this.route('confirmation', { path: '/confirmation/' }); | ||
| this.route('changes'); | ||
| this.route('discover'); | ||
| this.route('profile'); | ||
| this.route('settings'); | ||
| this.route('sources'); | ||
| this.route('registration', function() { | ||
| this.route('form', { path: '/' }); | ||
| this.route('confirmation', { path: '/confirmation/' }); | ||
| }); | ||
|
|
||
| this.route('detail', { path: '/:type/:id' }); | ||
| this.route('curate', { path: '/curate/:type/:id' }); | ||
|
|
||
| this.route('elastic-down'); | ||
| this.route('notfound', { path: '/*path' }); | ||
| this.route('notfound'); | ||
|
|
||
| this.route('status', function() { | ||
| this.route('source-detail', { path: '/:label' }, function() { | ||
| this.route('log-detail', { path: '/:log_id'}); | ||
| }); | ||
|
|
||
| this.route('detail', { path: '/:type/:id' }); | ||
| this.route('curate', { path: '/curate/:type/:id' }); | ||
|
|
||
| this.route('elastic-down'); | ||
| this.route('notfound', { path: '/*path' }); | ||
| this.route('notfound'); | ||
| }); | ||
| }); | ||
|
|
||
|
|
||
| export default Router; | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| import Ember from 'ember'; | ||
|
|
||
| export default Ember.Route.extend({ | ||
| queryParams: { | ||
| page: { | ||
| refreshModel: true | ||
| } | ||
| }, | ||
| model(params) { | ||
| return this.get('store').query('source-config', params); | ||
| }, | ||
| }); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| import Ember from 'ember'; | ||
|
|
||
| export default Ember.Route.extend({ | ||
| model: function(params) { | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| return this.get('store').query('harvest-log', {source_config_id: params.id}); | ||
| }, | ||
| }); | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| import Ember from 'ember'; | ||
|
|
||
| export default Ember.Route.extend({ | ||
| model: function(params) { | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| return this.get('store').findRecord('harvest-log', params.logId); | ||
| } | ||
|
|
||
| }); | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| import ApplicationSerializer from './application'; | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. delete probably |
||
|
|
||
| export default ApplicationSerializer.extend({ | ||
|
|
||
| keyForAttribute: function(attr) { | ||
| return attr; | ||
| }, | ||
|
|
||
| keyForRelationship: function(key){ | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. add a keyForRelationship to the application serializer |
||
| return key; | ||
| }, | ||
|
|
||
| }); | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| import ApplicationSerializer from './application'; | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. delete empty serializer |
||
|
|
||
| export default ApplicationSerializer.extend({ | ||
| }); | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| import ApplicationSerializer from './application'; | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. delete empty serializer |
||
|
|
||
| export default ApplicationSerializer.extend({ | ||
|
|
||
| }); | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| {{yield}} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| <article class="harvest-log-list-breadcrumb-class"> | ||
|
|
||
| <ul class="breadcrumb"> | ||
| <li>{{#link-to "status.source-detail" label}}Harvest Log List{{/link-to}}</li> | ||
| </ul> | ||
|
|
||
| <div> | ||
| <style> | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. move styles to stylesheets |
||
| ul.breadcrumb{ | ||
| padding: 10px; | ||
| list-style: none; | ||
| background-color: #eee; | ||
| font-size: 17px; | ||
| } | ||
| ul.breadcrumb li {display: inline;} | ||
| ul.breadcrumb li+li:before { | ||
| padding: 8px | ||
| color: black; | ||
| content: "/\00a0"; | ||
| } | ||
| ul.breadcrumb li a { | ||
| color: #0275d8; | ||
| text-decoration: none; | ||
| } | ||
| ul.breadcrumb li a:hover { | ||
| color: #01447e; | ||
| text-decoration: underline; | ||
| } | ||
| </style> | ||
| </div> | ||
| </article> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| <div class="page-nav"> | ||
| <button class="btn btn-link" disabled={{atFirstPage}} {{action prevPage}}>Prev</button> | ||
| <button class="btn btn-link" disabled={{atLastPage}} {{action nextPage}}>Next</button> | ||
| </div> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| <article class="recent-harvest"> | ||
|
|
||
| {{#each recentHarvest as |hl|}} | ||
| {{#link-to "status.source-detail.log-detail" sourceConfig.label hl}} | ||
| <td> | ||
| {{#status-emoji status=hl.status}} | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this doesn't need to be a block, just |
||
| {{/status-emoji}} | ||
| </td> | ||
| {{/link-to}} | ||
| {{/each}} | ||
| </article> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| <article class="status-board-breadcrumb-class"> | ||
|
|
||
| <ul class="breadcrumb"> | ||
| <li>{{#link-to "status"}}Status Board{{/link-to}}</li> | ||
| </ul> | ||
|
|
||
| <div> | ||
| <style> | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. styles to a stylesheet |
||
| ul.breadcrumb{ | ||
| padding: 10px; | ||
| list-style: none; | ||
| background-color: #eee; | ||
| font-size: 17px; | ||
| } | ||
| ul.breadcrumb li {display: inline;} | ||
| ul.breadcrumb li+li:before { | ||
| padding: 8px | ||
| color: black; | ||
| content: "/\00a0"; | ||
| } | ||
| ul.breadcrumb li a { | ||
| color: #0275d8; | ||
| text-decoration: none; | ||
| } | ||
| ul.breadcrumb li a:hover { | ||
| color: #01447e; | ||
| text-decoration: underline; | ||
| } | ||
| </style> | ||
| </div> | ||
| </article> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| <article class="status-board-source"> | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. delete |
||
| {{title}} | ||
| </article> | ||

There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this file