Best JavaScript code snippet using ladle
euSysConfig.mock.js
Source:euSysConfig.mock.js
1const sysConfig =2 [{3 path: '/act-monitor-web/common/systemConfig/initialize.do',4 data: {5 'success': [6 {7 'configid': 'center_flag',8 'defaultval': 'N',9 'configval': 'N',10 'title': 'å®å
¨ä¸å¿å¼å
³',11 'showType': '2'12 },13 {14 'configid': 'recur_ws_off',15 'defaultval': 'N',16 'configval': 'N',17 'title': 'éå½æå¡åºç¡ä»£ç ä¸è½½å¼å
³',18 'showType': '2'19 },20 {21 'configid': 'recur_ws_url',22 'defaultval': '',23 'configval': 'a',24 'title': 'éå½æå¡åºç¡ä»£ç ä¸è½½æ¥å£',25 'showType': '0'26 },27 {28 'configid': 'recur_jks_pwd',29 'defaultval': 'iUvFxu',30 'configval': 'iUvFxu',31 'title': 'éå½æå¡KeyStoreå¯ç ',32 'showType': '0'33 },34 {35 'configid': 'recur_file_pwd',36 'defaultval': 'baed6be6c20cc13d3560e7c15bd24c7d',37 'configval': 'baed6be6c20cc13d3560e7c15bd24c7d',38 'title': 'éå½æ件å¯ç ',39 'showType': '0'40 },41 {42 'configid': 'recur_file_pyl',43 'defaultval': '9b2126006d3805cecaedfa2ebb082a49',44 'configval': '9b2126006d3805cecaedfa2ebb082a49',45 'title': 'éå½æ件å移é',46 'showType': '0'47 },48 {49 'configid': 'recur_jks_alias',50 'defaultval': 'def8e-69',51 'configval': 'def8e-69',52 'title': 'éå½æå¡Keystoreå«å',53 'showType': '0'54 },55 {56 'configid': 'recur_jks_pripwd',57 'defaultval': 'LYbTGh',58 'configval': 'LYbTGh',59 'title': 'éå½æå¡Keystoreç§é¥è·åå¯ç ',60 'showType': '0'61 },62 {63 'configid': 'recur_enterprise_id',64 'defaultval': '67b4e5269b0c45ceb9ac7c4dd2adef8e',65 'configval': '67b4e5269b0c45ceb9ac7c4dd2adef8e',66 'title': 'éå½æå¡ä¼ä¸ID',67 'showType': '0'68 },69 {70 'configid': 'recur_user_password',71 'defaultval': 'Yoiq6HkO71SHel1l',72 'configval': 'Yoiq6HkO71SHel1l',73 'title': 'éå½æå¡ç¨æ·å¯ç ',74 'showType': '0'75 },76 {77 'configid': 'recur_basecode_cycle',78 'defaultval': '24',79 'configval': '24',80 'title': 'éå½æå¡åºç¡ä»£ç ä¸è½½å¨æ(åä½:å°æ¶)',81 'showType': '0'82 },83 {84 'configid': 'authority_ws_off',85 'defaultval': 'N',86 'configval': 'N',87 'title': 'æå¨æå¡åºç¡ä»£ç ä¸è½½å¼å
³',88 'showType': '2'89 },90 {91 'configid': 'authority_ws_url',92 'defaultval': '',93 'configval': 'a',94 'title': 'æå¨æå¡åºç¡ä»£ç ä¸è½½æ¥å£',95 'showType': '0'96 },97 {98 'configid': 'authority_jks_pwd',99 'defaultval': 'C6SBN8',100 'configval': 'C6SBN8',101 'title': 'æå¨æå¡Keystoreå¯ç ',102 'showType': '0'103 },104 {105 'configid': 'authority_file_pwd',106 'defaultval': 'e78212936280fcac62a839a1ede6222e',107 'configval': 'e78212936280fcac62a839a1ede6222e',108 'title': 'æå¨æ件å¯ç ',109 'showType': '0'110 },111 {112 'configid': 'authority_file_pyl',113 'defaultval': '8a3626ef7bd0a6c45c2c534a49b721f7',114 'configval': '8a3626ef7bd0a6c45c2c534a49b721f7',115 'title': 'æå¨æ件å移é',116 'showType': '0'117 },118 {119 'configid': 'authority_jks_alias',120 'defaultval': '0f24d-44',121 'configval': '0f24d-44',122 'title': 'æå¨æå¡Keystoreå«å',123 'showType': '0'124 },125 {126 'configid': 'authority_jks_pripwd',127 'defaultval': '9jPdtK',128 'configval': '9jPdtK',129 'title': 'æå¨æå¡Keystoreç§é¥å¯ç ',130 'showType': '0'131 },132 {133 'configid': 'authority_enterprise_id',134 'defaultval': 'decdb852aa1c46a9af0b71b6aca0f24d',135 'configval': 'decdb852aa1c46a9af0b71b6aca0f24d',136 'title': 'æå¨æå¡ä¼ä¸ID',137 'showType': '0'138 },139 {140 'configid': 'authority_user_password',141 'defaultval': 'DkbQT4W7tSWsY5mx',142 'configval': 'DkbQT4W7tSWsY5mx',143 'title': 'æå¨æå¡ç¨æ·å¯ç ',144 'showType': '0'145 },146 {147 'configid': 'authority_basecode_cycle',148 'defaultval': '24',149 'configval': '24',150 'title': 'æå¨æå¡åºç¡ä»£ç ä¸è½½å¨æ(åä½:å°æ¶)',151 'showType': '0'152 },153 {154 'configid': 'domain_ws_off',155 'defaultval': 'N',156 'configval': 'N',157 'title': 'åå注åæå¡åºç¡ä»£ç ä¸è½½å¼å
³',158 'showType': '2'159 },160 {161 'configid': 'domain_jks_pwd',162 'defaultval': 'g49d0y',163 'configval': 'g49d0y',164 'title': 'åå注åæå¡Keystoreå¯ç ',165 'showType': '0'166 },167 {168 'configid': 'domain_sftp_pwd',169 'defaultval': 'pQJwifc9U2K4VEGqbRs0',170 'configval': 'pQJwifc9U2K4VEGqbRs0',171 'title': 'åå注åæå¡SFTPä¸è½½å¯ç ',172 'showType': '0'173 },174 {175 'configid': 'domain_jks_alias',176 'defaultval': 'fdbe5-43',177 'configval': 'fdbe5-43',178 'title': 'åå注åæå¡Keystoreå«å',179 'showType': '0'180 },181 {182 'configid': 'domain_server_ip',183 'defaultval': '202.108.211.44',184 'configval': '202.108.211.44',185 'title': 'åå注åæå¡SFTPä¸è½½å°å',186 'showType': '0'187 },188 {189 'configid': 'domain_sftp_path',190 'defaultval': '/basecode/dn/service',191 'configval': '/basecode/dn/service',192 'title': 'åå注åæå¡SFTPä¸è½½è·¯å¾',193 'showType': '0'194 },195 {196 'configid': 'domain_sftp_user',197 'defaultval': 'jczydownload',198 'configval': 'jczydownload',199 'title': 'åå注åæå¡SFTPä¸è½½ç¨æ·',200 'showType': '0'201 },202 {203 'configid': 'domain_jks_pripwd',204 'defaultval': 'M9h79H',205 'configval': 'M9h79H',206 'title': 'åå注åæå¡Keystoreç§é¥å¯ç ',207 'showType': '0'208 },209 {210 'configid': 'domain_server_port',211 'defaultval': '2001',212 'configval': '2001',213 'title': 'åå注åæå¡SFTPä¸è½½ç«¯å£',214 'showType': '0'215 },216 {217 'configid': 'domain_enterprise_id',218 'defaultval': 'f14989d00b6f448087fb6009c59fdbe5',219 'configval': 'f14989d00b6f448087fb6009c59fdbe5',220 'title': 'åå注åæå¡ä¼ä¸ID',221 'showType': '0'222 },223 {224 'configid': 'domain_user_password',225 'defaultval': 'Iq29wTx2EySRVwFA',226 'configval': 'Iq29wTx2EySRVwFA',227 'title': 'åå注åæå¡ç¨æ·å¯ç ',228 'showType': '0'229 },230 {231 'configid': 'domain_basecode_cycle',232 'defaultval': '24',233 'configval': '24',234 'title': 'åå注åæå¡åºç¡ä»£ç ä¸è½½å¨æ(åä½:å°æ¶)',235 'showType': '0'236 },237 {238 'configid': 'domain_regist_file_pwd',239 'defaultval': '3d7254b50710dafe2da731c4058a7739',240 'configval': '3d7254b50710dafe2da731c4058a7739',241 'title': 'åå注åæ件å¯ç ',242 'showType': '0'243 },244 {245 'configid': 'domain_regist_file_pyl',246 'defaultval': 'fcebf7429730b1f3e5b4e3bbb0b7b96d',247 'configval': 'fcebf7429730b1f3e5b4e3bbb0b7b96d',248 'title': 'åå注åæ件å移é',249 'showType': '0'250 },251 {252 'configid': 'domain_regist_upload_sftp_ip',253 'defaultval': '127.0.0.1',254 'configval': '127.0.0.1',255 'title': 'åå注åè®°å½ä¸æ¥SFTPå°å',256 'showType': '0'257 },258 {259 'configid': 'domain_regist_upload_sftp_pwd',260 'defaultval': '123456',261 'configval': '123456',262 'title': 'åå注åè®°å½ä¸æ¥SFTPå¯ç ',263 'showType': '0'264 },265 {266 'configid': 'domain_regist_upload_sftp_path',267 'defaultval': 'upload/source',268 'configval': '/upload/source',269 'title': 'åå注åè®°å½ä¸æ¥SFTPè·¯å¾',270 'showType': '0'271 },272 {273 'configid': 'domain_regist_upload_sftp_port',274 'defaultval': '22',275 'configval': '22',276 'title': 'åå注åè®°å½ä¸æ¥SFTP端å£',277 'showType': '0'278 },279 {280 'configid': 'domain_regist_upload_sftp_switch',281 'defaultval': 'Y',282 'configval': 'Y',283 'title': 'åå注åä¸æ¥å¼å
³',284 'showType': '2'285 },286 {287 'configid': 'domain_regist_upload_sftp_username',288 'defaultval': 'dnsmSftp',289 'configval': 'dnsmSftp',290 'title': 'åå注åè®°å½ä¸æ¥SFTPç¨æ·å',291 'showType': '0'292 },293 {294 'configid': 'source_record_sftp_ip',295 'defaultval': '127.0.0.1',296 'configval': '127.0.0.1',297 'title': 'åæ¾èµæºè®°å½zoonæ件sftpå°å',298 'showType': '0'299 },300 {301 'configid': 'source_record_sftp_pwd',302 'defaultval': '123456',303 'configval': '123456',304 'title': 'åæ¾èµæºè®°å½zoonæ件sftpå¯ç ',305 'showType': '0'306 },307 {308 'configid': 'source_record_xml_path',309 'defaultval': '/date/xml/source',310 'configval': '/date/xml/source',311 'title': 'èµæºè®°å½ä¸æ¥xmlæ¬å°è®°å½',312 'showType': '0'313 },314 {315 'configid': 'source_record_sftp_port',316 'defaultval': '22',317 'configval': '22',318 'title': 'åæ¾èµæºè®°å½zoonæ件sftp端å£',319 'showType': '0'320 },321 {322 'configid': 'source_record_sftp_username',323 'defaultval': 'dnsmSftp',324 'configval': 'dnsmSftp',325 'title': 'åæ¾èµæºè®°å½zoonæ件sftpç¨æ·å',326 'showType': '0'327 },328 {329 'configid': 'source_record_sftp_zoon_path',330 'defaultval': 'upload/source',331 'configval': 'upload/source',332 'title': 'åæ¾èµæºè®°å½zoonæ件sftpè·¯å¾',333 'showType': '0'334 },335 {336 'configid': 'source_record_sftp_upload_path',337 'defaultval': 'upload/source',338 'configval': 'upload/source',339 'title': 'èµæºè®°å½æ件ä¸æ¥å°å',340 'showType': '0'341 },342 {343 'configid': 'source_record_sftp_upload_switch',344 'defaultval': 'Y',345 'configval': 'Y',346 'title': 'èµæºè®°å½ä¸æ¥å¼å
³',347 'showType': '2'348 },349 {350 'configid': 'smms_flag',351 'defaultval': 'N',352 'configval': 'N',353 'title': 'ç 究é¢å¼å
³',354 'showType': '2'355 },356 {357 'configid': 'isms_auth_dnsId',358 'defaultval': '2017060100453100002',359 'configval': '2017060100453100002',360 'title': 'æå¨ä¼ä¸ID',361 'showType': '0'362 },363 {364 'configid': 'isms_recur_dnsId',365 'defaultval': '2017060100453100001',366 'configval': '2017060100453100001',367 'title': 'éå½ä¼ä¸ID',368 'showType': '0'369 },370 {371 'configid': 'isms_domain_dnsId',372 'defaultval': '2017060100453100003',373 'configval': '2017060100453100003',374 'title': 'åå注åä¼ä¸ID',375 'showType': '0'376 },377 {378 'configid': 'isms_zip',379 'defaultval': 'Y',380 'configval': 'Y',381 'title': 'æ¯å¦ä½¿ç¨zipå缩',382 'showType': '2'383 },384 {385 'configid': 'isms_hash',386 'defaultval': '1',387 'configval': '1',388 'title': 'åå¸ç®æ³',389 'showType': '1'390 },391 {392 'configid': 'isms_encode',393 'defaultval': 'Y',394 'configval': 'Y',395 'title': 'æ¯å¦å å¯',396 'showType': '2'397 },398 {399 'configid': 'isms_msg_key',400 'defaultval': '1234567890abcDEF',401 'configval': '1234567890abcDEF',402 'title': 'æ¶æ¯è®¤è¯å¯é¥',403 'showType': '0'404 },405 {406 'configid': 'isms_pad_key',407 'defaultval': '1234567890abcDEF',408 'configval': '1234567890abcDEF',409 'title': 'å å¯å¯é¥',410 'showType': '0'411 },412 {413 'configid': 'isms_pass_py',414 'defaultval': '1234567890abcDEF',415 'configval': '1234567890abcDEF',416 'title': 'æ°æ®å å¯å¯åå移é',417 'showType': '0'418 },419 {420 'configid': 'isms_user_pass',421 'defaultval': '1234567890abcDEF',422 'configval': '1234567890abcDEF',423 'title': 'ç¨æ·å£ä»¤',424 'showType': '0'425 },426 {427 'configid': 'isms_sftp_ip',428 'defaultval': '127.0.0.1',429 'configval': '127.0.0.1',430 'title': 'æ¥å¿æå¡å¨SFTPIPå°å',431 'showType': '0'432 },433 {434 'configid': 'smms_version',435 'defaultval': '1.0',436 'configval': '1.0',437 'title': '管å±æ¥å£çæ¬',438 'showType': '0'439 },440 {441 'configid': 'isms_sftp_port',442 'defaultval': '22',443 'configval': '22',444 'title': 'æ¥å¿æå¡å¨SFTP端å£',445 'showType': '0'446 },447 {448 'configid': 'isms_sftp_user',449 'defaultval': 'dnsmSftp',450 'configval': 'dnsmSftp',451 'title': 'æ¥å¿æå¡å¨SFTPç¨æ·å',452 'showType': '0'453 },454 {455 'configid': 'isms_sftp_password',456 'defaultval': 'yhsj@2017',457 'configval': 'yhsj@2017',458 'title': 'æ¥å¿æå¡å¨SFTPå¯ç ',459 'showType': '0'460 },461 {462 'configid': 'isms_center_num',463 'defaultval': '20',464 'configval': '20',465 'title': 'dnsæ¢éä¸å¿ç«¯ä¸ªæ°',466 'showType': '0'467 },468 {469 'configid': 'isms_smms_ws_url',470 'defaultval': 'http://127.0.0.1:9090/ismi-gj/ws/DnsAckWebService/dns_commandack?wsdl',471 'configval': 'http://127.0.0.1:9090/ismi-gj/ws/DnsAckWebService/dns_commandack?wsdl',472 'title': '管å±ä¾§dns_commandackæ¥å£å°å',473 'showType': '0'474 }475 ]476 }477 }]...
cuSysConfig.mock.js
Source:cuSysConfig.mock.js
1const sysConfig =2 [{3 path: '/act-monitor-web/common/systemConfig/initialize.do',4 data: {5 'success': [6 {7 'configid': 'center_flag',8 'defaultval': 'N',9 'configval': 'N',10 'title': 'å®å
¨ä¸å¿å¼å
³',11 'showType': '2'12 },13 {14 'configid': 'recur_ws_off',15 'defaultval': 'N',16 'configval': 'N',17 'title': 'éå½æå¡åºç¡ä»£ç ä¸è½½å¼å
³',18 'showType': '2'19 },20 {21 'configid': 'recur_ws_url',22 'defaultval': '',23 'configval': 'a',24 'title': 'éå½æå¡åºç¡ä»£ç ä¸è½½æ¥å£',25 'showType': '0'26 },27 {28 'configid': 'recur_jks_pwd',29 'defaultval': 'iUvFxu',30 'configval': 'iUvFxu',31 'title': 'éå½æå¡KeyStoreå¯ç ',32 'showType': '0'33 },34 {35 'configid': 'recur_file_pwd',36 'defaultval': 'baed6be6c20cc13d3560e7c15bd24c7d',37 'configval': 'baed6be6c20cc13d3560e7c15bd24c7d',38 'title': 'éå½æ件å¯ç ',39 'showType': '0'40 },41 {42 'configid': 'recur_file_pyl',43 'defaultval': '9b2126006d3805cecaedfa2ebb082a49',44 'configval': '9b2126006d3805cecaedfa2ebb082a49',45 'title': 'éå½æ件å移é',46 'showType': '0'47 },48 {49 'configid': 'recur_jks_alias',50 'defaultval': 'def8e-69',51 'configval': 'def8e-69',52 'title': 'éå½æå¡Keystoreå«å',53 'showType': '0'54 },55 {56 'configid': 'recur_jks_pripwd',57 'defaultval': 'LYbTGh',58 'configval': 'LYbTGh',59 'title': 'éå½æå¡Keystoreç§é¥è·åå¯ç ',60 'showType': '0'61 },62 {63 'configid': 'recur_enterprise_id',64 'defaultval': '67b4e5269b0c45ceb9ac7c4dd2adef8e',65 'configval': '67b4e5269b0c45ceb9ac7c4dd2adef8e',66 'title': 'éå½æå¡ä¼ä¸ID',67 'showType': '0'68 },69 {70 'configid': 'recur_user_password',71 'defaultval': 'Yoiq6HkO71SHel1l',72 'configval': 'Yoiq6HkO71SHel1l',73 'title': 'éå½æå¡ç¨æ·å¯ç ',74 'showType': '0'75 },76 {77 'configid': 'recur_basecode_cycle',78 'defaultval': '24',79 'configval': '24',80 'title': 'éå½æå¡åºç¡ä»£ç ä¸è½½å¨æ(åä½:å°æ¶)',81 'showType': '0'82 },83 {84 'configid': 'authority_ws_off',85 'defaultval': 'N',86 'configval': 'N',87 'title': 'æå¨æå¡åºç¡ä»£ç ä¸è½½å¼å
³',88 'showType': '2'89 },90 {91 'configid': 'authority_ws_url',92 'defaultval': '',93 'configval': 'a',94 'title': 'æå¨æå¡åºç¡ä»£ç ä¸è½½æ¥å£',95 'showType': '0'96 },97 {98 'configid': 'authority_jks_pwd',99 'defaultval': 'C6SBN8',100 'configval': 'C6SBN8',101 'title': 'æå¨æå¡Keystoreå¯ç ',102 'showType': '0'103 },104 {105 'configid': 'authority_file_pwd',106 'defaultval': 'e78212936280fcac62a839a1ede6222e',107 'configval': 'e78212936280fcac62a839a1ede6222e',108 'title': 'æå¨æ件å¯ç ',109 'showType': '0'110 },111 {112 'configid': 'authority_file_pyl',113 'defaultval': '8a3626ef7bd0a6c45c2c534a49b721f7',114 'configval': '8a3626ef7bd0a6c45c2c534a49b721f7',115 'title': 'æå¨æ件å移é',116 'showType': '0'117 },118 {119 'configid': 'authority_jks_alias',120 'defaultval': '0f24d-44',121 'configval': '0f24d-44',122 'title': 'æå¨æå¡Keystoreå«å',123 'showType': '0'124 },125 {126 'configid': 'authority_jks_pripwd',127 'defaultval': '9jPdtK',128 'configval': '9jPdtK',129 'title': 'æå¨æå¡Keystoreç§é¥å¯ç ',130 'showType': '0'131 },132 {133 'configid': 'authority_enterprise_id',134 'defaultval': 'decdb852aa1c46a9af0b71b6aca0f24d',135 'configval': 'decdb852aa1c46a9af0b71b6aca0f24d',136 'title': 'æå¨æå¡ä¼ä¸ID',137 'showType': '0'138 },139 {140 'configid': 'authority_user_password',141 'defaultval': 'DkbQT4W7tSWsY5mx',142 'configval': 'DkbQT4W7tSWsY5mx',143 'title': 'æå¨æå¡ç¨æ·å¯ç ',144 'showType': '0'145 },146 {147 'configid': 'authority_basecode_cycle',148 'defaultval': '24',149 'configval': '24',150 'title': 'æå¨æå¡åºç¡ä»£ç ä¸è½½å¨æ(åä½:å°æ¶)',151 'showType': '0'152 },153 {154 'configid': 'domain_ws_off',155 'defaultval': 'N',156 'configval': 'N',157 'title': 'åå注åæå¡åºç¡ä»£ç ä¸è½½å¼å
³',158 'showType': '2'159 },160 {161 'configid': 'domain_jks_pwd',162 'defaultval': 'g49d0y',163 'configval': 'g49d0y',164 'title': 'åå注åæå¡Keystoreå¯ç ',165 'showType': '0'166 },167 {168 'configid': 'domain_sftp_pwd',169 'defaultval': 'pQJwifc9U2K4VEGqbRs0',170 'configval': 'pQJwifc9U2K4VEGqbRs0',171 'title': 'åå注åæå¡SFTPä¸è½½å¯ç ',172 'showType': '0'173 },174 {175 'configid': 'domain_jks_alias',176 'defaultval': 'fdbe5-43',177 'configval': 'fdbe5-43',178 'title': 'åå注åæå¡Keystoreå«å',179 'showType': '0'180 },181 {182 'configid': 'domain_server_ip',183 'defaultval': '202.108.211.44',184 'configval': '202.108.211.44',185 'title': 'åå注åæå¡SFTPä¸è½½å°å',186 'showType': '0'187 },188 {189 'configid': 'domain_sftp_path',190 'defaultval': '/basecode/dn/service',191 'configval': '/basecode/dn/service',192 'title': 'åå注åæå¡SFTPä¸è½½è·¯å¾',193 'showType': '0'194 },195 {196 'configid': 'domain_sftp_user',197 'defaultval': 'jczydownload',198 'configval': 'jczydownload',199 'title': 'åå注åæå¡SFTPä¸è½½ç¨æ·',200 'showType': '0'201 },202 {203 'configid': 'domain_jks_pripwd',204 'defaultval': 'M9h79H',205 'configval': 'M9h79H',206 'title': 'åå注åæå¡Keystoreç§é¥å¯ç ',207 'showType': '0'208 },209 {210 'configid': 'domain_server_port',211 'defaultval': '2001',212 'configval': '2001',213 'title': 'åå注åæå¡SFTPä¸è½½ç«¯å£',214 'showType': '0'215 },216 {217 'configid': 'domain_enterprise_id',218 'defaultval': 'f14989d00b6f448087fb6009c59fdbe5',219 'configval': 'f14989d00b6f448087fb6009c59fdbe5',220 'title': 'åå注åæå¡ä¼ä¸ID',221 'showType': '0'222 },223 {224 'configid': 'domain_user_password',225 'defaultval': 'Iq29wTx2EySRVwFA',226 'configval': 'Iq29wTx2EySRVwFA',227 'title': 'åå注åæå¡ç¨æ·å¯ç ',228 'showType': '0'229 },230 {231 'configid': 'domain_basecode_cycle',232 'defaultval': '24',233 'configval': '24',234 'title': 'åå注åæå¡åºç¡ä»£ç ä¸è½½å¨æ(åä½:å°æ¶)',235 'showType': '0'236 },237 {238 'configid': 'domain_regist_file_pwd',239 'defaultval': '3d7254b50710dafe2da731c4058a7739',240 'configval': '3d7254b50710dafe2da731c4058a7739',241 'title': 'åå注åæ件å¯ç ',242 'showType': '0'243 },244 {245 'configid': 'domain_regist_file_pyl',246 'defaultval': 'fcebf7429730b1f3e5b4e3bbb0b7b96d',247 'configval': 'fcebf7429730b1f3e5b4e3bbb0b7b96d',248 'title': 'åå注åæ件å移é',249 'showType': '0'250 },251 {252 'configid': 'domain_regist_upload_sftp_ip',253 'defaultval': '127.0.0.1',254 'configval': '127.0.0.1',255 'title': 'åå注åè®°å½ä¸æ¥SFTPå°å',256 'showType': '0'257 },258 {259 'configid': 'domain_regist_upload_sftp_pwd',260 'defaultval': '123456',261 'configval': '123456',262 'title': 'åå注åè®°å½ä¸æ¥SFTPå¯ç ',263 'showType': '0'264 },265 {266 'configid': 'domain_regist_upload_sftp_path',267 'defaultval': 'upload/source',268 'configval': '/upload/source',269 'title': 'åå注åè®°å½ä¸æ¥SFTPè·¯å¾',270 'showType': '0'271 },272 {273 'configid': 'domain_regist_upload_sftp_port',274 'defaultval': '22',275 'configval': '22',276 'title': 'åå注åè®°å½ä¸æ¥SFTP端å£',277 'showType': '0'278 },279 {280 'configid': 'domain_regist_upload_sftp_switch',281 'defaultval': 'Y',282 'configval': 'Y',283 'title': 'åå注åä¸æ¥å¼å
³',284 'showType': '2'285 },286 {287 'configid': 'domain_regist_upload_sftp_username',288 'defaultval': 'dnsmSftp',289 'configval': 'dnsmSftp',290 'title': 'åå注åè®°å½ä¸æ¥SFTPç¨æ·å',291 'showType': '0'292 },293 {294 'configid': 'source_record_sftp_ip',295 'defaultval': '127.0.0.1',296 'configval': '127.0.0.1',297 'title': 'åæ¾èµæºè®°å½zoonæ件sftpå°å',298 'showType': '0'299 },300 {301 'configid': 'source_record_sftp_pwd',302 'defaultval': '123456',303 'configval': '123456',304 'title': 'åæ¾èµæºè®°å½zoonæ件sftpå¯ç ',305 'showType': '0'306 },307 {308 'configid': 'source_record_xml_path',309 'defaultval': '/date/xml/source',310 'configval': '/date/xml/source',311 'title': 'èµæºè®°å½ä¸æ¥xmlæ¬å°è®°å½',312 'showType': '0'313 },314 {315 'configid': 'source_record_sftp_port',316 'defaultval': '22',317 'configval': '22',318 'title': 'åæ¾èµæºè®°å½zoonæ件sftp端å£',319 'showType': '0'320 },321 {322 'configid': 'source_record_sftp_username',323 'defaultval': 'dnsmSftp',324 'configval': 'dnsmSftp',325 'title': 'åæ¾èµæºè®°å½zoonæ件sftpç¨æ·å',326 'showType': '0'327 },328 {329 'configid': 'source_record_sftp_zoon_path',330 'defaultval': 'upload/source',331 'configval': 'upload/source',332 'title': 'åæ¾èµæºè®°å½zoonæ件sftpè·¯å¾',333 'showType': '0'334 },335 {336 'configid': 'source_record_sftp_upload_path',337 'defaultval': 'upload/source',338 'configval': 'upload/source',339 'title': 'èµæºè®°å½æ件ä¸æ¥å°å',340 'showType': '0'341 },342 {343 'configid': 'source_record_sftp_upload_switch',344 'defaultval': 'Y',345 'configval': 'Y',346 'title': 'èµæºè®°å½ä¸æ¥å¼å
³',347 'showType': '2'348 },349 {350 'configid': 'smms_flag',351 'defaultval': 'N',352 'configval': 'N',353 'title': 'ç 究é¢å¼å
³',354 'showType': '2'355 },356 {357 'configid': 'isms_auth_dnsId',358 'defaultval': '2017060100453100002',359 'configval': '2017060100453100002',360 'title': 'æå¨ä¼ä¸ID',361 'showType': '0'362 },363 {364 'configid': 'isms_recur_dnsId',365 'defaultval': '2017060100453100001',366 'configval': '2017060100453100001',367 'title': 'éå½ä¼ä¸ID',368 'showType': '0'369 },370 {371 'configid': 'isms_domain_dnsId',372 'defaultval': '2017060100453100003',373 'configval': '2017060100453100003',374 'title': 'åå注åä¼ä¸ID',375 'showType': '0'376 },377 {378 'configid': 'isms_zip',379 'defaultval': 'Y',380 'configval': 'Y',381 'title': 'æ¯å¦ä½¿ç¨zipå缩',382 'showType': '2'383 },384 {385 'configid': 'isms_hash',386 'defaultval': '1',387 'configval': '1',388 'title': 'åå¸ç®æ³',389 'showType': '1'390 },391 {392 'configid': 'isms_encode',393 'defaultval': 'Y',394 'configval': 'Y',395 'title': 'æ¯å¦å å¯',396 'showType': '2'397 },398 {399 'configid': 'isms_msg_key',400 'defaultval': '1234567890abcDEF',401 'configval': '1234567890abcDEF',402 'title': 'æ¶æ¯è®¤è¯å¯é¥',403 'showType': '0'404 },405 {406 'configid': 'isms_pad_key',407 'defaultval': '1234567890abcDEF',408 'configval': '1234567890abcDEF',409 'title': 'å å¯å¯é¥',410 'showType': '0'411 },412 {413 'configid': 'isms_pass_py',414 'defaultval': '1234567890abcDEF',415 'configval': '1234567890abcDEF',416 'title': 'æ°æ®å å¯å¯åå移é',417 'showType': '0'418 },419 {420 'configid': 'isms_user_pass',421 'defaultval': '1234567890abcDEF',422 'configval': '1234567890abcDEF',423 'title': 'ç¨æ·å£ä»¤',424 'showType': '0'425 },426 {427 'configid': 'isms_sftp_ip',428 'defaultval': '127.0.0.1',429 'configval': '127.0.0.1',430 'title': 'æ¥å¿æå¡å¨SFTPIPå°å',431 'showType': '0'432 },433 {434 'configid': 'smms_version',435 'defaultval': '1.0',436 'configval': '1.0',437 'title': '管å±æ¥å£çæ¬',438 'showType': '0'439 },440 {441 'configid': 'isms_sftp_port',442 'defaultval': '22',443 'configval': '22',444 'title': 'æ¥å¿æå¡å¨SFTP端å£',445 'showType': '0'446 },447 {448 'configid': 'isms_sftp_user',449 'defaultval': 'dnsmSftp',450 'configval': 'dnsmSftp',451 'title': 'æ¥å¿æå¡å¨SFTPç¨æ·å',452 'showType': '0'453 },454 {455 'configid': 'isms_sftp_password',456 'defaultval': 'yhsj@2017',457 'configval': 'yhsj@2017',458 'title': 'æ¥å¿æå¡å¨SFTPå¯ç ',459 'showType': '0'460 },461 {462 'configid': 'isms_center_num',463 'defaultval': '20',464 'configval': '20',465 'title': 'dnsæ¢éä¸å¿ç«¯ä¸ªæ°',466 'showType': '0'467 },468 {469 'configid': 'isms_smms_ws_url',470 'defaultval': 'http://127.0.0.1:9090/ismi-gj/ws/DnsAckWebService/dns_commandack?wsdl',471 'configval': 'http://127.0.0.1:9090/ismi-gj/ws/DnsAckWebService/dns_commandack?wsdl',472 'title': '管å±ä¾§dns_commandackæ¥å£å°å',473 'showType': '0'474 }475 ]476 }477 }]...
test.ts
Source:test.ts
1export interface C {2 d: number;3}4export interface TestArr1 {5 a: number;6 b: number[];7 c: C;8}9export interface User {10 id: string;11 name: string;12 account: string;13 mail_address: string;14 is_premium: boolean;15 x_restrict: number;16 is_mail_authorized: boolean;17 require_policy_agreement: boolean;18}19export interface Response {20 access_token: string;21 expires_in: number;22 token_type: string;23 scope: string;24 refresh_token: string;25}26export interface Welcome {27 access_token: string;28 expires_in: string;29 token_type: string;30 scope: string;31 refresh_token: string;32 testArr: string[];33 testArr1: TestArr1[];34 user: User;35 response: Response;36}37/**38 * å
Œ
±æ¹æ³å¯åç¬æ¾ç½®39 */40// common start41function safeConvert(source: any, conditions: ConditionItem[]) {42 const res: any = {};43 for (const con of conditions) {44 let value = source?.[con.label];45 if (con.type === "Array") {46 const val: any[] = [];47 if (!(value instanceof Array)) {48 value = [];49 }50 for (const item of value) {51 val.push(con.convert(item));52 }53 res[con.label] = val;54 } else {55 res[con.label] = con.convert(value);56 }57 }58 return res;59}60interface ConditionItem {61 label: string;62 type: string;63 convert: (val: any, defaultVal?: any) => any;64}65// common end66export function c(value?: any): C {67 const conditions: ConditionItem[] = [68 {69 label: "d",70 type: "Number",71 convert: (val: any, defaultVal = 0) => val ?? defaultVal,72 },73 ];74 return safeConvert(value, conditions);75}76export function testArr1(value?: any): TestArr1 {77 const conditions: ConditionItem[] = [78 {79 label: "a",80 type: "Number",81 convert: (val: any, defaultVal = 0) => val ?? defaultVal,82 },83 {84 label: "b",85 type: "Array",86 convert: (val: any, defaultVal = []) => val ?? defaultVal,87 },88 {89 label: "c",90 type: "Object",91 convert: (val: any) => c(val),92 },93 ];94 return safeConvert(value, conditions);95}96export function user(value?: any): User {97 const conditions: ConditionItem[] = [98 {99 label: "id",100 type: "String",101 convert: (val: any, defaultVal = "") => val ?? defaultVal,102 },103 {104 label: "name",105 type: "String",106 convert: (val: any, defaultVal = "") => val ?? defaultVal,107 },108 {109 label: "account",110 type: "String",111 convert: (val: any, defaultVal = "") => val ?? defaultVal,112 },113 {114 label: "mail_address",115 type: "String",116 convert: (val: any, defaultVal = "") => val ?? defaultVal,117 },118 {119 label: "is_premium",120 type: "Boolean",121 convert: (val: any, defaultVal = true) => val ?? defaultVal,122 },123 {124 label: "x_restrict",125 type: "Number",126 convert: (val: any, defaultVal = 0) => val ?? defaultVal,127 },128 {129 label: "is_mail_authorized",130 type: "Boolean",131 convert: (val: any, defaultVal = true) => val ?? defaultVal,132 },133 {134 label: "require_policy_agreement",135 type: "Boolean",136 convert: (val: any, defaultVal = true) => val ?? defaultVal,137 },138 ];139 return safeConvert(value, conditions);140}141export function response(value?: any): Response {142 const conditions: ConditionItem[] = [143 {144 label: "access_token",145 type: "String",146 convert: (val: any, defaultVal = "") => val ?? defaultVal,147 },148 {149 label: "expires_in",150 type: "Number",151 convert: (val: any, defaultVal = 0) => val ?? defaultVal,152 },153 {154 label: "token_type",155 type: "String",156 convert: (val: any, defaultVal = "") => val ?? defaultVal,157 },158 {159 label: "scope",160 type: "String",161 convert: (val: any, defaultVal = "") => val ?? defaultVal,162 },163 {164 label: "refresh_token",165 type: "String",166 convert: (val: any, defaultVal = "") => val ?? defaultVal,167 },168 ];169 return safeConvert(value, conditions);170}171export function welcome(value?: any): Welcome {172 const conditions: ConditionItem[] = [173 {174 label: "access_token",175 type: "String",176 convert: (val: any, defaultVal = "") => val ?? defaultVal,177 },178 {179 label: "expires_in",180 type: "String",181 convert: (val: any, defaultVal = "") => val ?? defaultVal,182 },183 {184 label: "token_type",185 type: "String",186 convert: (val: any, defaultVal = "") => val ?? defaultVal,187 },188 {189 label: "scope",190 type: "String",191 convert: (val: any, defaultVal = "") => val ?? defaultVal,192 },193 {194 label: "refresh_token",195 type: "String",196 convert: (val: any, defaultVal = "") => val ?? defaultVal,197 },198 {199 label: "testArr",200 type: "Array",201 convert: (val: any, defaultVal = []) => val ?? defaultVal,202 },203 {204 label: "testArr1",205 type: "Array",206 convert: (val: any) => testArr1(val),207 },208 {209 label: "user",210 type: "Object",211 convert: (val: any) => user(val),212 },213 {214 label: "response",215 type: "Object",216 convert: (val: any) => response(val),217 },218 ];219 return safeConvert(value, conditions);...
Using AI Code Generation
1var ladle = require('ladle')2var obj = ladle.defaultVal({a: 1}, {a: 2, b: 3})3console.log(obj)4var ladle = require('ladle')5var obj = ladle.get({a: 1, b: 2}, 'a')6console.log(obj)7var ladle = require('ladle')8var obj = ladle.getOr({a: 1, b: 2}, 'a', 3)9console.log(obj)10var ladle = require('ladle')11var obj = ladle.set({a: 1, b: 2}, 'a', 3)12console.log(obj)
Using AI Code Generation
1var ladle = require('ladle');2var defaultVal = ladle.defaultVal;3var a = defaultVal(undefined, 5);4var b = defaultVal(6, 5);5var c = defaultVal(null, 5);6var optional = ladle.optional;7var d = optional(3);8var e = optional(undefined);9var f = optional(null);10var isRequired = ladle.isRequired;11var g = isRequired(4);12var h = isRequired(undefined);13var i = isRequired(null);14var isOptional = ladle.isOptional;15var j = isOptional(3);16var k = isOptional(undefined);17var l = isOptional(null);
Using AI Code Generation
1var ladle = require('ladle');2var defaultVal = ladle.defaultVal;3var data = {a:1, b:2, c:3};4var data2 = {a:1, b:2, c:3, d:4};5var data3 = {a:1, b:2, c:3, d:4, e:5};6var defaultVal = ladle.defaultVal;7var a = defaultVal(data, 'a', 'default');8var b = defaultVal(data, 'b', 'default');9var c = defaultVal(data, 'c', 'default');10var d = defaultVal(data, 'd', 'default');11var e = defaultVal(data, 'e', 'default');12var ladle = require('ladle');13var defaultVal = ladle.defaultVal;14var data = {a:1, b:2, c:3};15var data2 = {a:1, b:2, c:3, d:4};16var data3 = {a:1, b:2, c:3, d:4, e:5};17var defaultVal = ladle.defaultVal;18var a = defaultVal(data, 'a', 'default');19var b = defaultVal(data, 'b', 'default');20var c = defaultVal(data, 'c', 'default');21var d = defaultVal(data2, 'd', 'default');22var e = defaultVal(data3, 'e', 'default');
Using AI Code Generation
1var ladle = require('ladle');2var test = ladle.defaultVal(10, 20);3console.log(test);4var ladle = require('ladle');5var test = ladle.defaultVal(10, 20);6console.log(test);
Using AI Code Generation
1const ladle = require('ladle');2const defaultVal = ladle.defaultVal;3const obj = {4 address: {5 }6};7const name = defaultVal(obj, 'name', 'John Doe');8const age = defaultVal(obj, 'age', 50);9const city = defaultVal(obj, 'address.city', 'Los Angeles');10const state = defaultVal(obj, 'address.state', 'CA');11const zip = defaultVal(obj, 'address.zip', '10001');12const ladle = require('ladle');13const defaultVal = ladle.defaultVal;14const obj = {15 address: {16 }17};18const name = defaultVal(obj, 'name', 'John Doe');19const age = defaultVal(obj, 'age', 50);20const city = defaultVal(obj, 'address.city', 'Los Angeles');21const state = defaultVal(obj, 'address.state', 'CA');22const zip = defaultVal(obj, 'address.zip', '10001');23const ladle = require('ladle');24const defaultVal = ladle.defaultVal;25const obj = {26 address: {27 }28};29const name = defaultVal(obj, 'name', 'John Doe');30const age = defaultVal(obj, 'age', 50);31const city = defaultVal(obj, 'address.city', 'Los Angeles');32const state = defaultVal(obj, 'address.state', 'CA');33const zip = defaultVal(obj, 'address.zip', '10001');34console.log(age);
Using AI Code Generation
1var ladle = require('ladle');2var config = ladle.load('config.json');3var val = config.defaultVal('key1', 'val1');4console.log(val);5{6}
Using AI Code Generation
1var ladle = require('ladle');2var myLadle = ladle.createLadle({3 defaults: {4 }5});6var myObj = myLadle.create({7});8var myObj = myLadle.create({9}).defaultVal('bar', 'baz').defaultVal('bar', 'baz').defaultVal('bar', 'baz');10var myObj = myLadle.create({11}).defaultVal('bar', 'baz').defaultVal('bar', 'baz').defaultVal('bar', 'baz');
Using AI Code Generation
1var ladle = require('ladle');2var myLadle = ladle.ladle();3var myObject = {myKey: 'myValue'};4console.log(myLadle.defaultVal(myObject.myKey, 'myDefault'));5var ladle = require('ladle');6var myLadle = ladle.ladle();7var myObject = {myKey: 'myValue'};8console.log(myLadle.defaultVal(myObject.myKey, 'myDefault'));9var ladle = require('ladle');10var myLadle = ladle.ladle();11var myObject = {myKey: 'myValue'};12console.log(myLadle.defaultVal(myObject.myKey, 'myDefault'));13var ladle = require('ladle');14var myLadle = ladle.ladle();15var myObject = {myKey: 'myValue'};16console.log(myLadle.defaultVal(myObject.myKey, 'myDefault'));17var ladle = require('ladle');18var myLadle = ladle.ladle();19var myObject = {myKey: 'myValue'};20console.log(myLadle.defaultVal(myObject.myKey, 'myDefault'));21var ladle = require('ladle');22var myLadle = ladle.ladle();23var myObject = {myKey: 'myValue'};24console.log(myLadle.defaultVal(myObject.myKey, 'myDefault'));25var ladle = require('ladle');26var myLadle = ladle.ladle();27var myObject = {myKey: 'myValue'};28console.log(myLadle.defaultVal(myObject.myKey, 'myDefault'));29var ladle = require('ladle');30var myLadle = ladle.ladle();31var myObject = {myKey: 'myValue'};32console.log(myLadle.defaultVal(myObject.myKey, 'myDefault'));
Using AI Code Generation
1var ladle = require('ladle');2var config = ladle.load('config.json', {defaultVal: 'default'});3{4 "b": {5 }6}7var ladle = require('ladle');8var config = ladle.load('config.json', {defaultVal: 'default'});9var ladle = require('ladle');10var config = ladle.load('config.json', {defaultVal: 'default'});11var ladle = require('ladle');12var config = ladle.load('config.json', {defaultVal: 'default'});13var ladle = require('ladle');14var config = ladle.load('config.json', {defaultVal: 'default'});15var ladle = require('ladle');16var config = ladle.load('config.json', {defaultVal: '
Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!