Best Python code snippet using localstack_python
apiUrl.js
Source:apiUrl.js
1const getUrl = apiPath => `${process.env.VUE_APP_API_BASE_URL}/${apiPath}`2export default {3 API0006: getUrl('user'), // GET ã¦ã¼ã¶ã¼ä¸è¦§æ¤ç´¢4 API0007: getUrl('user'), // GET ã¦ã¼ã¶ã¼è©³ç´°æ¤ç´¢5 API0008: getUrl('user'), // PUT ã¦ã¼ã¶ã¼æ´æ°6 API0009: getUrl('group'), // GET ã°ã«ã¼ãä¸è¦§æ¤ç´¢7 API0010: getUrl('group'), // GET ã°ã«ã¼ã詳細æ¤ç´¢ /group/{groupid}8 API0011: getUrl('group'), // POST ã°ã«ã¼ãç»é²9 API0012: getUrl('group'), // PUT ã°ã«ã¼ãæ´æ°10 API0013: getUrl('group/bulk/delete'), // POST ã°ã«ã¼ãæ´æ°11 API0022: getUrl('template'), //GET ã¡ã¼ã«ãã³ãã¬ã¼ãä¸è¦§æ¤ç´¢12 API0023: getUrl('template'), //GET ã¡ã¼ã«ãã³ãã¬ã¼ã詳細æ¤ç´¢13 API0024: getUrl('template'), //POST ã¡ã¼ã«ãã³ãã¬ã¼ãç»é²14 API0025: getUrl('template'), //PUT ã¡ã¼ã«ãã³ãã¬ã¼ãæ´æ°15 API0026: getUrl('template/bulk/delete'), //POST ã¡ã¼ã«ãã³ãã¬ã¼ãåé¤16 API0031: getUrl('jobrequest'),17 API0039: getUrl('projectxkaiin'),18 API0040: getUrl('projectxkaiin'),19 API0041: getUrl('projectxkaiin'),20 API0043: getUrl('jizenmitumori'),21 API0044: getUrl('jizenmitumori'),22 API0045: getUrl('jizenmitumori'),23 API0046: getUrl('jizenmitumori'),24 API0047: getUrl('jizenmitumori/bulk/delete'),25 API0048: getUrl('jizenmitumori/renraku/gyosya'),26 API0049: getUrl('jizenmitumori/renraku/result'),27 API0051: getUrl('settigyosyacapa'), //GET è¨ç½®å·¥äºãã£ãä¸è¦§æ¤ç´¢28 API0052: getUrl('settigyosyacapa'), //PUT è¨ç½®å·¥äºãã£ãä¸æ¬æ´æ°29 API0053: getUrl('oogatahaisocapa'), // PUT 大åé
éãã£ãä¸æ¬æ´æ°30 API0054: getUrl('oogatahaisocapa'), // GET 大åé
éãã£ãä¸è¦§æ¤ç´¢31 API0056: getUrl('uriagedenpyo'), // GET 売ä¸ä¼ç¥¨ä¸è¦§æ¤ç´¢32 API0057: getUrl('uriagedenpyo'), // GET 売ä¸ä¼ç¥¨è©³ç´°æ¤ç´¢ /uriagedenpyo/{denpyono}33 API0058: getUrl('uriagedenpyo'), // POST 売ä¸ä¼ç¥¨èµ¤ä¼ç»é²34 API0059: getUrl('uriagedenpyo'), // PUT 売ä¸ä¼ç¥¨æ´æ°35 API0060: getUrl('black'),36 API0061: getUrl('black'),37 API0062: getUrl('black'),38 API0063: getUrl('black'),39 API0064: getUrl('black/bulk/delete'),40 API0065: getUrl('oroshisaki'), //GET å¸å
ä¸è¦§æ¤ç´¢41 API0066: getUrl('oroshisaki'), //GET å¸å
詳細æ¤ç´¢ /oroshisaki/{oroshisakicd}42 API0067: getUrl('oroshisaki'), //POST å¸å
ç»é²43 API0068: getUrl('oroshisaki'), //PUT å¸å
æ´æ°44 API0069: getUrl('nounyusaki'), //GET ç´å
¥å
ä¸è¦§æ¤ç´¢45 API0070: getUrl('nounyusaki'), //GET ç´å
¥å
詳細æ¤ç´¢ /nounyusaki/{nounyucd}46 API0071: getUrl('nounyusaki'), //POST ç´å
¥å
ç»é²47 API0072: getUrl('nounyusaki'), //PUT ç´å
¥å
æ´æ°48 API0073: getUrl('nounyusaki'), //DELETE ç´å
¥å
åé¤49 API0074: getUrl('zyucyu'),50 API0076: getUrl('zyucyu/karihikiate'),51 API0077: getUrl('zyucyu'),52 API0078: getUrl('zyucyu/status'),53 API0079: getUrl('zyucyu'),54 API0080: getUrl('zyucyu'),55 API0081: getUrl('zyucyu/nouhinsyo'),56 API0082: getUrl('zyucyu/ryosyusyo/print'),57 API0083: getUrl('sendzyucyumail'),58 API0084: getUrl('zyucyu/cancel'),59 API0085: getUrl('zyucyu/syuka/manual'),60 API0086: getUrl('zyucyu/option'),61 API0087: getUrl('zyucyustatus/status'),62 API0088: getUrl('zyucyustatus'),63 API0090: getUrl('zyucyumeisaistatus/status'),64 API0091: getUrl('zyucyumeisaistatus'),65 API0093: getUrl('nyukin'),66 API0094: getUrl('nyukin/bulk/delete'),67 API0097: getUrl('nyukin'),68 API0099: getUrl('nyukin'),69 API0100: getUrl('nyukin'),70 API0101: getUrl('nyukinuriagekeshikomi'),71 API0102: getUrl('nyukinuriagekeshikomi/bulk/delete'),72 API0103: getUrl('seikyusyo'),73 API0104: getUrl('seikyusyo'),74 API0105: getUrl('seikyusyo'),75 API0106: getUrl('seikyusyo'),76 API0108: getUrl('seikyusyo/print'),77 API0109: getUrl('seikyusyoSales'),78 API0110: getUrl('zaikohikiate'),79 API0111: getUrl('zaikohikiate'),80 API0113: getUrl('shikirikakaku'), //GET shikirikakaku ä»åä¾¡æ ¼ä¸è¦§æ¤ç´¢81 API0114: getUrl('shikirikakaku/bulk/deleteRireki'), //POST shikirikakaku ä»åä¾¡æ ¼åé¤82 API0115: getUrl('shikirikakaku'), //GET shikirikakaku/{sikirikakakuno} ä»åä¾¡æ ¼è©³ç´°æ¤ç´¢83 API0116: getUrl('shikirikakaku/duplicated'), //GET shikirikakaku/duplicated ä»åä¾¡æ ¼åªå
éè¤ãã§ãã¯84 API0117: getUrl('shikirikakaku'), //POST shikirikakaku ä»åä¾¡æ ¼ç»é²85 API0118: getUrl('shikirikakaku'), //PUT shikirikakaku ä»åä¾¡æ ¼æ´æ°86 API0121: getUrl('siharaidenpyo/siiresiharaikesikomi'),87 API0122: getUrl('shiiresaki'),88 API0123: getUrl('shiiresaki/bulk/delete'),89 API0124: getUrl('shiiresaki'),90 API0125: getUrl('shiiresaki'),91 API0126: getUrl('shiiresaki'),92 API0127: getUrl('siirenebiki'),93 API0128: getUrl('siirenebiki'),94 API0129: getUrl('siirenebiki'),95 API0130: getUrl('siirenebiki/meisai/bulk'),96 API0133: getUrl('siire'),97 API0134: getUrl('siire'),98 API0136: getUrl('siire'),99 API0139: getUrl('siharaidenpyo/bulk/delete'),100 API0141: getUrl('siharaidenpyo'),101 API0142: getUrl('siharaidenpyo'),102 API0143: getUrl('siharaidenpyo/kesikomi'),103 API0147: getUrl('zyuhaccyukanri'),104 API0148: getUrl('tyokusokanryohokoku'),105 API0149: getUrl('serviceEndreport'),106 API0150: getUrl('urikireSyohin'),107 API0152: getUrl('siharaidenpyo/haccyusiharaikesikomi'),108 API0153: getUrl('haccyudenpyo'),109 API0155: getUrl('haccyudenpyo/copy'),110 API0156: getUrl('haccyudenpyo'),111 API0157: getUrl('haccyudenpyo/print'),112 API0158: getUrl('haccyudenpyo/bulk/delete'),113 API0159: getUrl('haccyudenpyo'),114 API0160: getUrl('haccyudenpyo'),115 API0161: getUrl('zaikokakaku/resale'),116 API0163: getUrl('zaikokakaku'),117 API0164: getUrl('zaikokakaku'),118 API0169: getUrl('zaikokakaku/biko'),119 API0170: getUrl('zaikokakaku/koteikakaku/rireki'),120 API0171: getUrl('zaikokakaku/sethin'),121 API0172: getUrl('zaikokakaku/timesale'),122 API0173: getUrl('zaikokakaku/timesale/item'),123 API0174: getUrl('zaikokakaku/koteikakaku'),124 API0175: getUrl('zaikokakaku/koteikakaku'),125 API0176: getUrl('zaikokakaku/okiniiri'),126 API0177: getUrl('zaikokakaku/okiniiri'),127 API0178: getUrl('zaikokakaku/okiniiri'),128 API0181: getUrl('zaikokakaku/rireki'),129 API0182: getUrl('zaikokakaku/ureyukiresearch'),130 API0183: getUrl('zaikokakaku/hacyumeisai'),131 API0184: getUrl('zaikokakaku/zyucyumeisai/tooltip'),132 API0186: getUrl('zaikokakaku/sikirikakaku'),133 API0187: getUrl('zaikokakaku/zaikomeisai'),134 API0188: getUrl('zaikokakaku/kcomjuni'),135 API0189: getUrl('catekotepoint'),136 API0190: getUrl('catekotepoint/bulk/delete'),137 API0191: getUrl('catekotepoint'),138 API0192: getUrl('catekotepoint'),139 API0194: getUrl('kihonprojectxpointritu'), //GET åºæ¬projectxãã¤ã³ãçä¸è¦§æ¤ç´¢140 API0195: getUrl('kihonprojectxpointritu'), //GET åºæ¬projectxãã¤ã³ãçä¸æ¬æ´æ°141 API0198: getUrl('kihonprojectxpointritu'), //POST åºæ¬projectxãã¤ã³ãçç»é²142 API0200: getUrl('kihonprojectxpointritu/bulk/delete'), //PUT åºæ¬Mprojectxãã¤ã³ãçåé¤143 API0201: getUrl('syokotepoint'), //GET åååºå®projectxãã¤ã³ãä¸è¦§æ¤ç´¢144 API0202: getUrl('syokotepoint'), //PUT åååºå®projectxãã¤ã³ãä¸æ¬æ´æ°145 API0203: getUrl('syokotepoint'), //POST åååºå®projectxãã¤ã³ãç»é²146 API0205: getUrl('kupon'), //GET kuopn ã¯ã¼ãã³ä¸è¦§æ¤ç´¢147 API0206: getUrl('kupon/bulk/delete'), //PSOT kupon/bulk/delete ã¯ã¼ãã³åé¤148 API0207: getUrl('kupon'), //GET kuopn/{kuponcd} ã¯ã¼ãã³ä¸è¦§è©³ç´°æ¤ç´¢149 API0208: getUrl('kupon'), //POST kuopn ã¯ã¼ãã³ç»é²150 API0212: getUrl('kyakupon'),151 API0216: getUrl('tsale'), //GET tsale ã¿ã¤ã ã»ã¼ã«ä¸è¦§æ¤ç´¢152 API0217: getUrl('tsale/bulk/delete'), //POST tsale/bulk/delete ã¿ã¤ã ã»ã¼ã«åé¤153 API0218: getUrl('tsale'), //POST tsale ã¿ã¤ã ã»ã¼ã«ç»é²154 API0222: getUrl('tsale/tsaleitem/bulk/insert'), //POST tsale/tsaleitem/bulk/insert ã¿ã¤ã ã»ã¼ã«ååä¸æ¬ç»é²155 API0224: getUrl('tsale/tsaleitem/bulk/update'), //PUT tsale/tsaleitem/bulk/update ã¿ã¤ã ã»ã¼ã«ååæ´æ°156 API0227: getUrl('syohin'),157 API0229: getUrl('syohin'),158 API0231: getUrl('syohinoption'),159 API0234: getUrl('syohingrptsuidegai'),160 API0238: getUrl('syohin'),161 API0240: getUrl('syohingrp'),162 API0241: getUrl('syohingrp'),163 API0253: getUrl('catetsuide'),164 API0257: getUrl('maker'),165 API0258: getUrl('maker/delete'),166 API0259: getUrl('maker'),167 API0260: getUrl('maker'),168 API0264: getUrl('option'),169 API0265: getUrl('option/bulk/delete'),170 API0267: getUrl('option'),171 API0268: getUrl('option'),172 API0273: getUrl('syokotepoint/bulk/delete'), //PUT åååºå®projectxãã¤ã³ãç»é²173 API0276: getUrl('suggest/bumon'), //ãã£ãã«ãµã¸ã§ã¹ã174 API0277: getUrl('suggest/tantou'), //æ
å½è
ãµã¸ã§ã¹ã175 API0278: getUrl('suggest/oroshisaki'), //å¸å
ãµã¸ã§ã¹ã176 API0279: getUrl('suggest/syobun'),177 API0284: getUrl('suggest/yubin'), // éµä¾¿çªå·ãµã¸ã§ã¹ã178 API0286: getUrl('suggest/settikojiarea'),179 API0288: getUrl('tsale'), //GET tsale/{timsecd} ã¿ã¤ã ã»ã¼ã«è©³ç´°æ¤ç´¢180 API0289: getUrl('tsale'), //PUT tsale ã¿ã¤ã ã»ã¼ã«æ´æ°181 API0292: getUrl('zaikohikiate/syohinzyotai'),182 API0293: getUrl('zaikohikiate/iso'),183 API0296: getUrl('kupon/kuponex'), //POST kupon/kuponex ã¯ã¼ãã³ã«ãã´ãªã¡ã¼ã«ã¼ç»é²184 API0298: getUrl('kupon/kuponex/bulk/delete'), //POST kupon/kuponex/bulk/delete ã¯ã¼ãã³æ¡å¼µãã¹ã¿åé¤185 API0299: getUrl('kupon/kuponex/bulk/insert'), //POST kupon/kuponex/bulk/insert ã¯ã¼ãã³ååç»é²186 API0301: getUrl('suggest/shiharai'),187 API0302: getUrl('tsale/tsaleitem/bulk/delete'), //POST tsale/tsaleitem/bulk/delete ã¿ã¤ã ã»ã¼ã«åååé¤188 API0304: getUrl('syohin'), // ååãµã¸ã§ã¹ã189 API0306: getUrl('option/shihahoho'),190 API0307: getUrl('option/shihahoho/bulk/delete'),191 API0308: getUrl('syohinoption/bulk/delete'),192 API0309: getUrl('uriagedenpyo/bulk/delete'), // POST 売ä¸æç´°åé¤193 API0310: getUrl('siharaidenpyo'),194 API0311: getUrl('siharaidenpyo'),195 API0312: getUrl('zyucyustatus'),196 API0313: getUrl('zyucyumeisaistatus'),197 API0314: getUrl('suggest/shiiresaki'), //GET ä»å
¥å
ãµã¸ã§ã¹ã198 API0315: getUrl('siirenebiki/meisai/hacyu'),199 API0316: getUrl('siirenebiki/meisai'),200 API0317: getUrl('oogatatuikasoryo'), // GET 大å追å éæä¸è¦§æ¤ç´¢201 API0318: getUrl('oogatatuikasoryo'), // PUT 大å追å éææ´æ°202 API0319: getUrl('zyucyu/meisai/delete'),203 API0321: getUrl('zyucyu/syosai'),204 API0323: getUrl('zyucyu/option'),205 API0324: getUrl('zyucyu/print'),206 API0325: getUrl('kupon'), //PUT kupon ã¯ã¼ãã³æ´æ°207 API0328: getUrl('option'),208 API0329: getUrl('suggest/option'),209 API0330: getUrl('hioogatatuikasoryo'), //GET é大å追å éæä¸æ¬ç»é²210 API0331: getUrl('hioogatatuikasoryo'), //PUT é大å追å éæä¸æ¬æ´æ°211 API0332: getUrl('tuikasoryo'), //POST é大å追å éæä¸æ¬æ´æ°212 API0333: getUrl('suggest/haisoarea'), //GET é
éã¨ãªã¢ãµã¸ã§ã¹ã213 API0334: getUrl('kupon/copy'), //POST kupon/copy ã¯ã¼ãã³è¤è£½214 API0335: getUrl('kupon/kuponex'), //PUT kupon/kuponex ã¯ã¼ãã³ã«ãã´ãªã¡ã¼ã«ã¼æ´æ°215 API0338: getUrl('catetsuide/bulk/delete'),216 API0339: getUrl('zyuhaccyukanri'), // POST åçºæ³¨ç»é²217 API0342: getUrl('zaikokakaku/okiniiri/syohin'),218 API0343: getUrl('zaikokakaku/okiniiri/syohin'),219 API0344: getUrl('zaikokakaku/okiniiri/syohin'),220 API0345: getUrl('API0345'),221 API0346: getUrl('API0346'),222 API0347: getUrl('siharaidenpyo/siiresiharaikesikomi/delete'),223 API0348: getUrl('siharaidenpyo/haccyusiharaikesikomi/delete'),224 API0350: getUrl('henpindenpyo'),225 API0352: getUrl('henpindenpyo'),226 API0354: getUrl('variation'),227 API0356: getUrl('variation/bulk/delete'),228 API0357: getUrl('variation'),229 API0358: getUrl('syohin/outlet'),230 API0360: getUrl('syohingrptsuidegai/bulk/delete'),231 API0362: getUrl('kihonsoryo'), //GET åºæ¬éæä¸è¦§æ¤ç´¢232 API0363: getUrl('kihonsoryo'), //POST åºæ¬éæä¸è¦§æ´æ°233 API0364: getUrl('sethin'),234 API0365: getUrl('sethin/bulk/delete'),235 API0366: getUrl('sethin'),236 API0367: getUrl('sethin/syohingrp'),237 API0368: getUrl('blackshiharai'),238 API0369: getUrl('blacksyouhin'),239 API0370: getUrl('blackjyogai'),240 API0372: getUrl('blackjyusyo'),241 API0373: getUrl('blacktyumonsya'),242 API0374: getUrl('blackmail'),243 API0375: getUrl('blackdenwabangou'),244 API0376: getUrl('blackshiharai/bulk/delete'),245 API0377: getUrl('blacksyouhin/bulk/delete'),246 API0378: getUrl('blackjyogai/bulk/delete'),247 API0380: getUrl('blackjyusyo/bulk/delete'),248 API0381: getUrl('blacktyumonsya/bulk/delete'),249 API0382: getUrl('blackmail/bulk/delete'),250 API0383: getUrl('blackdenwabangou/bulk/delete'),251 API0384: getUrl('suggest/oogatahaisoarea'), //GET 大åé
éã¨ãªã¢ãµã¸ã§ã¹ã252 API0388: getUrl('suggest/projectxkaiin'),253 API0389: getUrl('zyucyu/syuka/oroshikyosei'),254 API0390: getUrl('suggest/haisogyo'),255 API0391: getUrl('API0391'),256 API0395: getUrl('zyucyu/meisai'), // POST å注æ細追å 257 API0392: getUrl('usergroup'), // POST ã¦ã¼ã¶ã¼ã°ã«ã¼ãä¸æ¬è¿½å 258 API0393: getUrl('usergroup/bulk/delete'), // POST ã¦ã¼ã¶ã¼ã°ã«ã¼ãåé¤259 API0397: getUrl('role'), //GET ãã¼ã«ä¸è¦§æ¤ç´¢260 API0398: getUrl('grouprole'), // POST ã°ã«ã¼ããã¼ã«ä¸æ¬è¿½å 261 API0399: getUrl('grouprole/bulk/delete'), // PUT ã°ã«ã¼ããã¼ã«åé¤262 API0400: getUrl('role'), //GET ãã¼ã«è©³ç´°æ¤ç´¢ /role/{roleid}263 API0402: getUrl('role'), // POST ãã¼ã«ç»é²264 API0403: getUrl('role'), // PUT ãã¼ã«æ´æ°265 API0404: getUrl('role/bulk/delete'), // POST ãã¼ã«åé¤266 API0407: getUrl('role/roleresource'), // PUT ãã¼ã«ãªã½ã¼ã¹ä¸æ¬æ´æ°267 API0410: getUrl('job'),268 API0412: getUrl('otodokesaki'),269 API0413: getUrl('otodokesaki'),270 API0414: getUrl('otodokesaki/bulk/delete'),271 API0415: getUrl('otodokesaki'),272 API0418: getUrl('jobrequest'),273 API0422: getUrl('seikyusyo'),274 API0423: getUrl('seikyusyo/issue'),275 API0426: getUrl('projectxkaiin/password'),276 API0427: getUrl('seikyusyoMeisai/register'),277 API0429: getUrl('zaikokakaku/siiremeisai'),278 API0430: getUrl('zaikokakaku/zyucyumeisai/modal'),279 API0433: getUrl('suggest/shiten'),280 API0434: getUrl('urikireSyohinShiiresaki'),281 API0436: getUrl('option/shihahoho'),282 API0438: getUrl('suggest/ginko'),283 API0439: getUrl('siire'),284 API0440: getUrl('nyukinzyucyukeshikomi'),285 API0441: getUrl('nyukinuriagekeshikomi/seikyusyo'),286 API0442: getUrl('nyukinzyucyukeshikomi/bulk/delete'),287 API0443: getUrl('uriagedenpyo'), //DELETE 売ä¸ä¼ç¥¨èµ¤ä¼åé¤288 API0444: getUrl('suggest/maker'),289 API0445: getUrl('zyucyu/meisai'),290 API0446: getUrl('tyokusokanryohokoku'),291 API0447: getUrl('serviceCmplete'),292 API0448: getUrl('henpindenpyo'),293 API0449: getUrl('seikyusyoMeisai/delete'),294 API0450: getUrl('API0450'),295 API0451: getUrl('API0451'),296 API0453: getUrl('jikouza'),297 API0454: getUrl('henpindenpyo'),298 API0455: getUrl('haccyudenpyo/meisai'),299 API0456: getUrl('haccyudenpyo/meisai/bulk/delete'),300 API0457: getUrl('haccyudenpyo/meisai'),301 API0458: getUrl('siire/recreation'),302 API0461: getUrl('suggest/optiongrp'),303 API0463: getUrl('henpindenpyo/henkin'),304 API0464: getUrl('henpindenpyo/daihinsyukka'),305 API0465: getUrl('suggest/souko'),306 API0469: getUrl('catetsuide'),307 API0471: getUrl('syohingrptsuidegai'),308 API0474: getUrl('zyucyutouroku'),309 API0478: getUrl('syohingrp'),310 API0479: getUrl('maker'),311 API0480: getUrl('zyucyumeisaistatus/status'),312 API0482: getUrl('zaikohikiate/haikigenmo'),313 API0483: getUrl('zaikohikiate/zaikotyousei'),314 API0484: getUrl('suggest/amazonrate'), //GET Amazonã«ãã´ãªãµã¸ã§ã¹ã315 API0485: getUrl('amazonsyohin'), //GET Amazonã«ãã´ãªååä¸è¦§æ¤ç´¢316 API0486: getUrl('amazonsyohin'), //GET Amazonã«ãã´ãªè©³ç´°æ¤ç´¢ /amazonsyohin/{syohincd}317 API0487: getUrl('amazonsyohin'), //POST Amazonã«ãã´ãªååç»é²318 API0488: getUrl('amazonsyohin'), //PUT Amazonã«ãã´ãªååæ´æ°319 API0489: getUrl('amazonsyohin/bulk/delete'), //POST Amazonã«ãã´ãªåååé¤320 API0490: getUrl('nyukadenpyo'),321 API0491: getUrl('nyukadenpyo'),322 API0492: getUrl('syukadenpyo'),323 API0493: getUrl('syukadenpyo'),324 API0494: getUrl('syukadenpyo/bulk/delete'),325 API0500: getUrl('monthzaikohikiate'),326 API0501: getUrl('monthzaikohikiate/tourokunengetu'),327 API0505: getUrl('projectxpointCount'), //GET ãã¤ã³ãéè¨ä¸è¦§æ¤ç´¢328 API0506: getUrl('projectxMemberCount'), //GET projectxç»é²æ°éè¨ä¸è¦§æ¤ç´¢329 API0507: getUrl('eigyojisekiCount'),330 API0508: getUrl('zaikodakaCount'), //GET å¨åº«é«éè¨ä¸è¦§æ¤ç´¢331 API0510: getUrl('shiharaisalesCount'), //GET æ¯ææ¹æ³å¥è²©å£²éè¨ä¸è¦§æ¤ç´¢332 API0511: getUrl('bumonbetsusalesCount'), //GET æ¥å¥è²©å£²éè¨ä¸è¦§æ¤ç´¢333 API0512: getUrl('hacyujisekiCount'), //GET çºæ³¨å®ç¸¾éè¨ä¸è¦§æ¤ç´¢334 API0516: getUrl('mlsend'), //GET ã¡ã¼ã«éä¿¡ä¸è¦§æ¤ç´¢335 API0517: getUrl('mlsend'), //GET mlsend/{mlsousinno} ã¡ã¼ã«é信詳細æ¤ç´¢336 API0518: getUrl('yubin'), // éµä¾¿çªå·337 API0519: getUrl('kikankesa'), //POST æ¤ç´¢æ¡ä»¶ä¿å338 API0520: getUrl('kikankesa'), //GET æ¤ç´¢æ¡ä»¶æ¤ç´¢339 API0521: getUrl('kikankesa'), //PUT æ¤ç´¢æ¡ä»¶æ´æ°340 API0522: getUrl('kikankesa/delete'), //DELETE æ¤ç´¢æ¡ä»¶åé¤341 API0524: getUrl('jobtuti'),342 API0532: getUrl('uriagedenpyo/nebiki'), // POST 売ä¸ä¼ç¥¨èµ¤ä¼å¤å¼ç»é²343 API0533: getUrl('henpindenpyo/henpincancel'),344 API0535: getUrl('suggest/nounyusaki'),345 API0537: getUrl('setdepo'),346 API0540: getUrl('siharaidenpyo/akaden'),347 API0541: getUrl('seikyusyo/download'),348 API0542: getUrl('syobunsouko'),349 API0543: getUrl('zeiritsu'),350 API0545: getUrl('zyucyujistnamae'),351 API0546: getUrl('me'),352 API0547: getUrl('zyucyu/authorizationCancel'),353 API0549: getUrl('suggest/nyukinsyubetsu'),354 API0551: getUrl('sethin/reregist'),355 API0552: getUrl('zyucyu/forcedComplete'),356 API0553: getUrl('zyucyu/forcedComplete/cancel'),357 API0554: getUrl('kihonsoryo') //POST åºæ¬éæä¸è¦§æ´æ°...
main.js
Source:main.js
1"use strict";2mainCtrl.$inject = ["$scope","$rootScope","$translate","$http","$location","alertSrv","$routeParams","dataCenterSrv","$route"];3var appUrl = "#";4export default function mainCtrl($scope,$rootScope,$translate,$http,$location,alertSrv,$routeParams,dataCenterSrv,$route){5 let self = $scope;6 7 self.dashAlerts = alertSrv;8 self.sideMenu = [9 /*{10 icon:"icon-aw-internet",11 name:"ç³»ç»æ¦åµ",12 url:getUrl("/"),13 current:"systemview"14 },*/15 {16 icon:"icon-aw-data-center1",17 name:"æ°æ®ä¸å¿",18 url:getUrl("/datacenter"),19 current:"datacenter",20 child:[21 /* {22 icon:"icon-aw-ram",23 name:"æè¦",24 url:getUrl("/datacenter/overview"),25 current:"datacenter.overview"26 },*/27 /* {28 icon:"icon-aw-ram",29 name:"çæ§",30 url:getUrl("/datacenter/monitor"),31 current:"datacenter.monitor",32 child:[]33 },34 {35 icon:"icon-aw-ram",36 name:"管ç",37 url:getUrl("/datacenter/manage"),38 current:"datacenter.manage",39 child:[]40 },*/41 {42 icon:"icon-aw-ram",43 name:"ç¸å
³å¯¹è±¡",44 url:getUrl("/datacenter/objects/cluster"),45 current:"datacenter.objects.cluster",46 child:[47 {48 icon:"icon-aw-ram",49 name:"é群",50 url:getUrl("/datacenter/objects/cluster"),51 current:"datacenter.objects.cluster",52 },53 {54 icon:"icon-aw-ram",55 name:"主æº",56 url:getUrl("/datacenter/objects/host"),57 current:"datacenter.objects.host",58 },59 {60 icon:"icon-aw-ram",61 name:"èææº",62 url:getUrl("/datacenter/objects/vm"),63 current:"datacenter.objects.vm",64 },65 /*{66 icon:"icon-aw-ram",67 name:"èææºæ¨¡æ¿",68 url:getUrl("/datacenter/objects/vmtmpl"),69 current:"datacenter.objects.vmtmpl",70 },71 {72 icon:"icon-aw-ram",73 name:"æ°æ®åå¨",74 url:getUrl("/datacenter/objects/datastore"),75 current:"datacenter.objects.datastore",76 },77 {78 icon:"icon-aw-ram",79 name:"æ åç½ç»",80 url:getUrl("/datacenter/objects/vmnetwork"),81 current:"datacenter.objects.vmnetwork",82 },*/83 ]84 }85 ]86 },87 {88 icon:"icon-aw-cluster",89 name:"é群",90 url:getUrl("/cluster"),91 current:"cluster",92 child:[93 /*{94 icon:"icon-aw-ram",95 name:"æè¦",96 url:getUrl("/cluster/overview"),97 current:"cluster.overview"98 },*/99 {100 icon:"icon-aw-ram",101 name:"ç¸å
³å¯¹è±¡",102 url:getUrl("/cluster/objects/host"),103 current:"cluster.objects.host",104 child:[105 {106 icon:"icon-aw-ram",107 name:"主æº",108 url:getUrl("/cluster/objects/host"),109 current:"cluster.objects.host",110 },111 {112 icon:"icon-aw-ram",113 name:"èææº",114 url:getUrl("/cluster/objects/vm"),115 current:"cluster.objects.vm",116 },117 /*{118 icon:"icon-aw-ram",119 name:"æ°æ®åå¨",120 url:getUrl("/cluster/objects/datastore"),121 current:"cluster.objects.datastore",122 },123 {124 icon:"icon-aw-ram",125 name:"æ åç½ç»",126 url:getUrl("/cluster/objects/vmnetwork"),127 current:"cluster.objects.vmnetwork",128 },*/129 ]130 }131 ]132 },133 {134 icon:"icon-aw-pm",135 name:"主æº",136 url:getUrl("/host"),137 current:"host",138 child:[139 /*{140 icon:"icon-aw-ram",141 name:"æè¦",142 url:getUrl("/host/overview"),143 current:"host.overview"144 },*/145 {146 icon:"icon-aw-ram",147 name:"ç¸å
³å¯¹è±¡",148 url:getUrl("/host/objects/vm"),149 current:"host.objects.vm",150 child:[151 {152 icon:"icon-aw-ram",153 name:"èææº",154 url:getUrl("/host/objects/vm"),155 current:"host.objects.vm",156 },157 /*{158 icon:"icon-aw-ram",159 name:"èææºæ¨¡æ¿",160 url:getUrl("/host/objects/vmtmpl"),161 current:"host.objects.vmtmpl",162 },163 {164 icon:"icon-aw-ram",165 name:"æ°æ®åå¨",166 url:getUrl("/host/objects/datastore"),167 current:"host.objects.datastore",168 },169 {170 icon:"icon-aw-ram",171 name:"æ åç½ç»",172 url:getUrl("/host/objects/vmnetwork"),173 current:"host.objects.vmnetwork",174 },*/175 ]176 }177 ]178 },179 180 {181 icon:"icon-aw-cloud-server",182 name:"èææº",183 url:getUrl("/virtualmachine"),184 current:"virtualmachine",185 child:[186 {187 icon:"icon-aw-ram",188 name:"æè¦",189 url:getUrl("/virtualmachine/overview"),190 current:"virtualmachine.overview"191 },192 {193 icon:"icon-aw-ram",194 name:"ç¸å
³å¯¹è±¡",195 url:getUrl("/virtualmachine/objects/snapshots"),196 current:"virtualmachine.objects.snapshots",197 child:[198 {199 icon:"icon-aw-ram",200 name:"å¿«ç
§",201 url:getUrl("/virtualmachine/objects/snapshots"),202 current:"virtualmachine.objects.snapshots",203 }204 ]205 }206 ]207 }208 ]; 209 self.$on("$routeChangeSuccess",function(e,cur,old){210 ActiveMenu(e,cur,self);211 self.TAG = localStorage.TAG;212 if(cur&&cur.originalPath){213 var value = cur.originalPath.split("/")[1];214 if(value==="datacenter"){215 self.TAG = localStorage.DCTAG;216 }else if(value==="host"){217 self.TAG = localStorage.TAG;218 }else if(value==="cluster"){219 self.TAG=localStorage.CLUTAG;220 }221 }222 });223 self.showCont = function(e, cont) {224 self.showDel = true;225 self.delCont = cont.msg;226 self.ContType = cont.type || "danger";227 self.btnType = cont.btnType || "btn-danger";228 self.notDel = cont.notDel;229 self.confirm = function() {230 self.showDel = false;231 self.$broadcast(cont.target, cont.data);232 };233 };234 self.$on("delete", self.showCont);235 self.close = function() {236 self.showDel = false;237 };238 self.loadding_func=function(e,cont){239 self.vm_loadding=cont;240 }241 dataCenterSrv.getDictDataByEidAndDid().then(function(res){242 if(res&&res.data){243 var vmData = res.data.filter(item=>{244 return item.paramName == 'VMWARE_API_KEY'245 })246 var vmCenterList = JSON.parse(vmData[0].paramValue).filter(item=>{247 return item.Active == true248 })249 $rootScope.tops={250 vmList:vmCenterList,251 vmData:{}252 }253 $rootScope.tops.vmData.selected = self.tops.vmList[0]254 $rootScope.changevmtype = function(name){255 self.vm_loadding=true;256 var dataParams = {257 "enterpriseUid":localStorage.enterpriseUid,258 "vCenterName":name.vCenterName259 }260 dataCenterSrv.logins(dataParams).then(function(res){261 if (res && res.data ) {262 localStorage.VMware_url = res.data.url ? res.data.url : "";263 localStorage.VMware_uuid = res.data.uuid ? res.data.uuid : "";264 self.vm_loadding=false;265 /*if($routeParams.url){266 $location.url($routeParams.url);267 }else{268 $location.url("/datacenter");269 }*/270 $route.reload();271 localStorage.vmware_flag=2;272 }273 })274 }275 }276 })277 self.$on("loadding_vm",self.loadding_func);278 if(localStorage.vmware_flag==1){279 //è¿æ¥vcenter280 if (localStorage.supportOtherClouds && localStorage.supportOtherClouds.indexOf('VMWARE_API_KEY') > -1) {281 //self.$emit("loadding_vm",true);282 self.vm_loadding=true;283 var dataParams = {284 "enterpriseUid":localStorage.enterpriseUid,285 "vCenterName":""286 }287 dataCenterSrv.logins(dataParams).then(function(res){288 if (res && res.data ) {289 localStorage.VMware_url = res.data.url ? res.data.url : "";290 localStorage.VMware_uuid = res.data.uuid ? res.data.uuid : "";291 self.vm_loadding=false;292 if($location.search().url){293 $location.url($location.search().url);294 }else{295 $location.url("/datacenter");296 }297 localStorage.vmware_flag=2;298 }299 })300 }301 }else{302 if($location.search().url){303 $location.url($location.search().url);304 }305 }306}307function getUrl(url){308 return appUrl+url;309};310function ActiveMenu(e,cur,context){311 if(cur&&cur.current){312 var _current = cur.current.split(".");313 context.pageTitle = "";314 context.currentItem = _current[0];315 context.subMenu = [];316 context.L3Menu = [];317 context.sideMenu.forEach(item => {318 if(_current[1]){ 319 if(item.current == _current[0] && _current[1].indexOf("create") == -1){320 context.subMenu = item.child; 321 context.subCurrentItem = cur.current322 if(_current[2]){323 context.subMenu.forEach(subItem =>{324 if(subItem.current.split(".").slice(0,2).join(".") == _current.slice(0,2).join(".")){325 context.L3Menu = subItem.child;326 context.subCurrentItem = context.L3Menu[0].current;327 context.L3CurrentItem = cur.current;328 }329 });330 }331 }332 }else{333 if(item.current == _current[0]){334 context.pageTitle = item.name;335 }336 }337 });338 }...
test_iframe.js
Source:test_iframe.js
1// Copyright (c) 2011 The Chromium Authors. All rights reserved.2// Use of this source code is governed by a BSD-style license that can be3// found in the LICENSE file.4function runTests() {5 var getURL = chrome.extension.getURL;6 chrome.tabs.create({"url": "about:blank"}, function(tab) {7 var tabId = tab.id;8 chrome.test.runTests([9 // Navigates to a.html which includes b.html as an iframe. b.html10 // redirects to c.html.11 function iframe() {12 expect([13 { label: "a-onBeforeNavigate",14 event: "onBeforeNavigate",15 details: { frameId: 0,16 tabId: 0,17 timeStamp: 0,18 url: getURL('iframe/a.html') }},19 { label: "a-onCommitted",20 event: "onCommitted",21 details: { frameId: 0,22 tabId: 0,23 timeStamp: 0,24 transitionQualifiers: [],25 transitionType: "link",26 url: getURL('iframe/a.html') }},27 { label: "a-onDOMContentLoaded",28 event: "onDOMContentLoaded",29 details: { frameId: 0,30 tabId: 0,31 timeStamp: 0,32 url: getURL('iframe/a.html') }},33 { label: "a-onCompleted",34 event: "onCompleted",35 details: { frameId: 0,36 tabId: 0,37 timeStamp: 0,38 url: getURL('iframe/a.html') }},39 { label: "b-onBeforeNavigate",40 event: "onBeforeNavigate",41 details: { frameId: 1,42 tabId: 0,43 timeStamp: 0,44 url: getURL('iframe/b.html') }},45 { label: "b-onCommitted",46 event: "onCommitted",47 details: { frameId: 1,48 tabId: 0,49 timeStamp: 0,50 transitionQualifiers: [],51 transitionType: "auto_subframe",52 url: getURL('iframe/b.html') }},53 { label: "b-onDOMContentLoaded",54 event: "onDOMContentLoaded",55 details: { frameId: 1,56 tabId: 0,57 timeStamp: 0,58 url: getURL('iframe/b.html') }},59 { label: "b-onCompleted",60 event: "onCompleted",61 details: { frameId: 1,62 tabId: 0,63 timeStamp: 0,64 url: getURL('iframe/b.html') }},65 { label: "c-onBeforeNavigate",66 event: "onBeforeNavigate",67 details: { frameId: 1,68 tabId: 0,69 timeStamp: 0,70 url: getURL('iframe/c.html') }},71 { label: "c-onCommitted",72 event: "onCommitted",73 details: { frameId: 1,74 tabId: 0,75 timeStamp: 0,76 transitionQualifiers: [],77 transitionType: "auto_subframe",78 url: getURL('iframe/c.html') }},79 { label: "c-onDOMContentLoaded",80 event: "onDOMContentLoaded",81 details: { frameId: 1,82 tabId: 0,83 timeStamp: 0,84 url: getURL('iframe/c.html') }},85 { label: "c-onCompleted",86 event: "onCompleted",87 details: { frameId: 1,88 tabId: 0,89 timeStamp: 0,90 url: getURL('iframe/c.html') }}],91 [ navigationOrder("a-"),92 navigationOrder("b-"),93 navigationOrder("c-"),94 isIFrameOf("b-", "a-"),95 isLoadedBy("c-", "b-")]);96 chrome.tabs.update(tabId, { url: getURL('iframe/a.html') });97 },98 // Navigates to d.html which includes e.html and f.html as iframes. To be99 // able to predict which iframe has which id, the iframe for f.html is100 // created by javascript. f.html then navigates to g.html.101 function iframeMultiple() {102 expect([103 { label: "d-onBeforeNavigate",104 event: "onBeforeNavigate",105 details: { frameId: 0,106 tabId: 0,107 timeStamp: 0,108 url: getURL('iframe/d.html') }},109 { label: "d-onCommitted",110 event: "onCommitted",111 details: { frameId: 0,112 tabId: 0,113 timeStamp: 0,114 transitionQualifiers: [],115 transitionType: "link",116 url: getURL('iframe/d.html') }},117 { label: "d-onDOMContentLoaded",118 event: "onDOMContentLoaded",119 details: { frameId: 0,120 tabId: 0,121 timeStamp: 0,122 url: getURL('iframe/d.html') }},123 { label: "d-onCompleted",124 event: "onCompleted",125 details: { frameId: 0,126 tabId: 0,127 timeStamp: 0,128 url: getURL('iframe/d.html') }},129 { label: "e-onBeforeNavigate",130 event: "onBeforeNavigate",131 details: { frameId: 1,132 tabId: 0,133 timeStamp: 0,134 url: getURL('iframe/e.html') }},135 { label: "e-onCommitted",136 event: "onCommitted",137 details: { frameId: 1,138 tabId: 0,139 timeStamp: 0,140 transitionQualifiers: [],141 transitionType: "auto_subframe",142 url: getURL('iframe/e.html') }},143 { label: "e-onDOMContentLoaded",144 event: "onDOMContentLoaded",145 details: { frameId: 1,146 tabId: 0,147 timeStamp: 0,148 url: getURL('iframe/e.html') }},149 { label: "e-onCompleted",150 event: "onCompleted",151 details: { frameId: 1,152 tabId: 0,153 timeStamp: 0,154 url: getURL('iframe/e.html') }},155 { label: "f-onBeforeNavigate",156 event: "onBeforeNavigate",157 details: { frameId: 2,158 tabId: 0,159 timeStamp: 0,160 url: getURL('iframe/f.html') }},161 { label: "f-onCommitted",162 event: "onCommitted",163 details: { frameId: 2,164 tabId: 0,165 timeStamp: 0,166 transitionQualifiers: [],167 transitionType: "auto_subframe",168 url: getURL('iframe/f.html') }},169 { label: "f-onDOMContentLoaded",170 event: "onDOMContentLoaded",171 details: { frameId: 2,172 tabId: 0,173 timeStamp: 0,174 url: getURL('iframe/f.html') }},175 { label: "f-onCompleted",176 event: "onCompleted",177 details: { frameId: 2,178 tabId: 0,179 timeStamp: 0,180 url: getURL('iframe/f.html') }},181 { label: "g-onBeforeNavigate",182 event: "onBeforeNavigate",183 details: { frameId: 2,184 tabId: 0,185 timeStamp: 0,186 url: getURL('iframe/g.html') }},187 { label: "g-onCommitted",188 event: "onCommitted",189 details: { frameId: 2,190 tabId: 0,191 timeStamp: 0,192 transitionQualifiers: [],193 transitionType: "auto_subframe",194 url: getURL('iframe/g.html') }},195 { label: "g-onDOMContentLoaded",196 event: "onDOMContentLoaded",197 details: { frameId: 2,198 tabId: 0,199 timeStamp: 0,200 url: getURL('iframe/g.html') }},201 { label: "g-onCompleted",202 event: "onCompleted",203 details: { frameId: 2,204 tabId: 0,205 timeStamp: 0,206 url: getURL('iframe/g.html') }}],207 [ navigationOrder("d-"),208 navigationOrder("e-"),209 navigationOrder("f-"),210 navigationOrder("g-"),211 isIFrameOf("e-", "d-"),212 ["d-onDOMContentLoaded", "f-onBeforeNavigate", "f-onCompleted",213 "d-onCompleted"],214 isLoadedBy("g-", "f-")]);215 chrome.tabs.update(tabId, { url: getURL('iframe/d.html') });216 },217 // Navigates to h.html which includes i.html that triggers a navigation218 // on the main frame.219 function iframeNavigate() {220 expect([221 { label: "h-onBeforeNavigate",222 event: "onBeforeNavigate",223 details: { frameId: 0,224 tabId: 0,225 timeStamp: 0,226 url: getURL('iframe/h.html') }},227 { label: "h-onCommitted",228 event: "onCommitted",229 details: { frameId: 0,230 tabId: 0,231 timeStamp: 0,232 transitionQualifiers: [],233 transitionType: "link",234 url: getURL('iframe/h.html') }},235 { label: "h-onDOMContentLoaded",236 event: "onDOMContentLoaded",237 details: { frameId: 0,238 tabId: 0,239 timeStamp: 0,240 url: getURL('iframe/h.html') }},241 { label: "h-onCompleted",242 event: "onCompleted",243 details: { frameId: 0,244 tabId: 0,245 timeStamp: 0,246 url: getURL('iframe/h.html') }},247 { label: "i-onBeforeNavigate",248 event: "onBeforeNavigate",249 details: { frameId: 1,250 tabId: 0,251 timeStamp: 0,252 url: getURL('iframe/i.html') }},253 { label: "i-onCommitted",254 event: "onCommitted",255 details: { frameId: 1,256 tabId: 0,257 timeStamp: 0,258 transitionQualifiers: [],259 transitionType: "auto_subframe",260 url: getURL('iframe/i.html') }},261 { label: "i-onDOMContentLoaded",262 event: "onDOMContentLoaded",263 details: { frameId: 1,264 tabId: 0,265 timeStamp: 0,266 url: getURL('iframe/i.html') }},267 { label: "i-onCompleted",268 event: "onCompleted",269 details: { frameId: 1,270 tabId: 0,271 timeStamp: 0,272 url: getURL('iframe/i.html') }},273 { label: "c-onBeforeNavigate",274 event: "onBeforeNavigate",275 details: { frameId: 0,276 tabId: 0,277 timeStamp: 0,278 url: getURL('iframe/c.html') }},279 { label: "c-onCommitted",280 event: "onCommitted",281 details: { frameId: 0,282 tabId: 0,283 timeStamp: 0,284 transitionQualifiers: [],285 transitionType: "link",286 url: getURL('iframe/c.html') }},287 { label: "c-onDOMContentLoaded",288 event: "onDOMContentLoaded",289 details: { frameId: 0,290 tabId: 0,291 timeStamp: 0,292 url: getURL('iframe/c.html') }},293 { label: "c-onCompleted",294 event: "onCompleted",295 details: { frameId: 0,296 tabId: 0,297 timeStamp: 0,298 url: getURL('iframe/c.html') }}],299 [ navigationOrder("h-"),300 navigationOrder("i-"),301 navigationOrder("c-"),302 isIFrameOf("i-", "h-"),303 isLoadedBy("c-", "i-") ]);304 chrome.tabs.update(tabId, { url: getURL('iframe/h.html') });305 },306 ]);307 });...
Root.js
Source:Root.js
1import React from "react";2import { Router, Route, Switch, Redirect } from "react-router-dom";3import App from "./App"; // private app4import PublicApp from "./components/public/PublicApp"; // public app5import ErrorMessage from "./components/error/ErrorMessage"; // public app6import Login from "./components/login/Login"; // public app7import Password from "./components/password/Password"; // public app8import store from "./utils/store";9import Auth from "./utils/auth";10import { buildUrl, getUrl } from "./utils/UrlService";11import AuthCheck from "./utils/authcheck";12import history from "./utils/history";13import { injectIntl } from "react-intl";14import CreateProject from "./components/project/CreateProject";15import CreateGroup from "./components/groups/CreateGroup";16import EditProject from "./components/project/EditProject";17import ProjectDetail from "./components/project/ProjectDetail";18import EditGroup from "./components/groups/EditGroup";19import ListThreat from "./components/threat/ListThreat";20import AddThreat from "./components/threat/AddThreat";21import EditThreat from "./components/threat/EditThreat";22import ListSite from "./components/sites/ListSite";23import AddSite from "./components/sites/AddSite";24import EditSite from "./components/sites/EditSite";25import AddPlayer from "./components/players/AddPlayer";26import EditPlayer from "./components/players/EditPlayer";27import ListExposed from "./components/exposed/ListExposed";28import AddExposed from "./components/exposed/AddExposed";29import ListRisk from "./components/risk/ListRisk";30import AddRisk from "./components/risk/AddRisk";31import EditRisk from "./components/risk/EditRisk";32import AddColumn from "./components/columns/AddColumn";33import AddLevel from "./components/level/AddLevel";34import DirectImpacts from "./components/iframes/DirectImpacts";35import Interdependences from "./components/iframes/Interdependences";36import Simulator from "./components/iframes/Simulator";37import CascadeEffects from "./components/iframes/CascadeEffects";38export const auth = new Auth();39const PrivateRoute = ({ component: Component, auth }) => (40 <Route41 render={(props) =>42 auth.isFullAuthenticated() === true ? (43 <Component auth={auth} {...props} />44 ) : (45 <Redirect46 to={{47 pathname: buildUrl("LOGIN"),48 }}49 />50 )51 }52 />53);54class Root extends React.Component {55 componentWillMount() {56 const { intl } = this.props;57 // change page title coming via translation file58 document.title = intl.formatMessage({ id: "page.title" });59 }60 componentDidMount() {61 // detect online status, show homepage62 window.addEventListener("online", function () {63 //window.location.replace('/')64 history.push(buildUrl("HOME"));65 });66 // detect offline status, show error67 window.addEventListener("offline", function () {68 history.push(buildUrl("ERROR"));69 });70 // enable error handling71 window.onerror = function (message, source, lineno, colno, error) {72 if (window.appConfig.trackErrors === true) {73 // send info to an endpoint74 let debug = {75 short_message: message,76 full_message: window.location.pathname + " " + JSON.stringify(error),77 _component: "index.onError",78 };79 store.set("info", JSON.stringify(debug));80 }81 // if we see a white page redirect to an error page82 if (83 document.getElementById("root").innerHTML.length === 0 &&84 window.appConfig.trackErrors === true85 ) {86 history.push(buildUrl("ERROR"));87 //window.location.replace('/error')88 }89 };90 }91 render() {92 return (93 <Router history={history}>94 <Switch>95 <PrivateRoute path={getUrl("HOME")} auth={auth} component={App} />96 <PrivateRoute97 path={getUrl("CREATE_PROJECT")}98 auth={auth}99 component={CreateProject}100 />101 <Route102 path={getUrl("EDIT_PROJECT")}103 auth={auth}104 component={EditProject}105 />106 <Route107 path={getUrl("CREATE_GROUP")}108 auth={auth}109 component={CreateGroup}110 />111 <Route112 path={getUrl("EDIT_GROUP")}113 auth={auth}114 component={EditGroup}115 />116 <Route117 path={getUrl("CREATE_THREAT")}118 auth={auth}119 component={AddThreat}120 />121 <Route122 path={getUrl("EDIT_THREAT")}123 auth={auth}124 component={EditThreat}125 />126 <Route path={getUrl("CREATE_SITE")} auth={auth} component={AddSite} />127 <Route path={getUrl("EDIT_SITE")} auth={auth} component={EditSite} />128 <Route129 path={getUrl("CREATE_EXPOSED")}130 auth={auth}131 component={AddExposed}132 />133 <Route134 path={getUrl("EDIT_EXPOSED")}135 auth={auth}136 component={EditSite}137 />138 <Route139 path={getUrl("CREATE_PLAYER")}140 auth={auth}141 component={AddPlayer}142 />143 <Route144 path={getUrl("EDIT_PLAYER")}145 auth={auth}146 component={EditPlayer}147 />148 <Route path={getUrl("CREATE_RISK")} auth={auth} component={AddRisk} />149 <Route path={getUrl("EDIT_RISK")} auth={auth} component={EditRisk} />150 <Route151 path={getUrl("CREATE_COLUMN")}152 auth={auth}153 component={AddColumn}154 />155 <Route156 path={getUrl("CREATE_LEVEL")}157 auth={auth}158 component={AddLevel}159 />160 <Route path={getUrl("LIST_SITES")} auth={auth} component={ListSite} />161 <Route162 path={getUrl("DIRECT_IMPACTS")}163 auth={auth}164 component={DirectImpacts}165 />166 <Route167 path={getUrl("INTERDEPENDENCES")}168 auth={auth}169 component={Interdependences}170 />171 <Route path={getUrl("SIMULATOR")} auth={auth} component={Simulator} />172 <Route173 path={getUrl("CASCADE")}174 auth={auth}175 component={CascadeEffects}176 />177 <Route178 path={getUrl("LIST_THREATS")}179 auth={auth}180 component={ListThreat}181 />182 <Route path={getUrl("LIST_RISK")} auth={auth} component={ListRisk} />183 <Route path={getUrl("LIST_SITES")} auth={auth} component={ListSite} />184 <Route185 path={getUrl("LIST_EXPOSED")}186 auth={auth}187 component={ListExposed}188 />189 <Route190 path={getUrl("SHOW_PROJECT")}191 auth={auth}192 component={ProjectDetail}193 />194 {/* <Route path={getUrl("EDIT_THREAT")} auth={auth} component={ProjectDetail} /> */}195 {/* <PrivateRoute path={getUrl("EDIT_PROJECT")} auth={auth} component={EditProject} /> */}196 <Route path={getUrl("LOGIN")} render={() => <Login auth={auth} />} />197 <Route198 path={getUrl("RESET_PASSWORD")}199 render={() => <Password auth={auth} />}200 />201 <Route202 path={getUrl("AUTHCHECK")}203 render={() => <AuthCheck auth={auth} />}204 />205 <Route path={getUrl("ERROR")} render={() => <ErrorMessage />} />206 <Route path={getUrl("PUBLIC")} render={() => <PublicApp />} />207 {208 // language routes209 window.appConfig.lang.map(function (lang) {210 return (211 <Route212 exact213 key={lang}214 path={getUrl("/") + lang}215 render={() => <Login auth={auth} />}216 />217 );218 })219 }220 <Route render={() => <AuthCheck auth={auth} />} />221 </Switch>222 </Router>223 );224 }225}...
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!!