@ardimedia/angular-portal-azure 0.2.57 → 0.2.59
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 +14 -4
- package/apn.js +49 -20
- 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;
|
|
@@ -318,7 +319,6 @@ declare namespace angularportalazure {
|
|
|
318
319
|
declare namespace angularportalazure {
|
|
319
320
|
class BladeData extends angularportalazure.Blade {
|
|
320
321
|
constructor(portalService: angularportalazure.PortalService, path: string, title: string, subtitle?: string, width?: number);
|
|
321
|
-
processException(data: angularportalazure.Exception): void;
|
|
322
322
|
}
|
|
323
323
|
}
|
|
324
324
|
declare namespace angularportalazure {
|
|
@@ -364,7 +364,7 @@ declare namespace angularportalazure {
|
|
|
364
364
|
}
|
|
365
365
|
}
|
|
366
366
|
declare namespace angularportalazure {
|
|
367
|
-
class Exception {
|
|
367
|
+
class Exception implements angularportalazure.IExceptionDotNet {
|
|
368
368
|
ExceptionType: string;
|
|
369
369
|
ClassName: string;
|
|
370
370
|
Data: Object;
|
|
@@ -375,8 +375,18 @@ declare namespace angularportalazure {
|
|
|
375
375
|
Status: number;
|
|
376
376
|
StatusText: string;
|
|
377
377
|
Url: string;
|
|
378
|
-
|
|
379
|
-
|
|
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[];
|
|
380
390
|
}
|
|
381
391
|
}
|
|
382
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 () {
|
|
@@ -1136,19 +1146,6 @@ var angularportalazure;
|
|
|
1136
1146
|
angularportalazure.Debug.write('[angularportalazure-debug] \'BladeData\' constructor called.', [_this, portalService, path, title, subtitle, width]);
|
|
1137
1147
|
return _this;
|
|
1138
1148
|
}
|
|
1139
|
-
//#endregion
|
|
1140
|
-
//#region Methods
|
|
1141
|
-
BladeData.prototype.processException = function (data) {
|
|
1142
|
-
var that = this;
|
|
1143
|
-
// Find a better way to log information, maybe to the database or to Google Analytics.
|
|
1144
|
-
console.log('Exception:');
|
|
1145
|
-
console.log(data);
|
|
1146
|
-
that.statusbar = data.Message;
|
|
1147
|
-
that.statusbar += ' - ';
|
|
1148
|
-
data.Messages.forEach(function (item) {
|
|
1149
|
-
that.statusbar += item + ' - ';
|
|
1150
|
-
});
|
|
1151
|
-
};
|
|
1152
1149
|
return BladeData;
|
|
1153
1150
|
}(angularportalazure.Blade));
|
|
1154
1151
|
angularportalazure.BladeData = BladeData;
|
|
@@ -1249,7 +1246,16 @@ var angularportalazure;
|
|
|
1249
1246
|
if (onActivate === null || onActivate === undefined) {
|
|
1250
1247
|
}
|
|
1251
1248
|
else {
|
|
1252
|
-
that.loadItems(onActivate);
|
|
1249
|
+
//that.loadItems(onActivate);
|
|
1250
|
+
onActivate.then(function (data) {
|
|
1251
|
+
that.items = data;
|
|
1252
|
+
that.statusbar = '';
|
|
1253
|
+
that.statusbarClass = '';
|
|
1254
|
+
}).catch(function (exception) {
|
|
1255
|
+
console.log(exception);
|
|
1256
|
+
that.statusbar = 'FEHLER: ' + exception.Message;
|
|
1257
|
+
that.statusbarClass = 'message-info message-off';
|
|
1258
|
+
});
|
|
1253
1259
|
}
|
|
1254
1260
|
};
|
|
1255
1261
|
BladeGrid.prototype.onActivate = function () {
|
|
@@ -1262,7 +1268,7 @@ var angularportalazure;
|
|
|
1262
1268
|
that.statusbar = '';
|
|
1263
1269
|
that.statusbarClass = '';
|
|
1264
1270
|
}).catch(function (exception) {
|
|
1265
|
-
that.statusbar = 'FEHLER: ' + exception;
|
|
1271
|
+
that.statusbar = 'FEHLER: ' + exception.Message;
|
|
1266
1272
|
that.statusbarClass = 'message-info message-off';
|
|
1267
1273
|
});
|
|
1268
1274
|
};
|
|
@@ -1434,7 +1440,23 @@ var angularportalazure;
|
|
|
1434
1440
|
function Exception() {
|
|
1435
1441
|
}
|
|
1436
1442
|
//#endregion
|
|
1437
|
-
Exception.
|
|
1443
|
+
Exception.prototype.processException = function (response) {
|
|
1444
|
+
var that = this;
|
|
1445
|
+
this.convertFromWebApiException(response.data);
|
|
1446
|
+
that.ExceptionType = response.data.ExceptionType;
|
|
1447
|
+
that.Type = response.data.Type;
|
|
1448
|
+
that.Message = response.data.Message;
|
|
1449
|
+
that.MessageDetail = response.data.MessageDetail;
|
|
1450
|
+
that.Messages = response.data.Messages;
|
|
1451
|
+
that.Url = response.config.url;
|
|
1452
|
+
that.Status = response.status;
|
|
1453
|
+
that.StatusText = response.statusText;
|
|
1454
|
+
// Find a better way to log information, maybe to the database or to Google Analytics.
|
|
1455
|
+
console.log('processException:');
|
|
1456
|
+
console.log(response);
|
|
1457
|
+
console.log(that);
|
|
1458
|
+
};
|
|
1459
|
+
Exception.prototype.convertFromWebApiException = function (ex) {
|
|
1438
1460
|
//#region Process data to Messages
|
|
1439
1461
|
ex.Messages = [];
|
|
1440
1462
|
var i = 1;
|
|
@@ -1459,15 +1481,22 @@ var angularportalazure;
|
|
|
1459
1481
|
ex.Type = 'ValidationsException';
|
|
1460
1482
|
}
|
|
1461
1483
|
//#endregion
|
|
1462
|
-
Exception.onConvertFromWebApiException(ex);
|
|
1463
|
-
};
|
|
1464
|
-
Exception.onConvertFromWebApiException = function (ex) {
|
|
1465
|
-
angularportalazure.Debug.write('[angularportalazure-debug] \'Exception.convertFromWebApiException\' not overriden. You could override this.', [this]);
|
|
1466
1484
|
};
|
|
1467
1485
|
return Exception;
|
|
1468
1486
|
}());
|
|
1469
1487
|
angularportalazure.Exception = Exception;
|
|
1470
1488
|
})(angularportalazure || (angularportalazure = {}));
|
|
1489
|
+
/// <reference path="debug.ts" />
|
|
1490
|
+
/// <reference path="iexception.ts" />
|
|
1491
|
+
var angularportalazure;
|
|
1492
|
+
(function (angularportalazure) {
|
|
1493
|
+
var IExceptionDotNet = (function () {
|
|
1494
|
+
function IExceptionDotNet() {
|
|
1495
|
+
}
|
|
1496
|
+
return IExceptionDotNet;
|
|
1497
|
+
}());
|
|
1498
|
+
angularportalazure.IExceptionDotNet = IExceptionDotNet;
|
|
1499
|
+
})(angularportalazure || (angularportalazure = {}));
|
|
1471
1500
|
/// <reference types="angular" />
|
|
1472
1501
|
var angularportalazure;
|
|
1473
1502
|
(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.59",
|
|
6
6
|
"main": "index.js",
|
|
7
7
|
"typings": "apn.d.ts",
|
|
8
8
|
"dependencies": {
|