Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
Frontend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Package Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
HUB Terra
SMS
Frontend
Commits
23694644
Commit
23694644
authored
3 years ago
by
Tobias Kuhnert
Browse files
Options
Downloads
Patches
Plain Diff
changed format of update information, now also displaying the time
parent
0cb80ef2
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!120
Resolve "Switch to date time picker for mount & unmount actions"
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
components/ConfigurationsSelectedItem.vue
+4
-4
4 additions, 4 deletions
components/ConfigurationsSelectedItem.vue
utils/dateHelper.ts
+7
-0
7 additions, 0 deletions
utils/dateHelper.ts
with
11 additions
and
4 deletions
components/ConfigurationsSelectedItem.vue
+
4
−
4
View file @
23694644
...
...
@@ -193,7 +193,7 @@ permissions and limitations under the Licence.
>
<v-list-item-content>
<v-list-item-title>
Update for {{ value.unpack().date | dateToString }}
Update for {{ value.unpack().date | dateTo
DateTime
String
HHMM
}}
</v-list-item-title>
</v-list-item-content>
</v-list-item>
...
...
@@ -203,7 +203,7 @@ permissions and limitations under the Licence.
>
<v-list-item-content>
<v-list-item-title>
Update for {{ selectedDate | dateToString }}
Update for {{ selectedDate | dateTo
DateTime
String
HHMM
}}
</v-list-item-title>
</v-list-item-content>
</v-list-item>
...
...
@@ -250,7 +250,7 @@ import { DeviceNode } from '@/viewmodels/DeviceNode'
import
{
IUnmountData
}
from
'
@/viewmodels/IUnmountData
'
import
{
PlatformNode
}
from
'
@/viewmodels/PlatformNode
'
import
{
dateToString
}
from
'
@/utils/dateHelper
'
import
{
dateTo
DateTime
String
HHMM
}
from
'
@/utils/dateHelper
'
/**
* A class component to display information about a selected tree node
...
...
@@ -261,7 +261,7 @@ import { dateToString } from '@/utils/dateHelper'
ConfigurationsSelectedItemUnmountForm
},
filters
:
{
dateToString
dateTo
DateTime
String
HHMM
}
})
// @ts-ignore
...
...
This diff is collapsed.
Click to expand it.
utils/dateHelper.ts
+
7
−
0
View file @
23694644
...
...
@@ -40,6 +40,13 @@ export const dateToString = (aDate: DateTime | null): string => {
return
aDate
.
setZone
(
'
UTC
'
).
toFormat
(
'
yyyy-MM-dd
'
)
}
export
const
dateToDateTimeStringHHMM
=
(
aDate
:
DateTime
|
null
):
string
=>
{
if
(
!
aDate
)
{
return
''
}
return
aDate
.
setZone
(
'
UTC
'
).
toFormat
(
'
yyyy-MM-dd HH:mm
'
)
}
export
const
stringToDate
=
(
aDate
:
string
):
DateTime
=>
{
return
DateTime
.
fromISO
(
aDate
,
{
zone
:
'
UTC
'
})
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment