Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jérome Perrin
gitlab-ce
Commits
5823a191
Commit
5823a191
authored
Mar 22, 2018
by
George Tsiolis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move TimeTrackingComparisonPane vue component
parent
d14b8428
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
47 additions
and
38 deletions
+47
-38
app/assets/javascripts/sidebar/components/time_tracking/comparison_pane.vue
...ipts/sidebar/components/time_tracking/comparison_pane.vue
+40
-36
app/assets/javascripts/sidebar/components/time_tracking/time_tracker.vue
...scripts/sidebar/components/time_tracking/time_tracker.vue
+2
-2
changelogs/unreleased/refactor-move-time-tracking-comparison-pane-vue-component.yml
...ctor-move-time-tracking-comparison-pane-vue-component.yml
+5
-0
No files found.
app/assets/javascripts/sidebar/components/time_tracking/comparison_pane.
js
→
app/assets/javascripts/sidebar/components/time_tracking/comparison_pane.
vue
View file @
5823a191
<
script
>
import
{
parseSeconds
,
stringifyTime
}
from
'
../../../lib/utils/pretty_time
'
;
import
{
parseSeconds
,
stringifyTime
}
from
'
../../../lib/utils/pretty_time
'
;
export
default
{
export
default
{
name
:
'
time-tracking-comparison-p
ane
'
,
name
:
'
TimeTrackingComparisonP
ane
'
,
props
:
{
props
:
{
timeSpent
:
{
timeSpent
:
{
type
:
Number
,
type
:
Number
,
...
@@ -43,47 +44,50 @@ export default {
...
@@ -43,47 +44,50 @@ export default {
return
this
.
timeEstimate
>=
this
.
timeSpent
?
'
within_estimate
'
:
'
over_estimate
'
;
return
this
.
timeEstimate
>=
this
.
timeSpent
?
'
within_estimate
'
:
'
over_estimate
'
;
},
},
},
},
template
:
`
};
<div class="time-tracking-comparison-pane">
</
script
>
<
template
>
<div
class=
"time-tracking-comparison-pane"
>
<div
class=
"compare-meter"
data-toggle=
"tooltip"
data-placement=
"top"
role=
"timeRemainingDisplay"
:aria-valuenow=
"timeRemainingTooltip"
:title=
"timeRemainingTooltip"
:data-original-title=
"timeRemainingTooltip"
:class=
"timeRemainingStatusClass"
>
<div
<div
class="compare-meter"
class=
"meter-container"
data-toggle="tooltip"
role=
"timeSpentPercent"
data-placement="top"
:aria-valuenow=
"timeRemainingPercent"
role="timeRemainingDisplay"
:aria-valuenow="timeRemainingTooltip"
:title="timeRemainingTooltip"
:data-original-title="timeRemainingTooltip"
:class="timeRemainingStatusClass"
>
>
<div
<div
class="meter-container"
:style=
"
{ width: timeRemainingPercent }"
role="timeSpentPercent"
class="meter-fill"
:aria-valuenow="timeRemainingPercent"
>
>
<div
:style="{ width: timeRemainingPercent }"
class="meter-fill"
/>
</div>
</div>
<div class="compare-display-container">
</div>
<div class="compare-display pull-left">
<div
class=
"compare-display-container"
>
<span class="compare-label">
<div
class=
"compare-display pull-left"
>
<span
class=
"compare-label"
>
{{
s__
(
'
TimeTracking|Spent
'
)
}}
{{
s__
(
'
TimeTracking|Spent
'
)
}}
</span>
</span>
<span class="compare-value spent">
<span
class=
"compare-value spent"
>
{{ timeSpentHumanReadable }}
{{
timeSpentHumanReadable
}}
</span>
</span>
</div>
</div>
<div class="compare-display estimated pull-right">
<div
class=
"compare-display estimated pull-right"
>
<span class="compare-label">
<span
class=
"compare-label"
>
{{ s__('TimeTrackingEstimated|Est') }}
{{
s__
(
'
TimeTrackingEstimated|Est
'
)
}}
</span>
</span>
<span class="compare-value">
<span
class=
"compare-value"
>
{{ timeEstimateHumanReadable }}
{{
timeEstimateHumanReadable
}}
</span>
</span>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
`
,
</div>
};
</
template
>
app/assets/javascripts/sidebar/components/time_tracking/time_tracker.vue
View file @
5823a191
...
@@ -4,7 +4,7 @@ import TimeTrackingCollapsedState from './collapsed_state.vue';
...
@@ -4,7 +4,7 @@ import TimeTrackingCollapsedState from './collapsed_state.vue';
import
timeTrackingSpentOnlyPane
from
'
./spent_only_pane
'
;
import
timeTrackingSpentOnlyPane
from
'
./spent_only_pane
'
;
import
timeTrackingNoTrackingPane
from
'
./no_tracking_pane
'
;
import
timeTrackingNoTrackingPane
from
'
./no_tracking_pane
'
;
import
timeTrackingEstimateOnlyPane
from
'
./estimate_only_pane
'
;
import
timeTrackingEstimateOnlyPane
from
'
./estimate_only_pane
'
;
import
timeTrackingComparisonPane
from
'
./comparison_pan
e
'
;
import
TimeTrackingComparisonPane
from
'
./comparison_pane.vu
e
'
;
import
eventHub
from
'
../../event_hub
'
;
import
eventHub
from
'
../../event_hub
'
;
...
@@ -15,7 +15,7 @@ export default {
...
@@ -15,7 +15,7 @@ export default {
'
time-tracking-estimate-only-pane
'
:
timeTrackingEstimateOnlyPane
,
'
time-tracking-estimate-only-pane
'
:
timeTrackingEstimateOnlyPane
,
'
time-tracking-spent-only-pane
'
:
timeTrackingSpentOnlyPane
,
'
time-tracking-spent-only-pane
'
:
timeTrackingSpentOnlyPane
,
'
time-tracking-no-tracking-pane
'
:
timeTrackingNoTrackingPane
,
'
time-tracking-no-tracking-pane
'
:
timeTrackingNoTrackingPane
,
'
time-tracking-comparison-pane
'
:
t
imeTrackingComparisonPane
,
T
imeTrackingComparisonPane
,
'
time-tracking-help-state
'
:
timeTrackingHelpState
,
'
time-tracking-help-state
'
:
timeTrackingHelpState
,
},
},
props
:
{
props
:
{
...
...
changelogs/unreleased/refactor-move-time-tracking-comparison-pane-vue-component.yml
0 → 100644
View file @
5823a191
---
title
:
Move TimeTrackingComparisonPane vue component
merge_request
:
17931
author
:
George Tsiolis
type
:
performance
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment