How to use getUrl method in argos

Best JavaScript code snippet using argos

apiUrl.js

Source:apiUrl.js Github

copy

Full Screen

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 基本送料一覧更新...

Full Screen

Full Screen

main.js

Source:main.js Github

copy

Full Screen

...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.current...

Full Screen

Full Screen

test_iframe.js

Source:test_iframe.js Github

copy

Full Screen

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 });...

Full Screen

Full Screen

Root.js

Source:Root.js Github

copy

Full Screen

...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}...

Full Screen

Full Screen

test_openTab.js

Source:test_openTab.js Github

copy

Full Screen

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 // Opens a new tab from javascript.10 function openTab() {11 expect([12 { label: "a-onBeforeNavigate",13 event: "onBeforeNavigate",14 details: { frameId: 0,15 tabId: 0,16 timeStamp: 0,17 url: getURL('openTab/a.html') }},18 { label: "a-onCommitted",19 event: "onCommitted",20 details: { frameId: 0,21 tabId: 0,22 timeStamp: 0,23 transitionQualifiers: [],24 transitionType: "link",25 url: getURL('openTab/a.html') }},26 { label: "a-onDOMContentLoaded",27 event: "onDOMContentLoaded",28 details: { frameId: 0,29 tabId: 0,30 timeStamp: 0,31 url: getURL('openTab/a.html') }},32 { label: "a-onCompleted",33 event: "onCompleted",34 details: { frameId: 0,35 tabId: 0,36 timeStamp: 0,37 url: getURL('openTab/a.html') }},38 { label: "a-onCreatedNavigationTarget",39 event: "onCreatedNavigationTarget",40 details: { sourceFrameId: 0,41 sourceTabId: 0,42 tabId: 1,43 timeStamp: 0,44 url: getURL('openTab/b.html') }},45 { label: "b-onBeforeNavigate",46 event: "onBeforeNavigate",47 details: { frameId: 0,48 tabId: 1,49 timeStamp: 0,50 url: getURL('openTab/b.html') }},51 { label: "b-onCommitted",52 event: "onCommitted",53 details: { frameId: 0,54 tabId: 1,55 timeStamp: 0,56 transitionQualifiers: [],57 transitionType: "link",58 url: getURL('openTab/b.html') }},59 { label: "b-onDOMContentLoaded",60 event: "onDOMContentLoaded",61 details: { frameId: 0,62 tabId: 1,63 timeStamp: 0,64 url: getURL('openTab/b.html') }},65 { label: "b-onCompleted",66 event: "onCompleted",67 details: { frameId: 0,68 tabId: 1,69 timeStamp: 0,70 url: getURL('openTab/b.html') }}],71 [ navigationOrder("a-"),72 navigationOrder("b-"),73 ["a-onDOMContentLoaded", "a-onCreatedNavigationTarget",74 "b-onBeforeNavigate"]]);75 chrome.tabs.update(tabId, { url: getURL('openTab/a.html') });76 },77 // Opens a new tab from javascript within an iframe.78 function openTabFrame() {79 expect([80 { label: "c-onBeforeNavigate",81 event: "onBeforeNavigate",82 details: { frameId: 0,83 tabId: 0,84 timeStamp: 0,85 url: getURL('openTab/c.html') }},86 { label: "c-onCommitted",87 event: "onCommitted",88 details: { frameId: 0,89 tabId: 0,90 timeStamp: 0,91 transitionQualifiers: [],92 transitionType: "link",93 url: getURL('openTab/c.html') }},94 { label: "c-onDOMContentLoaded",95 event: "onDOMContentLoaded",96 details: { frameId: 0,97 tabId: 0,98 timeStamp: 0,99 url: getURL('openTab/c.html') }},100 { label: "c-onCompleted",101 event: "onCompleted",102 details: { frameId: 0,103 tabId: 0,104 timeStamp: 0,105 url: getURL('openTab/c.html') }},106 { label: "a-onBeforeNavigate",107 event: "onBeforeNavigate",108 details: { frameId: 1,109 tabId: 0,110 timeStamp: 0,111 url: getURL('openTab/a.html') }},112 { label: "a-onCommitted",113 event: "onCommitted",114 details: { frameId: 1,115 tabId: 0,116 timeStamp: 0,117 transitionQualifiers: [],118 transitionType: "auto_subframe",119 url: getURL('openTab/a.html') }},120 { label: "a-onDOMContentLoaded",121 event: "onDOMContentLoaded",122 details: { frameId: 1,123 tabId: 0,124 timeStamp: 0,125 url: getURL('openTab/a.html') }},126 { label: "a-onCompleted",127 event: "onCompleted",128 details: { frameId: 1,129 tabId: 0,130 timeStamp: 0,131 url: getURL('openTab/a.html') }},132 { label: "a-onCreatedNavigationTarget",133 event: "onCreatedNavigationTarget",134 details: { sourceFrameId: 1,135 sourceTabId: 0,136 tabId: 1,137 timeStamp: 0,138 url: getURL('openTab/b.html') }},139 { label: "b-onBeforeNavigate",140 event: "onBeforeNavigate",141 details: { frameId: 0,142 tabId: 1,143 timeStamp: 0,144 url: getURL('openTab/b.html') }},145 { label: "b-onCommitted",146 event: "onCommitted",147 details: { frameId: 0,148 tabId: 1,149 timeStamp: 0,150 transitionQualifiers: [],151 transitionType: "link",152 url: getURL('openTab/b.html') }},153 { label: "b-onDOMContentLoaded",154 event: "onDOMContentLoaded",155 details: { frameId: 0,156 tabId: 1,157 timeStamp: 0,158 url: getURL('openTab/b.html') }},159 { label: "b-onCompleted",160 event: "onCompleted",161 details: { frameId: 0,162 tabId: 1,163 timeStamp: 0,164 url: getURL('openTab/b.html') }}],165 [ navigationOrder("a-"),166 navigationOrder("b-"),167 navigationOrder("c-"),168 isIFrameOf("a-", "c-"),169 ["a-onDOMContentLoaded", "a-onCreatedNavigationTarget",170 "b-onBeforeNavigate"]]);171 chrome.tabs.update(tabId, { url: getURL('openTab/c.html') });172 },173 ]);174 });...

Full Screen

Full Screen

roleplay.js

Source:roleplay.js Github

copy

Full Screen

1module.exports.config = {2 name: "roleplay",3 version: "1.0.0",4 hasPermssion: 0,5 credits: "CatalizCS",6 description: "Hun, ôm, ... đủ thứ trò in here!",7 commandCategory: "random-img",8 usages: "roleplay",9 cooldowns: 1,10 dependencies: ['request', 'fs-extra']11};12module.exports.onLoad = () => {13 const { existsSync, createWriteStream } = require("fs-extra");14 const request = require("request");15 if (!existsSync(__dirname + "/cache/anime.json")) request("https://raw.githubusercontent.com/catalizcs/storage-data/master/anime/anime.json")16 .pipe(createWriteStream(__dirname + "/cache/anime.json"));17}18module.exports.event = ({ event, api, client }) => {19 if (event.type == "message_unsend") return;20 const request = require("request");21 const { readFileSync, createReadStream, createWriteStream, unlinkSync } = require("fs-extra");22 let settings = client.threadSetting.get(event.threadID) || {};23 let mention = Object.keys(event.mentions);24 if (!settings["roleplay"] || !settings || mention.length == 0) return;25 let animeData = JSON.parse(readFileSync(__dirname + "/cache/anime.json"));26 27 if (event.body.indexOf("hug") == 0 || event.body.indexOf("ôm") == 0) {28 for (const id of mention) {29 request(animeData["hug"], (error, response, body) => {30 let picData = JSON.parse(body);31 let getURL = picData.data.response.url;32 let ext = getURL.substring(getURL.lastIndexOf(".") + 1);33 request(getURL).pipe(createWriteStream(__dirname + `/cache/${id}.${ext}`)).on("close", () => api.sendMessage({ body: event.mentions[id] + ", I wanna hug you ❤️", mentions: [{ tag: event.mentions[id], id: id }], attachment: createReadStream(__dirname + `/cache/${id}.${ext}`) }, event.threadID, () => unlinkSync(__dirname + `/cache/${id}.${ext}`), event.messageID));34 })35 }36 return;37 }38 if (event.body.indexOf("kiss") == 0 || event.body.indexOf("hôn") == 0 || event.body.indexOf("hun") == 0) {39 for (const id of mention) {40 request(animeData["kiss"], (error, response, body) => {41 let picData = JSON.parse(body);42 let getURL = picData.data.response.url;43 let ext = getURL.substring(getURL.lastIndexOf(".") + 1);44 request(getURL).pipe(createWriteStream(__dirname + `/cache/${id}.${ext}`)).on("close", () => api.sendMessage({ body: event.mentions[id] + ", I wanna kiss you ❤️", mentions: [{ tag: event.mentions[id], id: id }], attachment: createReadStream(__dirname + `/cache/${id}.${ext}`) }, event.threadID, () => unlinkSync(__dirname + `/cache/${id}.${ext}`), event.messageID));45 })46 }47 return;48 }49 if (event.body.indexOf("feed") == 0 || event.body.indexOf("đút") == 0 || event.body.indexOf("banh họng ra") == 0 || event.body.indexOf("mớm") == 0) {50 for (const id of mention) {51 request(animeData["feed"], (error, response, body) => {52 let picData = JSON.parse(body);53 let getURL = picData.data.response.url;54 let ext = getURL.substring(getURL.lastIndexOf(".") + 1);55 request(getURL).pipe(createWriteStream(__dirname + `/cache/${id}.${ext}`)).on("close", () => api.sendMessage({ body: event.mentions[id] + ", say 'Ahhh'", mentions: [{ tag: event.mentions[id], id: id }], attachment: createReadStream(__dirname + `/cache/${id}.${ext}`) }, event.threadID, () => unlinkSync(__dirname + `/cache/${id}.${ext}`), event.messageID));56 })57 }58 return;59 }60 if (event.body.indexOf("pat") == 0 || event.body.indexOf("xoa đầu") == 0) {61 for (const id of mention) {62 request(animeData["pat"], (error, response, body) => {63 let picData = JSON.parse(body);64 let getURL = picData.data.response.url;65 let ext = getURL.substring(getURL.lastIndexOf(".") + 1);66 request(getURL).pipe(createWriteStream(__dirname + `/cache/${id}.${ext}`)).on("close", () => api.sendMessage({ body: event.mentions[id] + ", ...", mentions: [{ tag: event.mentions[id], id: id }], attachment: createReadStream(__dirname + `/cache/${id}.${ext}`) }, event.threadID, () => unlinkSync(__dirname + `/cache/${id}.${ext}`), event.messageID));67 })68 }69 return;70 }71 if (event.body.indexOf("slap") == 0 || event.body.indexOf("tát") == 0 || event.body.indexOf("vả") == 0) {72 for (const id of mention) {73 request(animeData["slap"], (error, response, body) => {74 let picData = JSON.parse(body);75 let getURL = picData.data.response.url;76 let ext = getURL.substring(getURL.lastIndexOf(".") + 1);77 request(getURL).pipe(createWriteStream(__dirname + `/cache/${id}.${ext}`)).on("close", () => api.sendMessage({ body: event.mentions[id] + ", take my slap, b*tch", mentions: [{ tag: event.mentions[id], id: id }], attachment: createReadStream(__dirname + `/cache/${id}.${ext}`) }, event.threadID, () => unlinkSync(__dirname + `/cache/${id}.${ext}`), event.messageID));78 })79 }80 return;81 }82 if (event.body.indexOf("poke") == 0 || event.body.indexOf("chọc") == 0) {83 for (const id of mention) {84 request(animeData["poke"], (error, response, body) => {85 let picData = JSON.parse(body);86 let getURL = picData.data.response.url;87 let ext = getURL.substring(getURL.lastIndexOf(".") + 1);88 request(getURL).pipe(createWriteStream(__dirname + `/cache/${id}.${ext}`)).on("close", () => api.sendMessage({ body: event.mentions[id] + ", HEHEHE", mentions: [{ tag: event.mentions[id], id: id }], attachment: createReadStream(__dirname + `/cache/${id}.${ext}`) }, event.threadID, () => unlinkSync(__dirname + `/cache/${id}.${ext}`), event.messageID));89 })90 }91 return;92 }93}94module.exports.run = async ({ event, api, args, Threads, client, utils }) => {95 let settings = (await Threads.getData(event.threadID)).settings;96 if (typeof settings["roleplay"] == "undefined" || settings["roleplay"] == false) settings["roleplay"] = true;97 else settings["roleplay"] = false;98 99 await Threads.setData(event.threadID, options = { settings });100 client.threadSetting.set(event.threadID, settings);101 102 return api.sendMessage(`Đã ${(settings["roleplay"] == true) ? "bật" : "tắt"} thành công roleplay!`, event.threadID);...

Full Screen

Full Screen

test_failures.js

Source:test_failures.js Github

copy

Full Screen

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 non-existant page.10 function nonExistant() {11 expect([12 { label: "onBeforeNavigate",13 event: "onBeforeNavigate",14 details: { frameId: 0,15 tabId: 0,16 timeStamp: 0,17 url: getURL('failures/nonexistant.html') }},18 { label: "onErrorOccurred",19 event: "onErrorOccurred",20 details: { error: "net::ERR_FILE_NOT_FOUND",21 frameId: 0,22 tabId: 0,23 timeStamp: 0,24 url: getURL('failures/nonexistant.html') }}],25 [["onBeforeNavigate", "onErrorOccurred"]]);26 chrome.tabs.update(tabId, { url: getURL('failures/nonexistant.html') });27 },28 // An page that tries to load an non-existant iframe.29 function nonExistantIframe() {30 expect([31 { label: "a-onBeforeNavigate",32 event: "onBeforeNavigate",33 details: { frameId: 0,34 tabId: 0,35 timeStamp: 0,36 url: getURL('failures/d.html') }},37 { label: "a-onCommitted",38 event: "onCommitted",39 details: { frameId: 0,40 tabId: 0,41 timeStamp: 0,42 transitionQualifiers: [],43 transitionType: "link",44 url: getURL('failures/d.html') }},45 { label: "a-onDOMContentLoaded",46 event: "onDOMContentLoaded",47 details: { frameId: 0,48 tabId: 0,49 timeStamp: 0,50 url: getURL('failures/d.html') }},51 { label: "a-onCompleted",52 event: "onCompleted",53 details: { frameId: 0,54 tabId: 0,55 timeStamp: 0,56 url: getURL('failures/d.html') }},57 { label: "b-onBeforeNavigate",58 event: "onBeforeNavigate",59 details: { frameId: 1,60 tabId: 0,61 timeStamp: 0,62 url: getURL('failures/c.html') }},63 { label: "b-onErrorOccurred",64 event: "onErrorOccurred",65 details: { error: "net::ERR_FILE_NOT_FOUND",66 frameId: 1,67 tabId: 0,68 timeStamp: 0,69 url: getURL('failures/c.html') }}],70 [navigationOrder("a-"),71 ["a-onCommitted", "b-onBeforeNavigate", "b-onErrorOccurred",72 "a-onCompleted"]]);73 chrome.tabs.update(tabId, { url: getURL('failures/d.html') });74 },75 // An iframe navigates to a non-existant page.76 function nonExistantIframeNavigation() {77 expect([78 { label: "a-onBeforeNavigate",79 event: "onBeforeNavigate",80 details: { frameId: 0,81 tabId: 0,82 timeStamp: 0,83 url: getURL('failures/a.html') }},84 { label: "a-onCommitted",85 event: "onCommitted",86 details: { frameId: 0,87 tabId: 0,88 timeStamp: 0,89 transitionQualifiers: [],90 transitionType: "link",91 url: getURL('failures/a.html') }},92 { label: "a-onDOMContentLoaded",93 event: "onDOMContentLoaded",94 details: { frameId: 0,95 tabId: 0,96 timeStamp: 0,97 url: getURL('failures/a.html') }},98 { label: "a-onCompleted",99 event: "onCompleted",100 details: { frameId: 0,101 tabId: 0,102 timeStamp: 0,103 url: getURL('failures/a.html') }},104 { label: "b-onBeforeNavigate",105 event: "onBeforeNavigate",106 details: { frameId: 1,107 tabId: 0,108 timeStamp: 0,109 url: getURL('failures/b.html') }},110 { label: "b-onCommitted",111 event: "onCommitted",112 details: { frameId: 1,113 tabId: 0,114 timeStamp: 0,115 transitionQualifiers: [],116 transitionType: "auto_subframe",117 url: getURL('failures/b.html') }},118 { label: "b-onDOMContentLoaded",119 event: "onDOMContentLoaded",120 details: { frameId: 1,121 tabId: 0,122 timeStamp: 0,123 url: getURL('failures/b.html') }},124 { label: "b-onCompleted",125 event: "onCompleted",126 details: { frameId: 1,127 tabId: 0,128 timeStamp: 0,129 url: getURL('failures/b.html') }},130 { label: "c-onBeforeNavigate",131 event: "onBeforeNavigate",132 details: { frameId: 1,133 tabId: 0,134 timeStamp: 0,135 url: getURL('failures/c.html') }},136 { label: "c-onErrorOccurred",137 event: "onErrorOccurred",138 details: { error: "net::ERR_FILE_NOT_FOUND",139 frameId: 1,140 tabId: 0,141 timeStamp: 0,142 url: getURL('failures/c.html') }}],143 [ navigationOrder("a-"),144 navigationOrder("b-"),145 isIFrameOf("b-", "a-"),146 isLoadedBy("c-", "b-"),147 ["c-onBeforeNavigate", "c-onErrorOccurred"]]);148 chrome.tabs.update(tabId, { url: getURL('failures/a.html') });149 },150 ]);151 });...

Full Screen

Full Screen

youtube.js

Source:youtube.js Github

copy

Full Screen

1const ytdl = require('ytdl-core');2const yts = require('yt-search');3const axios = require('axios');45function bytesToSize(bytes) {6 return new Promise((resolve, reject) => {7 const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB'];8 if (bytes === 0) return 'n/a';9 const i = parseInt(Math.floor(Math.log(bytes) / Math.log(1024)), 10);10 if (i === 0) resolve(`${bytes} ${sizes[i]}`);11 resolve(`${(bytes / (1024 ** i)).toFixed(1)} ${sizes[i]}`);12 });13 };1415function ytMp4(url) {16 return new Promise(async(resolve, reject) => {17 ytdl.getInfo(url).then(async(getUrl) => {18 let result = [];19 for(let i = 0; i < getUrl.formats.length; i++) {20 let item = getUrl.formats[i];21 if (item.container == 'mp4' && item.hasVideo == true && item.hasAudio == true) {22 let { qualityLabel, contentLength } = item;23 let bytes = await bytesToSize(contentLength);24 result[i] = {25 video: item.url,26 quality: qualityLabel,27 size: bytes28 };29 };30 };31 let resultFix = result.filter(x => x.video != undefined && x.size != undefined && x.quality != undefined) 32 let tiny = await axios.get(`https://tinyurl.com/api-create.php?url=${resultFix[0].video}`);33 let tinyUrl = tiny.data;34 let title = getUrl.videoDetails.title;35 let desc = getUrl.videoDetails.description;36 let views = getUrl.videoDetails.viewCount;37 let likes = getUrl.videoDetails.likes;38 let dislike = getUrl.videoDetails.dislikes;39 let channel = getUrl.videoDetails.ownerChannelName;40 let uploadDate = getUrl.videoDetails.uploadDate;41 let thumb = getUrl.player_response.microformat.playerMicroformatRenderer.thumbnail.thumbnails[0].url;42 resolve({43 title,44 result: tinyUrl,45 quality: resultFix[0].quality,46 size: resultFix[0].size,47 thumb,48 views,49 likes,50 dislike,51 channel,52 uploadDate,53 desc54 });55 }).catch(reject);56 });57};5859function ytMp3(url) {60 return new Promise((resolve, reject) => {61 ytdl.getInfo(url).then(async(getUrl) => {62 let result = [];63 for(let i = 0; i < getUrl.formats.length; i++) {64 let item = getUrl.formats[i];65 if (item.mimeType == 'audio/webm; codecs=\"opus\"') {66 let { contentLength } = item;67 let bytes = await bytesToSize(contentLength);68 result[i] = {69 audio: item.url,70 size: bytes71 };72 };73 };74 let resultFix = result.filter(x => x.audio != undefined && x.size != undefined) 75 let tiny = await axios.get(`https://tinyurl.com/api-create.php?url=${resultFix[0].audio}`);76 let tinyUrl = tiny.data;77 let title = getUrl.videoDetails.title;78 let desc = getUrl.videoDetails.description;79 let views = getUrl.videoDetails.viewCount;80 let likes = getUrl.videoDetails.likes;81 let dislike = getUrl.videoDetails.dislikes;82 let channel = getUrl.videoDetails.ownerChannelName;83 let uploadDate = getUrl.videoDetails.uploadDate;84 let thumb = getUrl.player_response.microformat.playerMicroformatRenderer.thumbnail.thumbnails[0].url;85 resolve({86 title,87 result: tinyUrl,88 size: resultFix[0].size,89 thumb,90 views,91 likes,92 dislike,93 channel,94 uploadDate,95 desc96 });97 }).catch(reject);98 });99}100101function ytPlay(query) {102 return new Promise((resolve, reject) => {103 yts(query).then(async(getData) => {104 let result = getData.videos.slice( 0, 5 );105 let url = [];106 for (let i = 0; i < result.length; i++) {107 url.push(result[i].url);108 }109 let random = url[Math.floor(Math.random() * url.length)];110 let getAudio = await ytMp3(random);111 resolve(getAudio);112 }).catch(reject);113 });114};115 ...

Full Screen

Full Screen

Using AI Code Generation

copy

Full Screen

1var argosy = require('argosy')2var argosyPattern = require('argosy-pattern')3var argosyUrl = require('argosy-url')4var argosyRpc = require('argosy-rpc')5var url = require('url')6var service = argosy()7service.pipe(argosyUrl()).pipe(service)8service.on('error', function (err) {9 console.log('Error: ' + err.message)10})11var pattern = argosyPattern({12})13var rpc = argosyRpc(service, pattern)14var client = rpc()15console.log(url)

Full Screen

Using AI Code Generation

copy

Full Screen

1var argosy = require('argosy'),2 url = require('url'),3 http = require('http'),4 argosyPattern = require('argosy-pattern'),5 argosyService = argosy(),6 argosyClient = argosy(),7 argosyProxy = argosy(),8 argosyUrl = argosy(),9 argosyUrlClient = argosy(),10 argosyUrlProxy = argosy(),11 argosyUrlService = argosy(),12 argosyUrlService2 = argosy(),13 argosyUrlService3 = argosy(),14 urlPattern = pattern({15 }),16 urlRequest = request({17 }),18 urlResponse = pattern({19 }),20 urlService = argosyUrlService.accept({21 }),22 urlService2 = argosyUrlService2.accept({23 }),24 urlService3 = argosyUrlService3.accept({25 }),26 urlServiceProxy = argosyUrlProxy.accept({27 }),28 urlClient = argosyUrlClient.accept({29 }),30 urlProxy = argosyUrlProxy.accept({31 }),32 urlServiceUrl = argosyUrlService.accept({33 }),34 urlService2Url = argosyUrlService2.accept({35 }),36 urlService3Url = argosyUrlService3.accept({37 }),38 urlServiceProxyUrl = argosyUrlProxy.accept({39 }),40 urlClientUrl = argosyUrlClient.accept({41 }),42 urlProxyUrl = argosyUrlProxy.accept({43 }),44 urlServiceUrl2 = argosyUrlService.accept({45 }),46 urlService2Url2 = argosyUrlService2.accept({47 }),

Full Screen

Using AI Code Generation

copy

Full Screen

1require([2], function(3) {4 var url = Utility.getUrl('test');5 alert(url);6});7require([8], function(9) {10 var basePath = Utility.getBasePath();11 alert(basePath);12});13require([14], function(15) {16 var baseURL = Utility.getBaseURL();17 alert(baseURL);18});19require([20], function(21) {22 var baseURL = Utility.getBaseURL();23 alert(baseURL);24});25require([26], function(27) {28 var baseURL = Utility.getBaseURL();29 alert(baseURL);30});31require([32], function(33) {34 var appPath = Utility.getAppPath();35 alert(appPath);36});

Full Screen

Using AI Code Generation

copy

Full Screen

1const argosy = require('argosy')2const matcher = require('argosy-pattern-matcher')3const service = argosy()4service.use('hello', matcher({5 getUrl: {6 }7}, {8 getUrl: (pattern, done) => {9 done(null, pattern.url)10 }11}))12service.listen(3000)13const argosy = require('argosy')14const matcher = require('argosy-pattern-matcher')15const service = argosy()16service.use('hello', matcher({17 getUrl: {18 }19}, {20 getUrl: (pattern, done) => {21 done(null, pattern.url)22 }23}))24service.listen(3000)25const argosy = require('argosy')26const matcher = require('argosy-pattern-matcher')27const service = argosy()28service.use('hello', matcher({29 getUrl: {30 }31}, {32 getUrl: (pattern, done) => {33 done(null, pattern.url)34 }35}))36service.listen(3000)37const argosy = require('argosy')38const matcher = require('argosy-pattern-matcher')39const service = argosy()40service.use('hello', matcher({41 getUrl: {42 }43}, {44 getUrl: (pattern, done) => {45 done(null, pattern.url)46 }47}))48service.listen(3000)49const argosy = require('argosy')50const matcher = require('argosy-pattern-matcher')51const service = argosy()52service.use('hello', matcher({53 getUrl: {54 }55}, {56 getUrl: (pattern, done) => {57 done(null, pattern.url)58 }59}))60service.listen(3000)61const argosy = require('argos

Full Screen

Using AI Code Generation

copy

Full Screen

1var argosy = require('argosy')2var request = require('request')3var service = argosy()4service.accept({5})6service.pipe(argosy()).pipe(service)7service.act('getUrl', function (err, url) {8 if (err) throw err9 request(url, function (err, res, body) {10 if (err) throw err11 console.log(body)12 })13})

Full Screen

Automation Testing Tutorials

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.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run argos automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful