Skip to content

Commit 301e119

Browse files
committed
Small fixes for the UI tests
1 parent 2e81928 commit 301e119

File tree

6 files changed

+75
-43
lines changed

6 files changed

+75
-43
lines changed

src/Server/Coderr.Server.App/Modules/MonthlyStats/CollectStatsJob.cs

+8-8
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,14 @@ public async Task ExecuteAsync()
3636
return;
3737

3838
var lastMonth = new DateTime(lastMonthDate.Year, lastMonthDate.Month, 1);
39-
//if (_config.Value.LatestUploadedMonth == null)
40-
//{
41-
// await ReportAllFoundMonths(lastMonth);
42-
// return;
43-
//}
44-
45-
//if (_config.Value?.LatestUploadedMonth == lastMonth)
46-
// return;
39+
if (_config.Value.LatestUploadedMonth == null)
40+
{
41+
await ReportAllFoundMonths(lastMonth);
42+
return;
43+
}
44+
45+
if (_config.Value?.LatestUploadedMonth == lastMonth)
46+
return;
4747

4848

4949
await ReportMonth(lastMonth);

src/Server/Coderr.Server.Web/ClientApp/boot.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -276,9 +276,9 @@ AppRoot.Instance.loadCurrentUser()
276276

277277
}
278278
});
279-
ourVue.$router.beforeEach((to, from, next) => {
280-
next();
281-
});
279+
//ourVue.$router.beforeEach((to, from, next) => {
280+
// next();
281+
//});
282282
ourVue.$router.afterEach((to, from) => {
283283
hooks.afterRoute(to.path, from.path);
284284
})

src/Server/Coderr.Server.Web/ClientApp/components/discover/application/configure.ts

+26-14
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { AppRoot } from '../../../services/AppRoot';
44
import { FindIncidents, FindIncidentsResult, FindIncidentsResultItem } from '../../../dto/Core/Incidents'
55
import * as Mine from '../../../dto/Common/Mine'
66
import Vue from "vue";
7-
import { Component } from "vue-property-decorator";
7+
import { Component, Watch } from "vue-property-decorator";
88

99
interface ILibrarySummary {
1010
clientFolderName: string;
@@ -14,6 +14,7 @@ interface ILibrarySummary {
1414
}
1515
@Component
1616
export default class ConfigureClientComponent extends Vue {
17+
private lastLib: string;
1718
libraries: ILibrarySummary[] = [];
1819
instruction: string | null = null;
1920

@@ -27,7 +28,6 @@ export default class ConfigureClientComponent extends Vue {
2728

2829
created() {
2930
this.applicationId = parseInt(this.$route.params.applicationId, 10);
30-
3131
var client = new http.HttpClient();
3232
client.get(ApiClient.ApiUrl + 'onboarding/libraries/')
3333
.then(response => {
@@ -44,32 +44,43 @@ export default class ConfigureClientComponent extends Vue {
4444
}
4545

4646
mounted() {
47-
this.applicationId = parseInt(this.$route.params.applicationId, 10);
4847
AppRoot.Instance.applicationService.get(this.applicationId)
4948
.then(app => {
5049
this.sharedSecret = app.sharedSecret;
5150
this.appKey = app.appKey;
5251
});
5352
}
5453

54+
@Watch('$route.params.applicationId')
55+
onApplicationChanged(value: string, oldValue: string) {
56+
if (!value) {
57+
return;
58+
}
59+
60+
this.applicationId = parseInt(value);
61+
AppRoot.Instance.applicationService.get(this.applicationId)
62+
.then(app => {
63+
this.sharedSecret = app.sharedSecret;
64+
this.appKey = app.appKey;
65+
this.select(this.lastLib);
66+
});
67+
}
68+
5569
goToSupport() {
5670
this.$router.push({
5771
name: "support",
5872
params: { type: "configuration" }
5973
});
6074
}
61-
75+
6276
select(libName: string) {
63-
var appInfo = AppRoot.Instance.currentUser.applications[0];
64-
AppRoot.Instance.applicationService.get(appInfo.id)
65-
.then(app => {
66-
var client = new http.HttpClient();
67-
client.get(ApiClient.ApiUrl + 'onboarding/library/' + libName + "/?appKey=" + app.appKey)
68-
.then(response => {
69-
this.instruction = response.body
70-
.replace('yourAppKey', this.appKey)
71-
.replace('yourSharedSecret', this.sharedSecret);
72-
});
77+
this.lastLib = libName;
78+
var client = new http.HttpClient();
79+
client.get(ApiClient.ApiUrl + 'onboarding/library/' + libName + "/?appKey=" + this.appKey)
80+
.then(response => {
81+
this.instruction = response.body
82+
.replace('yourAppKey', this.appKey)
83+
.replace('yourSharedSecret', this.sharedSecret);
7384
});
7485
var buttons = document.querySelectorAll('.buttons button');
7586
for (var i = 0; i < buttons.length; i++) {
@@ -88,6 +99,7 @@ export default class ConfigureClientComponent extends Vue {
8899
var q = new FindIncidents();
89100
q.PageNumber = 1;
90101
q.ItemsPerPage = 1;
102+
q.ApplicationIds = [this.applicationId];
91103
AppRoot.Instance.apiClient.query<FindIncidentsResult>(q)
92104
.then(result => {
93105
if (result.TotalCount === 0) {

src/Server/Coderr.Server.Web/ClientApp/components/home/navmenu/navmenu.vue.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
</div>
3131
</li>
3232
<li class="nav-item">
33-
<router-link class="nav-link" :to="discoverLink">
33+
<router-link class="nav-link" :to="discoverLink" id="DiscoverMenu">
3434
<span class="fa fa-binoculars"></span> Discover
3535
</router-link>
3636
</li>

src/Server/Coderr.Server.Web/wwwroot/dist/main.js

+36-16
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
/******/
6060
/******/
6161
/******/ var hotApplyOnUpdate = true;
62-
/******/ var hotCurrentHash = "17d5ff35f9585df8e737"; // eslint-disable-line no-unused-vars
62+
/******/ var hotCurrentHash = "dbb48a9e34eaaec2540a"; // eslint-disable-line no-unused-vars
6363
/******/ var hotCurrentModuleData = {};
6464
/******/ var hotCurrentChildModule; // eslint-disable-line no-unused-vars
6565
/******/ var hotCurrentParents = []; // eslint-disable-line no-unused-vars
@@ -38776,9 +38776,9 @@ __WEBPACK_IMPORTED_MODULE_4__services_AppRoot__["a" /* AppRoot */].Instance.load
3877638776
hooks.mounted(ourVue);
3877738777
}
3877838778
});
38779-
ourVue.$router.beforeEach(function (to, from, next) {
38780-
next();
38781-
});
38779+
//ourVue.$router.beforeEach((to, from, next) => {
38780+
// next();
38781+
//});
3878238782
ourVue.$router.afterEach(function (to, from) {
3878338783
hooks.afterRoute(to.path, from.path);
3878438784
});
@@ -40816,6 +40816,9 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
4081640816
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
4081740817
return c > 3 && r && Object.defineProperty(target, key, r), r;
4081840818
};
40819+
var __metadata = (this && this.__metadata) || function (k, v) {
40820+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
40821+
};
4081940822

4082040823

4082140824

@@ -40854,13 +40857,25 @@ var ConfigureClientComponent = /** @class */ (function (_super) {
4085440857
};
4085540858
ConfigureClientComponent.prototype.mounted = function () {
4085640859
var _this = this;
40857-
this.applicationId = parseInt(this.$route.params.applicationId, 10);
4085840860
__WEBPACK_IMPORTED_MODULE_2__services_AppRoot__["a" /* AppRoot */].Instance.applicationService.get(this.applicationId)
4085940861
.then(function (app) {
4086040862
_this.sharedSecret = app.sharedSecret;
4086140863
_this.appKey = app.appKey;
4086240864
});
4086340865
};
40866+
ConfigureClientComponent.prototype.onApplicationChanged = function (value, oldValue) {
40867+
var _this = this;
40868+
if (!value) {
40869+
return;
40870+
}
40871+
this.applicationId = parseInt(value);
40872+
__WEBPACK_IMPORTED_MODULE_2__services_AppRoot__["a" /* AppRoot */].Instance.applicationService.get(this.applicationId)
40873+
.then(function (app) {
40874+
_this.sharedSecret = app.sharedSecret;
40875+
_this.appKey = app.appKey;
40876+
_this.select(_this.lastLib);
40877+
});
40878+
};
4086440879
ConfigureClientComponent.prototype.goToSupport = function () {
4086540880
this.$router.push({
4086640881
name: "support",
@@ -40869,16 +40884,13 @@ var ConfigureClientComponent = /** @class */ (function (_super) {
4086940884
};
4087040885
ConfigureClientComponent.prototype.select = function (libName) {
4087140886
var _this = this;
40872-
var appInfo = __WEBPACK_IMPORTED_MODULE_2__services_AppRoot__["a" /* AppRoot */].Instance.currentUser.applications[0];
40873-
__WEBPACK_IMPORTED_MODULE_2__services_AppRoot__["a" /* AppRoot */].Instance.applicationService.get(appInfo.id)
40874-
.then(function (app) {
40875-
var client = new __WEBPACK_IMPORTED_MODULE_1__services_HttpClient__["a" /* HttpClient */]();
40876-
client.get(__WEBPACK_IMPORTED_MODULE_0__services_ApiClient__["a" /* ApiClient */].ApiUrl + 'onboarding/library/' + libName + "/?appKey=" + app.appKey)
40877-
.then(function (response) {
40878-
_this.instruction = response.body
40879-
.replace('yourAppKey', _this.appKey)
40880-
.replace('yourSharedSecret', _this.sharedSecret);
40881-
});
40887+
this.lastLib = libName;
40888+
var client = new __WEBPACK_IMPORTED_MODULE_1__services_HttpClient__["a" /* HttpClient */]();
40889+
client.get(__WEBPACK_IMPORTED_MODULE_0__services_ApiClient__["a" /* ApiClient */].ApiUrl + 'onboarding/library/' + libName + "/?appKey=" + this.appKey)
40890+
.then(function (response) {
40891+
_this.instruction = response.body
40892+
.replace('yourAppKey', _this.appKey)
40893+
.replace('yourSharedSecret', _this.sharedSecret);
4088240894
});
4088340895
var buttons = document.querySelectorAll('.buttons button');
4088440896
for (var i = 0; i < buttons.length; i++) {
@@ -40896,6 +40908,7 @@ var ConfigureClientComponent = /** @class */ (function (_super) {
4089640908
var q = new __WEBPACK_IMPORTED_MODULE_3__dto_Core_Incidents__["a" /* FindIncidents */]();
4089740909
q.PageNumber = 1;
4089840910
q.ItemsPerPage = 1;
40911+
q.ApplicationIds = [this.applicationId];
4089940912
__WEBPACK_IMPORTED_MODULE_2__services_AppRoot__["a" /* AppRoot */].Instance.apiClient.query(q)
4090040913
.then(function (result) {
4090140914
if (result.TotalCount === 0) {
@@ -40908,6 +40921,12 @@ var ConfigureClientComponent = /** @class */ (function (_super) {
4090840921
});
4090940922
});
4091040923
};
40924+
__decorate([
40925+
__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5_vue_property_decorator__["Watch"])('$route.params.applicationId'),
40926+
__metadata("design:type", Function),
40927+
__metadata("design:paramtypes", [String, String]),
40928+
__metadata("design:returntype", void 0)
40929+
], ConfigureClientComponent.prototype, "onApplicationChanged", null);
4091140930
ConfigureClientComponent = __decorate([
4091240931
__WEBPACK_IMPORTED_MODULE_5_vue_property_decorator__["Component"]
4091340932
], ConfigureClientComponent);
@@ -63477,7 +63496,8 @@ module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c
6347763496
}, [_c('router-link', {
6347863497
staticClass: "nav-link",
6347963498
attrs: {
63480-
"to": _vm.discoverLink
63499+
"to": _vm.discoverLink,
63500+
"id": "DiscoverMenu"
6348163501
}
6348263502
}, [_c('span', {
6348363503
staticClass: "fa fa-binoculars"

src/Server/Coderr.Server.Web/wwwroot/dist/main.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)