Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.

Commit db2bb49

Browse files
committed
Added reliability link for development
1 parent 1930618 commit db2bb49

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

app/profile/subtrack/subtrack.controller.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,13 @@
7575
// user iterable stats
7676
vm.subTrackStats = UserStatsService.getIterableStats(vm.track, vm.subTrack, data);
7777
if (vm.track === 'DEVELOP') {
78+
var reliability = vm.subTrackStats.filter(function(stat) { return stat.label === 'reliability'; });
79+
if (reliability.length > 0) {
80+
reliability = reliability[0];
81+
reliability.link = 'http://community.' + vm.domain + '/tc?module=ReliabilityDetail&pt=2&cr=' + profileVm.profile.userId;
82+
}
83+
console.log('sts')
84+
console.log(vm.subTrackStats)
7885
var mustHaveMetrics = ["rank", "rating", "reliability"];
7986
// check if rating, rank & reliability are all set
8087
var _filteredObjs = _.filter(vm.subTrackStats, function(k) { return _.indexOf(mustHaveMetrics, k.label) > -1});

app/profile/subtrack/subtrack.jade

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
.subtrack-stats
1010
responsive-carousel(data="vm.subTrackStats", handle="{{vm.handle}}")
1111
.carousel-elem
12-
.flex-wrapper
12+
a.flex-wrapper(ng-class="{'link': item.link, 'no-link': !item.link}", ng-href="{{item.link}}")
1313
p.title(ng-hide="true") {{item.subTrack | track}}
1414

1515
p.value(ng-show="item.label === 'rating'", style="color: {{item.val | ratingColor}}") {{item.val | empty}}

assets/css/directives/responsive-carousel.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,12 @@
152152
display: flex;
153153
flex-direction: column;
154154
align-items: center;
155+
&.no-link {
156+
cursor: default;
157+
}
158+
&.link {
159+
cursor: pointer;
160+
}
155161
}
156162

157163
p {

0 commit comments

Comments
 (0)