-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add event card to new ui #1055
Conversation
579ebd9
to
2e14b43
Compare
import Route from '@ember/routing/route'; | ||
import { inject as service } from '@ember/service'; |
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.
import { inject as service } from '@ember/service'; | |
import { service } from '@ember/service'; |
const eventId = | ||
get(model, 'events.firstObject.id') === undefined | ||
? 0 | ||
: get(model, 'events.firstObject.id'); |
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.
const eventId = | |
get(model, 'events.firstObject.id') === undefined | |
? 0 | |
: get(model, 'events.firstObject.id'); | |
const eventId = model.events.firstObject.id; |
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.
app/v2/pipeline/events/route.js
Outdated
@@ -1,9 +1,38 @@ | |||
import Route from '@ember/routing/route'; | |||
import RSVP from 'rsvp'; | |||
import { inject as service } from '@ember/service'; |
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.
import { inject as service } from '@ember/service'; | |
import { service } from '@ember/service'; |
app/v2/pipeline/events/show/route.js
Outdated
@@ -1,9 +1,14 @@ | |||
import Route from '@ember/routing/route'; | |||
import { inject as service } from '@ember/service'; |
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.
import { inject as service } from '@ember/service'; | |
import { service } from '@ember/service'; |
app/v2/pipeline/index/route.js
Outdated
@@ -1,6 +1,20 @@ | |||
import Route from '@ember/routing/route'; | |||
import { inject as service } from '@ember/service'; |
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.
import { inject as service } from '@ember/service'; | |
import { service } from '@ember/service'; |
font-size: 14px; | ||
font-style: normal; |
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.
These should safe to remove
font-style: normal; | ||
font-weight: 400; |
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.
These should safe to remove
import { Promise as EmberPromise } from 'rsvp'; | ||
import Service from '@ember/service'; |
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.
import { Promise as EmberPromise } from 'rsvp'; | |
import Service from '@ember/service'; | |
import sinon from 'sinon'; |
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.
You'll need to add sinon
to the dev dependencies and can also remove ember-sinon
const userSettingsStub = Service.extend({ | ||
getUserPreference() { | ||
return new EmberPromise(resolve => { | ||
resolve({ | ||
timestampFormat: 'UTC' | ||
}); | ||
}); | ||
} | ||
}); | ||
|
||
this.owner.unregister('service:userSettings'); | ||
this.owner.register('service:userSettings', userSettingsStub); |
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.
const userSettingsStub = Service.extend({ | |
getUserPreference() { | |
return new EmberPromise(resolve => { | |
resolve({ | |
timestampFormat: 'UTC' | |
}); | |
}); | |
} | |
}); | |
this.owner.unregister('service:userSettings'); | |
this.owner.register('service:userSettings', userSettingsStub); | |
const userSettings = this.owner.lookup('service:user-settings'); | |
sinon.stub(userSettings, 'getUserPreference').resolves({timestampFormat: 'UTC'}); |
app/v2/pipeline/index/route.js
Outdated
beforeModel() { | ||
const { pipeline } = this.modelFor('v2.pipeline'); | ||
|
||
if (pipeline.get('childPipelines')) { |
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.
if (pipeline.get('childPipelines')) { | |
if (pipeline.childPipelines) { |
Context
Add event card and meta data info to event card
Objective
Build on top of #1040
Screenshot:
Regular Card
Card with parameters
References
License
I confirm that this contribution is made under the terms of the license found in the root directory of this repository's source tree and that I have the authority necessary to make this contribution on behalf of its copyright owner.