@@ -157,12 +157,12 @@ define(function() {
157
157
$ ( '#fileSystemSambaDomain' ) . val ( clientOptions . SAMBA_DOMAIN ) ;
158
158
$ ( '#fileSystemSambaShare' ) . val ( clientOptions . SAMBA_SHARE_NAME ) ;
159
159
} else if ( isSftpClient ) {
160
- // $('#fileSystemDetailsSftpDirChoiceRow').show();
161
160
$ ( '#fileSystemSftpServerPublicKey' ) . val ( clientOptions . SFTP_SERVER_PUBLIC_KEY ) ;
162
161
} else if ( isIrodsClient ) {
163
162
$ ( '#fileSystemIrodsZone' ) . val ( clientOptions . IRODS_ZONE ) ;
164
163
$ ( '#fileSystemIrodsHomeDir' ) . val ( clientOptions . IRODS_HOME_DIR ) ;
165
164
$ ( '#fileSystemIrodsPort' ) . val ( clientOptions . IRODS_PORT ) ;
165
+ $ ( '#fileSystemIrodsCsneg' ) . val ( clientOptions . IRODS_CSNEG ) ;
166
166
}
167
167
168
168
var isPasswordAuth = isExistingFileSystem && fileSystem . authType === 'PASSWORD' ;
@@ -174,6 +174,19 @@ define(function() {
174
174
175
175
$ ( '#fileSystemPubKeyRegistrationUrl' ) . val ( "" ) ;
176
176
177
+
178
+ if ( fileSystem . clientType === 'IRODS' ) {
179
+ var rows = fileSystem . clientOptions . split ( '\n' ) ;
180
+ for ( var i = 0 ; i < rows . length ; i ++ ) {
181
+ var currRow = rows [ i ] ;
182
+ var currRowValue = currRow . substring ( currRow . indexOf ( '=' ) + 1 ) ;
183
+ if ( currRow . indexOf ( 'IRODS_AUTH' ) === 0 ) {
184
+ $ ( '#iRODSfileSystemAuthTypeNative' ) . prop ( 'checked' , currRowValue === 'NATIVE' ) ;
185
+ $ ( '#iRODSfileSystemAuthTypePAM' ) . prop ( 'checked' , currRowValue === 'PAM' ) ;
186
+ }
187
+ }
188
+ }
189
+
177
190
if ( fileSystem . authOptions ) {
178
191
if ( isPubKeyAuth ) {
179
192
var rows = fileSystem . authOptions . split ( '\n' ) ;
@@ -236,9 +249,7 @@ define(function() {
236
249
clientOptions += "\nUSER_DIRS_REQUIRED=" + dirsRequired ;
237
250
}
238
251
} else if ( clientType === 'IRODS' ) {
239
- clientOptions = "IRODS_ZONE=" + $ ( '#fileSystemIrodsZone' ) . val ( )
240
- + "\nIRODS_HOME_DIR=" + $ ( '#fileSystemIrodsHomeDir' ) . val ( )
241
- + "\nIRODS_PORT=" + $ ( '#fileSystemIrodsPort' ) . val ( ) ;
252
+ clientOptions = "IRODS_ZONE=" + $ ( '#fileSystemIrodsZone' ) . val ( ) + "\nIRODS_HOME_DIR=" + $ ( '#fileSystemIrodsHomeDir' ) . val ( ) + "\nIRODS_PORT=" + $ ( '#fileSystemIrodsPort' ) . val ( ) + "\nIRODS_CSNEG=" + $ ( '#fileSystemIrodsCsneg' ) . val ( ) + "\nIRODS_AUTH=" + $ ( 'input[name="iRODSfileSystemAuthType"]:checked' ) . val ( ) + "\n" ;
242
253
}
243
254
244
255
var fileSystem = {
@@ -251,7 +262,7 @@ define(function() {
251
262
clientOptions : clientOptions ,
252
263
authOptions : authOptions
253
264
} ;
254
- console . log ( "File System:" , fileSystem ) ;
265
+ // console.log("File System:", fileSystem);
255
266
RS . blockPage ( "Saving..." ) ;
256
267
var jqxhr = RS . sendJsonPostRequestToUrl ( '/system/netfilesystem/save' , fileSystem ) ;
257
268
jqxhr . done ( function ( ) {
@@ -304,7 +315,9 @@ define(function() {
304
315
$ ( '.fileSystemDetailsIrodsZoneRow' ) . toggle ( isIrodsClient ) ;
305
316
$ ( '.fileSystemDetailsIrodsHomeDirRow' ) . toggle ( isIrodsClient ) ;
306
317
$ ( '.fileSystemDetailsIrodsPortRow' ) . toggle ( isIrodsClient ) ;
307
-
318
+ $ ( '.fileSystemDetailsIrodsCsnegRow' ) . toggle ( isIrodsClient ) ;
319
+ $ ( '.fileSystemDetailsIrodsAuthRow' ) . toggle ( isIrodsClient ) ;
320
+
308
321
$ ( '#fileSystemAuthTypePubKey' ) . prop ( 'disabled' , isSambaClient ) ;
309
322
if ( isSambaClient ) {
310
323
$ ( '#fileSystemAuthTypePassword' ) . click ( ) ;
@@ -323,8 +336,9 @@ define(function() {
323
336
. removeAttr ( 'pattern' )
324
337
. attr ( 'title' , 'iRODS hostname or IP without protocol' ) ;
325
338
$ ( "label[for='fileSystemUrl']" ) . text ( 'iRODS Host' ) ;
326
- $ ( "label[for='fileSystemAuthTypePubKey']" ) . hide ( ) ;
327
- $ ( '#fileSystemAuthTypePasswordSpan' ) . text ( 'Native' ) ;
339
+ $ ( "label[for='fileSystemAuthTypePubKey']" ) . hide ( ) ;
340
+ //$('#fileSystemAuthTypePasswordSpan').text('Native');
341
+ $ ( '#fileSystemAuthTypePasswordSpan' ) . text ( sysNetfileSysDetAuthPasswd ) ;
328
342
} else {
329
343
$ ( '#fileSystemUrl' ) . removeAttr ( 'title' ) . removeAttr ( 'pattern' ) ;
330
344
$ ( "label[for='fileSystemAuthTypePubKey']" ) . show ( ) ;
0 commit comments