@@ -1275,7 +1275,7 @@ export class RoleCtrl extends entityCtrl<Role> {
12751275 { name : this . searchtext }
12761276 ]
12771277 }
1278- , null , { _type : - 1 , name : 1 } , 1 , 0 , null ) ;
1278+ , null , { _type : - 1 , name : 1 } , 2 , 0 , null ) ;
12791279
12801280 this . searchFilteredList = this . searchFilteredList . concat ( await NoderedUtil . Query ( "users" ,
12811281 {
@@ -1480,30 +1480,35 @@ export class FilesCtrl extends entitiesCtrl<Base> {
14801480 xhr . send ( fd ) ;
14811481 }
14821482 async Upload_usingapi ( ) {
1483- var filename = ( this . $scope as any ) . filename ;
1484- var type = ( this . $scope as any ) . type ;
1485- console . debug ( "filename: " + filename + " type: " + type ) ;
1486- this . loading = true ;
1487- if ( ! this . $scope . $$phase ) { this . $scope . $apply ( ) ; }
1488- var lastp : number = 0 ;
1489- await NoderedUtil . SaveFile ( filename , type , null , this . file , null ) ;
1490- // await NoderedUtil.SaveFile(filename, type, null, this.file, (msg, index, count) => {
1491- // var p: number = ((index + 1) / count * 100) | 0;
1492- // if (p > lastp || (index + 1) == count) {
1493- // console.debug(index + "/" + count + " " + p + "%");
1494- // lastp = p;
1495- // }
1496- // var elem = document.getElementById("myBar");
1497- // elem.style.width = p + '%';
1498- // elem.innerText = p + '%';
1499- // if (p == 100) {
1500- // elem.innerText = 'Processing ...';
1501- // }
1502- // });
1503- var elem = document . getElementById ( "myBar" ) ;
1504- elem . style . width = '0%' ;
1505- elem . innerText = '' ;
1506- this . loading = false ;
1483+ try {
1484+ var filename = ( this . $scope as any ) . filename ;
1485+ var type = ( this . $scope as any ) . type ;
1486+ console . debug ( "filename: " + filename + " type: " + type ) ;
1487+ this . loading = true ;
1488+ if ( ! this . $scope . $$phase ) { this . $scope . $apply ( ) ; }
1489+ var lastp : number = 0 ;
1490+ await NoderedUtil . SaveFile ( filename , type , null , this . file , null ) ;
1491+ // await NoderedUtil.SaveFile(filename, type, null, this.file, (msg, index, count) => {
1492+ // var p: number = ((index + 1) / count * 100) | 0;
1493+ // if (p > lastp || (index + 1) == count) {
1494+ // console.debug(index + "/" + count + " " + p + "%");
1495+ // lastp = p;
1496+ // }
1497+ // var elem = document.getElementById("myBar");
1498+ // elem.style.width = p + '%';
1499+ // elem.innerText = p + '%';
1500+ // if (p == 100) {
1501+ // elem.innerText = 'Processing ...';
1502+ // }
1503+ // });
1504+ var elem = document . getElementById ( "myBar" ) ;
1505+ elem . style . width = '0%' ;
1506+ elem . innerText = '' ;
1507+ this . loading = false ;
1508+
1509+ } catch ( error ) {
1510+ console . error ( error ) ;
1511+ }
15071512 if ( ! this . $scope . $$phase ) { this . $scope . $apply ( ) ; }
15081513 this . loadData ( ) ;
15091514 }
@@ -2562,7 +2567,7 @@ export class EntityCtrl extends entityCtrl<Base> {
25622567 { name : this . searchtext }
25632568 ]
25642569 }
2565- , null , { _type : - 1 , name : 1 } , 1 , 0 , null ) ;
2570+ , null , { _type : - 1 , name : 1 } , 2 , 0 , null ) ;
25662571
25672572 this . searchFilteredList = this . searchFilteredList . concat ( await NoderedUtil . Query ( "users" ,
25682573 {
@@ -3920,7 +3925,7 @@ export class CredentialCtrl extends entityCtrl<Base> {
39203925 { name : this . searchtext }
39213926 ]
39223927 }
3923- , null , { _type : - 1 , name : 1 } , 1 , 0 , null ) ;
3928+ , null , { _type : - 1 , name : 1 } , 2 , 0 , null ) ;
39243929
39253930 this . searchFilteredList = this . searchFilteredList . concat ( await NoderedUtil . Query ( "users" ,
39263931 {
0 commit comments