Skip to content

Commit 7820984

Browse files
committed
Corrected an issue where the wrong incident got selected.
1 parent 42e550e commit 7820984

File tree

8 files changed

+15
-17
lines changed

8 files changed

+15
-17
lines changed

src/Server/Coderr.Server.Web/ClientApp/components/analyze/incidents/incident.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ export default class AnalyzeIncidentComponent extends Vue {
2727
currentCollectionName: string = '';
2828

2929
created() {
30-
MyIncidents.Instance.subscribeOnSelectedIncident(this.selectIncident);
3130
}
3231

3332
mounted() {
3433
var incidentId = parseInt(this.$route.params.incidentId, 10);
3534
this.loadIncident(incidentId);
35+
MyIncidents.Instance.subscribeOnSelectedIncident(this.selectIncident);
3636
}
3737

3838
destroyed() {

src/Server/Coderr.Server.Web/ClientApp/components/analyze/incidents/report.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@ export default class AnalyzeReportComponent extends Vue {
9797

9898
if (reportId !== this.reportId) {
9999
this.reportId = reportId;
100-
console.log('got report id', this.reportId);
101100
this.$router.push({ name: 'analyzeReport', params: { reportId: reportId.toString(), incidentId: this.incidentId.toString() } });
102101
}
103102

src/Server/Coderr.Server.Web/ClientApp/components/analyze/menu.ts

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ export default class AnalyzeMenuComponent extends Vue {
2020
incidentId: number | null = null;
2121

2222
created() {
23+
if (this.$route.params.incidentId) {
24+
this.incidentId = parseInt(this.$route.params.incidentId, 10);
25+
}
2326
MyIncidents.Instance.subscribeOnSelectedIncident(this.onIncidentSelected);
2427
MyIncidents.Instance.subscribeOnListChanges(this.onListChanged);
2528
}
@@ -40,11 +43,18 @@ export default class AnalyzeMenuComponent extends Vue {
4043
MyIncidents.Instance.unsubscribe(this.onListChanged);
4144
}
4245

43-
private onListChanged() {
46+
private onListChanged(args: any) {
4447
this.incidents = MyIncidents.Instance.myIncidents;
45-
if (!this.incidentId && this.incidents.length > 0) {
48+
if (this.incidents.length === 0) {
49+
return;
50+
}
51+
52+
if (!this.incidentId) {
4653
this.incidentId = this.incidents[0].incidentId;
4754
MyIncidents.Instance.switchIncident(this.incidentId);
55+
} else {
56+
var incident = this.incidents.find(x => x.incidentId === this.incidentId);
57+
this.title = incident.shortTitle;
4858
}
4959
}
5060

src/Server/Coderr.Server.Web/ClientApp/components/analyze/myincidents.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,6 @@ export class MyIncidents {
137137

138138
private onIncidentAssigned(msgContext: MessageContext) {
139139
var msg = <IncidentAssigned>msgContext.message.body;
140-
console.log('got assigned: ' + msg.incidentId)
141140
AppRoot.Instance.incidentService.get(msg.incidentId)
142141
.then(assignedIncident => {
143142
if (this.allMyIncidents$.findIndex(menuItem => menuItem.incidentId === assignedIncident.Id) === -1) {

src/Server/Coderr.Server.Web/ClientApp/components/discover/incidents/incident.vue.html

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,6 @@ <h3 class="">Report history</h3>
6161
<th>{{fact.Title}}</th>
6262
<td>{{fact.Value}}</td>
6363
</tr>
64-
<tr>
65-
<th>Created</th>
66-
<td>{{incident.CreatedAtUtc|ago}}</td>
67-
</tr>
68-
<tr>
69-
<th>Last report</th>
70-
<td>{{incident.LastReportReceivedAtUtc|ago}}</td>
71-
</tr>
7264
</table>
7365
</div>
7466
</div>

src/Server/Coderr.Server.Web/ClientApp/components/discover/menu.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ export default class DiscoverMenuComponent extends Vue {
2121

2222
@Watch('$route.params.applicationId')
2323
onApplicationSelected(value: string, oldValue: string) {
24-
console.log('DiscoverMenuComponent.changed,', value, 'stored:', this.currentApplicationId, 'old', oldValue);
2524
if (!value) {
2625
this.currentApplicationId = null;
2726
return;

src/Server/Coderr.Server.Web/ClientApp/components/home/navmenu/navmenu.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ export default class NavMenuComponent extends Vue {
7979
}
8080
});
8181
PubSubService.Instance.subscribe(MenuApi.MessagingTopics.SetApplication, ctx => {
82-
console.log('Set application invoked', ctx);
8382
var msg = <MenuApi.SetApplication>ctx.message.body;
8483
this.changeApplication(msg.applicationId);
8584
});

src/Server/Coderr.Server.Web/ClientApp/components/manage/application/environments/environments.vue.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
2-
<div class="mt-4">
3-
<div class="row">
2+
<div class="">
3+
<div class="row minimal-gutters">
44
<div class="col-lg-8 environments">
55
<div class="card">
66
<div class="card-header">

0 commit comments

Comments
 (0)