@ardimedia/angular-portal-azure 0.2.56 → 0.2.58
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 +24 -19
- package/apn.js +55 -19
- package/package.json +1 -1
package/apn.d.ts
CHANGED
|
@@ -129,6 +129,7 @@ declare namespace angularportalazure {
|
|
|
129
129
|
comparePaths(path1: string, path2: string): boolean;
|
|
130
130
|
/** close blade. */
|
|
131
131
|
close(): void;
|
|
132
|
+
showExceptionOnStatusbar(data: angularportalazure.Exception): void;
|
|
132
133
|
onCommandBrowse(): void;
|
|
133
134
|
onCommandCancel(): void;
|
|
134
135
|
onCommandCopy(): void;
|
|
@@ -315,25 +316,9 @@ declare namespace angularportalazure {
|
|
|
315
316
|
}
|
|
316
317
|
declare namespace angularportalazure {
|
|
317
318
|
}
|
|
318
|
-
declare namespace angularportalazure {
|
|
319
|
-
/** If a Web API throws an exception, the following interface should be used to communicate the execption. */
|
|
320
|
-
interface IException {
|
|
321
|
-
ExceptionType: string;
|
|
322
|
-
ClassName: string;
|
|
323
|
-
Data: Object;
|
|
324
|
-
Type: string;
|
|
325
|
-
Messages?: string[];
|
|
326
|
-
Message: string;
|
|
327
|
-
MessageDetail: string;
|
|
328
|
-
Status: number;
|
|
329
|
-
StatusText: string;
|
|
330
|
-
Url: string;
|
|
331
|
-
}
|
|
332
|
-
}
|
|
333
319
|
declare namespace angularportalazure {
|
|
334
320
|
class BladeData extends angularportalazure.Blade {
|
|
335
321
|
constructor(portalService: angularportalazure.PortalService, path: string, title: string, subtitle?: string, width?: number);
|
|
336
|
-
processException(data: angularportalazure.IException): void;
|
|
337
322
|
}
|
|
338
323
|
}
|
|
339
324
|
declare namespace angularportalazure {
|
|
@@ -379,9 +364,29 @@ declare namespace angularportalazure {
|
|
|
379
364
|
}
|
|
380
365
|
}
|
|
381
366
|
declare namespace angularportalazure {
|
|
382
|
-
class Exception {
|
|
383
|
-
|
|
384
|
-
|
|
367
|
+
class Exception implements angularportalazure.IExceptionDotNet {
|
|
368
|
+
ExceptionType: string;
|
|
369
|
+
ClassName: string;
|
|
370
|
+
Data: Object;
|
|
371
|
+
Type: string;
|
|
372
|
+
Messages?: string[];
|
|
373
|
+
Message: string;
|
|
374
|
+
MessageDetail: string;
|
|
375
|
+
Status: number;
|
|
376
|
+
StatusText: string;
|
|
377
|
+
Url: string;
|
|
378
|
+
processException(response: angular.IHttpPromiseCallbackArg<any>): void;
|
|
379
|
+
convertFromWebApiException(ex: angularportalazure.IExceptionDotNet): void;
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
declare namespace angularportalazure {
|
|
383
|
+
class IExceptionDotNet {
|
|
384
|
+
ExceptionType: string;
|
|
385
|
+
ClassName: string;
|
|
386
|
+
Data: Object;
|
|
387
|
+
Type: string;
|
|
388
|
+
Message: string;
|
|
389
|
+
Messages?: string[];
|
|
385
390
|
}
|
|
386
391
|
}
|
|
387
392
|
declare namespace angularportalazure {
|
package/apn.js
CHANGED
|
@@ -342,6 +342,16 @@ var angularportalazure;
|
|
|
342
342
|
throw new Error('[angularportalazure.Blade] path: \'' + this.path + '\' could not be removed, since no \'this.portalService.bladeArea\' available.');
|
|
343
343
|
}
|
|
344
344
|
};
|
|
345
|
+
//#region Show Exceptions
|
|
346
|
+
Blade.prototype.showExceptionOnStatusbar = function (data) {
|
|
347
|
+
var that = this;
|
|
348
|
+
that.statusbar = data.Message;
|
|
349
|
+
that.statusbar += ' - ';
|
|
350
|
+
data.Messages.forEach(function (item) {
|
|
351
|
+
that.statusbar += item + ' - ';
|
|
352
|
+
});
|
|
353
|
+
};
|
|
354
|
+
//#endregion
|
|
345
355
|
//#endregion
|
|
346
356
|
//#region Commands
|
|
347
357
|
Blade.prototype.onCommandBrowse = function () {
|
|
@@ -1105,6 +1115,21 @@ var angularportalazure;
|
|
|
1105
1115
|
}
|
|
1106
1116
|
angular.module('angularportalazure').directive('nav', ['$window', nav]);
|
|
1107
1117
|
})(angularportalazure || (angularportalazure = {}));
|
|
1118
|
+
//namespace angularportalazure {
|
|
1119
|
+
// /** If a Web API throws an exception, the following interface should be used to communicate the execption. */
|
|
1120
|
+
// export interface IException {
|
|
1121
|
+
// ExceptionType: string; // provided by the server
|
|
1122
|
+
// ClassName: string; // provided by the server - .NET exception class name
|
|
1123
|
+
// Data: Object; // provided by the server - object having trouble
|
|
1124
|
+
// Type: string; // provided by the server
|
|
1125
|
+
// Messages?: string[]; // provided by the server
|
|
1126
|
+
// Message: string; // provided by Web API or filled by the client if empty - .NET exception messages or user defined
|
|
1127
|
+
// MessageDetail: string; // Filled by the client - .NET exception detail message
|
|
1128
|
+
// Status: number; // Filled by the client - http error code
|
|
1129
|
+
// StatusText: string; // Filled by the client - http message
|
|
1130
|
+
// Url: string; // Filled by the client - http URL
|
|
1131
|
+
// }
|
|
1132
|
+
//}
|
|
1108
1133
|
/// <reference path="bladearea.ts" />
|
|
1109
1134
|
/// <reference path="debug.ts" />
|
|
1110
1135
|
/// <reference path="iexception.ts" />
|
|
@@ -1121,19 +1146,6 @@ var angularportalazure;
|
|
|
1121
1146
|
angularportalazure.Debug.write('[angularportalazure-debug] \'BladeData\' constructor called.', [_this, portalService, path, title, subtitle, width]);
|
|
1122
1147
|
return _this;
|
|
1123
1148
|
}
|
|
1124
|
-
//#endregion
|
|
1125
|
-
//#region Methods
|
|
1126
|
-
BladeData.prototype.processException = function (data) {
|
|
1127
|
-
var that = this;
|
|
1128
|
-
// Find a better way to log information, maybe to the database or to Google Analytics.
|
|
1129
|
-
console.log('Exception:');
|
|
1130
|
-
console.log(data);
|
|
1131
|
-
that.statusbar = data.Message;
|
|
1132
|
-
that.statusbar += ' - ';
|
|
1133
|
-
data.Messages.forEach(function (item) {
|
|
1134
|
-
that.statusbar += item + ' - ';
|
|
1135
|
-
});
|
|
1136
|
-
};
|
|
1137
1149
|
return BladeData;
|
|
1138
1150
|
}(angularportalazure.Blade));
|
|
1139
1151
|
angularportalazure.BladeData = BladeData;
|
|
@@ -1247,7 +1259,7 @@ var angularportalazure;
|
|
|
1247
1259
|
that.statusbar = '';
|
|
1248
1260
|
that.statusbarClass = '';
|
|
1249
1261
|
}).catch(function (exception) {
|
|
1250
|
-
that.statusbar = 'FEHLER: ' + exception;
|
|
1262
|
+
that.statusbar = 'FEHLER: ' + exception.Message;
|
|
1251
1263
|
that.statusbarClass = 'message-info message-off';
|
|
1252
1264
|
});
|
|
1253
1265
|
};
|
|
@@ -1418,7 +1430,24 @@ var angularportalazure;
|
|
|
1418
1430
|
var Exception = (function () {
|
|
1419
1431
|
function Exception() {
|
|
1420
1432
|
}
|
|
1421
|
-
|
|
1433
|
+
//#endregion
|
|
1434
|
+
Exception.prototype.processException = function (response) {
|
|
1435
|
+
var that = this;
|
|
1436
|
+
this.convertFromWebApiException(response.data);
|
|
1437
|
+
that.ExceptionType = response.data.ExceptionType;
|
|
1438
|
+
that.Type = response.data.Type;
|
|
1439
|
+
that.Message = response.data.Message;
|
|
1440
|
+
that.MessageDetail = response.data.MessageDetail;
|
|
1441
|
+
that.Messages = response.data.Messages;
|
|
1442
|
+
that.Url = response.config.url;
|
|
1443
|
+
that.Status = response.status;
|
|
1444
|
+
that.StatusText = response.statusText;
|
|
1445
|
+
// Find a better way to log information, maybe to the database or to Google Analytics.
|
|
1446
|
+
console.log('processException:');
|
|
1447
|
+
console.log(response);
|
|
1448
|
+
console.log(that);
|
|
1449
|
+
};
|
|
1450
|
+
Exception.prototype.convertFromWebApiException = function (ex) {
|
|
1422
1451
|
//#region Process data to Messages
|
|
1423
1452
|
ex.Messages = [];
|
|
1424
1453
|
var i = 1;
|
|
@@ -1443,15 +1472,22 @@ var angularportalazure;
|
|
|
1443
1472
|
ex.Type = 'ValidationsException';
|
|
1444
1473
|
}
|
|
1445
1474
|
//#endregion
|
|
1446
|
-
Exception.onConvertFromWebApiException(ex);
|
|
1447
|
-
};
|
|
1448
|
-
Exception.onConvertFromWebApiException = function (ex) {
|
|
1449
|
-
angularportalazure.Debug.write('[angularportalazure-debug] \'Exception.convertFromWebApiException\' not overriden. You could override this.', [this]);
|
|
1450
1475
|
};
|
|
1451
1476
|
return Exception;
|
|
1452
1477
|
}());
|
|
1453
1478
|
angularportalazure.Exception = Exception;
|
|
1454
1479
|
})(angularportalazure || (angularportalazure = {}));
|
|
1480
|
+
/// <reference path="debug.ts" />
|
|
1481
|
+
/// <reference path="iexception.ts" />
|
|
1482
|
+
var angularportalazure;
|
|
1483
|
+
(function (angularportalazure) {
|
|
1484
|
+
var IExceptionDotNet = (function () {
|
|
1485
|
+
function IExceptionDotNet() {
|
|
1486
|
+
}
|
|
1487
|
+
return IExceptionDotNet;
|
|
1488
|
+
}());
|
|
1489
|
+
angularportalazure.IExceptionDotNet = IExceptionDotNet;
|
|
1490
|
+
})(angularportalazure || (angularportalazure = {}));
|
|
1455
1491
|
/// <reference types="angular" />
|
|
1456
1492
|
var angularportalazure;
|
|
1457
1493
|
(function (angularportalazure) {
|
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.58",
|
|
6
6
|
"main": "index.js",
|
|
7
7
|
"typings": "apn.d.ts",
|
|
8
8
|
"dependencies": {
|