feat: 🎸 Create time-remaining helper (#2012)
* feat: 🎸 create helper Create `time-remaining` helper to track remaining session time. ✅ Closes: https://hashicorp.atlassian.net/browse/ICU-10519 * refactor: 💡 Clean up code for time-remaining helper Moved time remaining helper into `core` addons folder. Cleaned up the `time-remaining` helper to use the `DurationUnitFormat` service. ✅ Closes: https://hashicorp.atlassian.net/browse/ICU-10519 * Update session.hbs removed test implementation * refactor: 💡 files added for helper files added for helper ✅ Closes: https://hashicorp.atlassian.net/browse/ICU-10519 * Update session.hbs fix linting * refactor: 💡 fix uneeded spacing Fix spacing on hbs file used for testing time-remaining helper ✅ Closes: https://hashicorp.atlassian.net/browse/ICU-10519 * refactor: 💡 refactor time-remaining helper Cleaned up code that was returning a string if `differenceInSeconds` was less than or equal to zero. Code is now conditionally checking in the `differenceInSeconds` variable if the `difference` is greater than zero. If it is not then it will return zero and let the `DurationUnitFormat` handle the rest. ✅ Closes: https://hashicorp.atlassian.net/browse/ICU-10519 * refactor: 💡 fix failing test Fix failing `time-remaining` test ✅ Closes: https://hashicorp.atlassian.net/browse/ICU-10519
This commit is contained in:
1 parent
3f2f2ba756
commit
f282dbb5b1
6 files changed
+82
No files matched your search
@@ -32,6 +32,13 @@ export default class GeneratedSessionModel extends BaseModel {
|
||||
})
|
||||
updated_time;
|
||||
|
||||
@attr('date', {
|
||||
description:
|
||||
'After this time the connection will be expired, e.g. forcefully terminated.\nOutput only.',
|
||||
readOnly: true,
|
||||
})
|
||||
expiration_time;
|
||||
|
||||
@attr('number', {
|
||||
description: 'Current version number of this resource.',
|
||||
})
|
||||
|
||||
Reference in new issue
Block a user