Skip to content

Commit 8f2b2ab

Browse files
committed
Corrected the context navigator
1 parent f59c297 commit 8f2b2ab

File tree

4 files changed

+10
-12
lines changed

4 files changed

+10
-12
lines changed

src/Server/Coderr.Server.App/Modules/History/Events/IncidentAssignedHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@ public async Task HandleAsync(IMessageContext context, IncidentAssigned message)
2828
await _repository.CreateAsync(entry);
2929
}
3030
}
31-
}git
31+
}

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

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export default class AnalyzeIncidentComponent extends Vue {
3333

3434
mounted() {
3535
var incidentId = parseInt(this.$route.params.incidentId, 10);
36-
this.loadIncident(incidentId);
36+
this.loadIncident();
3737
MyIncidents.Instance.subscribeOnSelectedIncident(this.selectIncident);
3838
}
3939

@@ -72,13 +72,8 @@ export default class AnalyzeIncidentComponent extends Vue {
7272

7373
}
7474

75-
private loadIncident(id: number) {
76-
if (!id) {
77-
throw new Error("Expected an incidentId.");
78-
}
79-
80-
this.incidentId = id;
81-
AppRoot.Instance.incidentService.get(id)
75+
private loadIncident() {
76+
AppRoot.Instance.incidentService.get(this.incidentId)
8277
.then(incident => {
8378
this.incident = incident;
8479
AppRoot.Instance.applicationService.getTeam(incident.ApplicationId)
@@ -88,7 +83,7 @@ export default class AnalyzeIncidentComponent extends Vue {
8883
});
8984

9085
var q = new GetReportList();
91-
q.IncidentId = id;
86+
q.IncidentId = this.incidentId;
9287
AppRoot.Instance.apiClient.query<GetReportListResult>(q)
9388
.then(list => {
9489
this.reports = list.Items;
@@ -166,7 +161,8 @@ export default class AnalyzeIncidentComponent extends Vue {
166161
if (myIncident == null) {
167162
this.$router.push({ name: 'analyzeHome' });
168163
} else {
169-
this.loadIncident(myIncident.incidentId);
164+
this.incidentId = myIncident.incidentId;
165+
this.loadIncident();
170166
}
171167
}
172168
}

src/Server/Coderr.Server.Web/ClientApp/components/shared/incidents/ContextNavigator.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ export default class ContextNavigatorComponent extends Vue {
2323
@Prop() showAnalyzeFooter: boolean;
2424

2525
mounted() {
26+
this.loadReports(this.incidentId);
2627
}
2728

2829
@Watch('incidentId')
@@ -38,6 +39,7 @@ export default class ContextNavigatorComponent extends Vue {
3839
q.PageSize = 50;
3940
AppRoot.Instance.apiClient.query<GetReportListResult>(q)
4041
.then(list => {
42+
console.log('reports', list);
4143
this.reports = list.Items;
4244
if (this.reports.length > 0) {
4345
this.loadReport(this.reports[0].Id);

src/Server/Coderr.Server.Web/ClientApp/components/shared/incidents/ContextNavigator.vue.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ <h6 class="dropdown-header">Select context collection</h6>
3030
<tbody>
3131
<tr v-for="prop in currentCollectionProperties">
3232
<th>{{prop.name}}</th>
33-
<td>
33+
<td style="width: 90%">
3434
<span v-if="prop.htmlValue" v-html="prop.htmlValue"></span>
3535
<span v-else>{{prop.value}}</span>
3636

0 commit comments

Comments
 (0)