@ardimedia/angular-portal-azure 0.2.216 → 0.2.218
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/apn.d.ts +5 -7
- package/apn.js +55 -63
- package/package.json +1 -1
package/apn.d.ts
CHANGED
|
@@ -48,7 +48,7 @@ declare namespace angularportalazure {
|
|
|
48
48
|
We don't know how to provide [this] to the directive.
|
|
49
49
|
So we came up with this [vm] property.*/
|
|
50
50
|
vm: any;
|
|
51
|
-
|
|
51
|
+
visibility: string;
|
|
52
52
|
private watcherTitle;
|
|
53
53
|
bladeContentHeight: number;
|
|
54
54
|
bladeContentHeightInner: number;
|
|
@@ -391,6 +391,7 @@ declare namespace angularportalazure {
|
|
|
391
391
|
class ExceptionDotNet {
|
|
392
392
|
ExceptionMessage: string;
|
|
393
393
|
ExceptionType: string;
|
|
394
|
+
InnerException: ExceptionDotNet;
|
|
394
395
|
Message: string;
|
|
395
396
|
StackTrace: string;
|
|
396
397
|
}
|
|
@@ -405,14 +406,13 @@ declare namespace angularportalazure {
|
|
|
405
406
|
value: string;
|
|
406
407
|
}[];
|
|
407
408
|
ValidationResults: ValidationResultDotNet[];
|
|
409
|
+
convertResponse(response: any): void;
|
|
410
|
+
private static convertResponse(exception, responseData);
|
|
411
|
+
private static convertExceptionType(exception, responseData);
|
|
408
412
|
}
|
|
409
413
|
}
|
|
410
414
|
declare namespace angularportalazure {
|
|
411
415
|
class Exception extends angularportalazure.ValidationsExceptionDotNet {
|
|
412
|
-
ExceptionMessage: string;
|
|
413
|
-
ExceptionType: string;
|
|
414
|
-
Message: string;
|
|
415
|
-
StackTrace: string;
|
|
416
416
|
Type: string;
|
|
417
417
|
MessageDetail: string;
|
|
418
418
|
Messages: string[];
|
|
@@ -423,8 +423,6 @@ declare namespace angularportalazure {
|
|
|
423
423
|
static getOneLineMessage(exception: angularportalazure.Exception): string;
|
|
424
424
|
private static processDotNetException1(response);
|
|
425
425
|
private static processDotNetException2(response);
|
|
426
|
-
private static setExceptionType1(response, exception);
|
|
427
|
-
private static setExceptionType2(response, exception);
|
|
428
426
|
}
|
|
429
427
|
}
|
|
430
428
|
declare namespace angularportalazure {
|
package/apn.js
CHANGED
|
@@ -160,7 +160,7 @@ var angularportalazure;
|
|
|
160
160
|
We don't know how to provide [this] to the directive.
|
|
161
161
|
So we came up with this [vm] property.*/
|
|
162
162
|
_this.vm = {};
|
|
163
|
-
_this.
|
|
163
|
+
_this.visibility = 'collapse';
|
|
164
164
|
_this.title = '';
|
|
165
165
|
_this.subTitle = '';
|
|
166
166
|
_this.width = { 'width': '0' };
|
|
@@ -630,19 +630,19 @@ var angularportalazure;
|
|
|
630
630
|
}
|
|
631
631
|
//#endregion
|
|
632
632
|
BladeData.prototype.onLoadItem = function () {
|
|
633
|
-
this.
|
|
633
|
+
this.visibility = 'collapse';
|
|
634
634
|
this.setStatusBarLoadData();
|
|
635
635
|
};
|
|
636
636
|
BladeData.prototype.onLoadItems = function () {
|
|
637
|
-
this.
|
|
637
|
+
this.visibility = 'collapse';
|
|
638
638
|
this.setStatusBarLoadData();
|
|
639
639
|
};
|
|
640
640
|
BladeData.prototype.onLoadedItem = function () {
|
|
641
|
-
this.
|
|
641
|
+
this.visibility = 'visible';
|
|
642
642
|
this.clearStatusBar();
|
|
643
643
|
};
|
|
644
644
|
BladeData.prototype.onLoadedItems = function () {
|
|
645
|
-
this.
|
|
645
|
+
this.visibility = 'visible';
|
|
646
646
|
this.clearStatusBar();
|
|
647
647
|
};
|
|
648
648
|
return BladeData;
|
|
@@ -1351,6 +1351,48 @@ var angularportalazure;
|
|
|
1351
1351
|
function ValidationsExceptionDotNet() {
|
|
1352
1352
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
1353
1353
|
}
|
|
1354
|
+
ValidationsExceptionDotNet.prototype.convertResponse = function (response) {
|
|
1355
|
+
if (response.headers === undefined) {
|
|
1356
|
+
ValidationsExceptionDotNet.convertResponse(this, response.data);
|
|
1357
|
+
ValidationsExceptionDotNet.convertExceptionType(this, response.data);
|
|
1358
|
+
}
|
|
1359
|
+
else {
|
|
1360
|
+
ValidationsExceptionDotNet.convertResponse(this, response.json());
|
|
1361
|
+
ValidationsExceptionDotNet.convertExceptionType(this, response.json());
|
|
1362
|
+
}
|
|
1363
|
+
};
|
|
1364
|
+
ValidationsExceptionDotNet.convertResponse = function (exception, responseData) {
|
|
1365
|
+
// ExceptionDotNet
|
|
1366
|
+
exception.ExceptionMessage = responseData.ExceptionMessage;
|
|
1367
|
+
exception.Message = responseData.Message;
|
|
1368
|
+
exception.StackTrace = responseData.StackTrace;
|
|
1369
|
+
exception.InnerException = responseData.InnerException;
|
|
1370
|
+
// ValidationsExceptionDotNet
|
|
1371
|
+
exception.ClassName = 'Not yet implemented';
|
|
1372
|
+
exception.Data = [{ key: 0, value: 'Not yet implemented' }];
|
|
1373
|
+
// ValidationResultDotNet
|
|
1374
|
+
exception.ValidationResults = [{ ErrorMessage: 'Not yet implemented', MemberNames: [] }];
|
|
1375
|
+
};
|
|
1376
|
+
ValidationsExceptionDotNet.convertExceptionType = function (exception, responseData) {
|
|
1377
|
+
if (responseData.ExceptionType === undefined) {
|
|
1378
|
+
return;
|
|
1379
|
+
}
|
|
1380
|
+
if (responseData.ExceptionType === 'System.Data.Entity.Validation.DbEntityValidationException') {
|
|
1381
|
+
exception.ExceptionType = 'DbEntityValidationException';
|
|
1382
|
+
return;
|
|
1383
|
+
}
|
|
1384
|
+
else if (responseData.ExceptionType === 'System.Data.Entity.Infrastructure.DbUpdateConcurrencyException') {
|
|
1385
|
+
exception.ExceptionType = 'DbUpdateConcurrencyException';
|
|
1386
|
+
return;
|
|
1387
|
+
}
|
|
1388
|
+
// ClassName should by ExceptionType
|
|
1389
|
+
if (responseData.ClassName !== undefined && responseData.ClassName.indexOf('ValidationsException') > 0) {
|
|
1390
|
+
console.log('[angularportalazure.Exception.setExceptionType2] Why is this in ClassName? Can this be changed?');
|
|
1391
|
+
exception.ExceptionType = 'ValidationsException';
|
|
1392
|
+
return;
|
|
1393
|
+
}
|
|
1394
|
+
exception.ExceptionType = responseData.ExceptionType;
|
|
1395
|
+
};
|
|
1354
1396
|
return ValidationsExceptionDotNet;
|
|
1355
1397
|
}(ExceptionDotNet));
|
|
1356
1398
|
angularportalazure.ValidationsExceptionDotNet = ValidationsExceptionDotNet;
|
|
@@ -1368,34 +1410,21 @@ var angularportalazure;
|
|
|
1368
1410
|
//#region Static Methods
|
|
1369
1411
|
// TODO:2017-01-09/hp: [any] will be [Response] in angular2
|
|
1370
1412
|
Exception.prepareException = function (response) {
|
|
1371
|
-
console.log('angularportalazure.Exception.prepareException - Logging Exception: Find more information in [Responsee] and [Exception]
|
|
1413
|
+
console.log('angularportalazure.Exception.prepareException - Logging Exception: Find more information in following [Responsee] and [Exception].');
|
|
1372
1414
|
var exception = new angularportalazure.Exception();
|
|
1373
1415
|
if (response.headers === undefined) {
|
|
1416
|
+
console.log('> response.headers === undefined. Get information from [.data].');
|
|
1374
1417
|
exception = Exception.processDotNetException1(response);
|
|
1375
|
-
exception.
|
|
1376
|
-
exception.StackTrace = response.data.StackTrace;
|
|
1377
|
-
Exception.setExceptionType1(response, exception);
|
|
1378
|
-
exception.Type = response.data.Type;
|
|
1379
|
-
exception.Message = response.data.Message;
|
|
1380
|
-
exception.MessageDetail = response.data.MessageDetail;
|
|
1381
|
-
exception.Messages = response.data.Messages;
|
|
1382
|
-
exception.Url = response.config.url;
|
|
1383
|
-
exception.Status = response.status;
|
|
1384
|
-
exception.StatusText = response.statusText;
|
|
1418
|
+
exception.convertResponse(response.data);
|
|
1385
1419
|
}
|
|
1386
1420
|
else {
|
|
1421
|
+
console.log('> response.headers !== undefined. Get information from [.json()].');
|
|
1387
1422
|
exception = Exception.processDotNetException2(response);
|
|
1388
|
-
exception.
|
|
1389
|
-
exception.StackTrace = response.json().StackTrace;
|
|
1390
|
-
Exception.setExceptionType2(response, exception);
|
|
1391
|
-
exception.Type = response.json().Type;
|
|
1392
|
-
exception.Message = response.json().Message;
|
|
1393
|
-
exception.MessageDetail = response.json().MessageDetail;
|
|
1394
|
-
exception.Messages = response.json().Messages;
|
|
1395
|
-
exception.Url = response.url;
|
|
1396
|
-
exception.Status = response.status;
|
|
1397
|
-
exception.StatusText = response.statusText;
|
|
1423
|
+
exception.convertResponse(response.json());
|
|
1398
1424
|
}
|
|
1425
|
+
exception.Url = response.url;
|
|
1426
|
+
exception.Status = response.status;
|
|
1427
|
+
exception.StatusText = response.statusText;
|
|
1399
1428
|
//// Find a better way to log information, maybe to the database or to Google Analytics.
|
|
1400
1429
|
console.log(response);
|
|
1401
1430
|
console.log(exception);
|
|
@@ -1436,43 +1465,6 @@ var angularportalazure;
|
|
|
1436
1465
|
}
|
|
1437
1466
|
return exception;
|
|
1438
1467
|
};
|
|
1439
|
-
Exception.setExceptionType1 = function (response, exception) {
|
|
1440
|
-
if (response.data.ExceptionType === 'System.Data.Entity.Validation.DbEntityValidationException') {
|
|
1441
|
-
exception.ExceptionType = 'DbEntityValidationException';
|
|
1442
|
-
return;
|
|
1443
|
-
}
|
|
1444
|
-
else if (response.data.ExceptionType === 'System.Data.Entity.Infrastructure.DbUpdateConcurrencyException') {
|
|
1445
|
-
exception.ExceptionType = 'DbUpdateConcurrencyException';
|
|
1446
|
-
return;
|
|
1447
|
-
}
|
|
1448
|
-
else if (response.data.ClassName.indexOf('ValidationsException') > 0) {
|
|
1449
|
-
// ClassName should by ExceptionType
|
|
1450
|
-
exception.ExceptionType = 'ValidationsException';
|
|
1451
|
-
return;
|
|
1452
|
-
}
|
|
1453
|
-
exception.ExceptionType = response.data.ExceptionType;
|
|
1454
|
-
};
|
|
1455
|
-
// TODO:2017-01-09/hp: Implement this function for angular2
|
|
1456
|
-
Exception.setExceptionType2 = function (response, exception) {
|
|
1457
|
-
if (response.json().ExceptionType === undefined) {
|
|
1458
|
-
return;
|
|
1459
|
-
}
|
|
1460
|
-
if (response.json().ExceptionType === 'System.Data.Entity.Validation.DbEntityValidationException') {
|
|
1461
|
-
exception.ExceptionType = 'DbEntityValidationException';
|
|
1462
|
-
return;
|
|
1463
|
-
}
|
|
1464
|
-
else if (response.json().ExceptionType === 'System.Data.Entity.Infrastructure.DbUpdateConcurrencyException') {
|
|
1465
|
-
exception.ExceptionType = 'DbUpdateConcurrencyException';
|
|
1466
|
-
return;
|
|
1467
|
-
}
|
|
1468
|
-
// ClassName should by ExceptionType
|
|
1469
|
-
if (response.json().ClassName !== undefined && response.json().ClassName.indexOf('ValidationsException') > 0) {
|
|
1470
|
-
console.log('[angularportalazure.Exception.setExceptionType2] Why is this in ClassName? Can this be changed?');
|
|
1471
|
-
exception.ExceptionType = 'ValidationsException';
|
|
1472
|
-
return;
|
|
1473
|
-
}
|
|
1474
|
-
exception.ExceptionType = response.json().ExceptionType;
|
|
1475
|
-
};
|
|
1476
1468
|
return Exception;
|
|
1477
1469
|
}(angularportalazure.ValidationsExceptionDotNet));
|
|
1478
1470
|
angularportalazure.Exception = Exception;
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@ardimedia/angular-portal-azure",
|
|
3
3
|
"description": "Angular Portal Azure - GUI Framework.",
|
|
4
4
|
"author": "Ardimedia Anstalt <info@ardimedia.com> (http://www.ardimedia.com)",
|
|
5
|
-
"version": "0.2.
|
|
5
|
+
"version": "0.2.218",
|
|
6
6
|
"main": "index.js",
|
|
7
7
|
"typings": "apn.d.ts",
|
|
8
8
|
"dependencies": {
|