network.js.html 307 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title>Source: network.js</title>
  6. <script src="scripts/prettify/prettify.js"></script>
  7. <script src="scripts/prettify/lang-css.js"></script>
  8. <script src="scripts/jquery.min.js"></script>
  9. <!--[if lt IE 9]>
  10. <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
  11. <![endif]-->
  12. <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
  13. <link type="text/css" rel="stylesheet" href="styles/bootstrap.min.css">
  14. <link type="text/css" rel="stylesheet" href="styles/jaguar.css">
  15. <script>
  16. var config = {"monospaceLinks":true,"cleverLinks":true,"default":{"outputSourceFiles":true}};
  17. </script>
  18. </head>
  19. <body>
  20. <div id="wrap" class="clearfix">
  21. <div class="navigation">
  22. <h3 class="applicationName"><a href="index.html"></a></h3>
  23. <div class="search">
  24. <input id="search" type="text" class="form-control input-sm" placeholder="Search Documentations">
  25. </div>
  26. <ul class="list">
  27. <li class="item" data-name="LuCI">
  28. <span class="title">
  29. <a href="LuCI.html">LuCI</a>
  30. </span>
  31. <ul class="members itemMembers">
  32. <span class="subtitle">Members</span>
  33. <li data-name="LuCI#Class"><a href="LuCI.html#Class">Class</a></li>
  34. <li data-name="LuCI#dom"><a href="LuCI.html#dom">dom</a></li>
  35. <li data-name="LuCI#env"><a href="LuCI.html#env">env</a></li>
  36. <li data-name="LuCI#naturalCompare"><a href="LuCI.html#naturalCompare">naturalCompare</a></li>
  37. <li data-name="LuCI#Poll"><a href="LuCI.html#Poll">Poll</a></li>
  38. <li data-name="LuCI#Request"><a href="LuCI.html#Request">Request</a></li>
  39. <li data-name="LuCI#view"><a href="LuCI.html#view">view</a></li>
  40. </ul>
  41. <ul class="typedefs itemMembers">
  42. <span class="subtitle">Typedefs</span>
  43. <li data-name="LuCI.requestCallbackFn"><a href="LuCI.html#.requestCallbackFn">requestCallbackFn</a></li>
  44. </ul>
  45. <ul class="typedefs itemMembers">
  46. </ul>
  47. <ul class="methods itemMembers">
  48. <span class="subtitle">Methods</span>
  49. <li data-name="LuCI#bind"><a href="LuCI.html#bind">bind</a></li>
  50. <li data-name="LuCI#error"><a href="LuCI.html#error">error</a></li>
  51. <li data-name="LuCI#fspath"><a href="LuCI.html#fspath">fspath</a></li>
  52. <li data-name="LuCI#get"><a href="LuCI.html#get">get</a></li>
  53. <li data-name="LuCI#halt"><a href="LuCI.html#halt">halt</a></li>
  54. <li data-name="LuCI#hasSystemFeature"><a href="LuCI.html#hasSystemFeature">hasSystemFeature</a></li>
  55. <li data-name="LuCI#hasViewPermission"><a href="LuCI.html#hasViewPermission">hasViewPermission</a></li>
  56. <li data-name="LuCI#isObject"><a href="LuCI.html#isObject">isObject</a></li>
  57. <li data-name="LuCI#location"><a href="LuCI.html#location">location</a></li>
  58. <li data-name="LuCI#media"><a href="LuCI.html#media">media</a></li>
  59. <li data-name="LuCI#path"><a href="LuCI.html#path">path</a></li>
  60. <li data-name="LuCI#poll"><a href="LuCI.html#poll">poll</a></li>
  61. <li data-name="LuCI#post"><a href="LuCI.html#post">post</a></li>
  62. <li data-name="LuCI#raise"><a href="LuCI.html#raise">raise</a></li>
  63. <li data-name="LuCI#require"><a href="LuCI.html#require">require</a></li>
  64. <li data-name="LuCI#resolveDefault"><a href="LuCI.html#resolveDefault">resolveDefault</a></li>
  65. <li data-name="LuCI#resource"><a href="LuCI.html#resource">resource</a></li>
  66. <li data-name="LuCI#run"><a href="LuCI.html#run">run</a></li>
  67. <li data-name="LuCI#sortedArray"><a href="LuCI.html#sortedArray">sortedArray</a></li>
  68. <li data-name="LuCI#sortedKeys"><a href="LuCI.html#sortedKeys">sortedKeys</a></li>
  69. <li data-name="LuCI#stop"><a href="LuCI.html#stop">stop</a></li>
  70. <li data-name="LuCI#toArray"><a href="LuCI.html#toArray">toArray</a></li>
  71. <li data-name="LuCI#url"><a href="LuCI.html#url">url</a></li>
  72. </ul>
  73. <ul class="events itemMembers">
  74. </ul>
  75. </li>
  76. <li class="item" data-name="LuCI.baseclass">
  77. <span class="title">
  78. <a href="LuCI.baseclass.html">LuCI.baseclass</a>
  79. </span>
  80. <ul class="members itemMembers">
  81. </ul>
  82. <ul class="typedefs itemMembers">
  83. </ul>
  84. <ul class="typedefs itemMembers">
  85. </ul>
  86. <ul class="methods itemMembers">
  87. <span class="subtitle">Methods</span>
  88. <li data-name="LuCI.baseclass.extend"><a href="LuCI.baseclass.html#.extend">extend</a></li>
  89. <li data-name="LuCI.baseclass.instantiate"><a href="LuCI.baseclass.html#.instantiate">instantiate</a></li>
  90. <li data-name="LuCI.baseclass.isSubclass"><a href="LuCI.baseclass.html#.isSubclass">isSubclass</a></li>
  91. <li data-name="LuCI.baseclass.singleton"><a href="LuCI.baseclass.html#.singleton">singleton</a></li>
  92. <li data-name="LuCI.baseclass#super"><a href="LuCI.baseclass.html#super">super</a></li>
  93. <li data-name="LuCI.baseclass#varargs"><a href="LuCI.baseclass.html#varargs">varargs</a></li>
  94. </ul>
  95. <ul class="events itemMembers">
  96. </ul>
  97. </li>
  98. <li class="item" data-name="LuCI.dom">
  99. <span class="title">
  100. <a href="LuCI.dom.html">LuCI.dom</a>
  101. </span>
  102. <ul class="members itemMembers">
  103. </ul>
  104. <ul class="typedefs itemMembers">
  105. <span class="subtitle">Typedefs</span>
  106. <li data-name="LuCI.dom~ignoreCallbackFn"><a href="LuCI.dom.html#~ignoreCallbackFn">ignoreCallbackFn</a></li>
  107. </ul>
  108. <ul class="typedefs itemMembers">
  109. </ul>
  110. <ul class="methods itemMembers">
  111. <span class="subtitle">Methods</span>
  112. <li data-name="LuCI.dom#append"><a href="LuCI.dom.html#append">append</a></li>
  113. <li data-name="LuCI.dom#attr"><a href="LuCI.dom.html#attr">attr</a></li>
  114. <li data-name="LuCI.dom#bindClassInstance"><a href="LuCI.dom.html#bindClassInstance">bindClassInstance</a></li>
  115. <li data-name="LuCI.dom#callClassMethod"><a href="LuCI.dom.html#callClassMethod">callClassMethod</a></li>
  116. <li data-name="LuCI.dom#content"><a href="LuCI.dom.html#content">content</a></li>
  117. <li data-name="LuCI.dom#create"><a href="LuCI.dom.html#create">create</a></li>
  118. <li data-name="LuCI.dom#data"><a href="LuCI.dom.html#data">data</a></li>
  119. <li data-name="LuCI.dom#elem"><a href="LuCI.dom.html#elem">elem</a></li>
  120. <li data-name="LuCI.dom#findClassInstance"><a href="LuCI.dom.html#findClassInstance">findClassInstance</a></li>
  121. <li data-name="LuCI.dom#isEmpty"><a href="LuCI.dom.html#isEmpty">isEmpty</a></li>
  122. <li data-name="LuCI.dom#matches"><a href="LuCI.dom.html#matches">matches</a></li>
  123. <li data-name="LuCI.dom#parent"><a href="LuCI.dom.html#parent">parent</a></li>
  124. <li data-name="LuCI.dom#parse"><a href="LuCI.dom.html#parse">parse</a></li>
  125. </ul>
  126. <ul class="events itemMembers">
  127. </ul>
  128. </li>
  129. <li class="item" data-name="LuCI.form">
  130. <span class="title">
  131. <a href="LuCI.form.html">LuCI.form</a>
  132. </span>
  133. <ul class="members itemMembers">
  134. </ul>
  135. <ul class="typedefs itemMembers">
  136. </ul>
  137. <ul class="typedefs itemMembers">
  138. </ul>
  139. <ul class="methods itemMembers">
  140. </ul>
  141. <ul class="events itemMembers">
  142. </ul>
  143. </li>
  144. <li class="item" data-name="LuCI.form.AbstractElement">
  145. <span class="title">
  146. <a href="LuCI.form.AbstractElement.html">LuCI.form.AbstractElement</a>
  147. </span>
  148. <ul class="members itemMembers">
  149. </ul>
  150. <ul class="typedefs itemMembers">
  151. </ul>
  152. <ul class="typedefs itemMembers">
  153. </ul>
  154. <ul class="methods itemMembers">
  155. <span class="subtitle">Methods</span>
  156. <li data-name="LuCI.form.AbstractElement#append"><a href="LuCI.form.AbstractElement.html#append">append</a></li>
  157. <li data-name="LuCI.form.AbstractElement#parse"><a href="LuCI.form.AbstractElement.html#parse">parse</a></li>
  158. <li data-name="LuCI.form.AbstractElement#render"><a href="LuCI.form.AbstractElement.html#render">render</a></li>
  159. <li data-name="LuCI.form.AbstractElement#stripTags"><a href="LuCI.form.AbstractElement.html#stripTags">stripTags</a></li>
  160. <li data-name="LuCI.form.AbstractElement#titleFn"><a href="LuCI.form.AbstractElement.html#titleFn">titleFn</a></li>
  161. </ul>
  162. <ul class="events itemMembers">
  163. </ul>
  164. </li>
  165. <li class="item" data-name="LuCI.form.AbstractSection">
  166. <span class="title">
  167. <a href="LuCI.form.AbstractSection.html">LuCI.form.AbstractSection</a>
  168. </span>
  169. <ul class="members itemMembers">
  170. <span class="subtitle">Members</span>
  171. <li data-name="LuCI.form.AbstractSection##parentoption"><a href="LuCI.form.AbstractSection.html#parentoption">parentoption</a></li>
  172. </ul>
  173. <ul class="typedefs itemMembers">
  174. </ul>
  175. <ul class="typedefs itemMembers">
  176. </ul>
  177. <ul class="methods itemMembers">
  178. <span class="subtitle">Methods</span>
  179. <li data-name="LuCI.form.AbstractSection#append"><a href="LuCI.form.AbstractSection.html#append">append</a></li>
  180. <li data-name="LuCI.form.AbstractSection#cfgsections"><a href="LuCI.form.AbstractSection.html#cfgsections">cfgsections</a></li>
  181. <li data-name="LuCI.form.AbstractSection#cfgvalue"><a href="LuCI.form.AbstractSection.html#cfgvalue">cfgvalue</a></li>
  182. <li data-name="LuCI.form.AbstractSection#filter"><a href="LuCI.form.AbstractSection.html#filter">filter</a></li>
  183. <li data-name="LuCI.form.AbstractSection#formvalue"><a href="LuCI.form.AbstractSection.html#formvalue">formvalue</a></li>
  184. <li data-name="LuCI.form.AbstractSection#getOption"><a href="LuCI.form.AbstractSection.html#getOption">getOption</a></li>
  185. <li data-name="LuCI.form.AbstractSection#getUIElement"><a href="LuCI.form.AbstractSection.html#getUIElement">getUIElement</a></li>
  186. <li data-name="LuCI.form.AbstractSection#load"><a href="LuCI.form.AbstractSection.html#load">load</a></li>
  187. <li data-name="LuCI.form.AbstractSection#option"><a href="LuCI.form.AbstractSection.html#option">option</a></li>
  188. <li data-name="LuCI.form.AbstractSection#parse"><a href="LuCI.form.AbstractSection.html#parse">parse</a></li>
  189. <li data-name="LuCI.form.AbstractSection#render"><a href="LuCI.form.AbstractSection.html#render">render</a></li>
  190. <li data-name="LuCI.form.AbstractSection#stripTags"><a href="LuCI.form.AbstractSection.html#stripTags">stripTags</a></li>
  191. <li data-name="LuCI.form.AbstractSection#tab"><a href="LuCI.form.AbstractSection.html#tab">tab</a></li>
  192. <li data-name="LuCI.form.AbstractSection#taboption"><a href="LuCI.form.AbstractSection.html#taboption">taboption</a></li>
  193. <li data-name="LuCI.form.AbstractSection#titleFn"><a href="LuCI.form.AbstractSection.html#titleFn">titleFn</a></li>
  194. </ul>
  195. <ul class="events itemMembers">
  196. </ul>
  197. </li>
  198. <li class="item" data-name="LuCI.form.AbstractValue">
  199. <span class="title">
  200. <a href="LuCI.form.AbstractValue.html">LuCI.form.AbstractValue</a>
  201. </span>
  202. <ul class="members itemMembers">
  203. <span class="subtitle">Members</span>
  204. <li data-name="LuCI.form.AbstractValue##datatype"><a href="LuCI.form.AbstractValue.html#datatype">datatype</a></li>
  205. <li data-name="LuCI.form.AbstractValue##default"><a href="LuCI.form.AbstractValue.html#default">default</a></li>
  206. <li data-name="LuCI.form.AbstractValue##editable"><a href="LuCI.form.AbstractValue.html#editable">editable</a></li>
  207. <li data-name="LuCI.form.AbstractValue##modalonly"><a href="LuCI.form.AbstractValue.html#modalonly">modalonly</a></li>
  208. <li data-name="LuCI.form.AbstractValue##onchange"><a href="LuCI.form.AbstractValue.html#onchange">onchange</a></li>
  209. <li data-name="LuCI.form.AbstractValue##optional"><a href="LuCI.form.AbstractValue.html#optional">optional</a></li>
  210. <li data-name="LuCI.form.AbstractValue##readonly"><a href="LuCI.form.AbstractValue.html#readonly">readonly</a></li>
  211. <li data-name="LuCI.form.AbstractValue##retain"><a href="LuCI.form.AbstractValue.html#retain">retain</a></li>
  212. <li data-name="LuCI.form.AbstractValue##rmempty"><a href="LuCI.form.AbstractValue.html#rmempty">rmempty</a></li>
  213. <li data-name="LuCI.form.AbstractValue##uciconfig"><a href="LuCI.form.AbstractValue.html#uciconfig">uciconfig</a></li>
  214. <li data-name="LuCI.form.AbstractValue##ucioption"><a href="LuCI.form.AbstractValue.html#ucioption">ucioption</a></li>
  215. <li data-name="LuCI.form.AbstractValue##ucisection"><a href="LuCI.form.AbstractValue.html#ucisection">ucisection</a></li>
  216. <li data-name="LuCI.form.AbstractValue##validate"><a href="LuCI.form.AbstractValue.html#validate">validate</a></li>
  217. <li data-name="LuCI.form.AbstractValue##width"><a href="LuCI.form.AbstractValue.html#width">width</a></li>
  218. </ul>
  219. <ul class="typedefs itemMembers">
  220. </ul>
  221. <ul class="typedefs itemMembers">
  222. </ul>
  223. <ul class="methods itemMembers">
  224. <span class="subtitle">Methods</span>
  225. <li data-name="LuCI.form.AbstractValue#append"><a href="LuCI.form.AbstractValue.html#append">append</a></li>
  226. <li data-name="LuCI.form.AbstractValue#cbid"><a href="LuCI.form.AbstractValue.html#cbid">cbid</a></li>
  227. <li data-name="LuCI.form.AbstractValue#cfgvalue"><a href="LuCI.form.AbstractValue.html#cfgvalue">cfgvalue</a></li>
  228. <li data-name="LuCI.form.AbstractValue#depends"><a href="LuCI.form.AbstractValue.html#depends">depends</a></li>
  229. <li data-name="LuCI.form.AbstractValue#formvalue"><a href="LuCI.form.AbstractValue.html#formvalue">formvalue</a></li>
  230. <li data-name="LuCI.form.AbstractValue#getUIElement"><a href="LuCI.form.AbstractValue.html#getUIElement">getUIElement</a></li>
  231. <li data-name="LuCI.form.AbstractValue#getValidationError"><a href="LuCI.form.AbstractValue.html#getValidationError">getValidationError</a></li>
  232. <li data-name="LuCI.form.AbstractValue#isActive"><a href="LuCI.form.AbstractValue.html#isActive">isActive</a></li>
  233. <li data-name="LuCI.form.AbstractValue#isValid"><a href="LuCI.form.AbstractValue.html#isValid">isValid</a></li>
  234. <li data-name="LuCI.form.AbstractValue#load"><a href="LuCI.form.AbstractValue.html#load">load</a></li>
  235. <li data-name="LuCI.form.AbstractValue#parse"><a href="LuCI.form.AbstractValue.html#parse">parse</a></li>
  236. <li data-name="LuCI.form.AbstractValue#remove"><a href="LuCI.form.AbstractValue.html#remove">remove</a></li>
  237. <li data-name="LuCI.form.AbstractValue#render"><a href="LuCI.form.AbstractValue.html#render">render</a></li>
  238. <li data-name="LuCI.form.AbstractValue#stripTags"><a href="LuCI.form.AbstractValue.html#stripTags">stripTags</a></li>
  239. <li data-name="LuCI.form.AbstractValue#textvalue"><a href="LuCI.form.AbstractValue.html#textvalue">textvalue</a></li>
  240. <li data-name="LuCI.form.AbstractValue#titleFn"><a href="LuCI.form.AbstractValue.html#titleFn">titleFn</a></li>
  241. <li data-name="LuCI.form.AbstractValue#validate"><a href="LuCI.form.AbstractValue.html#validate">validate</a></li>
  242. <li data-name="LuCI.form.AbstractValue#write"><a href="LuCI.form.AbstractValue.html#write">write</a></li>
  243. </ul>
  244. <ul class="events itemMembers">
  245. </ul>
  246. </li>
  247. <li class="item" data-name="LuCI.form.ButtonValue">
  248. <span class="title">
  249. <a href="LuCI.form.ButtonValue.html">LuCI.form.ButtonValue</a>
  250. </span>
  251. <ul class="members itemMembers">
  252. <span class="subtitle">Members</span>
  253. <li data-name="LuCI.form.ButtonValue##inputstyle"><a href="LuCI.form.ButtonValue.html#inputstyle">inputstyle</a></li>
  254. <li data-name="LuCI.form.ButtonValue##inputtitle"><a href="LuCI.form.ButtonValue.html#inputtitle">inputtitle</a></li>
  255. <li data-name="LuCI.form.ButtonValue##onclick"><a href="LuCI.form.ButtonValue.html#onclick">onclick</a></li>
  256. <li data-name="LuCI.form.ButtonValue#datatype"><a href="LuCI.form.ButtonValue.html#datatype">datatype</a></li>
  257. <li data-name="LuCI.form.ButtonValue#default"><a href="LuCI.form.ButtonValue.html#default">default</a></li>
  258. <li data-name="LuCI.form.ButtonValue#editable"><a href="LuCI.form.ButtonValue.html#editable">editable</a></li>
  259. <li data-name="LuCI.form.ButtonValue#modalonly"><a href="LuCI.form.ButtonValue.html#modalonly">modalonly</a></li>
  260. <li data-name="LuCI.form.ButtonValue#onchange"><a href="LuCI.form.ButtonValue.html#onchange">onchange</a></li>
  261. <li data-name="LuCI.form.ButtonValue#optional"><a href="LuCI.form.ButtonValue.html#optional">optional</a></li>
  262. <li data-name="LuCI.form.ButtonValue#password"><a href="LuCI.form.ButtonValue.html#password">password</a></li>
  263. <li data-name="LuCI.form.ButtonValue#placeholder"><a href="LuCI.form.ButtonValue.html#placeholder">placeholder</a></li>
  264. <li data-name="LuCI.form.ButtonValue#readonly"><a href="LuCI.form.ButtonValue.html#readonly">readonly</a></li>
  265. <li data-name="LuCI.form.ButtonValue#retain"><a href="LuCI.form.ButtonValue.html#retain">retain</a></li>
  266. <li data-name="LuCI.form.ButtonValue#rmempty"><a href="LuCI.form.ButtonValue.html#rmempty">rmempty</a></li>
  267. <li data-name="LuCI.form.ButtonValue#uciconfig"><a href="LuCI.form.ButtonValue.html#uciconfig">uciconfig</a></li>
  268. <li data-name="LuCI.form.ButtonValue#ucioption"><a href="LuCI.form.ButtonValue.html#ucioption">ucioption</a></li>
  269. <li data-name="LuCI.form.ButtonValue#ucisection"><a href="LuCI.form.ButtonValue.html#ucisection">ucisection</a></li>
  270. <li data-name="LuCI.form.ButtonValue#validate"><a href="LuCI.form.ButtonValue.html#validate">validate</a></li>
  271. <li data-name="LuCI.form.ButtonValue#width"><a href="LuCI.form.ButtonValue.html#width">width</a></li>
  272. </ul>
  273. <ul class="typedefs itemMembers">
  274. </ul>
  275. <ul class="typedefs itemMembers">
  276. </ul>
  277. <ul class="methods itemMembers">
  278. <span class="subtitle">Methods</span>
  279. <li data-name="LuCI.form.ButtonValue#append"><a href="LuCI.form.ButtonValue.html#append">append</a></li>
  280. <li data-name="LuCI.form.ButtonValue#cbid"><a href="LuCI.form.ButtonValue.html#cbid">cbid</a></li>
  281. <li data-name="LuCI.form.ButtonValue#cfgvalue"><a href="LuCI.form.ButtonValue.html#cfgvalue">cfgvalue</a></li>
  282. <li data-name="LuCI.form.ButtonValue#depends"><a href="LuCI.form.ButtonValue.html#depends">depends</a></li>
  283. <li data-name="LuCI.form.ButtonValue#formvalue"><a href="LuCI.form.ButtonValue.html#formvalue">formvalue</a></li>
  284. <li data-name="LuCI.form.ButtonValue#getUIElement"><a href="LuCI.form.ButtonValue.html#getUIElement">getUIElement</a></li>
  285. <li data-name="LuCI.form.ButtonValue#getValidationError"><a href="LuCI.form.ButtonValue.html#getValidationError">getValidationError</a></li>
  286. <li data-name="LuCI.form.ButtonValue#isActive"><a href="LuCI.form.ButtonValue.html#isActive">isActive</a></li>
  287. <li data-name="LuCI.form.ButtonValue#isValid"><a href="LuCI.form.ButtonValue.html#isValid">isValid</a></li>
  288. <li data-name="LuCI.form.ButtonValue#load"><a href="LuCI.form.ButtonValue.html#load">load</a></li>
  289. <li data-name="LuCI.form.ButtonValue#parse"><a href="LuCI.form.ButtonValue.html#parse">parse</a></li>
  290. <li data-name="LuCI.form.ButtonValue#remove"><a href="LuCI.form.ButtonValue.html#remove">remove</a></li>
  291. <li data-name="LuCI.form.ButtonValue#stripTags"><a href="LuCI.form.ButtonValue.html#stripTags">stripTags</a></li>
  292. <li data-name="LuCI.form.ButtonValue#textvalue"><a href="LuCI.form.ButtonValue.html#textvalue">textvalue</a></li>
  293. <li data-name="LuCI.form.ButtonValue#titleFn"><a href="LuCI.form.ButtonValue.html#titleFn">titleFn</a></li>
  294. <li data-name="LuCI.form.ButtonValue#value"><a href="LuCI.form.ButtonValue.html#value">value</a></li>
  295. <li data-name="LuCI.form.ButtonValue#write"><a href="LuCI.form.ButtonValue.html#write">write</a></li>
  296. </ul>
  297. <ul class="events itemMembers">
  298. </ul>
  299. </li>
  300. <li class="item" data-name="LuCI.form.DummyValue">
  301. <span class="title">
  302. <a href="LuCI.form.DummyValue.html">LuCI.form.DummyValue</a>
  303. </span>
  304. <ul class="members itemMembers">
  305. <span class="subtitle">Members</span>
  306. <li data-name="LuCI.form.DummyValue##hidden"><a href="LuCI.form.DummyValue.html#hidden">hidden</a></li>
  307. <li data-name="LuCI.form.DummyValue##href"><a href="LuCI.form.DummyValue.html#href">href</a></li>
  308. <li data-name="LuCI.form.DummyValue##rawhtml"><a href="LuCI.form.DummyValue.html#rawhtml">rawhtml</a></li>
  309. <li data-name="LuCI.form.DummyValue#datatype"><a href="LuCI.form.DummyValue.html#datatype">datatype</a></li>
  310. <li data-name="LuCI.form.DummyValue#default"><a href="LuCI.form.DummyValue.html#default">default</a></li>
  311. <li data-name="LuCI.form.DummyValue#editable"><a href="LuCI.form.DummyValue.html#editable">editable</a></li>
  312. <li data-name="LuCI.form.DummyValue#modalonly"><a href="LuCI.form.DummyValue.html#modalonly">modalonly</a></li>
  313. <li data-name="LuCI.form.DummyValue#onchange"><a href="LuCI.form.DummyValue.html#onchange">onchange</a></li>
  314. <li data-name="LuCI.form.DummyValue#optional"><a href="LuCI.form.DummyValue.html#optional">optional</a></li>
  315. <li data-name="LuCI.form.DummyValue#password"><a href="LuCI.form.DummyValue.html#password">password</a></li>
  316. <li data-name="LuCI.form.DummyValue#placeholder"><a href="LuCI.form.DummyValue.html#placeholder">placeholder</a></li>
  317. <li data-name="LuCI.form.DummyValue#readonly"><a href="LuCI.form.DummyValue.html#readonly">readonly</a></li>
  318. <li data-name="LuCI.form.DummyValue#retain"><a href="LuCI.form.DummyValue.html#retain">retain</a></li>
  319. <li data-name="LuCI.form.DummyValue#rmempty"><a href="LuCI.form.DummyValue.html#rmempty">rmempty</a></li>
  320. <li data-name="LuCI.form.DummyValue#uciconfig"><a href="LuCI.form.DummyValue.html#uciconfig">uciconfig</a></li>
  321. <li data-name="LuCI.form.DummyValue#ucioption"><a href="LuCI.form.DummyValue.html#ucioption">ucioption</a></li>
  322. <li data-name="LuCI.form.DummyValue#ucisection"><a href="LuCI.form.DummyValue.html#ucisection">ucisection</a></li>
  323. <li data-name="LuCI.form.DummyValue#validate"><a href="LuCI.form.DummyValue.html#validate">validate</a></li>
  324. <li data-name="LuCI.form.DummyValue#width"><a href="LuCI.form.DummyValue.html#width">width</a></li>
  325. </ul>
  326. <ul class="typedefs itemMembers">
  327. </ul>
  328. <ul class="typedefs itemMembers">
  329. </ul>
  330. <ul class="methods itemMembers">
  331. <span class="subtitle">Methods</span>
  332. <li data-name="LuCI.form.DummyValue#append"><a href="LuCI.form.DummyValue.html#append">append</a></li>
  333. <li data-name="LuCI.form.DummyValue#cbid"><a href="LuCI.form.DummyValue.html#cbid">cbid</a></li>
  334. <li data-name="LuCI.form.DummyValue#cfgvalue"><a href="LuCI.form.DummyValue.html#cfgvalue">cfgvalue</a></li>
  335. <li data-name="LuCI.form.DummyValue#depends"><a href="LuCI.form.DummyValue.html#depends">depends</a></li>
  336. <li data-name="LuCI.form.DummyValue#formvalue"><a href="LuCI.form.DummyValue.html#formvalue">formvalue</a></li>
  337. <li data-name="LuCI.form.DummyValue#getUIElement"><a href="LuCI.form.DummyValue.html#getUIElement">getUIElement</a></li>
  338. <li data-name="LuCI.form.DummyValue#getValidationError"><a href="LuCI.form.DummyValue.html#getValidationError">getValidationError</a></li>
  339. <li data-name="LuCI.form.DummyValue#isActive"><a href="LuCI.form.DummyValue.html#isActive">isActive</a></li>
  340. <li data-name="LuCI.form.DummyValue#isValid"><a href="LuCI.form.DummyValue.html#isValid">isValid</a></li>
  341. <li data-name="LuCI.form.DummyValue#load"><a href="LuCI.form.DummyValue.html#load">load</a></li>
  342. <li data-name="LuCI.form.DummyValue#parse"><a href="LuCI.form.DummyValue.html#parse">parse</a></li>
  343. <li data-name="LuCI.form.DummyValue#remove"><a href="LuCI.form.DummyValue.html#remove">remove</a></li>
  344. <li data-name="LuCI.form.DummyValue#stripTags"><a href="LuCI.form.DummyValue.html#stripTags">stripTags</a></li>
  345. <li data-name="LuCI.form.DummyValue#textvalue"><a href="LuCI.form.DummyValue.html#textvalue">textvalue</a></li>
  346. <li data-name="LuCI.form.DummyValue#titleFn"><a href="LuCI.form.DummyValue.html#titleFn">titleFn</a></li>
  347. <li data-name="LuCI.form.DummyValue#value"><a href="LuCI.form.DummyValue.html#value">value</a></li>
  348. <li data-name="LuCI.form.DummyValue#write"><a href="LuCI.form.DummyValue.html#write">write</a></li>
  349. </ul>
  350. <ul class="events itemMembers">
  351. </ul>
  352. </li>
  353. <li class="item" data-name="LuCI.form.DynamicList">
  354. <span class="title">
  355. <a href="LuCI.form.DynamicList.html">LuCI.form.DynamicList</a>
  356. </span>
  357. <ul class="members itemMembers">
  358. <span class="subtitle">Members</span>
  359. <li data-name="LuCI.form.DynamicList#datatype"><a href="LuCI.form.DynamicList.html#datatype">datatype</a></li>
  360. <li data-name="LuCI.form.DynamicList#default"><a href="LuCI.form.DynamicList.html#default">default</a></li>
  361. <li data-name="LuCI.form.DynamicList#editable"><a href="LuCI.form.DynamicList.html#editable">editable</a></li>
  362. <li data-name="LuCI.form.DynamicList#modalonly"><a href="LuCI.form.DynamicList.html#modalonly">modalonly</a></li>
  363. <li data-name="LuCI.form.DynamicList#onchange"><a href="LuCI.form.DynamicList.html#onchange">onchange</a></li>
  364. <li data-name="LuCI.form.DynamicList#optional"><a href="LuCI.form.DynamicList.html#optional">optional</a></li>
  365. <li data-name="LuCI.form.DynamicList#password"><a href="LuCI.form.DynamicList.html#password">password</a></li>
  366. <li data-name="LuCI.form.DynamicList#placeholder"><a href="LuCI.form.DynamicList.html#placeholder">placeholder</a></li>
  367. <li data-name="LuCI.form.DynamicList#readonly"><a href="LuCI.form.DynamicList.html#readonly">readonly</a></li>
  368. <li data-name="LuCI.form.DynamicList#retain"><a href="LuCI.form.DynamicList.html#retain">retain</a></li>
  369. <li data-name="LuCI.form.DynamicList#rmempty"><a href="LuCI.form.DynamicList.html#rmempty">rmempty</a></li>
  370. <li data-name="LuCI.form.DynamicList#uciconfig"><a href="LuCI.form.DynamicList.html#uciconfig">uciconfig</a></li>
  371. <li data-name="LuCI.form.DynamicList#ucioption"><a href="LuCI.form.DynamicList.html#ucioption">ucioption</a></li>
  372. <li data-name="LuCI.form.DynamicList#ucisection"><a href="LuCI.form.DynamicList.html#ucisection">ucisection</a></li>
  373. <li data-name="LuCI.form.DynamicList#validate"><a href="LuCI.form.DynamicList.html#validate">validate</a></li>
  374. <li data-name="LuCI.form.DynamicList#width"><a href="LuCI.form.DynamicList.html#width">width</a></li>
  375. </ul>
  376. <ul class="typedefs itemMembers">
  377. </ul>
  378. <ul class="typedefs itemMembers">
  379. </ul>
  380. <ul class="methods itemMembers">
  381. <span class="subtitle">Methods</span>
  382. <li data-name="LuCI.form.DynamicList#append"><a href="LuCI.form.DynamicList.html#append">append</a></li>
  383. <li data-name="LuCI.form.DynamicList#cbid"><a href="LuCI.form.DynamicList.html#cbid">cbid</a></li>
  384. <li data-name="LuCI.form.DynamicList#cfgvalue"><a href="LuCI.form.DynamicList.html#cfgvalue">cfgvalue</a></li>
  385. <li data-name="LuCI.form.DynamicList#depends"><a href="LuCI.form.DynamicList.html#depends">depends</a></li>
  386. <li data-name="LuCI.form.DynamicList#formvalue"><a href="LuCI.form.DynamicList.html#formvalue">formvalue</a></li>
  387. <li data-name="LuCI.form.DynamicList#getUIElement"><a href="LuCI.form.DynamicList.html#getUIElement">getUIElement</a></li>
  388. <li data-name="LuCI.form.DynamicList#getValidationError"><a href="LuCI.form.DynamicList.html#getValidationError">getValidationError</a></li>
  389. <li data-name="LuCI.form.DynamicList#isActive"><a href="LuCI.form.DynamicList.html#isActive">isActive</a></li>
  390. <li data-name="LuCI.form.DynamicList#isValid"><a href="LuCI.form.DynamicList.html#isValid">isValid</a></li>
  391. <li data-name="LuCI.form.DynamicList#load"><a href="LuCI.form.DynamicList.html#load">load</a></li>
  392. <li data-name="LuCI.form.DynamicList#parse"><a href="LuCI.form.DynamicList.html#parse">parse</a></li>
  393. <li data-name="LuCI.form.DynamicList#remove"><a href="LuCI.form.DynamicList.html#remove">remove</a></li>
  394. <li data-name="LuCI.form.DynamicList#stripTags"><a href="LuCI.form.DynamicList.html#stripTags">stripTags</a></li>
  395. <li data-name="LuCI.form.DynamicList#textvalue"><a href="LuCI.form.DynamicList.html#textvalue">textvalue</a></li>
  396. <li data-name="LuCI.form.DynamicList#titleFn"><a href="LuCI.form.DynamicList.html#titleFn">titleFn</a></li>
  397. <li data-name="LuCI.form.DynamicList#value"><a href="LuCI.form.DynamicList.html#value">value</a></li>
  398. <li data-name="LuCI.form.DynamicList#write"><a href="LuCI.form.DynamicList.html#write">write</a></li>
  399. </ul>
  400. <ul class="events itemMembers">
  401. </ul>
  402. </li>
  403. <li class="item" data-name="LuCI.form.FileUpload">
  404. <span class="title">
  405. <a href="LuCI.form.FileUpload.html">LuCI.form.FileUpload</a>
  406. </span>
  407. <ul class="members itemMembers">
  408. <span class="subtitle">Members</span>
  409. <li data-name="LuCI.form.FileUpload##browser"><a href="LuCI.form.FileUpload.html#browser">browser</a></li>
  410. <li data-name="LuCI.form.FileUpload##enable_download"><a href="LuCI.form.FileUpload.html#enable_download">enable_download</a></li>
  411. <li data-name="LuCI.form.FileUpload##enable_remove"><a href="LuCI.form.FileUpload.html#enable_remove">enable_remove</a></li>
  412. <li data-name="LuCI.form.FileUpload##enable_upload"><a href="LuCI.form.FileUpload.html#enable_upload">enable_upload</a></li>
  413. <li data-name="LuCI.form.FileUpload##root_directory"><a href="LuCI.form.FileUpload.html#root_directory">root_directory</a></li>
  414. <li data-name="LuCI.form.FileUpload##show_hidden"><a href="LuCI.form.FileUpload.html#show_hidden">show_hidden</a></li>
  415. <li data-name="LuCI.form.FileUpload#datatype"><a href="LuCI.form.FileUpload.html#datatype">datatype</a></li>
  416. <li data-name="LuCI.form.FileUpload#default"><a href="LuCI.form.FileUpload.html#default">default</a></li>
  417. <li data-name="LuCI.form.FileUpload#editable"><a href="LuCI.form.FileUpload.html#editable">editable</a></li>
  418. <li data-name="LuCI.form.FileUpload#modalonly"><a href="LuCI.form.FileUpload.html#modalonly">modalonly</a></li>
  419. <li data-name="LuCI.form.FileUpload#onchange"><a href="LuCI.form.FileUpload.html#onchange">onchange</a></li>
  420. <li data-name="LuCI.form.FileUpload#optional"><a href="LuCI.form.FileUpload.html#optional">optional</a></li>
  421. <li data-name="LuCI.form.FileUpload#password"><a href="LuCI.form.FileUpload.html#password">password</a></li>
  422. <li data-name="LuCI.form.FileUpload#placeholder"><a href="LuCI.form.FileUpload.html#placeholder">placeholder</a></li>
  423. <li data-name="LuCI.form.FileUpload#readonly"><a href="LuCI.form.FileUpload.html#readonly">readonly</a></li>
  424. <li data-name="LuCI.form.FileUpload#retain"><a href="LuCI.form.FileUpload.html#retain">retain</a></li>
  425. <li data-name="LuCI.form.FileUpload#rmempty"><a href="LuCI.form.FileUpload.html#rmempty">rmempty</a></li>
  426. <li data-name="LuCI.form.FileUpload#uciconfig"><a href="LuCI.form.FileUpload.html#uciconfig">uciconfig</a></li>
  427. <li data-name="LuCI.form.FileUpload#ucioption"><a href="LuCI.form.FileUpload.html#ucioption">ucioption</a></li>
  428. <li data-name="LuCI.form.FileUpload#ucisection"><a href="LuCI.form.FileUpload.html#ucisection">ucisection</a></li>
  429. <li data-name="LuCI.form.FileUpload#validate"><a href="LuCI.form.FileUpload.html#validate">validate</a></li>
  430. <li data-name="LuCI.form.FileUpload#width"><a href="LuCI.form.FileUpload.html#width">width</a></li>
  431. </ul>
  432. <ul class="typedefs itemMembers">
  433. </ul>
  434. <ul class="typedefs itemMembers">
  435. </ul>
  436. <ul class="methods itemMembers">
  437. <span class="subtitle">Methods</span>
  438. <li data-name="LuCI.form.FileUpload#append"><a href="LuCI.form.FileUpload.html#append">append</a></li>
  439. <li data-name="LuCI.form.FileUpload#cbid"><a href="LuCI.form.FileUpload.html#cbid">cbid</a></li>
  440. <li data-name="LuCI.form.FileUpload#cfgvalue"><a href="LuCI.form.FileUpload.html#cfgvalue">cfgvalue</a></li>
  441. <li data-name="LuCI.form.FileUpload#depends"><a href="LuCI.form.FileUpload.html#depends">depends</a></li>
  442. <li data-name="LuCI.form.FileUpload#formvalue"><a href="LuCI.form.FileUpload.html#formvalue">formvalue</a></li>
  443. <li data-name="LuCI.form.FileUpload#getUIElement"><a href="LuCI.form.FileUpload.html#getUIElement">getUIElement</a></li>
  444. <li data-name="LuCI.form.FileUpload#getValidationError"><a href="LuCI.form.FileUpload.html#getValidationError">getValidationError</a></li>
  445. <li data-name="LuCI.form.FileUpload#isActive"><a href="LuCI.form.FileUpload.html#isActive">isActive</a></li>
  446. <li data-name="LuCI.form.FileUpload#isValid"><a href="LuCI.form.FileUpload.html#isValid">isValid</a></li>
  447. <li data-name="LuCI.form.FileUpload#load"><a href="LuCI.form.FileUpload.html#load">load</a></li>
  448. <li data-name="LuCI.form.FileUpload#parse"><a href="LuCI.form.FileUpload.html#parse">parse</a></li>
  449. <li data-name="LuCI.form.FileUpload#remove"><a href="LuCI.form.FileUpload.html#remove">remove</a></li>
  450. <li data-name="LuCI.form.FileUpload#stripTags"><a href="LuCI.form.FileUpload.html#stripTags">stripTags</a></li>
  451. <li data-name="LuCI.form.FileUpload#textvalue"><a href="LuCI.form.FileUpload.html#textvalue">textvalue</a></li>
  452. <li data-name="LuCI.form.FileUpload#titleFn"><a href="LuCI.form.FileUpload.html#titleFn">titleFn</a></li>
  453. <li data-name="LuCI.form.FileUpload#value"><a href="LuCI.form.FileUpload.html#value">value</a></li>
  454. <li data-name="LuCI.form.FileUpload#write"><a href="LuCI.form.FileUpload.html#write">write</a></li>
  455. </ul>
  456. <ul class="events itemMembers">
  457. </ul>
  458. </li>
  459. <li class="item" data-name="LuCI.form.FlagValue">
  460. <span class="title">
  461. <a href="LuCI.form.FlagValue.html">LuCI.form.FlagValue</a>
  462. </span>
  463. <ul class="members itemMembers">
  464. <span class="subtitle">Members</span>
  465. <li data-name="LuCI.form.FlagValue##disabled"><a href="LuCI.form.FlagValue.html#disabled">disabled</a></li>
  466. <li data-name="LuCI.form.FlagValue##enabled"><a href="LuCI.form.FlagValue.html#enabled">enabled</a></li>
  467. <li data-name="LuCI.form.FlagValue##tooltip"><a href="LuCI.form.FlagValue.html#tooltip">tooltip</a></li>
  468. <li data-name="LuCI.form.FlagValue##tooltipicon"><a href="LuCI.form.FlagValue.html#tooltipicon">tooltipicon</a></li>
  469. <li data-name="LuCI.form.FlagValue#datatype"><a href="LuCI.form.FlagValue.html#datatype">datatype</a></li>
  470. <li data-name="LuCI.form.FlagValue#default"><a href="LuCI.form.FlagValue.html#default">default</a></li>
  471. <li data-name="LuCI.form.FlagValue#editable"><a href="LuCI.form.FlagValue.html#editable">editable</a></li>
  472. <li data-name="LuCI.form.FlagValue#modalonly"><a href="LuCI.form.FlagValue.html#modalonly">modalonly</a></li>
  473. <li data-name="LuCI.form.FlagValue#onchange"><a href="LuCI.form.FlagValue.html#onchange">onchange</a></li>
  474. <li data-name="LuCI.form.FlagValue#optional"><a href="LuCI.form.FlagValue.html#optional">optional</a></li>
  475. <li data-name="LuCI.form.FlagValue#password"><a href="LuCI.form.FlagValue.html#password">password</a></li>
  476. <li data-name="LuCI.form.FlagValue#placeholder"><a href="LuCI.form.FlagValue.html#placeholder">placeholder</a></li>
  477. <li data-name="LuCI.form.FlagValue#readonly"><a href="LuCI.form.FlagValue.html#readonly">readonly</a></li>
  478. <li data-name="LuCI.form.FlagValue#retain"><a href="LuCI.form.FlagValue.html#retain">retain</a></li>
  479. <li data-name="LuCI.form.FlagValue#rmempty"><a href="LuCI.form.FlagValue.html#rmempty">rmempty</a></li>
  480. <li data-name="LuCI.form.FlagValue#uciconfig"><a href="LuCI.form.FlagValue.html#uciconfig">uciconfig</a></li>
  481. <li data-name="LuCI.form.FlagValue#ucioption"><a href="LuCI.form.FlagValue.html#ucioption">ucioption</a></li>
  482. <li data-name="LuCI.form.FlagValue#ucisection"><a href="LuCI.form.FlagValue.html#ucisection">ucisection</a></li>
  483. <li data-name="LuCI.form.FlagValue#validate"><a href="LuCI.form.FlagValue.html#validate">validate</a></li>
  484. <li data-name="LuCI.form.FlagValue#width"><a href="LuCI.form.FlagValue.html#width">width</a></li>
  485. </ul>
  486. <ul class="typedefs itemMembers">
  487. </ul>
  488. <ul class="typedefs itemMembers">
  489. </ul>
  490. <ul class="methods itemMembers">
  491. <span class="subtitle">Methods</span>
  492. <li data-name="LuCI.form.FlagValue#append"><a href="LuCI.form.FlagValue.html#append">append</a></li>
  493. <li data-name="LuCI.form.FlagValue#cbid"><a href="LuCI.form.FlagValue.html#cbid">cbid</a></li>
  494. <li data-name="LuCI.form.FlagValue#cfgvalue"><a href="LuCI.form.FlagValue.html#cfgvalue">cfgvalue</a></li>
  495. <li data-name="LuCI.form.FlagValue#depends"><a href="LuCI.form.FlagValue.html#depends">depends</a></li>
  496. <li data-name="LuCI.form.FlagValue#formvalue"><a href="LuCI.form.FlagValue.html#formvalue">formvalue</a></li>
  497. <li data-name="LuCI.form.FlagValue#getUIElement"><a href="LuCI.form.FlagValue.html#getUIElement">getUIElement</a></li>
  498. <li data-name="LuCI.form.FlagValue#getValidationError"><a href="LuCI.form.FlagValue.html#getValidationError">getValidationError</a></li>
  499. <li data-name="LuCI.form.FlagValue#isActive"><a href="LuCI.form.FlagValue.html#isActive">isActive</a></li>
  500. <li data-name="LuCI.form.FlagValue#isValid"><a href="LuCI.form.FlagValue.html#isValid">isValid</a></li>
  501. <li data-name="LuCI.form.FlagValue#load"><a href="LuCI.form.FlagValue.html#load">load</a></li>
  502. <li data-name="LuCI.form.FlagValue#parse"><a href="LuCI.form.FlagValue.html#parse">parse</a></li>
  503. <li data-name="LuCI.form.FlagValue#remove"><a href="LuCI.form.FlagValue.html#remove">remove</a></li>
  504. <li data-name="LuCI.form.FlagValue#stripTags"><a href="LuCI.form.FlagValue.html#stripTags">stripTags</a></li>
  505. <li data-name="LuCI.form.FlagValue#textvalue"><a href="LuCI.form.FlagValue.html#textvalue">textvalue</a></li>
  506. <li data-name="LuCI.form.FlagValue#titleFn"><a href="LuCI.form.FlagValue.html#titleFn">titleFn</a></li>
  507. <li data-name="LuCI.form.FlagValue#value"><a href="LuCI.form.FlagValue.html#value">value</a></li>
  508. <li data-name="LuCI.form.FlagValue#write"><a href="LuCI.form.FlagValue.html#write">write</a></li>
  509. </ul>
  510. <ul class="events itemMembers">
  511. </ul>
  512. </li>
  513. <li class="item" data-name="LuCI.form.GridSection">
  514. <span class="title">
  515. <a href="LuCI.form.GridSection.html">LuCI.form.GridSection</a>
  516. </span>
  517. <ul class="members itemMembers">
  518. <span class="subtitle">Members</span>
  519. <li data-name="LuCI.form.GridSection#addbtntitle"><a href="LuCI.form.GridSection.html#addbtntitle">addbtntitle</a></li>
  520. <li data-name="LuCI.form.GridSection#addremove"><a href="LuCI.form.GridSection.html#addremove">addremove</a></li>
  521. <li data-name="LuCI.form.GridSection#anonymous"><a href="LuCI.form.GridSection.html#anonymous">anonymous</a></li>
  522. <li data-name="LuCI.form.GridSection#cloneable"><a href="LuCI.form.GridSection.html#cloneable">cloneable</a></li>
  523. <li data-name="LuCI.form.GridSection#extedit"><a href="LuCI.form.GridSection.html#extedit">extedit</a></li>
  524. <li data-name="LuCI.form.GridSection#max_cols"><a href="LuCI.form.GridSection.html#max_cols">max_cols</a></li>
  525. <li data-name="LuCI.form.GridSection#modaltitle"><a href="LuCI.form.GridSection.html#modaltitle">modaltitle</a></li>
  526. <li data-name="LuCI.form.GridSection#nodescriptions"><a href="LuCI.form.GridSection.html#nodescriptions">nodescriptions</a></li>
  527. <li data-name="LuCI.form.GridSection#parentoption"><a href="LuCI.form.GridSection.html#parentoption">parentoption</a></li>
  528. <li data-name="LuCI.form.GridSection#rowcolors"><a href="LuCI.form.GridSection.html#rowcolors">rowcolors</a></li>
  529. <li data-name="LuCI.form.GridSection#sectiontitle"><a href="LuCI.form.GridSection.html#sectiontitle">sectiontitle</a></li>
  530. <li data-name="LuCI.form.GridSection#sortable"><a href="LuCI.form.GridSection.html#sortable">sortable</a></li>
  531. <li data-name="LuCI.form.GridSection#tabbed"><a href="LuCI.form.GridSection.html#tabbed">tabbed</a></li>
  532. <li data-name="LuCI.form.GridSection#uciconfig"><a href="LuCI.form.GridSection.html#uciconfig">uciconfig</a></li>
  533. </ul>
  534. <ul class="typedefs itemMembers">
  535. </ul>
  536. <ul class="typedefs itemMembers">
  537. </ul>
  538. <ul class="methods itemMembers">
  539. <span class="subtitle">Methods</span>
  540. <li data-name="LuCI.form.GridSection#addModalOptions"><a href="LuCI.form.GridSection.html#addModalOptions">addModalOptions</a></li>
  541. <li data-name="LuCI.form.GridSection#append"><a href="LuCI.form.GridSection.html#append">append</a></li>
  542. <li data-name="LuCI.form.GridSection#cfgvalue"><a href="LuCI.form.GridSection.html#cfgvalue">cfgvalue</a></li>
  543. <li data-name="LuCI.form.GridSection#filter"><a href="LuCI.form.GridSection.html#filter">filter</a></li>
  544. <li data-name="LuCI.form.GridSection#formvalue"><a href="LuCI.form.GridSection.html#formvalue">formvalue</a></li>
  545. <li data-name="LuCI.form.GridSection#getOption"><a href="LuCI.form.GridSection.html#getOption">getOption</a></li>
  546. <li data-name="LuCI.form.GridSection#getUIElement"><a href="LuCI.form.GridSection.html#getUIElement">getUIElement</a></li>
  547. <li data-name="LuCI.form.GridSection#load"><a href="LuCI.form.GridSection.html#load">load</a></li>
  548. <li data-name="LuCI.form.GridSection#option"><a href="LuCI.form.GridSection.html#option">option</a></li>
  549. <li data-name="LuCI.form.GridSection#parse"><a href="LuCI.form.GridSection.html#parse">parse</a></li>
  550. <li data-name="LuCI.form.GridSection#stripTags"><a href="LuCI.form.GridSection.html#stripTags">stripTags</a></li>
  551. <li data-name="LuCI.form.GridSection#tab"><a href="LuCI.form.GridSection.html#tab">tab</a></li>
  552. <li data-name="LuCI.form.GridSection#taboption"><a href="LuCI.form.GridSection.html#taboption">taboption</a></li>
  553. <li data-name="LuCI.form.GridSection#titleFn"><a href="LuCI.form.GridSection.html#titleFn">titleFn</a></li>
  554. </ul>
  555. <ul class="events itemMembers">
  556. </ul>
  557. </li>
  558. <li class="item" data-name="LuCI.form.HiddenValue">
  559. <span class="title">
  560. <a href="LuCI.form.HiddenValue.html">LuCI.form.HiddenValue</a>
  561. </span>
  562. <ul class="members itemMembers">
  563. <span class="subtitle">Members</span>
  564. <li data-name="LuCI.form.HiddenValue#datatype"><a href="LuCI.form.HiddenValue.html#datatype">datatype</a></li>
  565. <li data-name="LuCI.form.HiddenValue#default"><a href="LuCI.form.HiddenValue.html#default">default</a></li>
  566. <li data-name="LuCI.form.HiddenValue#editable"><a href="LuCI.form.HiddenValue.html#editable">editable</a></li>
  567. <li data-name="LuCI.form.HiddenValue#modalonly"><a href="LuCI.form.HiddenValue.html#modalonly">modalonly</a></li>
  568. <li data-name="LuCI.form.HiddenValue#onchange"><a href="LuCI.form.HiddenValue.html#onchange">onchange</a></li>
  569. <li data-name="LuCI.form.HiddenValue#optional"><a href="LuCI.form.HiddenValue.html#optional">optional</a></li>
  570. <li data-name="LuCI.form.HiddenValue#password"><a href="LuCI.form.HiddenValue.html#password">password</a></li>
  571. <li data-name="LuCI.form.HiddenValue#placeholder"><a href="LuCI.form.HiddenValue.html#placeholder">placeholder</a></li>
  572. <li data-name="LuCI.form.HiddenValue#readonly"><a href="LuCI.form.HiddenValue.html#readonly">readonly</a></li>
  573. <li data-name="LuCI.form.HiddenValue#retain"><a href="LuCI.form.HiddenValue.html#retain">retain</a></li>
  574. <li data-name="LuCI.form.HiddenValue#rmempty"><a href="LuCI.form.HiddenValue.html#rmempty">rmempty</a></li>
  575. <li data-name="LuCI.form.HiddenValue#uciconfig"><a href="LuCI.form.HiddenValue.html#uciconfig">uciconfig</a></li>
  576. <li data-name="LuCI.form.HiddenValue#ucioption"><a href="LuCI.form.HiddenValue.html#ucioption">ucioption</a></li>
  577. <li data-name="LuCI.form.HiddenValue#ucisection"><a href="LuCI.form.HiddenValue.html#ucisection">ucisection</a></li>
  578. <li data-name="LuCI.form.HiddenValue#validate"><a href="LuCI.form.HiddenValue.html#validate">validate</a></li>
  579. <li data-name="LuCI.form.HiddenValue#width"><a href="LuCI.form.HiddenValue.html#width">width</a></li>
  580. </ul>
  581. <ul class="typedefs itemMembers">
  582. </ul>
  583. <ul class="typedefs itemMembers">
  584. </ul>
  585. <ul class="methods itemMembers">
  586. <span class="subtitle">Methods</span>
  587. <li data-name="LuCI.form.HiddenValue#append"><a href="LuCI.form.HiddenValue.html#append">append</a></li>
  588. <li data-name="LuCI.form.HiddenValue#cbid"><a href="LuCI.form.HiddenValue.html#cbid">cbid</a></li>
  589. <li data-name="LuCI.form.HiddenValue#cfgvalue"><a href="LuCI.form.HiddenValue.html#cfgvalue">cfgvalue</a></li>
  590. <li data-name="LuCI.form.HiddenValue#depends"><a href="LuCI.form.HiddenValue.html#depends">depends</a></li>
  591. <li data-name="LuCI.form.HiddenValue#formvalue"><a href="LuCI.form.HiddenValue.html#formvalue">formvalue</a></li>
  592. <li data-name="LuCI.form.HiddenValue#getUIElement"><a href="LuCI.form.HiddenValue.html#getUIElement">getUIElement</a></li>
  593. <li data-name="LuCI.form.HiddenValue#getValidationError"><a href="LuCI.form.HiddenValue.html#getValidationError">getValidationError</a></li>
  594. <li data-name="LuCI.form.HiddenValue#isActive"><a href="LuCI.form.HiddenValue.html#isActive">isActive</a></li>
  595. <li data-name="LuCI.form.HiddenValue#isValid"><a href="LuCI.form.HiddenValue.html#isValid">isValid</a></li>
  596. <li data-name="LuCI.form.HiddenValue#load"><a href="LuCI.form.HiddenValue.html#load">load</a></li>
  597. <li data-name="LuCI.form.HiddenValue#parse"><a href="LuCI.form.HiddenValue.html#parse">parse</a></li>
  598. <li data-name="LuCI.form.HiddenValue#remove"><a href="LuCI.form.HiddenValue.html#remove">remove</a></li>
  599. <li data-name="LuCI.form.HiddenValue#stripTags"><a href="LuCI.form.HiddenValue.html#stripTags">stripTags</a></li>
  600. <li data-name="LuCI.form.HiddenValue#textvalue"><a href="LuCI.form.HiddenValue.html#textvalue">textvalue</a></li>
  601. <li data-name="LuCI.form.HiddenValue#titleFn"><a href="LuCI.form.HiddenValue.html#titleFn">titleFn</a></li>
  602. <li data-name="LuCI.form.HiddenValue#value"><a href="LuCI.form.HiddenValue.html#value">value</a></li>
  603. <li data-name="LuCI.form.HiddenValue#write"><a href="LuCI.form.HiddenValue.html#write">write</a></li>
  604. </ul>
  605. <ul class="events itemMembers">
  606. </ul>
  607. </li>
  608. <li class="item" data-name="LuCI.form.JSONMap">
  609. <span class="title">
  610. <a href="LuCI.form.JSONMap.html">LuCI.form.JSONMap</a>
  611. </span>
  612. <ul class="members itemMembers">
  613. <span class="subtitle">Members</span>
  614. <li data-name="LuCI.form.JSONMap#readonly"><a href="LuCI.form.JSONMap.html#readonly">readonly</a></li>
  615. </ul>
  616. <ul class="typedefs itemMembers">
  617. </ul>
  618. <ul class="typedefs itemMembers">
  619. </ul>
  620. <ul class="methods itemMembers">
  621. <span class="subtitle">Methods</span>
  622. <li data-name="LuCI.form.JSONMap#append"><a href="LuCI.form.JSONMap.html#append">append</a></li>
  623. <li data-name="LuCI.form.JSONMap#chain"><a href="LuCI.form.JSONMap.html#chain">chain</a></li>
  624. <li data-name="LuCI.form.JSONMap#findElement"><a href="LuCI.form.JSONMap.html#findElement">findElement</a></li>
  625. <li data-name="LuCI.form.JSONMap#findElements"><a href="LuCI.form.JSONMap.html#findElements">findElements</a></li>
  626. <li data-name="LuCI.form.JSONMap#load"><a href="LuCI.form.JSONMap.html#load">load</a></li>
  627. <li data-name="LuCI.form.JSONMap#lookupOption"><a href="LuCI.form.JSONMap.html#lookupOption">lookupOption</a></li>
  628. <li data-name="LuCI.form.JSONMap#parse"><a href="LuCI.form.JSONMap.html#parse">parse</a></li>
  629. <li data-name="LuCI.form.JSONMap#render"><a href="LuCI.form.JSONMap.html#render">render</a></li>
  630. <li data-name="LuCI.form.JSONMap#reset"><a href="LuCI.form.JSONMap.html#reset">reset</a></li>
  631. <li data-name="LuCI.form.JSONMap#save"><a href="LuCI.form.JSONMap.html#save">save</a></li>
  632. <li data-name="LuCI.form.JSONMap#section"><a href="LuCI.form.JSONMap.html#section">section</a></li>
  633. <li data-name="LuCI.form.JSONMap#stripTags"><a href="LuCI.form.JSONMap.html#stripTags">stripTags</a></li>
  634. <li data-name="LuCI.form.JSONMap#titleFn"><a href="LuCI.form.JSONMap.html#titleFn">titleFn</a></li>
  635. </ul>
  636. <ul class="events itemMembers">
  637. </ul>
  638. </li>
  639. <li class="item" data-name="LuCI.form.ListValue">
  640. <span class="title">
  641. <a href="LuCI.form.ListValue.html">LuCI.form.ListValue</a>
  642. </span>
  643. <ul class="members itemMembers">
  644. <span class="subtitle">Members</span>
  645. <li data-name="LuCI.form.ListValue##orientation"><a href="LuCI.form.ListValue.html#orientation">orientation</a></li>
  646. <li data-name="LuCI.form.ListValue##size"><a href="LuCI.form.ListValue.html#size">size</a></li>
  647. <li data-name="LuCI.form.ListValue##widget"><a href="LuCI.form.ListValue.html#widget">widget</a></li>
  648. <li data-name="LuCI.form.ListValue#datatype"><a href="LuCI.form.ListValue.html#datatype">datatype</a></li>
  649. <li data-name="LuCI.form.ListValue#default"><a href="LuCI.form.ListValue.html#default">default</a></li>
  650. <li data-name="LuCI.form.ListValue#editable"><a href="LuCI.form.ListValue.html#editable">editable</a></li>
  651. <li data-name="LuCI.form.ListValue#modalonly"><a href="LuCI.form.ListValue.html#modalonly">modalonly</a></li>
  652. <li data-name="LuCI.form.ListValue#onchange"><a href="LuCI.form.ListValue.html#onchange">onchange</a></li>
  653. <li data-name="LuCI.form.ListValue#optional"><a href="LuCI.form.ListValue.html#optional">optional</a></li>
  654. <li data-name="LuCI.form.ListValue#password"><a href="LuCI.form.ListValue.html#password">password</a></li>
  655. <li data-name="LuCI.form.ListValue#placeholder"><a href="LuCI.form.ListValue.html#placeholder">placeholder</a></li>
  656. <li data-name="LuCI.form.ListValue#readonly"><a href="LuCI.form.ListValue.html#readonly">readonly</a></li>
  657. <li data-name="LuCI.form.ListValue#retain"><a href="LuCI.form.ListValue.html#retain">retain</a></li>
  658. <li data-name="LuCI.form.ListValue#rmempty"><a href="LuCI.form.ListValue.html#rmempty">rmempty</a></li>
  659. <li data-name="LuCI.form.ListValue#uciconfig"><a href="LuCI.form.ListValue.html#uciconfig">uciconfig</a></li>
  660. <li data-name="LuCI.form.ListValue#ucioption"><a href="LuCI.form.ListValue.html#ucioption">ucioption</a></li>
  661. <li data-name="LuCI.form.ListValue#ucisection"><a href="LuCI.form.ListValue.html#ucisection">ucisection</a></li>
  662. <li data-name="LuCI.form.ListValue#validate"><a href="LuCI.form.ListValue.html#validate">validate</a></li>
  663. <li data-name="LuCI.form.ListValue#width"><a href="LuCI.form.ListValue.html#width">width</a></li>
  664. </ul>
  665. <ul class="typedefs itemMembers">
  666. </ul>
  667. <ul class="typedefs itemMembers">
  668. </ul>
  669. <ul class="methods itemMembers">
  670. <span class="subtitle">Methods</span>
  671. <li data-name="LuCI.form.ListValue#append"><a href="LuCI.form.ListValue.html#append">append</a></li>
  672. <li data-name="LuCI.form.ListValue#cbid"><a href="LuCI.form.ListValue.html#cbid">cbid</a></li>
  673. <li data-name="LuCI.form.ListValue#cfgvalue"><a href="LuCI.form.ListValue.html#cfgvalue">cfgvalue</a></li>
  674. <li data-name="LuCI.form.ListValue#depends"><a href="LuCI.form.ListValue.html#depends">depends</a></li>
  675. <li data-name="LuCI.form.ListValue#formvalue"><a href="LuCI.form.ListValue.html#formvalue">formvalue</a></li>
  676. <li data-name="LuCI.form.ListValue#getUIElement"><a href="LuCI.form.ListValue.html#getUIElement">getUIElement</a></li>
  677. <li data-name="LuCI.form.ListValue#getValidationError"><a href="LuCI.form.ListValue.html#getValidationError">getValidationError</a></li>
  678. <li data-name="LuCI.form.ListValue#isActive"><a href="LuCI.form.ListValue.html#isActive">isActive</a></li>
  679. <li data-name="LuCI.form.ListValue#isValid"><a href="LuCI.form.ListValue.html#isValid">isValid</a></li>
  680. <li data-name="LuCI.form.ListValue#load"><a href="LuCI.form.ListValue.html#load">load</a></li>
  681. <li data-name="LuCI.form.ListValue#parse"><a href="LuCI.form.ListValue.html#parse">parse</a></li>
  682. <li data-name="LuCI.form.ListValue#remove"><a href="LuCI.form.ListValue.html#remove">remove</a></li>
  683. <li data-name="LuCI.form.ListValue#stripTags"><a href="LuCI.form.ListValue.html#stripTags">stripTags</a></li>
  684. <li data-name="LuCI.form.ListValue#textvalue"><a href="LuCI.form.ListValue.html#textvalue">textvalue</a></li>
  685. <li data-name="LuCI.form.ListValue#titleFn"><a href="LuCI.form.ListValue.html#titleFn">titleFn</a></li>
  686. <li data-name="LuCI.form.ListValue#value"><a href="LuCI.form.ListValue.html#value">value</a></li>
  687. <li data-name="LuCI.form.ListValue#write"><a href="LuCI.form.ListValue.html#write">write</a></li>
  688. </ul>
  689. <ul class="events itemMembers">
  690. </ul>
  691. </li>
  692. <li class="item" data-name="LuCI.form.Map">
  693. <span class="title">
  694. <a href="LuCI.form.Map.html">LuCI.form.Map</a>
  695. </span>
  696. <ul class="members itemMembers">
  697. <span class="subtitle">Members</span>
  698. <li data-name="LuCI.form.Map##readonly"><a href="LuCI.form.Map.html#readonly">readonly</a></li>
  699. </ul>
  700. <ul class="typedefs itemMembers">
  701. </ul>
  702. <ul class="typedefs itemMembers">
  703. </ul>
  704. <ul class="methods itemMembers">
  705. <span class="subtitle">Methods</span>
  706. <li data-name="LuCI.form.Map#append"><a href="LuCI.form.Map.html#append">append</a></li>
  707. <li data-name="LuCI.form.Map#chain"><a href="LuCI.form.Map.html#chain">chain</a></li>
  708. <li data-name="LuCI.form.Map#findElement"><a href="LuCI.form.Map.html#findElement">findElement</a></li>
  709. <li data-name="LuCI.form.Map#findElements"><a href="LuCI.form.Map.html#findElements">findElements</a></li>
  710. <li data-name="LuCI.form.Map#load"><a href="LuCI.form.Map.html#load">load</a></li>
  711. <li data-name="LuCI.form.Map#lookupOption"><a href="LuCI.form.Map.html#lookupOption">lookupOption</a></li>
  712. <li data-name="LuCI.form.Map#parse"><a href="LuCI.form.Map.html#parse">parse</a></li>
  713. <li data-name="LuCI.form.Map#render"><a href="LuCI.form.Map.html#render">render</a></li>
  714. <li data-name="LuCI.form.Map#reset"><a href="LuCI.form.Map.html#reset">reset</a></li>
  715. <li data-name="LuCI.form.Map#save"><a href="LuCI.form.Map.html#save">save</a></li>
  716. <li data-name="LuCI.form.Map#section"><a href="LuCI.form.Map.html#section">section</a></li>
  717. <li data-name="LuCI.form.Map#stripTags"><a href="LuCI.form.Map.html#stripTags">stripTags</a></li>
  718. <li data-name="LuCI.form.Map#titleFn"><a href="LuCI.form.Map.html#titleFn">titleFn</a></li>
  719. </ul>
  720. <ul class="events itemMembers">
  721. </ul>
  722. </li>
  723. <li class="item" data-name="LuCI.form.MultiValue">
  724. <span class="title">
  725. <a href="LuCI.form.MultiValue.html">LuCI.form.MultiValue</a>
  726. </span>
  727. <ul class="members itemMembers">
  728. <span class="subtitle">Members</span>
  729. <li data-name="LuCI.form.MultiValue##create"><a href="LuCI.form.MultiValue.html#create">create</a></li>
  730. <li data-name="LuCI.form.MultiValue##display_size"><a href="LuCI.form.MultiValue.html#display_size">display_size</a></li>
  731. <li data-name="LuCI.form.MultiValue##dropdown_size"><a href="LuCI.form.MultiValue.html#dropdown_size">dropdown_size</a></li>
  732. <li data-name="LuCI.form.MultiValue#datatype"><a href="LuCI.form.MultiValue.html#datatype">datatype</a></li>
  733. <li data-name="LuCI.form.MultiValue#default"><a href="LuCI.form.MultiValue.html#default">default</a></li>
  734. <li data-name="LuCI.form.MultiValue#editable"><a href="LuCI.form.MultiValue.html#editable">editable</a></li>
  735. <li data-name="LuCI.form.MultiValue#modalonly"><a href="LuCI.form.MultiValue.html#modalonly">modalonly</a></li>
  736. <li data-name="LuCI.form.MultiValue#onchange"><a href="LuCI.form.MultiValue.html#onchange">onchange</a></li>
  737. <li data-name="LuCI.form.MultiValue#optional"><a href="LuCI.form.MultiValue.html#optional">optional</a></li>
  738. <li data-name="LuCI.form.MultiValue#password"><a href="LuCI.form.MultiValue.html#password">password</a></li>
  739. <li data-name="LuCI.form.MultiValue#placeholder"><a href="LuCI.form.MultiValue.html#placeholder">placeholder</a></li>
  740. <li data-name="LuCI.form.MultiValue#readonly"><a href="LuCI.form.MultiValue.html#readonly">readonly</a></li>
  741. <li data-name="LuCI.form.MultiValue#retain"><a href="LuCI.form.MultiValue.html#retain">retain</a></li>
  742. <li data-name="LuCI.form.MultiValue#rmempty"><a href="LuCI.form.MultiValue.html#rmempty">rmempty</a></li>
  743. <li data-name="LuCI.form.MultiValue#uciconfig"><a href="LuCI.form.MultiValue.html#uciconfig">uciconfig</a></li>
  744. <li data-name="LuCI.form.MultiValue#ucioption"><a href="LuCI.form.MultiValue.html#ucioption">ucioption</a></li>
  745. <li data-name="LuCI.form.MultiValue#ucisection"><a href="LuCI.form.MultiValue.html#ucisection">ucisection</a></li>
  746. <li data-name="LuCI.form.MultiValue#validate"><a href="LuCI.form.MultiValue.html#validate">validate</a></li>
  747. <li data-name="LuCI.form.MultiValue#width"><a href="LuCI.form.MultiValue.html#width">width</a></li>
  748. </ul>
  749. <ul class="typedefs itemMembers">
  750. </ul>
  751. <ul class="typedefs itemMembers">
  752. </ul>
  753. <ul class="methods itemMembers">
  754. <span class="subtitle">Methods</span>
  755. <li data-name="LuCI.form.MultiValue#append"><a href="LuCI.form.MultiValue.html#append">append</a></li>
  756. <li data-name="LuCI.form.MultiValue#cbid"><a href="LuCI.form.MultiValue.html#cbid">cbid</a></li>
  757. <li data-name="LuCI.form.MultiValue#cfgvalue"><a href="LuCI.form.MultiValue.html#cfgvalue">cfgvalue</a></li>
  758. <li data-name="LuCI.form.MultiValue#depends"><a href="LuCI.form.MultiValue.html#depends">depends</a></li>
  759. <li data-name="LuCI.form.MultiValue#formvalue"><a href="LuCI.form.MultiValue.html#formvalue">formvalue</a></li>
  760. <li data-name="LuCI.form.MultiValue#getUIElement"><a href="LuCI.form.MultiValue.html#getUIElement">getUIElement</a></li>
  761. <li data-name="LuCI.form.MultiValue#getValidationError"><a href="LuCI.form.MultiValue.html#getValidationError">getValidationError</a></li>
  762. <li data-name="LuCI.form.MultiValue#isActive"><a href="LuCI.form.MultiValue.html#isActive">isActive</a></li>
  763. <li data-name="LuCI.form.MultiValue#isValid"><a href="LuCI.form.MultiValue.html#isValid">isValid</a></li>
  764. <li data-name="LuCI.form.MultiValue#load"><a href="LuCI.form.MultiValue.html#load">load</a></li>
  765. <li data-name="LuCI.form.MultiValue#parse"><a href="LuCI.form.MultiValue.html#parse">parse</a></li>
  766. <li data-name="LuCI.form.MultiValue#remove"><a href="LuCI.form.MultiValue.html#remove">remove</a></li>
  767. <li data-name="LuCI.form.MultiValue#stripTags"><a href="LuCI.form.MultiValue.html#stripTags">stripTags</a></li>
  768. <li data-name="LuCI.form.MultiValue#textvalue"><a href="LuCI.form.MultiValue.html#textvalue">textvalue</a></li>
  769. <li data-name="LuCI.form.MultiValue#titleFn"><a href="LuCI.form.MultiValue.html#titleFn">titleFn</a></li>
  770. <li data-name="LuCI.form.MultiValue#value"><a href="LuCI.form.MultiValue.html#value">value</a></li>
  771. <li data-name="LuCI.form.MultiValue#write"><a href="LuCI.form.MultiValue.html#write">write</a></li>
  772. </ul>
  773. <ul class="events itemMembers">
  774. </ul>
  775. </li>
  776. <li class="item" data-name="LuCI.form.NamedSection">
  777. <span class="title">
  778. <a href="LuCI.form.NamedSection.html">LuCI.form.NamedSection</a>
  779. </span>
  780. <ul class="members itemMembers">
  781. <span class="subtitle">Members</span>
  782. <li data-name="LuCI.form.NamedSection##addremove"><a href="LuCI.form.NamedSection.html#addremove">addremove</a></li>
  783. <li data-name="LuCI.form.NamedSection##uciconfig"><a href="LuCI.form.NamedSection.html#uciconfig">uciconfig</a></li>
  784. <li data-name="LuCI.form.NamedSection#parentoption"><a href="LuCI.form.NamedSection.html#parentoption">parentoption</a></li>
  785. </ul>
  786. <ul class="typedefs itemMembers">
  787. </ul>
  788. <ul class="typedefs itemMembers">
  789. </ul>
  790. <ul class="methods itemMembers">
  791. <span class="subtitle">Methods</span>
  792. <li data-name="LuCI.form.NamedSection#append"><a href="LuCI.form.NamedSection.html#append">append</a></li>
  793. <li data-name="LuCI.form.NamedSection#cfgsections"><a href="LuCI.form.NamedSection.html#cfgsections">cfgsections</a></li>
  794. <li data-name="LuCI.form.NamedSection#cfgvalue"><a href="LuCI.form.NamedSection.html#cfgvalue">cfgvalue</a></li>
  795. <li data-name="LuCI.form.NamedSection#filter"><a href="LuCI.form.NamedSection.html#filter">filter</a></li>
  796. <li data-name="LuCI.form.NamedSection#formvalue"><a href="LuCI.form.NamedSection.html#formvalue">formvalue</a></li>
  797. <li data-name="LuCI.form.NamedSection#getOption"><a href="LuCI.form.NamedSection.html#getOption">getOption</a></li>
  798. <li data-name="LuCI.form.NamedSection#getUIElement"><a href="LuCI.form.NamedSection.html#getUIElement">getUIElement</a></li>
  799. <li data-name="LuCI.form.NamedSection#load"><a href="LuCI.form.NamedSection.html#load">load</a></li>
  800. <li data-name="LuCI.form.NamedSection#option"><a href="LuCI.form.NamedSection.html#option">option</a></li>
  801. <li data-name="LuCI.form.NamedSection#parse"><a href="LuCI.form.NamedSection.html#parse">parse</a></li>
  802. <li data-name="LuCI.form.NamedSection#render"><a href="LuCI.form.NamedSection.html#render">render</a></li>
  803. <li data-name="LuCI.form.NamedSection#stripTags"><a href="LuCI.form.NamedSection.html#stripTags">stripTags</a></li>
  804. <li data-name="LuCI.form.NamedSection#tab"><a href="LuCI.form.NamedSection.html#tab">tab</a></li>
  805. <li data-name="LuCI.form.NamedSection#taboption"><a href="LuCI.form.NamedSection.html#taboption">taboption</a></li>
  806. <li data-name="LuCI.form.NamedSection#titleFn"><a href="LuCI.form.NamedSection.html#titleFn">titleFn</a></li>
  807. </ul>
  808. <ul class="events itemMembers">
  809. </ul>
  810. </li>
  811. <li class="item" data-name="LuCI.form.RichListValue">
  812. <span class="title">
  813. <a href="LuCI.form.RichListValue.html">LuCI.form.RichListValue</a>
  814. </span>
  815. <ul class="members itemMembers">
  816. <span class="subtitle">Members</span>
  817. <li data-name="LuCI.form.RichListValue##orientation"><a href="LuCI.form.RichListValue.html#orientation">orientation</a></li>
  818. <li data-name="LuCI.form.RichListValue##size"><a href="LuCI.form.RichListValue.html#size">size</a></li>
  819. <li data-name="LuCI.form.RichListValue##widget"><a href="LuCI.form.RichListValue.html#widget">widget</a></li>
  820. <li data-name="LuCI.form.RichListValue#datatype"><a href="LuCI.form.RichListValue.html#datatype">datatype</a></li>
  821. <li data-name="LuCI.form.RichListValue#default"><a href="LuCI.form.RichListValue.html#default">default</a></li>
  822. <li data-name="LuCI.form.RichListValue#editable"><a href="LuCI.form.RichListValue.html#editable">editable</a></li>
  823. <li data-name="LuCI.form.RichListValue#modalonly"><a href="LuCI.form.RichListValue.html#modalonly">modalonly</a></li>
  824. <li data-name="LuCI.form.RichListValue#onchange"><a href="LuCI.form.RichListValue.html#onchange">onchange</a></li>
  825. <li data-name="LuCI.form.RichListValue#optional"><a href="LuCI.form.RichListValue.html#optional">optional</a></li>
  826. <li data-name="LuCI.form.RichListValue#orientation"><a href="LuCI.form.RichListValue.html#orientation">orientation</a></li>
  827. <li data-name="LuCI.form.RichListValue#password"><a href="LuCI.form.RichListValue.html#password">password</a></li>
  828. <li data-name="LuCI.form.RichListValue#placeholder"><a href="LuCI.form.RichListValue.html#placeholder">placeholder</a></li>
  829. <li data-name="LuCI.form.RichListValue#readonly"><a href="LuCI.form.RichListValue.html#readonly">readonly</a></li>
  830. <li data-name="LuCI.form.RichListValue#retain"><a href="LuCI.form.RichListValue.html#retain">retain</a></li>
  831. <li data-name="LuCI.form.RichListValue#rmempty"><a href="LuCI.form.RichListValue.html#rmempty">rmempty</a></li>
  832. <li data-name="LuCI.form.RichListValue#size"><a href="LuCI.form.RichListValue.html#size">size</a></li>
  833. <li data-name="LuCI.form.RichListValue#uciconfig"><a href="LuCI.form.RichListValue.html#uciconfig">uciconfig</a></li>
  834. <li data-name="LuCI.form.RichListValue#ucioption"><a href="LuCI.form.RichListValue.html#ucioption">ucioption</a></li>
  835. <li data-name="LuCI.form.RichListValue#ucisection"><a href="LuCI.form.RichListValue.html#ucisection">ucisection</a></li>
  836. <li data-name="LuCI.form.RichListValue#validate"><a href="LuCI.form.RichListValue.html#validate">validate</a></li>
  837. <li data-name="LuCI.form.RichListValue#widget"><a href="LuCI.form.RichListValue.html#widget">widget</a></li>
  838. <li data-name="LuCI.form.RichListValue#width"><a href="LuCI.form.RichListValue.html#width">width</a></li>
  839. </ul>
  840. <ul class="typedefs itemMembers">
  841. </ul>
  842. <ul class="typedefs itemMembers">
  843. </ul>
  844. <ul class="methods itemMembers">
  845. <span class="subtitle">Methods</span>
  846. <li data-name="LuCI.form.RichListValue#append"><a href="LuCI.form.RichListValue.html#append">append</a></li>
  847. <li data-name="LuCI.form.RichListValue#cbid"><a href="LuCI.form.RichListValue.html#cbid">cbid</a></li>
  848. <li data-name="LuCI.form.RichListValue#cfgvalue"><a href="LuCI.form.RichListValue.html#cfgvalue">cfgvalue</a></li>
  849. <li data-name="LuCI.form.RichListValue#depends"><a href="LuCI.form.RichListValue.html#depends">depends</a></li>
  850. <li data-name="LuCI.form.RichListValue#formvalue"><a href="LuCI.form.RichListValue.html#formvalue">formvalue</a></li>
  851. <li data-name="LuCI.form.RichListValue#getUIElement"><a href="LuCI.form.RichListValue.html#getUIElement">getUIElement</a></li>
  852. <li data-name="LuCI.form.RichListValue#getValidationError"><a href="LuCI.form.RichListValue.html#getValidationError">getValidationError</a></li>
  853. <li data-name="LuCI.form.RichListValue#isActive"><a href="LuCI.form.RichListValue.html#isActive">isActive</a></li>
  854. <li data-name="LuCI.form.RichListValue#isValid"><a href="LuCI.form.RichListValue.html#isValid">isValid</a></li>
  855. <li data-name="LuCI.form.RichListValue#load"><a href="LuCI.form.RichListValue.html#load">load</a></li>
  856. <li data-name="LuCI.form.RichListValue#parse"><a href="LuCI.form.RichListValue.html#parse">parse</a></li>
  857. <li data-name="LuCI.form.RichListValue#remove"><a href="LuCI.form.RichListValue.html#remove">remove</a></li>
  858. <li data-name="LuCI.form.RichListValue#stripTags"><a href="LuCI.form.RichListValue.html#stripTags">stripTags</a></li>
  859. <li data-name="LuCI.form.RichListValue#textvalue"><a href="LuCI.form.RichListValue.html#textvalue">textvalue</a></li>
  860. <li data-name="LuCI.form.RichListValue#titleFn"><a href="LuCI.form.RichListValue.html#titleFn">titleFn</a></li>
  861. <li data-name="LuCI.form.RichListValue#value"><a href="LuCI.form.RichListValue.html#value">value</a></li>
  862. <li data-name="LuCI.form.RichListValue#write"><a href="LuCI.form.RichListValue.html#write">write</a></li>
  863. </ul>
  864. <ul class="events itemMembers">
  865. </ul>
  866. </li>
  867. <li class="item" data-name="LuCI.form.SectionValue">
  868. <span class="title">
  869. <a href="LuCI.form.SectionValue.html">LuCI.form.SectionValue</a>
  870. </span>
  871. <ul class="members itemMembers">
  872. <span class="subtitle">Members</span>
  873. <li data-name="LuCI.form.SectionValue##subsection"><a href="LuCI.form.SectionValue.html#subsection">subsection</a></li>
  874. <li data-name="LuCI.form.SectionValue#datatype"><a href="LuCI.form.SectionValue.html#datatype">datatype</a></li>
  875. <li data-name="LuCI.form.SectionValue#default"><a href="LuCI.form.SectionValue.html#default">default</a></li>
  876. <li data-name="LuCI.form.SectionValue#editable"><a href="LuCI.form.SectionValue.html#editable">editable</a></li>
  877. <li data-name="LuCI.form.SectionValue#modalonly"><a href="LuCI.form.SectionValue.html#modalonly">modalonly</a></li>
  878. <li data-name="LuCI.form.SectionValue#onchange"><a href="LuCI.form.SectionValue.html#onchange">onchange</a></li>
  879. <li data-name="LuCI.form.SectionValue#optional"><a href="LuCI.form.SectionValue.html#optional">optional</a></li>
  880. <li data-name="LuCI.form.SectionValue#password"><a href="LuCI.form.SectionValue.html#password">password</a></li>
  881. <li data-name="LuCI.form.SectionValue#placeholder"><a href="LuCI.form.SectionValue.html#placeholder">placeholder</a></li>
  882. <li data-name="LuCI.form.SectionValue#readonly"><a href="LuCI.form.SectionValue.html#readonly">readonly</a></li>
  883. <li data-name="LuCI.form.SectionValue#retain"><a href="LuCI.form.SectionValue.html#retain">retain</a></li>
  884. <li data-name="LuCI.form.SectionValue#rmempty"><a href="LuCI.form.SectionValue.html#rmempty">rmempty</a></li>
  885. <li data-name="LuCI.form.SectionValue#uciconfig"><a href="LuCI.form.SectionValue.html#uciconfig">uciconfig</a></li>
  886. <li data-name="LuCI.form.SectionValue#ucioption"><a href="LuCI.form.SectionValue.html#ucioption">ucioption</a></li>
  887. <li data-name="LuCI.form.SectionValue#ucisection"><a href="LuCI.form.SectionValue.html#ucisection">ucisection</a></li>
  888. <li data-name="LuCI.form.SectionValue#validate"><a href="LuCI.form.SectionValue.html#validate">validate</a></li>
  889. <li data-name="LuCI.form.SectionValue#width"><a href="LuCI.form.SectionValue.html#width">width</a></li>
  890. </ul>
  891. <ul class="typedefs itemMembers">
  892. </ul>
  893. <ul class="typedefs itemMembers">
  894. </ul>
  895. <ul class="methods itemMembers">
  896. <span class="subtitle">Methods</span>
  897. <li data-name="LuCI.form.SectionValue#append"><a href="LuCI.form.SectionValue.html#append">append</a></li>
  898. <li data-name="LuCI.form.SectionValue#cbid"><a href="LuCI.form.SectionValue.html#cbid">cbid</a></li>
  899. <li data-name="LuCI.form.SectionValue#cfgvalue"><a href="LuCI.form.SectionValue.html#cfgvalue">cfgvalue</a></li>
  900. <li data-name="LuCI.form.SectionValue#depends"><a href="LuCI.form.SectionValue.html#depends">depends</a></li>
  901. <li data-name="LuCI.form.SectionValue#formvalue"><a href="LuCI.form.SectionValue.html#formvalue">formvalue</a></li>
  902. <li data-name="LuCI.form.SectionValue#getUIElement"><a href="LuCI.form.SectionValue.html#getUIElement">getUIElement</a></li>
  903. <li data-name="LuCI.form.SectionValue#getValidationError"><a href="LuCI.form.SectionValue.html#getValidationError">getValidationError</a></li>
  904. <li data-name="LuCI.form.SectionValue#isActive"><a href="LuCI.form.SectionValue.html#isActive">isActive</a></li>
  905. <li data-name="LuCI.form.SectionValue#isValid"><a href="LuCI.form.SectionValue.html#isValid">isValid</a></li>
  906. <li data-name="LuCI.form.SectionValue#load"><a href="LuCI.form.SectionValue.html#load">load</a></li>
  907. <li data-name="LuCI.form.SectionValue#parse"><a href="LuCI.form.SectionValue.html#parse">parse</a></li>
  908. <li data-name="LuCI.form.SectionValue#remove"><a href="LuCI.form.SectionValue.html#remove">remove</a></li>
  909. <li data-name="LuCI.form.SectionValue#stripTags"><a href="LuCI.form.SectionValue.html#stripTags">stripTags</a></li>
  910. <li data-name="LuCI.form.SectionValue#textvalue"><a href="LuCI.form.SectionValue.html#textvalue">textvalue</a></li>
  911. <li data-name="LuCI.form.SectionValue#titleFn"><a href="LuCI.form.SectionValue.html#titleFn">titleFn</a></li>
  912. <li data-name="LuCI.form.SectionValue#value"><a href="LuCI.form.SectionValue.html#value">value</a></li>
  913. <li data-name="LuCI.form.SectionValue#write"><a href="LuCI.form.SectionValue.html#write">write</a></li>
  914. </ul>
  915. <ul class="events itemMembers">
  916. </ul>
  917. </li>
  918. <li class="item" data-name="LuCI.form.TableSection">
  919. <span class="title">
  920. <a href="LuCI.form.TableSection.html">LuCI.form.TableSection</a>
  921. </span>
  922. <ul class="members itemMembers">
  923. <span class="subtitle">Members</span>
  924. <li data-name="LuCI.form.TableSection##extedit"><a href="LuCI.form.TableSection.html#extedit">extedit</a></li>
  925. <li data-name="LuCI.form.TableSection##max_cols"><a href="LuCI.form.TableSection.html#max_cols">max_cols</a></li>
  926. <li data-name="LuCI.form.TableSection##modaltitle"><a href="LuCI.form.TableSection.html#modaltitle">modaltitle</a></li>
  927. <li data-name="LuCI.form.TableSection##nodescriptions"><a href="LuCI.form.TableSection.html#nodescriptions">nodescriptions</a></li>
  928. <li data-name="LuCI.form.TableSection##rowcolors"><a href="LuCI.form.TableSection.html#rowcolors">rowcolors</a></li>
  929. <li data-name="LuCI.form.TableSection##sectiontitle"><a href="LuCI.form.TableSection.html#sectiontitle">sectiontitle</a></li>
  930. <li data-name="LuCI.form.TableSection##sortable"><a href="LuCI.form.TableSection.html#sortable">sortable</a></li>
  931. <li data-name="LuCI.form.TableSection#addbtntitle"><a href="LuCI.form.TableSection.html#addbtntitle">addbtntitle</a></li>
  932. <li data-name="LuCI.form.TableSection#addremove"><a href="LuCI.form.TableSection.html#addremove">addremove</a></li>
  933. <li data-name="LuCI.form.TableSection#anonymous"><a href="LuCI.form.TableSection.html#anonymous">anonymous</a></li>
  934. <li data-name="LuCI.form.TableSection#cloneable"><a href="LuCI.form.TableSection.html#cloneable">cloneable</a></li>
  935. <li data-name="LuCI.form.TableSection#parentoption"><a href="LuCI.form.TableSection.html#parentoption">parentoption</a></li>
  936. <li data-name="LuCI.form.TableSection#tabbed"><a href="LuCI.form.TableSection.html#tabbed">tabbed</a></li>
  937. <li data-name="LuCI.form.TableSection#uciconfig"><a href="LuCI.form.TableSection.html#uciconfig">uciconfig</a></li>
  938. </ul>
  939. <ul class="typedefs itemMembers">
  940. </ul>
  941. <ul class="typedefs itemMembers">
  942. </ul>
  943. <ul class="methods itemMembers">
  944. <span class="subtitle">Methods</span>
  945. <li data-name="LuCI.form.TableSection#addModalOptions"><a href="LuCI.form.TableSection.html#addModalOptions">addModalOptions</a></li>
  946. <li data-name="LuCI.form.TableSection#append"><a href="LuCI.form.TableSection.html#append">append</a></li>
  947. <li data-name="LuCI.form.TableSection#cfgvalue"><a href="LuCI.form.TableSection.html#cfgvalue">cfgvalue</a></li>
  948. <li data-name="LuCI.form.TableSection#filter"><a href="LuCI.form.TableSection.html#filter">filter</a></li>
  949. <li data-name="LuCI.form.TableSection#formvalue"><a href="LuCI.form.TableSection.html#formvalue">formvalue</a></li>
  950. <li data-name="LuCI.form.TableSection#getOption"><a href="LuCI.form.TableSection.html#getOption">getOption</a></li>
  951. <li data-name="LuCI.form.TableSection#getUIElement"><a href="LuCI.form.TableSection.html#getUIElement">getUIElement</a></li>
  952. <li data-name="LuCI.form.TableSection#load"><a href="LuCI.form.TableSection.html#load">load</a></li>
  953. <li data-name="LuCI.form.TableSection#option"><a href="LuCI.form.TableSection.html#option">option</a></li>
  954. <li data-name="LuCI.form.TableSection#parse"><a href="LuCI.form.TableSection.html#parse">parse</a></li>
  955. <li data-name="LuCI.form.TableSection#stripTags"><a href="LuCI.form.TableSection.html#stripTags">stripTags</a></li>
  956. <li data-name="LuCI.form.TableSection#tab"><a href="LuCI.form.TableSection.html#tab">tab</a></li>
  957. <li data-name="LuCI.form.TableSection#taboption"><a href="LuCI.form.TableSection.html#taboption">taboption</a></li>
  958. <li data-name="LuCI.form.TableSection#titleFn"><a href="LuCI.form.TableSection.html#titleFn">titleFn</a></li>
  959. </ul>
  960. <ul class="events itemMembers">
  961. </ul>
  962. </li>
  963. <li class="item" data-name="LuCI.form.TextValue">
  964. <span class="title">
  965. <a href="LuCI.form.TextValue.html">LuCI.form.TextValue</a>
  966. </span>
  967. <ul class="members itemMembers">
  968. <span class="subtitle">Members</span>
  969. <li data-name="LuCI.form.TextValue##cols"><a href="LuCI.form.TextValue.html#cols">cols</a></li>
  970. <li data-name="LuCI.form.TextValue##monospace"><a href="LuCI.form.TextValue.html#monospace">monospace</a></li>
  971. <li data-name="LuCI.form.TextValue##rows"><a href="LuCI.form.TextValue.html#rows">rows</a></li>
  972. <li data-name="LuCI.form.TextValue##wrap"><a href="LuCI.form.TextValue.html#wrap">wrap</a></li>
  973. <li data-name="LuCI.form.TextValue#datatype"><a href="LuCI.form.TextValue.html#datatype">datatype</a></li>
  974. <li data-name="LuCI.form.TextValue#default"><a href="LuCI.form.TextValue.html#default">default</a></li>
  975. <li data-name="LuCI.form.TextValue#editable"><a href="LuCI.form.TextValue.html#editable">editable</a></li>
  976. <li data-name="LuCI.form.TextValue#modalonly"><a href="LuCI.form.TextValue.html#modalonly">modalonly</a></li>
  977. <li data-name="LuCI.form.TextValue#onchange"><a href="LuCI.form.TextValue.html#onchange">onchange</a></li>
  978. <li data-name="LuCI.form.TextValue#optional"><a href="LuCI.form.TextValue.html#optional">optional</a></li>
  979. <li data-name="LuCI.form.TextValue#password"><a href="LuCI.form.TextValue.html#password">password</a></li>
  980. <li data-name="LuCI.form.TextValue#placeholder"><a href="LuCI.form.TextValue.html#placeholder">placeholder</a></li>
  981. <li data-name="LuCI.form.TextValue#readonly"><a href="LuCI.form.TextValue.html#readonly">readonly</a></li>
  982. <li data-name="LuCI.form.TextValue#retain"><a href="LuCI.form.TextValue.html#retain">retain</a></li>
  983. <li data-name="LuCI.form.TextValue#rmempty"><a href="LuCI.form.TextValue.html#rmempty">rmempty</a></li>
  984. <li data-name="LuCI.form.TextValue#uciconfig"><a href="LuCI.form.TextValue.html#uciconfig">uciconfig</a></li>
  985. <li data-name="LuCI.form.TextValue#ucioption"><a href="LuCI.form.TextValue.html#ucioption">ucioption</a></li>
  986. <li data-name="LuCI.form.TextValue#ucisection"><a href="LuCI.form.TextValue.html#ucisection">ucisection</a></li>
  987. <li data-name="LuCI.form.TextValue#validate"><a href="LuCI.form.TextValue.html#validate">validate</a></li>
  988. <li data-name="LuCI.form.TextValue#width"><a href="LuCI.form.TextValue.html#width">width</a></li>
  989. </ul>
  990. <ul class="typedefs itemMembers">
  991. </ul>
  992. <ul class="typedefs itemMembers">
  993. </ul>
  994. <ul class="methods itemMembers">
  995. <span class="subtitle">Methods</span>
  996. <li data-name="LuCI.form.TextValue#append"><a href="LuCI.form.TextValue.html#append">append</a></li>
  997. <li data-name="LuCI.form.TextValue#cbid"><a href="LuCI.form.TextValue.html#cbid">cbid</a></li>
  998. <li data-name="LuCI.form.TextValue#cfgvalue"><a href="LuCI.form.TextValue.html#cfgvalue">cfgvalue</a></li>
  999. <li data-name="LuCI.form.TextValue#depends"><a href="LuCI.form.TextValue.html#depends">depends</a></li>
  1000. <li data-name="LuCI.form.TextValue#formvalue"><a href="LuCI.form.TextValue.html#formvalue">formvalue</a></li>
  1001. <li data-name="LuCI.form.TextValue#getUIElement"><a href="LuCI.form.TextValue.html#getUIElement">getUIElement</a></li>
  1002. <li data-name="LuCI.form.TextValue#getValidationError"><a href="LuCI.form.TextValue.html#getValidationError">getValidationError</a></li>
  1003. <li data-name="LuCI.form.TextValue#isActive"><a href="LuCI.form.TextValue.html#isActive">isActive</a></li>
  1004. <li data-name="LuCI.form.TextValue#isValid"><a href="LuCI.form.TextValue.html#isValid">isValid</a></li>
  1005. <li data-name="LuCI.form.TextValue#load"><a href="LuCI.form.TextValue.html#load">load</a></li>
  1006. <li data-name="LuCI.form.TextValue#parse"><a href="LuCI.form.TextValue.html#parse">parse</a></li>
  1007. <li data-name="LuCI.form.TextValue#remove"><a href="LuCI.form.TextValue.html#remove">remove</a></li>
  1008. <li data-name="LuCI.form.TextValue#stripTags"><a href="LuCI.form.TextValue.html#stripTags">stripTags</a></li>
  1009. <li data-name="LuCI.form.TextValue#textvalue"><a href="LuCI.form.TextValue.html#textvalue">textvalue</a></li>
  1010. <li data-name="LuCI.form.TextValue#titleFn"><a href="LuCI.form.TextValue.html#titleFn">titleFn</a></li>
  1011. <li data-name="LuCI.form.TextValue#write"><a href="LuCI.form.TextValue.html#write">write</a></li>
  1012. </ul>
  1013. <ul class="events itemMembers">
  1014. </ul>
  1015. </li>
  1016. <li class="item" data-name="LuCI.form.TypedSection">
  1017. <span class="title">
  1018. <a href="LuCI.form.TypedSection.html">LuCI.form.TypedSection</a>
  1019. </span>
  1020. <ul class="members itemMembers">
  1021. <span class="subtitle">Members</span>
  1022. <li data-name="LuCI.form.TypedSection##addbtntitle"><a href="LuCI.form.TypedSection.html#addbtntitle">addbtntitle</a></li>
  1023. <li data-name="LuCI.form.TypedSection##addremove"><a href="LuCI.form.TypedSection.html#addremove">addremove</a></li>
  1024. <li data-name="LuCI.form.TypedSection##anonymous"><a href="LuCI.form.TypedSection.html#anonymous">anonymous</a></li>
  1025. <li data-name="LuCI.form.TypedSection##cloneable"><a href="LuCI.form.TypedSection.html#cloneable">cloneable</a></li>
  1026. <li data-name="LuCI.form.TypedSection##tabbed"><a href="LuCI.form.TypedSection.html#tabbed">tabbed</a></li>
  1027. <li data-name="LuCI.form.TypedSection##uciconfig"><a href="LuCI.form.TypedSection.html#uciconfig">uciconfig</a></li>
  1028. <li data-name="LuCI.form.TypedSection#parentoption"><a href="LuCI.form.TypedSection.html#parentoption">parentoption</a></li>
  1029. </ul>
  1030. <ul class="typedefs itemMembers">
  1031. </ul>
  1032. <ul class="typedefs itemMembers">
  1033. </ul>
  1034. <ul class="methods itemMembers">
  1035. <span class="subtitle">Methods</span>
  1036. <li data-name="LuCI.form.TypedSection#append"><a href="LuCI.form.TypedSection.html#append">append</a></li>
  1037. <li data-name="LuCI.form.TypedSection#cfgsections"><a href="LuCI.form.TypedSection.html#cfgsections">cfgsections</a></li>
  1038. <li data-name="LuCI.form.TypedSection#cfgvalue"><a href="LuCI.form.TypedSection.html#cfgvalue">cfgvalue</a></li>
  1039. <li data-name="LuCI.form.TypedSection#filter"><a href="LuCI.form.TypedSection.html#filter">filter</a></li>
  1040. <li data-name="LuCI.form.TypedSection#formvalue"><a href="LuCI.form.TypedSection.html#formvalue">formvalue</a></li>
  1041. <li data-name="LuCI.form.TypedSection#getOption"><a href="LuCI.form.TypedSection.html#getOption">getOption</a></li>
  1042. <li data-name="LuCI.form.TypedSection#getUIElement"><a href="LuCI.form.TypedSection.html#getUIElement">getUIElement</a></li>
  1043. <li data-name="LuCI.form.TypedSection#load"><a href="LuCI.form.TypedSection.html#load">load</a></li>
  1044. <li data-name="LuCI.form.TypedSection#option"><a href="LuCI.form.TypedSection.html#option">option</a></li>
  1045. <li data-name="LuCI.form.TypedSection#parse"><a href="LuCI.form.TypedSection.html#parse">parse</a></li>
  1046. <li data-name="LuCI.form.TypedSection#render"><a href="LuCI.form.TypedSection.html#render">render</a></li>
  1047. <li data-name="LuCI.form.TypedSection#stripTags"><a href="LuCI.form.TypedSection.html#stripTags">stripTags</a></li>
  1048. <li data-name="LuCI.form.TypedSection#tab"><a href="LuCI.form.TypedSection.html#tab">tab</a></li>
  1049. <li data-name="LuCI.form.TypedSection#taboption"><a href="LuCI.form.TypedSection.html#taboption">taboption</a></li>
  1050. <li data-name="LuCI.form.TypedSection#titleFn"><a href="LuCI.form.TypedSection.html#titleFn">titleFn</a></li>
  1051. </ul>
  1052. <ul class="events itemMembers">
  1053. </ul>
  1054. </li>
  1055. <li class="item" data-name="LuCI.form.Value">
  1056. <span class="title">
  1057. <a href="LuCI.form.Value.html">LuCI.form.Value</a>
  1058. </span>
  1059. <ul class="members itemMembers">
  1060. <span class="subtitle">Members</span>
  1061. <li data-name="LuCI.form.Value##password"><a href="LuCI.form.Value.html#password">password</a></li>
  1062. <li data-name="LuCI.form.Value##placeholder"><a href="LuCI.form.Value.html#placeholder">placeholder</a></li>
  1063. <li data-name="LuCI.form.Value#datatype"><a href="LuCI.form.Value.html#datatype">datatype</a></li>
  1064. <li data-name="LuCI.form.Value#default"><a href="LuCI.form.Value.html#default">default</a></li>
  1065. <li data-name="LuCI.form.Value#editable"><a href="LuCI.form.Value.html#editable">editable</a></li>
  1066. <li data-name="LuCI.form.Value#modalonly"><a href="LuCI.form.Value.html#modalonly">modalonly</a></li>
  1067. <li data-name="LuCI.form.Value#onchange"><a href="LuCI.form.Value.html#onchange">onchange</a></li>
  1068. <li data-name="LuCI.form.Value#optional"><a href="LuCI.form.Value.html#optional">optional</a></li>
  1069. <li data-name="LuCI.form.Value#readonly"><a href="LuCI.form.Value.html#readonly">readonly</a></li>
  1070. <li data-name="LuCI.form.Value#retain"><a href="LuCI.form.Value.html#retain">retain</a></li>
  1071. <li data-name="LuCI.form.Value#rmempty"><a href="LuCI.form.Value.html#rmempty">rmempty</a></li>
  1072. <li data-name="LuCI.form.Value#uciconfig"><a href="LuCI.form.Value.html#uciconfig">uciconfig</a></li>
  1073. <li data-name="LuCI.form.Value#ucioption"><a href="LuCI.form.Value.html#ucioption">ucioption</a></li>
  1074. <li data-name="LuCI.form.Value#ucisection"><a href="LuCI.form.Value.html#ucisection">ucisection</a></li>
  1075. <li data-name="LuCI.form.Value#validate"><a href="LuCI.form.Value.html#validate">validate</a></li>
  1076. <li data-name="LuCI.form.Value#width"><a href="LuCI.form.Value.html#width">width</a></li>
  1077. </ul>
  1078. <ul class="typedefs itemMembers">
  1079. </ul>
  1080. <ul class="typedefs itemMembers">
  1081. </ul>
  1082. <ul class="methods itemMembers">
  1083. <span class="subtitle">Methods</span>
  1084. <li data-name="LuCI.form.Value#append"><a href="LuCI.form.Value.html#append">append</a></li>
  1085. <li data-name="LuCI.form.Value#cbid"><a href="LuCI.form.Value.html#cbid">cbid</a></li>
  1086. <li data-name="LuCI.form.Value#cfgvalue"><a href="LuCI.form.Value.html#cfgvalue">cfgvalue</a></li>
  1087. <li data-name="LuCI.form.Value#depends"><a href="LuCI.form.Value.html#depends">depends</a></li>
  1088. <li data-name="LuCI.form.Value#formvalue"><a href="LuCI.form.Value.html#formvalue">formvalue</a></li>
  1089. <li data-name="LuCI.form.Value#getUIElement"><a href="LuCI.form.Value.html#getUIElement">getUIElement</a></li>
  1090. <li data-name="LuCI.form.Value#getValidationError"><a href="LuCI.form.Value.html#getValidationError">getValidationError</a></li>
  1091. <li data-name="LuCI.form.Value#isActive"><a href="LuCI.form.Value.html#isActive">isActive</a></li>
  1092. <li data-name="LuCI.form.Value#isValid"><a href="LuCI.form.Value.html#isValid">isValid</a></li>
  1093. <li data-name="LuCI.form.Value#load"><a href="LuCI.form.Value.html#load">load</a></li>
  1094. <li data-name="LuCI.form.Value#parse"><a href="LuCI.form.Value.html#parse">parse</a></li>
  1095. <li data-name="LuCI.form.Value#remove"><a href="LuCI.form.Value.html#remove">remove</a></li>
  1096. <li data-name="LuCI.form.Value#render"><a href="LuCI.form.Value.html#render">render</a></li>
  1097. <li data-name="LuCI.form.Value#stripTags"><a href="LuCI.form.Value.html#stripTags">stripTags</a></li>
  1098. <li data-name="LuCI.form.Value#textvalue"><a href="LuCI.form.Value.html#textvalue">textvalue</a></li>
  1099. <li data-name="LuCI.form.Value#titleFn"><a href="LuCI.form.Value.html#titleFn">titleFn</a></li>
  1100. <li data-name="LuCI.form.Value#value"><a href="LuCI.form.Value.html#value">value</a></li>
  1101. <li data-name="LuCI.form.Value#write"><a href="LuCI.form.Value.html#write">write</a></li>
  1102. </ul>
  1103. <ul class="events itemMembers">
  1104. </ul>
  1105. </li>
  1106. <li class="item" data-name="LuCI.fs">
  1107. <span class="title">
  1108. <a href="LuCI.fs.html">LuCI.fs</a>
  1109. </span>
  1110. <ul class="members itemMembers">
  1111. </ul>
  1112. <ul class="typedefs itemMembers">
  1113. <span class="subtitle">Typedefs</span>
  1114. <li data-name="LuCI.fs.FileExecResult"><a href="LuCI.fs.html#.FileExecResult">FileExecResult</a></li>
  1115. <li data-name="LuCI.fs.FileStatEntry"><a href="LuCI.fs.html#.FileStatEntry">FileStatEntry</a></li>
  1116. </ul>
  1117. <ul class="typedefs itemMembers">
  1118. </ul>
  1119. <ul class="methods itemMembers">
  1120. <span class="subtitle">Methods</span>
  1121. <li data-name="LuCI.fs#exec"><a href="LuCI.fs.html#exec">exec</a></li>
  1122. <li data-name="LuCI.fs#exec_direct"><a href="LuCI.fs.html#exec_direct">exec_direct</a></li>
  1123. <li data-name="LuCI.fs#lines"><a href="LuCI.fs.html#lines">lines</a></li>
  1124. <li data-name="LuCI.fs#list"><a href="LuCI.fs.html#list">list</a></li>
  1125. <li data-name="LuCI.fs#read"><a href="LuCI.fs.html#read">read</a></li>
  1126. <li data-name="LuCI.fs#read_direct"><a href="LuCI.fs.html#read_direct">read_direct</a></li>
  1127. <li data-name="LuCI.fs#remove"><a href="LuCI.fs.html#remove">remove</a></li>
  1128. <li data-name="LuCI.fs#stat"><a href="LuCI.fs.html#stat">stat</a></li>
  1129. <li data-name="LuCI.fs#trimmed"><a href="LuCI.fs.html#trimmed">trimmed</a></li>
  1130. <li data-name="LuCI.fs#write"><a href="LuCI.fs.html#write">write</a></li>
  1131. </ul>
  1132. <ul class="events itemMembers">
  1133. </ul>
  1134. </li>
  1135. <li class="item" data-name="LuCI.headers">
  1136. <span class="title">
  1137. <a href="LuCI.headers.html">LuCI.headers</a>
  1138. </span>
  1139. <ul class="members itemMembers">
  1140. </ul>
  1141. <ul class="typedefs itemMembers">
  1142. </ul>
  1143. <ul class="typedefs itemMembers">
  1144. </ul>
  1145. <ul class="methods itemMembers">
  1146. <span class="subtitle">Methods</span>
  1147. <li data-name="LuCI.headers#get"><a href="LuCI.headers.html#get">get</a></li>
  1148. <li data-name="LuCI.headers#has"><a href="LuCI.headers.html#has">has</a></li>
  1149. </ul>
  1150. <ul class="events itemMembers">
  1151. </ul>
  1152. </li>
  1153. <li class="item" data-name="LuCI.network">
  1154. <span class="title">
  1155. <a href="LuCI.network.html">LuCI.network</a>
  1156. </span>
  1157. <ul class="members itemMembers">
  1158. </ul>
  1159. <ul class="typedefs itemMembers">
  1160. <span class="subtitle">Typedefs</span>
  1161. <li data-name="LuCI.network.SwitchTopology"><a href="LuCI.network.html#.SwitchTopology">SwitchTopology</a></li>
  1162. <li data-name="LuCI.network.WifiEncryption"><a href="LuCI.network.html#.WifiEncryption">WifiEncryption</a></li>
  1163. <li data-name="LuCI.network.WifiPeerEntry"><a href="LuCI.network.html#.WifiPeerEntry">WifiPeerEntry</a></li>
  1164. <li data-name="LuCI.network.WifiRateEntry"><a href="LuCI.network.html#.WifiRateEntry">WifiRateEntry</a></li>
  1165. <li data-name="LuCI.network.WifiScanResult"><a href="LuCI.network.html#.WifiScanResult">WifiScanResult</a></li>
  1166. </ul>
  1167. <ul class="typedefs itemMembers">
  1168. </ul>
  1169. <ul class="methods itemMembers">
  1170. <span class="subtitle">Methods</span>
  1171. <li data-name="LuCI.network#addNetwork"><a href="LuCI.network.html#addNetwork">addNetwork</a></li>
  1172. <li data-name="LuCI.network#addWifiNetwork"><a href="LuCI.network.html#addWifiNetwork">addWifiNetwork</a></li>
  1173. <li data-name="LuCI.network#deleteNetwork"><a href="LuCI.network.html#deleteNetwork">deleteNetwork</a></li>
  1174. <li data-name="LuCI.network#deleteWifiNetwork"><a href="LuCI.network.html#deleteWifiNetwork">deleteWifiNetwork</a></li>
  1175. <li data-name="LuCI.network#flushCache"><a href="LuCI.network.html#flushCache">flushCache</a></li>
  1176. <li data-name="LuCI.network#formatWifiEncryption"><a href="LuCI.network.html#formatWifiEncryption">formatWifiEncryption</a></li>
  1177. <li data-name="LuCI.network#getDevice"><a href="LuCI.network.html#getDevice">getDevice</a></li>
  1178. <li data-name="LuCI.network#getDevices"><a href="LuCI.network.html#getDevices">getDevices</a></li>
  1179. <li data-name="LuCI.network#getDSLModemType"><a href="LuCI.network.html#getDSLModemType">getDSLModemType</a></li>
  1180. <li data-name="LuCI.network#getHostHints"><a href="LuCI.network.html#getHostHints">getHostHints</a></li>
  1181. <li data-name="LuCI.network#getIfnameOf"><a href="LuCI.network.html#getIfnameOf">getIfnameOf</a></li>
  1182. <li data-name="LuCI.network#getNetwork"><a href="LuCI.network.html#getNetwork">getNetwork</a></li>
  1183. <li data-name="LuCI.network#getNetworks"><a href="LuCI.network.html#getNetworks">getNetworks</a></li>
  1184. <li data-name="LuCI.network#getProtocol"><a href="LuCI.network.html#getProtocol">getProtocol</a></li>
  1185. <li data-name="LuCI.network#getProtocols"><a href="LuCI.network.html#getProtocols">getProtocols</a></li>
  1186. <li data-name="LuCI.network#getSwitchTopologies"><a href="LuCI.network.html#getSwitchTopologies">getSwitchTopologies</a></li>
  1187. <li data-name="LuCI.network#getWAN6Networks"><a href="LuCI.network.html#getWAN6Networks">getWAN6Networks</a></li>
  1188. <li data-name="LuCI.network#getWANNetworks"><a href="LuCI.network.html#getWANNetworks">getWANNetworks</a></li>
  1189. <li data-name="LuCI.network#getWifiDevice"><a href="LuCI.network.html#getWifiDevice">getWifiDevice</a></li>
  1190. <li data-name="LuCI.network#getWifiDevices"><a href="LuCI.network.html#getWifiDevices">getWifiDevices</a></li>
  1191. <li data-name="LuCI.network#getWifiNetwork"><a href="LuCI.network.html#getWifiNetwork">getWifiNetwork</a></li>
  1192. <li data-name="LuCI.network#getWifiNetworks"><a href="LuCI.network.html#getWifiNetworks">getWifiNetworks</a></li>
  1193. <li data-name="LuCI.network#isIgnoredDevice"><a href="LuCI.network.html#isIgnoredDevice">isIgnoredDevice</a></li>
  1194. <li data-name="LuCI.network#maskToPrefix"><a href="LuCI.network.html#maskToPrefix">maskToPrefix</a></li>
  1195. <li data-name="LuCI.network#prefixToMask"><a href="LuCI.network.html#prefixToMask">prefixToMask</a></li>
  1196. <li data-name="LuCI.network#registerErrorCode"><a href="LuCI.network.html#registerErrorCode">registerErrorCode</a></li>
  1197. <li data-name="LuCI.network#registerPatternVirtual"><a href="LuCI.network.html#registerPatternVirtual">registerPatternVirtual</a></li>
  1198. <li data-name="LuCI.network#registerProtocol"><a href="LuCI.network.html#registerProtocol">registerProtocol</a></li>
  1199. <li data-name="LuCI.network#renameNetwork"><a href="LuCI.network.html#renameNetwork">renameNetwork</a></li>
  1200. </ul>
  1201. <ul class="events itemMembers">
  1202. </ul>
  1203. </li>
  1204. <li class="item" data-name="LuCI.network.Device">
  1205. <span class="title">
  1206. <a href="LuCI.network.Device.html">LuCI.network.Device</a>
  1207. </span>
  1208. <ul class="members itemMembers">
  1209. </ul>
  1210. <ul class="typedefs itemMembers">
  1211. </ul>
  1212. <ul class="typedefs itemMembers">
  1213. </ul>
  1214. <ul class="methods itemMembers">
  1215. <span class="subtitle">Methods</span>
  1216. <li data-name="LuCI.network.Device#getBridgeID"><a href="LuCI.network.Device.html#getBridgeID">getBridgeID</a></li>
  1217. <li data-name="LuCI.network.Device#getBridgeSTP"><a href="LuCI.network.Device.html#getBridgeSTP">getBridgeSTP</a></li>
  1218. <li data-name="LuCI.network.Device#getCarrier"><a href="LuCI.network.Device.html#getCarrier">getCarrier</a></li>
  1219. <li data-name="LuCI.network.Device#getDuplex"><a href="LuCI.network.Device.html#getDuplex">getDuplex</a></li>
  1220. <li data-name="LuCI.network.Device#getI18n"><a href="LuCI.network.Device.html#getI18n">getI18n</a></li>
  1221. <li data-name="LuCI.network.Device#getIP6Addrs"><a href="LuCI.network.Device.html#getIP6Addrs">getIP6Addrs</a></li>
  1222. <li data-name="LuCI.network.Device#getIPAddrs"><a href="LuCI.network.Device.html#getIPAddrs">getIPAddrs</a></li>
  1223. <li data-name="LuCI.network.Device#getMAC"><a href="LuCI.network.Device.html#getMAC">getMAC</a></li>
  1224. <li data-name="LuCI.network.Device#getMTU"><a href="LuCI.network.Device.html#getMTU">getMTU</a></li>
  1225. <li data-name="LuCI.network.Device#getName"><a href="LuCI.network.Device.html#getName">getName</a></li>
  1226. <li data-name="LuCI.network.Device#getNetwork"><a href="LuCI.network.Device.html#getNetwork">getNetwork</a></li>
  1227. <li data-name="LuCI.network.Device#getNetworks"><a href="LuCI.network.Device.html#getNetworks">getNetworks</a></li>
  1228. <li data-name="LuCI.network.Device#getParent"><a href="LuCI.network.Device.html#getParent">getParent</a></li>
  1229. <li data-name="LuCI.network.Device#getPorts"><a href="LuCI.network.Device.html#getPorts">getPorts</a></li>
  1230. <li data-name="LuCI.network.Device#getRXBytes"><a href="LuCI.network.Device.html#getRXBytes">getRXBytes</a></li>
  1231. <li data-name="LuCI.network.Device#getRXPackets"><a href="LuCI.network.Device.html#getRXPackets">getRXPackets</a></li>
  1232. <li data-name="LuCI.network.Device#getShortName"><a href="LuCI.network.Device.html#getShortName">getShortName</a></li>
  1233. <li data-name="LuCI.network.Device#getSpeed"><a href="LuCI.network.Device.html#getSpeed">getSpeed</a></li>
  1234. <li data-name="LuCI.network.Device#getTXBytes"><a href="LuCI.network.Device.html#getTXBytes">getTXBytes</a></li>
  1235. <li data-name="LuCI.network.Device#getTXPackets"><a href="LuCI.network.Device.html#getTXPackets">getTXPackets</a></li>
  1236. <li data-name="LuCI.network.Device#getType"><a href="LuCI.network.Device.html#getType">getType</a></li>
  1237. <li data-name="LuCI.network.Device#getTypeI18n"><a href="LuCI.network.Device.html#getTypeI18n">getTypeI18n</a></li>
  1238. <li data-name="LuCI.network.Device#getWifiNetwork"><a href="LuCI.network.Device.html#getWifiNetwork">getWifiNetwork</a></li>
  1239. <li data-name="LuCI.network.Device#isBridge"><a href="LuCI.network.Device.html#isBridge">isBridge</a></li>
  1240. <li data-name="LuCI.network.Device#isBridgePort"><a href="LuCI.network.Device.html#isBridgePort">isBridgePort</a></li>
  1241. <li data-name="LuCI.network.Device#isUp"><a href="LuCI.network.Device.html#isUp">isUp</a></li>
  1242. </ul>
  1243. <ul class="events itemMembers">
  1244. </ul>
  1245. </li>
  1246. <li class="item" data-name="LuCI.network.Hosts">
  1247. <span class="title">
  1248. <a href="LuCI.network.Hosts.html">LuCI.network.Hosts</a>
  1249. </span>
  1250. <ul class="members itemMembers">
  1251. </ul>
  1252. <ul class="typedefs itemMembers">
  1253. </ul>
  1254. <ul class="typedefs itemMembers">
  1255. </ul>
  1256. <ul class="methods itemMembers">
  1257. <span class="subtitle">Methods</span>
  1258. <li data-name="LuCI.network.Hosts#getHostnameByIP6Addr"><a href="LuCI.network.Hosts.html#getHostnameByIP6Addr">getHostnameByIP6Addr</a></li>
  1259. <li data-name="LuCI.network.Hosts#getHostnameByIPAddr"><a href="LuCI.network.Hosts.html#getHostnameByIPAddr">getHostnameByIPAddr</a></li>
  1260. <li data-name="LuCI.network.Hosts#getHostnameByMACAddr"><a href="LuCI.network.Hosts.html#getHostnameByMACAddr">getHostnameByMACAddr</a></li>
  1261. <li data-name="LuCI.network.Hosts#getIP6AddrByMACAddr"><a href="LuCI.network.Hosts.html#getIP6AddrByMACAddr">getIP6AddrByMACAddr</a></li>
  1262. <li data-name="LuCI.network.Hosts#getIPAddrByMACAddr"><a href="LuCI.network.Hosts.html#getIPAddrByMACAddr">getIPAddrByMACAddr</a></li>
  1263. <li data-name="LuCI.network.Hosts#getMACAddrByIP6Addr"><a href="LuCI.network.Hosts.html#getMACAddrByIP6Addr">getMACAddrByIP6Addr</a></li>
  1264. <li data-name="LuCI.network.Hosts#getMACAddrByIPAddr"><a href="LuCI.network.Hosts.html#getMACAddrByIPAddr">getMACAddrByIPAddr</a></li>
  1265. <li data-name="LuCI.network.Hosts#getMACHints"><a href="LuCI.network.Hosts.html#getMACHints">getMACHints</a></li>
  1266. </ul>
  1267. <ul class="events itemMembers">
  1268. </ul>
  1269. </li>
  1270. <li class="item" data-name="LuCI.network.Protocol">
  1271. <span class="title">
  1272. <a href="LuCI.network.Protocol.html">LuCI.network.Protocol</a>
  1273. </span>
  1274. <ul class="members itemMembers">
  1275. </ul>
  1276. <ul class="typedefs itemMembers">
  1277. </ul>
  1278. <ul class="typedefs itemMembers">
  1279. </ul>
  1280. <ul class="methods itemMembers">
  1281. <span class="subtitle">Methods</span>
  1282. <li data-name="LuCI.network.Protocol#addDevice"><a href="LuCI.network.Protocol.html#addDevice">addDevice</a></li>
  1283. <li data-name="LuCI.network.Protocol#containsDevice"><a href="LuCI.network.Protocol.html#containsDevice">containsDevice</a></li>
  1284. <li data-name="LuCI.network.Protocol#deleteConfiguration"><a href="LuCI.network.Protocol.html#deleteConfiguration">deleteConfiguration</a></li>
  1285. <li data-name="LuCI.network.Protocol#deleteDevice"><a href="LuCI.network.Protocol.html#deleteDevice">deleteDevice</a></li>
  1286. <li data-name="LuCI.network.Protocol#get"><a href="LuCI.network.Protocol.html#get">get</a></li>
  1287. <li data-name="LuCI.network.Protocol#getDevice"><a href="LuCI.network.Protocol.html#getDevice">getDevice</a></li>
  1288. <li data-name="LuCI.network.Protocol#getDevices"><a href="LuCI.network.Protocol.html#getDevices">getDevices</a></li>
  1289. <li data-name="LuCI.network.Protocol#getDNS6Addrs"><a href="LuCI.network.Protocol.html#getDNS6Addrs">getDNS6Addrs</a></li>
  1290. <li data-name="LuCI.network.Protocol#getDNSAddrs"><a href="LuCI.network.Protocol.html#getDNSAddrs">getDNSAddrs</a></li>
  1291. <li data-name="LuCI.network.Protocol#getErrors"><a href="LuCI.network.Protocol.html#getErrors">getErrors</a></li>
  1292. <li data-name="LuCI.network.Protocol#getExpiry"><a href="LuCI.network.Protocol.html#getExpiry">getExpiry</a></li>
  1293. <li data-name="LuCI.network.Protocol#getGateway6Addr"><a href="LuCI.network.Protocol.html#getGateway6Addr">getGateway6Addr</a></li>
  1294. <li data-name="LuCI.network.Protocol#getGatewayAddr"><a href="LuCI.network.Protocol.html#getGatewayAddr">getGatewayAddr</a></li>
  1295. <li data-name="LuCI.network.Protocol#getI18n"><a href="LuCI.network.Protocol.html#getI18n">getI18n</a></li>
  1296. <li data-name="LuCI.network.Protocol#getIfname"><a href="LuCI.network.Protocol.html#getIfname">getIfname</a></li>
  1297. <li data-name="LuCI.network.Protocol#getIP6Addr"><a href="LuCI.network.Protocol.html#getIP6Addr">getIP6Addr</a></li>
  1298. <li data-name="LuCI.network.Protocol#getIP6Addrs"><a href="LuCI.network.Protocol.html#getIP6Addrs">getIP6Addrs</a></li>
  1299. <li data-name="LuCI.network.Protocol#getIP6Prefix"><a href="LuCI.network.Protocol.html#getIP6Prefix">getIP6Prefix</a></li>
  1300. <li data-name="LuCI.network.Protocol#getIP6Prefixes"><a href="LuCI.network.Protocol.html#getIP6Prefixes">getIP6Prefixes</a></li>
  1301. <li data-name="LuCI.network.Protocol#getIPAddr"><a href="LuCI.network.Protocol.html#getIPAddr">getIPAddr</a></li>
  1302. <li data-name="LuCI.network.Protocol#getIPAddrs"><a href="LuCI.network.Protocol.html#getIPAddrs">getIPAddrs</a></li>
  1303. <li data-name="LuCI.network.Protocol#getL2Device"><a href="LuCI.network.Protocol.html#getL2Device">getL2Device</a></li>
  1304. <li data-name="LuCI.network.Protocol#getL3Device"><a href="LuCI.network.Protocol.html#getL3Device">getL3Device</a></li>
  1305. <li data-name="LuCI.network.Protocol#getMetric"><a href="LuCI.network.Protocol.html#getMetric">getMetric</a></li>
  1306. <li data-name="LuCI.network.Protocol#getName"><a href="LuCI.network.Protocol.html#getName">getName</a></li>
  1307. <li data-name="LuCI.network.Protocol#getNetmask"><a href="LuCI.network.Protocol.html#getNetmask">getNetmask</a></li>
  1308. <li data-name="LuCI.network.Protocol#getOpkgPackage"><a href="LuCI.network.Protocol.html#getOpkgPackage">getOpkgPackage</a></li>
  1309. <li data-name="LuCI.network.Protocol#getProtocol"><a href="LuCI.network.Protocol.html#getProtocol">getProtocol</a></li>
  1310. <li data-name="LuCI.network.Protocol#getType"><a href="LuCI.network.Protocol.html#getType">getType</a></li>
  1311. <li data-name="LuCI.network.Protocol#getUptime"><a href="LuCI.network.Protocol.html#getUptime">getUptime</a></li>
  1312. <li data-name="LuCI.network.Protocol#getZoneName"><a href="LuCI.network.Protocol.html#getZoneName">getZoneName</a></li>
  1313. <li data-name="LuCI.network.Protocol#isAlias"><a href="LuCI.network.Protocol.html#isAlias">isAlias</a></li>
  1314. <li data-name="LuCI.network.Protocol#isBridge"><a href="LuCI.network.Protocol.html#isBridge">isBridge</a></li>
  1315. <li data-name="LuCI.network.Protocol#isCreateable"><a href="LuCI.network.Protocol.html#isCreateable">isCreateable</a></li>
  1316. <li data-name="LuCI.network.Protocol#isDynamic"><a href="LuCI.network.Protocol.html#isDynamic">isDynamic</a></li>
  1317. <li data-name="LuCI.network.Protocol#isEmpty"><a href="LuCI.network.Protocol.html#isEmpty">isEmpty</a></li>
  1318. <li data-name="LuCI.network.Protocol#isFloating"><a href="LuCI.network.Protocol.html#isFloating">isFloating</a></li>
  1319. <li data-name="LuCI.network.Protocol#isInstalled"><a href="LuCI.network.Protocol.html#isInstalled">isInstalled</a></li>
  1320. <li data-name="LuCI.network.Protocol#isUp"><a href="LuCI.network.Protocol.html#isUp">isUp</a></li>
  1321. <li data-name="LuCI.network.Protocol#isVirtual"><a href="LuCI.network.Protocol.html#isVirtual">isVirtual</a></li>
  1322. <li data-name="LuCI.network.Protocol#set"><a href="LuCI.network.Protocol.html#set">set</a></li>
  1323. </ul>
  1324. <ul class="events itemMembers">
  1325. </ul>
  1326. </li>
  1327. <li class="item" data-name="LuCI.network.WifiDevice">
  1328. <span class="title">
  1329. <a href="LuCI.network.WifiDevice.html">LuCI.network.WifiDevice</a>
  1330. </span>
  1331. <ul class="members itemMembers">
  1332. </ul>
  1333. <ul class="typedefs itemMembers">
  1334. </ul>
  1335. <ul class="typedefs itemMembers">
  1336. </ul>
  1337. <ul class="methods itemMembers">
  1338. <span class="subtitle">Methods</span>
  1339. <li data-name="LuCI.network.WifiDevice#addWifiNetwork"><a href="LuCI.network.WifiDevice.html#addWifiNetwork">addWifiNetwork</a></li>
  1340. <li data-name="LuCI.network.WifiDevice#deleteWifiNetwork"><a href="LuCI.network.WifiDevice.html#deleteWifiNetwork">deleteWifiNetwork</a></li>
  1341. <li data-name="LuCI.network.WifiDevice#get"><a href="LuCI.network.WifiDevice.html#get">get</a></li>
  1342. <li data-name="LuCI.network.WifiDevice#getHTModes"><a href="LuCI.network.WifiDevice.html#getHTModes">getHTModes</a></li>
  1343. <li data-name="LuCI.network.WifiDevice#getHWModes"><a href="LuCI.network.WifiDevice.html#getHWModes">getHWModes</a></li>
  1344. <li data-name="LuCI.network.WifiDevice#getI18n"><a href="LuCI.network.WifiDevice.html#getI18n">getI18n</a></li>
  1345. <li data-name="LuCI.network.WifiDevice#getName"><a href="LuCI.network.WifiDevice.html#getName">getName</a></li>
  1346. <li data-name="LuCI.network.WifiDevice#getScanList"><a href="LuCI.network.WifiDevice.html#getScanList">getScanList</a></li>
  1347. <li data-name="LuCI.network.WifiDevice#getWifiNetwork"><a href="LuCI.network.WifiDevice.html#getWifiNetwork">getWifiNetwork</a></li>
  1348. <li data-name="LuCI.network.WifiDevice#getWifiNetworks"><a href="LuCI.network.WifiDevice.html#getWifiNetworks">getWifiNetworks</a></li>
  1349. <li data-name="LuCI.network.WifiDevice#isDisabled"><a href="LuCI.network.WifiDevice.html#isDisabled">isDisabled</a></li>
  1350. <li data-name="LuCI.network.WifiDevice#isUp"><a href="LuCI.network.WifiDevice.html#isUp">isUp</a></li>
  1351. <li data-name="LuCI.network.WifiDevice#set"><a href="LuCI.network.WifiDevice.html#set">set</a></li>
  1352. </ul>
  1353. <ul class="events itemMembers">
  1354. </ul>
  1355. </li>
  1356. <li class="item" data-name="LuCI.network.WifiNetwork">
  1357. <span class="title">
  1358. <a href="LuCI.network.WifiNetwork.html">LuCI.network.WifiNetwork</a>
  1359. </span>
  1360. <ul class="members itemMembers">
  1361. </ul>
  1362. <ul class="typedefs itemMembers">
  1363. </ul>
  1364. <ul class="typedefs itemMembers">
  1365. </ul>
  1366. <ul class="methods itemMembers">
  1367. <span class="subtitle">Methods</span>
  1368. <li data-name="LuCI.network.WifiNetwork#disconnectClient"><a href="LuCI.network.WifiNetwork.html#disconnectClient">disconnectClient</a></li>
  1369. <li data-name="LuCI.network.WifiNetwork#get"><a href="LuCI.network.WifiNetwork.html#get">get</a></li>
  1370. <li data-name="LuCI.network.WifiNetwork#getActiveBSSID"><a href="LuCI.network.WifiNetwork.html#getActiveBSSID">getActiveBSSID</a></li>
  1371. <li data-name="LuCI.network.WifiNetwork#getActiveEncryption"><a href="LuCI.network.WifiNetwork.html#getActiveEncryption">getActiveEncryption</a></li>
  1372. <li data-name="LuCI.network.WifiNetwork#getActiveMode"><a href="LuCI.network.WifiNetwork.html#getActiveMode">getActiveMode</a></li>
  1373. <li data-name="LuCI.network.WifiNetwork#getActiveModeI18n"><a href="LuCI.network.WifiNetwork.html#getActiveModeI18n">getActiveModeI18n</a></li>
  1374. <li data-name="LuCI.network.WifiNetwork#getActiveSSID"><a href="LuCI.network.WifiNetwork.html#getActiveSSID">getActiveSSID</a></li>
  1375. <li data-name="LuCI.network.WifiNetwork#getAssocList"><a href="LuCI.network.WifiNetwork.html#getAssocList">getAssocList</a></li>
  1376. <li data-name="LuCI.network.WifiNetwork#getBitRate"><a href="LuCI.network.WifiNetwork.html#getBitRate">getBitRate</a></li>
  1377. <li data-name="LuCI.network.WifiNetwork#getBSSID"><a href="LuCI.network.WifiNetwork.html#getBSSID">getBSSID</a></li>
  1378. <li data-name="LuCI.network.WifiNetwork#getChannel"><a href="LuCI.network.WifiNetwork.html#getChannel">getChannel</a></li>
  1379. <li data-name="LuCI.network.WifiNetwork#getCountryCode"><a href="LuCI.network.WifiNetwork.html#getCountryCode">getCountryCode</a></li>
  1380. <li data-name="LuCI.network.WifiNetwork#getDevice"><a href="LuCI.network.WifiNetwork.html#getDevice">getDevice</a></li>
  1381. <li data-name="LuCI.network.WifiNetwork#getFrequency"><a href="LuCI.network.WifiNetwork.html#getFrequency">getFrequency</a></li>
  1382. <li data-name="LuCI.network.WifiNetwork#getI18n"><a href="LuCI.network.WifiNetwork.html#getI18n">getI18n</a></li>
  1383. <li data-name="LuCI.network.WifiNetwork#getID"><a href="LuCI.network.WifiNetwork.html#getID">getID</a></li>
  1384. <li data-name="LuCI.network.WifiNetwork#getIfname"><a href="LuCI.network.WifiNetwork.html#getIfname">getIfname</a></li>
  1385. <li data-name="LuCI.network.WifiNetwork#getMeshID"><a href="LuCI.network.WifiNetwork.html#getMeshID">getMeshID</a></li>
  1386. <li data-name="LuCI.network.WifiNetwork#getMode"><a href="LuCI.network.WifiNetwork.html#getMode">getMode</a></li>
  1387. <li data-name="LuCI.network.WifiNetwork#getName"><a href="LuCI.network.WifiNetwork.html#getName">getName</a></li>
  1388. <li data-name="LuCI.network.WifiNetwork#getNetwork"><a href="LuCI.network.WifiNetwork.html#getNetwork">getNetwork</a></li>
  1389. <li data-name="LuCI.network.WifiNetwork#getNetworkNames"><a href="LuCI.network.WifiNetwork.html#getNetworkNames">getNetworkNames</a></li>
  1390. <li data-name="LuCI.network.WifiNetwork#getNetworks"><a href="LuCI.network.WifiNetwork.html#getNetworks">getNetworks</a></li>
  1391. <li data-name="LuCI.network.WifiNetwork#getNoise"><a href="LuCI.network.WifiNetwork.html#getNoise">getNoise</a></li>
  1392. <li data-name="LuCI.network.WifiNetwork#getShortName"><a href="LuCI.network.WifiNetwork.html#getShortName">getShortName</a></li>
  1393. <li data-name="LuCI.network.WifiNetwork#getSignal"><a href="LuCI.network.WifiNetwork.html#getSignal">getSignal</a></li>
  1394. <li data-name="LuCI.network.WifiNetwork#getSignalLevel"><a href="LuCI.network.WifiNetwork.html#getSignalLevel">getSignalLevel</a></li>
  1395. <li data-name="LuCI.network.WifiNetwork#getSignalPercent"><a href="LuCI.network.WifiNetwork.html#getSignalPercent">getSignalPercent</a></li>
  1396. <li data-name="LuCI.network.WifiNetwork#getSSID"><a href="LuCI.network.WifiNetwork.html#getSSID">getSSID</a></li>
  1397. <li data-name="LuCI.network.WifiNetwork#getTXPower"><a href="LuCI.network.WifiNetwork.html#getTXPower">getTXPower</a></li>
  1398. <li data-name="LuCI.network.WifiNetwork#getTXPowerOffset"><a href="LuCI.network.WifiNetwork.html#getTXPowerOffset">getTXPowerOffset</a></li>
  1399. <li data-name="LuCI.network.WifiNetwork#getVlanIfnames"><a href="LuCI.network.WifiNetwork.html#getVlanIfnames">getVlanIfnames</a></li>
  1400. <li data-name="LuCI.network.WifiNetwork#getWifiDevice"><a href="LuCI.network.WifiNetwork.html#getWifiDevice">getWifiDevice</a></li>
  1401. <li data-name="LuCI.network.WifiNetwork#getWifiDeviceName"><a href="LuCI.network.WifiNetwork.html#getWifiDeviceName">getWifiDeviceName</a></li>
  1402. <li data-name="LuCI.network.WifiNetwork#isClientDisconnectSupported"><a href="LuCI.network.WifiNetwork.html#isClientDisconnectSupported">isClientDisconnectSupported</a></li>
  1403. <li data-name="LuCI.network.WifiNetwork#isDisabled"><a href="LuCI.network.WifiNetwork.html#isDisabled">isDisabled</a></li>
  1404. <li data-name="LuCI.network.WifiNetwork#isUp"><a href="LuCI.network.WifiNetwork.html#isUp">isUp</a></li>
  1405. <li data-name="LuCI.network.WifiNetwork#set"><a href="LuCI.network.WifiNetwork.html#set">set</a></li>
  1406. </ul>
  1407. <ul class="events itemMembers">
  1408. </ul>
  1409. </li>
  1410. <li class="item" data-name="LuCI.poll">
  1411. <span class="title">
  1412. <a href="LuCI.poll.html">LuCI.poll</a>
  1413. </span>
  1414. <ul class="members itemMembers">
  1415. </ul>
  1416. <ul class="typedefs itemMembers">
  1417. </ul>
  1418. <ul class="typedefs itemMembers">
  1419. </ul>
  1420. <ul class="methods itemMembers">
  1421. <span class="subtitle">Methods</span>
  1422. <li data-name="LuCI.poll#active"><a href="LuCI.poll.html#active">active</a></li>
  1423. <li data-name="LuCI.poll#add"><a href="LuCI.poll.html#add">add</a></li>
  1424. <li data-name="LuCI.poll#remove"><a href="LuCI.poll.html#remove">remove</a></li>
  1425. <li data-name="LuCI.poll#start"><a href="LuCI.poll.html#start">start</a></li>
  1426. <li data-name="LuCI.poll#stop"><a href="LuCI.poll.html#stop">stop</a></li>
  1427. </ul>
  1428. <ul class="events itemMembers">
  1429. </ul>
  1430. </li>
  1431. <li class="item" data-name="LuCI.request">
  1432. <span class="title">
  1433. <a href="LuCI.request.html">LuCI.request</a>
  1434. </span>
  1435. <ul class="members itemMembers">
  1436. </ul>
  1437. <ul class="typedefs itemMembers">
  1438. <span class="subtitle">Typedefs</span>
  1439. <li data-name="LuCI.request.interceptorFn"><a href="LuCI.request.html#.interceptorFn">interceptorFn</a></li>
  1440. <li data-name="LuCI.request.RequestOptions"><a href="LuCI.request.html#.RequestOptions">RequestOptions</a></li>
  1441. </ul>
  1442. <ul class="typedefs itemMembers">
  1443. </ul>
  1444. <ul class="methods itemMembers">
  1445. <span class="subtitle">Methods</span>
  1446. <li data-name="LuCI.request#addInterceptor"><a href="LuCI.request.html#addInterceptor">addInterceptor</a></li>
  1447. <li data-name="LuCI.request#expandURL"><a href="LuCI.request.html#expandURL">expandURL</a></li>
  1448. <li data-name="LuCI.request#get"><a href="LuCI.request.html#get">get</a></li>
  1449. <li data-name="LuCI.request#post"><a href="LuCI.request.html#post">post</a></li>
  1450. <li data-name="LuCI.request#removeInterceptor"><a href="LuCI.request.html#removeInterceptor">removeInterceptor</a></li>
  1451. <li data-name="LuCI.request#request"><a href="LuCI.request.html#request">request</a></li>
  1452. </ul>
  1453. <ul class="events itemMembers">
  1454. </ul>
  1455. </li>
  1456. <li class="item" data-name="LuCI.request.poll">
  1457. <span class="title">
  1458. <a href="LuCI.request.poll.html">LuCI.request.poll</a>
  1459. </span>
  1460. <ul class="members itemMembers">
  1461. </ul>
  1462. <ul class="typedefs itemMembers">
  1463. <span class="subtitle">Typedefs</span>
  1464. <li data-name="LuCI.request.poll~callbackFn"><a href="LuCI.request.poll.html#~callbackFn">callbackFn</a></li>
  1465. </ul>
  1466. <ul class="typedefs itemMembers">
  1467. </ul>
  1468. <ul class="methods itemMembers">
  1469. <span class="subtitle">Methods</span>
  1470. <li data-name="LuCI.request.poll#active"><a href="LuCI.request.poll.html#active">active</a></li>
  1471. <li data-name="LuCI.request.poll#add"><a href="LuCI.request.poll.html#add">add</a></li>
  1472. <li data-name="LuCI.request.poll#remove"><a href="LuCI.request.poll.html#remove">remove</a></li>
  1473. <li data-name="LuCI.request.poll#start"><a href="LuCI.request.poll.html#start">start</a></li>
  1474. <li data-name="LuCI.request.poll#stop"><a href="LuCI.request.poll.html#stop">stop</a></li>
  1475. </ul>
  1476. <ul class="events itemMembers">
  1477. </ul>
  1478. </li>
  1479. <li class="item" data-name="LuCI.response">
  1480. <span class="title">
  1481. <a href="LuCI.response.html">LuCI.response</a>
  1482. </span>
  1483. <ul class="members itemMembers">
  1484. <span class="subtitle">Members</span>
  1485. <li data-name="LuCI.response#duration"><a href="LuCI.response.html#duration">duration</a></li>
  1486. <li data-name="LuCI.response#headers"><a href="LuCI.response.html#headers">headers</a></li>
  1487. <li data-name="LuCI.response#ok"><a href="LuCI.response.html#ok">ok</a></li>
  1488. <li data-name="LuCI.response#status"><a href="LuCI.response.html#status">status</a></li>
  1489. <li data-name="LuCI.response#statusText"><a href="LuCI.response.html#statusText">statusText</a></li>
  1490. <li data-name="LuCI.response#url"><a href="LuCI.response.html#url">url</a></li>
  1491. </ul>
  1492. <ul class="typedefs itemMembers">
  1493. </ul>
  1494. <ul class="typedefs itemMembers">
  1495. </ul>
  1496. <ul class="methods itemMembers">
  1497. <span class="subtitle">Methods</span>
  1498. <li data-name="LuCI.response#blob"><a href="LuCI.response.html#blob">blob</a></li>
  1499. <li data-name="LuCI.response#clone"><a href="LuCI.response.html#clone">clone</a></li>
  1500. <li data-name="LuCI.response#json"><a href="LuCI.response.html#json">json</a></li>
  1501. <li data-name="LuCI.response#text"><a href="LuCI.response.html#text">text</a></li>
  1502. </ul>
  1503. <ul class="events itemMembers">
  1504. </ul>
  1505. </li>
  1506. <li class="item" data-name="LuCI.rpc">
  1507. <span class="title">
  1508. <a href="LuCI.rpc.html">LuCI.rpc</a>
  1509. </span>
  1510. <ul class="members itemMembers">
  1511. </ul>
  1512. <ul class="typedefs itemMembers">
  1513. <span class="subtitle">Typedefs</span>
  1514. <li data-name="LuCI.rpc.DeclareOptions"><a href="LuCI.rpc.html#.DeclareOptions">DeclareOptions</a></li>
  1515. <li data-name="LuCI.rpc~filterFn"><a href="LuCI.rpc.html#~filterFn">filterFn</a></li>
  1516. <li data-name="LuCI.rpc~interceptorFn"><a href="LuCI.rpc.html#~interceptorFn">interceptorFn</a></li>
  1517. <li data-name="LuCI.rpc~invokeFn"><a href="LuCI.rpc.html#~invokeFn">invokeFn</a></li>
  1518. </ul>
  1519. <ul class="typedefs itemMembers">
  1520. </ul>
  1521. <ul class="methods itemMembers">
  1522. <span class="subtitle">Methods</span>
  1523. <li data-name="LuCI.rpc#addInterceptor"><a href="LuCI.rpc.html#addInterceptor">addInterceptor</a></li>
  1524. <li data-name="LuCI.rpc#declare"><a href="LuCI.rpc.html#declare">declare</a></li>
  1525. <li data-name="LuCI.rpc#getBaseURL"><a href="LuCI.rpc.html#getBaseURL">getBaseURL</a></li>
  1526. <li data-name="LuCI.rpc#getSessionID"><a href="LuCI.rpc.html#getSessionID">getSessionID</a></li>
  1527. <li data-name="LuCI.rpc#getStatusText"><a href="LuCI.rpc.html#getStatusText">getStatusText</a></li>
  1528. <li data-name="LuCI.rpc#list"><a href="LuCI.rpc.html#list">list</a></li>
  1529. <li data-name="LuCI.rpc#removeInterceptor"><a href="LuCI.rpc.html#removeInterceptor">removeInterceptor</a></li>
  1530. <li data-name="LuCI.rpc#setBaseURL"><a href="LuCI.rpc.html#setBaseURL">setBaseURL</a></li>
  1531. <li data-name="LuCI.rpc#setSessionID"><a href="LuCI.rpc.html#setSessionID">setSessionID</a></li>
  1532. </ul>
  1533. <ul class="events itemMembers">
  1534. </ul>
  1535. </li>
  1536. <li class="item" data-name="LuCI.session">
  1537. <span class="title">
  1538. <a href="LuCI.session.html">LuCI.session</a>
  1539. </span>
  1540. <ul class="members itemMembers">
  1541. </ul>
  1542. <ul class="typedefs itemMembers">
  1543. </ul>
  1544. <ul class="typedefs itemMembers">
  1545. </ul>
  1546. <ul class="methods itemMembers">
  1547. <span class="subtitle">Methods</span>
  1548. <li data-name="LuCI.session#getID"><a href="LuCI.session.html#getID">getID</a></li>
  1549. <li data-name="LuCI.session#getLocalData"><a href="LuCI.session.html#getLocalData">getLocalData</a></li>
  1550. <li data-name="LuCI.session#getToken"><a href="LuCI.session.html#getToken">getToken</a></li>
  1551. <li data-name="LuCI.session#setLocalData"><a href="LuCI.session.html#setLocalData">setLocalData</a></li>
  1552. </ul>
  1553. <ul class="events itemMembers">
  1554. </ul>
  1555. </li>
  1556. <li class="item" data-name="LuCI.uci">
  1557. <span class="title">
  1558. <a href="LuCI.uci.html">LuCI.uci</a>
  1559. </span>
  1560. <ul class="members itemMembers">
  1561. </ul>
  1562. <ul class="typedefs itemMembers">
  1563. <span class="subtitle">Typedefs</span>
  1564. <li data-name="LuCI.uci.ChangeRecord"><a href="LuCI.uci.html#.ChangeRecord">ChangeRecord</a></li>
  1565. <li data-name="LuCI.uci.SectionObject"><a href="LuCI.uci.html#.SectionObject">SectionObject</a></li>
  1566. <li data-name="LuCI.uci~sectionsFn"><a href="LuCI.uci.html#~sectionsFn">sectionsFn</a></li>
  1567. </ul>
  1568. <ul class="typedefs itemMembers">
  1569. </ul>
  1570. <ul class="methods itemMembers">
  1571. <span class="subtitle">Methods</span>
  1572. <li data-name="LuCI.uci#add"><a href="LuCI.uci.html#add">add</a></li>
  1573. <li data-name="LuCI.uci#apply"><a href="LuCI.uci.html#apply">apply</a></li>
  1574. <li data-name="LuCI.uci#changes"><a href="LuCI.uci.html#changes">changes</a></li>
  1575. <li data-name="LuCI.uci#clone"><a href="LuCI.uci.html#clone">clone</a></li>
  1576. <li data-name="LuCI.uci#createSID"><a href="LuCI.uci.html#createSID">createSID</a></li>
  1577. <li data-name="LuCI.uci#get"><a href="LuCI.uci.html#get">get</a></li>
  1578. <li data-name="LuCI.uci#get_first"><a href="LuCI.uci.html#get_first">get_first</a></li>
  1579. <li data-name="LuCI.uci#load"><a href="LuCI.uci.html#load">load</a></li>
  1580. <li data-name="LuCI.uci#move"><a href="LuCI.uci.html#move">move</a></li>
  1581. <li data-name="LuCI.uci#remove"><a href="LuCI.uci.html#remove">remove</a></li>
  1582. <li data-name="LuCI.uci#resolveSID"><a href="LuCI.uci.html#resolveSID">resolveSID</a></li>
  1583. <li data-name="LuCI.uci#save"><a href="LuCI.uci.html#save">save</a></li>
  1584. <li data-name="LuCI.uci#sections"><a href="LuCI.uci.html#sections">sections</a></li>
  1585. <li data-name="LuCI.uci#set"><a href="LuCI.uci.html#set">set</a></li>
  1586. <li data-name="LuCI.uci#set_first"><a href="LuCI.uci.html#set_first">set_first</a></li>
  1587. <li data-name="LuCI.uci#unload"><a href="LuCI.uci.html#unload">unload</a></li>
  1588. <li data-name="LuCI.uci#unset"><a href="LuCI.uci.html#unset">unset</a></li>
  1589. <li data-name="LuCI.uci#unset_first"><a href="LuCI.uci.html#unset_first">unset_first</a></li>
  1590. </ul>
  1591. <ul class="events itemMembers">
  1592. </ul>
  1593. </li>
  1594. <li class="item" data-name="LuCI.ui">
  1595. <span class="title">
  1596. <a href="LuCI.ui.html">LuCI.ui</a>
  1597. </span>
  1598. <ul class="members itemMembers">
  1599. </ul>
  1600. <ul class="typedefs itemMembers">
  1601. <span class="subtitle">Typedefs</span>
  1602. <li data-name="LuCI.ui.FileUploadReply"><a href="LuCI.ui.html#.FileUploadReply">FileUploadReply</a></li>
  1603. </ul>
  1604. <ul class="typedefs itemMembers">
  1605. </ul>
  1606. <ul class="methods itemMembers">
  1607. <span class="subtitle">Methods</span>
  1608. <li data-name="LuCI.ui#addNotification"><a href="LuCI.ui.html#addNotification">addNotification</a></li>
  1609. <li data-name="LuCI.ui#addValidator"><a href="LuCI.ui.html#addValidator">addValidator</a></li>
  1610. <li data-name="LuCI.ui#awaitReconnect"><a href="LuCI.ui.html#awaitReconnect">awaitReconnect</a></li>
  1611. <li data-name="LuCI.ui#createHandlerFn"><a href="LuCI.ui.html#createHandlerFn">createHandlerFn</a></li>
  1612. <li data-name="LuCI.ui#hideIndicator"><a href="LuCI.ui.html#hideIndicator">hideIndicator</a></li>
  1613. <li data-name="LuCI.ui#hideModal"><a href="LuCI.ui.html#hideModal">hideModal</a></li>
  1614. <li data-name="LuCI.ui#instantiateView"><a href="LuCI.ui.html#instantiateView">instantiateView</a></li>
  1615. <li data-name="LuCI.ui#itemlist"><a href="LuCI.ui.html#itemlist">itemlist</a></li>
  1616. <li data-name="LuCI.ui#pingDevice"><a href="LuCI.ui.html#pingDevice">pingDevice</a></li>
  1617. <li data-name="LuCI.ui#showIndicator"><a href="LuCI.ui.html#showIndicator">showIndicator</a></li>
  1618. <li data-name="LuCI.ui#showModal"><a href="LuCI.ui.html#showModal">showModal</a></li>
  1619. <li data-name="LuCI.ui#uploadFile"><a href="LuCI.ui.html#uploadFile">uploadFile</a></li>
  1620. </ul>
  1621. <ul class="events itemMembers">
  1622. </ul>
  1623. </li>
  1624. <li class="item" data-name="LuCI.ui.AbstractElement">
  1625. <span class="title">
  1626. <a href="LuCI.ui.AbstractElement.html">LuCI.ui.AbstractElement</a>
  1627. </span>
  1628. <ul class="members itemMembers">
  1629. </ul>
  1630. <ul class="typedefs itemMembers">
  1631. <span class="subtitle">Typedefs</span>
  1632. <li data-name="LuCI.ui.AbstractElement.InitOptions"><a href="LuCI.ui.AbstractElement.html#.InitOptions">InitOptions</a></li>
  1633. </ul>
  1634. <ul class="typedefs itemMembers">
  1635. </ul>
  1636. <ul class="methods itemMembers">
  1637. <span class="subtitle">Methods</span>
  1638. <li data-name="LuCI.ui.AbstractElement#getValidationError"><a href="LuCI.ui.AbstractElement.html#getValidationError">getValidationError</a></li>
  1639. <li data-name="LuCI.ui.AbstractElement#getValue"><a href="LuCI.ui.AbstractElement.html#getValue">getValue</a></li>
  1640. <li data-name="LuCI.ui.AbstractElement#isChanged"><a href="LuCI.ui.AbstractElement.html#isChanged">isChanged</a></li>
  1641. <li data-name="LuCI.ui.AbstractElement#isValid"><a href="LuCI.ui.AbstractElement.html#isValid">isValid</a></li>
  1642. <li data-name="LuCI.ui.AbstractElement#registerEvents"><a href="LuCI.ui.AbstractElement.html#registerEvents">registerEvents</a></li>
  1643. <li data-name="LuCI.ui.AbstractElement#render"><a href="LuCI.ui.AbstractElement.html#render">render</a></li>
  1644. <li data-name="LuCI.ui.AbstractElement#setChangeEvents"><a href="LuCI.ui.AbstractElement.html#setChangeEvents">setChangeEvents</a></li>
  1645. <li data-name="LuCI.ui.AbstractElement#setPlaceholder"><a href="LuCI.ui.AbstractElement.html#setPlaceholder">setPlaceholder</a></li>
  1646. <li data-name="LuCI.ui.AbstractElement#setUpdateEvents"><a href="LuCI.ui.AbstractElement.html#setUpdateEvents">setUpdateEvents</a></li>
  1647. <li data-name="LuCI.ui.AbstractElement#setValue"><a href="LuCI.ui.AbstractElement.html#setValue">setValue</a></li>
  1648. <li data-name="LuCI.ui.AbstractElement#triggerValidation"><a href="LuCI.ui.AbstractElement.html#triggerValidation">triggerValidation</a></li>
  1649. </ul>
  1650. <ul class="events itemMembers">
  1651. </ul>
  1652. </li>
  1653. <li class="item" data-name="LuCI.ui.changes">
  1654. <span class="title">
  1655. <a href="LuCI.ui.changes.html">LuCI.ui.changes</a>
  1656. </span>
  1657. <ul class="members itemMembers">
  1658. </ul>
  1659. <ul class="typedefs itemMembers">
  1660. </ul>
  1661. <ul class="typedefs itemMembers">
  1662. </ul>
  1663. <ul class="methods itemMembers">
  1664. <span class="subtitle">Methods</span>
  1665. <li data-name="LuCI.ui.changes#apply"><a href="LuCI.ui.changes.html#apply">apply</a></li>
  1666. <li data-name="LuCI.ui.changes#displayChanges"><a href="LuCI.ui.changes.html#displayChanges">displayChanges</a></li>
  1667. <li data-name="LuCI.ui.changes#renderChangeIndicator"><a href="LuCI.ui.changes.html#renderChangeIndicator">renderChangeIndicator</a></li>
  1668. <li data-name="LuCI.ui.changes#revert"><a href="LuCI.ui.changes.html#revert">revert</a></li>
  1669. <li data-name="LuCI.ui.changes#setIndicator"><a href="LuCI.ui.changes.html#setIndicator">setIndicator</a></li>
  1670. </ul>
  1671. <ul class="events itemMembers">
  1672. </ul>
  1673. </li>
  1674. <li class="item" data-name="LuCI.ui.Checkbox">
  1675. <span class="title">
  1676. <a href="LuCI.ui.Checkbox.html">LuCI.ui.Checkbox</a>
  1677. </span>
  1678. <ul class="members itemMembers">
  1679. </ul>
  1680. <ul class="typedefs itemMembers">
  1681. <span class="subtitle">Typedefs</span>
  1682. <li data-name="LuCI.ui.Checkbox.InitOptions"><a href="LuCI.ui.Checkbox.html#.InitOptions">InitOptions</a></li>
  1683. </ul>
  1684. <ul class="typedefs itemMembers">
  1685. </ul>
  1686. <ul class="methods itemMembers">
  1687. <span class="subtitle">Methods</span>
  1688. <li data-name="LuCI.ui.Checkbox#getValidationError"><a href="LuCI.ui.Checkbox.html#getValidationError">getValidationError</a></li>
  1689. <li data-name="LuCI.ui.Checkbox#getValue"><a href="LuCI.ui.Checkbox.html#getValue">getValue</a></li>
  1690. <li data-name="LuCI.ui.Checkbox#isChanged"><a href="LuCI.ui.Checkbox.html#isChanged">isChanged</a></li>
  1691. <li data-name="LuCI.ui.Checkbox#isChecked"><a href="LuCI.ui.Checkbox.html#isChecked">isChecked</a></li>
  1692. <li data-name="LuCI.ui.Checkbox#isValid"><a href="LuCI.ui.Checkbox.html#isValid">isValid</a></li>
  1693. <li data-name="LuCI.ui.Checkbox#registerEvents"><a href="LuCI.ui.Checkbox.html#registerEvents">registerEvents</a></li>
  1694. <li data-name="LuCI.ui.Checkbox#render"><a href="LuCI.ui.Checkbox.html#render">render</a></li>
  1695. <li data-name="LuCI.ui.Checkbox#setChangeEvents"><a href="LuCI.ui.Checkbox.html#setChangeEvents">setChangeEvents</a></li>
  1696. <li data-name="LuCI.ui.Checkbox#setPlaceholder"><a href="LuCI.ui.Checkbox.html#setPlaceholder">setPlaceholder</a></li>
  1697. <li data-name="LuCI.ui.Checkbox#setUpdateEvents"><a href="LuCI.ui.Checkbox.html#setUpdateEvents">setUpdateEvents</a></li>
  1698. <li data-name="LuCI.ui.Checkbox#setValue"><a href="LuCI.ui.Checkbox.html#setValue">setValue</a></li>
  1699. <li data-name="LuCI.ui.Checkbox#triggerValidation"><a href="LuCI.ui.Checkbox.html#triggerValidation">triggerValidation</a></li>
  1700. </ul>
  1701. <ul class="events itemMembers">
  1702. </ul>
  1703. </li>
  1704. <li class="item" data-name="LuCI.ui.Combobox">
  1705. <span class="title">
  1706. <a href="LuCI.ui.Combobox.html">LuCI.ui.Combobox</a>
  1707. </span>
  1708. <ul class="members itemMembers">
  1709. </ul>
  1710. <ul class="typedefs itemMembers">
  1711. <span class="subtitle">Typedefs</span>
  1712. <li data-name="LuCI.ui.Combobox.InitOptions"><a href="LuCI.ui.Combobox.html#.InitOptions">InitOptions</a></li>
  1713. </ul>
  1714. <ul class="typedefs itemMembers">
  1715. </ul>
  1716. <ul class="methods itemMembers">
  1717. <span class="subtitle">Methods</span>
  1718. <li data-name="LuCI.ui.Combobox#addChoices"><a href="LuCI.ui.Combobox.html#addChoices">addChoices</a></li>
  1719. <li data-name="LuCI.ui.Combobox#clearChoices"><a href="LuCI.ui.Combobox.html#clearChoices">clearChoices</a></li>
  1720. <li data-name="LuCI.ui.Combobox#closeAllDropdowns"><a href="LuCI.ui.Combobox.html#closeAllDropdowns">closeAllDropdowns</a></li>
  1721. <li data-name="LuCI.ui.Combobox#getValidationError"><a href="LuCI.ui.Combobox.html#getValidationError">getValidationError</a></li>
  1722. <li data-name="LuCI.ui.Combobox#isChanged"><a href="LuCI.ui.Combobox.html#isChanged">isChanged</a></li>
  1723. <li data-name="LuCI.ui.Combobox#isValid"><a href="LuCI.ui.Combobox.html#isValid">isValid</a></li>
  1724. <li data-name="LuCI.ui.Combobox#registerEvents"><a href="LuCI.ui.Combobox.html#registerEvents">registerEvents</a></li>
  1725. <li data-name="LuCI.ui.Combobox#setChangeEvents"><a href="LuCI.ui.Combobox.html#setChangeEvents">setChangeEvents</a></li>
  1726. <li data-name="LuCI.ui.Combobox#setPlaceholder"><a href="LuCI.ui.Combobox.html#setPlaceholder">setPlaceholder</a></li>
  1727. <li data-name="LuCI.ui.Combobox#setUpdateEvents"><a href="LuCI.ui.Combobox.html#setUpdateEvents">setUpdateEvents</a></li>
  1728. <li data-name="LuCI.ui.Combobox#triggerValidation"><a href="LuCI.ui.Combobox.html#triggerValidation">triggerValidation</a></li>
  1729. </ul>
  1730. <ul class="events itemMembers">
  1731. </ul>
  1732. </li>
  1733. <li class="item" data-name="LuCI.ui.ComboButton">
  1734. <span class="title">
  1735. <a href="LuCI.ui.ComboButton.html">LuCI.ui.ComboButton</a>
  1736. </span>
  1737. <ul class="members itemMembers">
  1738. </ul>
  1739. <ul class="typedefs itemMembers">
  1740. <span class="subtitle">Typedefs</span>
  1741. <li data-name="LuCI.ui.ComboButton.InitOptions"><a href="LuCI.ui.ComboButton.html#.InitOptions">InitOptions</a></li>
  1742. </ul>
  1743. <ul class="typedefs itemMembers">
  1744. </ul>
  1745. <ul class="methods itemMembers">
  1746. <span class="subtitle">Methods</span>
  1747. <li data-name="LuCI.ui.ComboButton#addChoices"><a href="LuCI.ui.ComboButton.html#addChoices">addChoices</a></li>
  1748. <li data-name="LuCI.ui.ComboButton#clearChoices"><a href="LuCI.ui.ComboButton.html#clearChoices">clearChoices</a></li>
  1749. <li data-name="LuCI.ui.ComboButton#closeAllDropdowns"><a href="LuCI.ui.ComboButton.html#closeAllDropdowns">closeAllDropdowns</a></li>
  1750. <li data-name="LuCI.ui.ComboButton#getValidationError"><a href="LuCI.ui.ComboButton.html#getValidationError">getValidationError</a></li>
  1751. <li data-name="LuCI.ui.ComboButton#isChanged"><a href="LuCI.ui.ComboButton.html#isChanged">isChanged</a></li>
  1752. <li data-name="LuCI.ui.ComboButton#isValid"><a href="LuCI.ui.ComboButton.html#isValid">isValid</a></li>
  1753. <li data-name="LuCI.ui.ComboButton#registerEvents"><a href="LuCI.ui.ComboButton.html#registerEvents">registerEvents</a></li>
  1754. <li data-name="LuCI.ui.ComboButton#setChangeEvents"><a href="LuCI.ui.ComboButton.html#setChangeEvents">setChangeEvents</a></li>
  1755. <li data-name="LuCI.ui.ComboButton#setPlaceholder"><a href="LuCI.ui.ComboButton.html#setPlaceholder">setPlaceholder</a></li>
  1756. <li data-name="LuCI.ui.ComboButton#setUpdateEvents"><a href="LuCI.ui.ComboButton.html#setUpdateEvents">setUpdateEvents</a></li>
  1757. <li data-name="LuCI.ui.ComboButton#triggerValidation"><a href="LuCI.ui.ComboButton.html#triggerValidation">triggerValidation</a></li>
  1758. </ul>
  1759. <ul class="events itemMembers">
  1760. </ul>
  1761. </li>
  1762. <li class="item" data-name="LuCI.ui.Dropdown">
  1763. <span class="title">
  1764. <a href="LuCI.ui.Dropdown.html">LuCI.ui.Dropdown</a>
  1765. </span>
  1766. <ul class="members itemMembers">
  1767. </ul>
  1768. <ul class="typedefs itemMembers">
  1769. <span class="subtitle">Typedefs</span>
  1770. <li data-name="LuCI.ui.Dropdown.InitOptions"><a href="LuCI.ui.Dropdown.html#.InitOptions">InitOptions</a></li>
  1771. </ul>
  1772. <ul class="typedefs itemMembers">
  1773. </ul>
  1774. <ul class="methods itemMembers">
  1775. <span class="subtitle">Methods</span>
  1776. <li data-name="LuCI.ui.Dropdown#addChoices"><a href="LuCI.ui.Dropdown.html#addChoices">addChoices</a></li>
  1777. <li data-name="LuCI.ui.Dropdown#clearChoices"><a href="LuCI.ui.Dropdown.html#clearChoices">clearChoices</a></li>
  1778. <li data-name="LuCI.ui.Dropdown#closeAllDropdowns"><a href="LuCI.ui.Dropdown.html#closeAllDropdowns">closeAllDropdowns</a></li>
  1779. <li data-name="LuCI.ui.Dropdown#getValidationError"><a href="LuCI.ui.Dropdown.html#getValidationError">getValidationError</a></li>
  1780. <li data-name="LuCI.ui.Dropdown#getValue"><a href="LuCI.ui.Dropdown.html#getValue">getValue</a></li>
  1781. <li data-name="LuCI.ui.Dropdown#isChanged"><a href="LuCI.ui.Dropdown.html#isChanged">isChanged</a></li>
  1782. <li data-name="LuCI.ui.Dropdown#isValid"><a href="LuCI.ui.Dropdown.html#isValid">isValid</a></li>
  1783. <li data-name="LuCI.ui.Dropdown#registerEvents"><a href="LuCI.ui.Dropdown.html#registerEvents">registerEvents</a></li>
  1784. <li data-name="LuCI.ui.Dropdown#render"><a href="LuCI.ui.Dropdown.html#render">render</a></li>
  1785. <li data-name="LuCI.ui.Dropdown#setChangeEvents"><a href="LuCI.ui.Dropdown.html#setChangeEvents">setChangeEvents</a></li>
  1786. <li data-name="LuCI.ui.Dropdown#setPlaceholder"><a href="LuCI.ui.Dropdown.html#setPlaceholder">setPlaceholder</a></li>
  1787. <li data-name="LuCI.ui.Dropdown#setUpdateEvents"><a href="LuCI.ui.Dropdown.html#setUpdateEvents">setUpdateEvents</a></li>
  1788. <li data-name="LuCI.ui.Dropdown#setValue"><a href="LuCI.ui.Dropdown.html#setValue">setValue</a></li>
  1789. <li data-name="LuCI.ui.Dropdown#triggerValidation"><a href="LuCI.ui.Dropdown.html#triggerValidation">triggerValidation</a></li>
  1790. </ul>
  1791. <ul class="events itemMembers">
  1792. </ul>
  1793. </li>
  1794. <li class="item" data-name="LuCI.ui.DynamicList">
  1795. <span class="title">
  1796. <a href="LuCI.ui.DynamicList.html">LuCI.ui.DynamicList</a>
  1797. </span>
  1798. <ul class="members itemMembers">
  1799. </ul>
  1800. <ul class="typedefs itemMembers">
  1801. <span class="subtitle">Typedefs</span>
  1802. <li data-name="LuCI.ui.DynamicList.InitOptions"><a href="LuCI.ui.DynamicList.html#.InitOptions">InitOptions</a></li>
  1803. </ul>
  1804. <ul class="typedefs itemMembers">
  1805. </ul>
  1806. <ul class="methods itemMembers">
  1807. <span class="subtitle">Methods</span>
  1808. <li data-name="LuCI.ui.DynamicList#addChoices"><a href="LuCI.ui.DynamicList.html#addChoices">addChoices</a></li>
  1809. <li data-name="LuCI.ui.DynamicList#clearChoices"><a href="LuCI.ui.DynamicList.html#clearChoices">clearChoices</a></li>
  1810. <li data-name="LuCI.ui.DynamicList#getValidationError"><a href="LuCI.ui.DynamicList.html#getValidationError">getValidationError</a></li>
  1811. <li data-name="LuCI.ui.DynamicList#getValue"><a href="LuCI.ui.DynamicList.html#getValue">getValue</a></li>
  1812. <li data-name="LuCI.ui.DynamicList#isChanged"><a href="LuCI.ui.DynamicList.html#isChanged">isChanged</a></li>
  1813. <li data-name="LuCI.ui.DynamicList#isValid"><a href="LuCI.ui.DynamicList.html#isValid">isValid</a></li>
  1814. <li data-name="LuCI.ui.DynamicList#registerEvents"><a href="LuCI.ui.DynamicList.html#registerEvents">registerEvents</a></li>
  1815. <li data-name="LuCI.ui.DynamicList#render"><a href="LuCI.ui.DynamicList.html#render">render</a></li>
  1816. <li data-name="LuCI.ui.DynamicList#setChangeEvents"><a href="LuCI.ui.DynamicList.html#setChangeEvents">setChangeEvents</a></li>
  1817. <li data-name="LuCI.ui.DynamicList#setPlaceholder"><a href="LuCI.ui.DynamicList.html#setPlaceholder">setPlaceholder</a></li>
  1818. <li data-name="LuCI.ui.DynamicList#setUpdateEvents"><a href="LuCI.ui.DynamicList.html#setUpdateEvents">setUpdateEvents</a></li>
  1819. <li data-name="LuCI.ui.DynamicList#setValue"><a href="LuCI.ui.DynamicList.html#setValue">setValue</a></li>
  1820. <li data-name="LuCI.ui.DynamicList#triggerValidation"><a href="LuCI.ui.DynamicList.html#triggerValidation">triggerValidation</a></li>
  1821. </ul>
  1822. <ul class="events itemMembers">
  1823. </ul>
  1824. </li>
  1825. <li class="item" data-name="LuCI.ui.FileUpload">
  1826. <span class="title">
  1827. <a href="LuCI.ui.FileUpload.html">LuCI.ui.FileUpload</a>
  1828. </span>
  1829. <ul class="members itemMembers">
  1830. </ul>
  1831. <ul class="typedefs itemMembers">
  1832. <span class="subtitle">Typedefs</span>
  1833. <li data-name="LuCI.ui.FileUpload.InitOptions"><a href="LuCI.ui.FileUpload.html#.InitOptions">InitOptions</a></li>
  1834. </ul>
  1835. <ul class="typedefs itemMembers">
  1836. </ul>
  1837. <ul class="methods itemMembers">
  1838. <span class="subtitle">Methods</span>
  1839. <li data-name="LuCI.ui.FileUpload#getValidationError"><a href="LuCI.ui.FileUpload.html#getValidationError">getValidationError</a></li>
  1840. <li data-name="LuCI.ui.FileUpload#getValue"><a href="LuCI.ui.FileUpload.html#getValue">getValue</a></li>
  1841. <li data-name="LuCI.ui.FileUpload#isChanged"><a href="LuCI.ui.FileUpload.html#isChanged">isChanged</a></li>
  1842. <li data-name="LuCI.ui.FileUpload#isValid"><a href="LuCI.ui.FileUpload.html#isValid">isValid</a></li>
  1843. <li data-name="LuCI.ui.FileUpload#registerEvents"><a href="LuCI.ui.FileUpload.html#registerEvents">registerEvents</a></li>
  1844. <li data-name="LuCI.ui.FileUpload#render"><a href="LuCI.ui.FileUpload.html#render">render</a></li>
  1845. <li data-name="LuCI.ui.FileUpload#setChangeEvents"><a href="LuCI.ui.FileUpload.html#setChangeEvents">setChangeEvents</a></li>
  1846. <li data-name="LuCI.ui.FileUpload#setPlaceholder"><a href="LuCI.ui.FileUpload.html#setPlaceholder">setPlaceholder</a></li>
  1847. <li data-name="LuCI.ui.FileUpload#setUpdateEvents"><a href="LuCI.ui.FileUpload.html#setUpdateEvents">setUpdateEvents</a></li>
  1848. <li data-name="LuCI.ui.FileUpload#setValue"><a href="LuCI.ui.FileUpload.html#setValue">setValue</a></li>
  1849. <li data-name="LuCI.ui.FileUpload#triggerValidation"><a href="LuCI.ui.FileUpload.html#triggerValidation">triggerValidation</a></li>
  1850. </ul>
  1851. <ul class="events itemMembers">
  1852. </ul>
  1853. </li>
  1854. <li class="item" data-name="LuCI.ui.Hiddenfield">
  1855. <span class="title">
  1856. <a href="LuCI.ui.Hiddenfield.html">LuCI.ui.Hiddenfield</a>
  1857. </span>
  1858. <ul class="members itemMembers">
  1859. </ul>
  1860. <ul class="typedefs itemMembers">
  1861. </ul>
  1862. <ul class="typedefs itemMembers">
  1863. </ul>
  1864. <ul class="methods itemMembers">
  1865. <span class="subtitle">Methods</span>
  1866. <li data-name="LuCI.ui.Hiddenfield#getValidationError"><a href="LuCI.ui.Hiddenfield.html#getValidationError">getValidationError</a></li>
  1867. <li data-name="LuCI.ui.Hiddenfield#getValue"><a href="LuCI.ui.Hiddenfield.html#getValue">getValue</a></li>
  1868. <li data-name="LuCI.ui.Hiddenfield#isChanged"><a href="LuCI.ui.Hiddenfield.html#isChanged">isChanged</a></li>
  1869. <li data-name="LuCI.ui.Hiddenfield#isValid"><a href="LuCI.ui.Hiddenfield.html#isValid">isValid</a></li>
  1870. <li data-name="LuCI.ui.Hiddenfield#registerEvents"><a href="LuCI.ui.Hiddenfield.html#registerEvents">registerEvents</a></li>
  1871. <li data-name="LuCI.ui.Hiddenfield#render"><a href="LuCI.ui.Hiddenfield.html#render">render</a></li>
  1872. <li data-name="LuCI.ui.Hiddenfield#setChangeEvents"><a href="LuCI.ui.Hiddenfield.html#setChangeEvents">setChangeEvents</a></li>
  1873. <li data-name="LuCI.ui.Hiddenfield#setPlaceholder"><a href="LuCI.ui.Hiddenfield.html#setPlaceholder">setPlaceholder</a></li>
  1874. <li data-name="LuCI.ui.Hiddenfield#setUpdateEvents"><a href="LuCI.ui.Hiddenfield.html#setUpdateEvents">setUpdateEvents</a></li>
  1875. <li data-name="LuCI.ui.Hiddenfield#setValue"><a href="LuCI.ui.Hiddenfield.html#setValue">setValue</a></li>
  1876. <li data-name="LuCI.ui.Hiddenfield#triggerValidation"><a href="LuCI.ui.Hiddenfield.html#triggerValidation">triggerValidation</a></li>
  1877. </ul>
  1878. <ul class="events itemMembers">
  1879. </ul>
  1880. </li>
  1881. <li class="item" data-name="LuCI.ui.menu">
  1882. <span class="title">
  1883. <a href="LuCI.ui.menu.html">LuCI.ui.menu</a>
  1884. </span>
  1885. <ul class="members itemMembers">
  1886. </ul>
  1887. <ul class="typedefs itemMembers">
  1888. <span class="subtitle">Typedefs</span>
  1889. <li data-name="LuCI.ui.menu.MenuNode"><a href="LuCI.ui.menu.html#.MenuNode">MenuNode</a></li>
  1890. </ul>
  1891. <ul class="typedefs itemMembers">
  1892. </ul>
  1893. <ul class="methods itemMembers">
  1894. <span class="subtitle">Methods</span>
  1895. <li data-name="LuCI.ui.menu#flushCache"><a href="LuCI.ui.menu.html#flushCache">flushCache</a></li>
  1896. <li data-name="LuCI.ui.menu#getChildren"><a href="LuCI.ui.menu.html#getChildren">getChildren</a></li>
  1897. <li data-name="LuCI.ui.menu#load"><a href="LuCI.ui.menu.html#load">load</a></li>
  1898. </ul>
  1899. <ul class="events itemMembers">
  1900. </ul>
  1901. </li>
  1902. <li class="item" data-name="LuCI.ui.Select">
  1903. <span class="title">
  1904. <a href="LuCI.ui.Select.html">LuCI.ui.Select</a>
  1905. </span>
  1906. <ul class="members itemMembers">
  1907. </ul>
  1908. <ul class="typedefs itemMembers">
  1909. <span class="subtitle">Typedefs</span>
  1910. <li data-name="LuCI.ui.Select.InitOptions"><a href="LuCI.ui.Select.html#.InitOptions">InitOptions</a></li>
  1911. </ul>
  1912. <ul class="typedefs itemMembers">
  1913. </ul>
  1914. <ul class="methods itemMembers">
  1915. <span class="subtitle">Methods</span>
  1916. <li data-name="LuCI.ui.Select#getValidationError"><a href="LuCI.ui.Select.html#getValidationError">getValidationError</a></li>
  1917. <li data-name="LuCI.ui.Select#getValue"><a href="LuCI.ui.Select.html#getValue">getValue</a></li>
  1918. <li data-name="LuCI.ui.Select#isChanged"><a href="LuCI.ui.Select.html#isChanged">isChanged</a></li>
  1919. <li data-name="LuCI.ui.Select#isValid"><a href="LuCI.ui.Select.html#isValid">isValid</a></li>
  1920. <li data-name="LuCI.ui.Select#registerEvents"><a href="LuCI.ui.Select.html#registerEvents">registerEvents</a></li>
  1921. <li data-name="LuCI.ui.Select#render"><a href="LuCI.ui.Select.html#render">render</a></li>
  1922. <li data-name="LuCI.ui.Select#setChangeEvents"><a href="LuCI.ui.Select.html#setChangeEvents">setChangeEvents</a></li>
  1923. <li data-name="LuCI.ui.Select#setPlaceholder"><a href="LuCI.ui.Select.html#setPlaceholder">setPlaceholder</a></li>
  1924. <li data-name="LuCI.ui.Select#setUpdateEvents"><a href="LuCI.ui.Select.html#setUpdateEvents">setUpdateEvents</a></li>
  1925. <li data-name="LuCI.ui.Select#setValue"><a href="LuCI.ui.Select.html#setValue">setValue</a></li>
  1926. <li data-name="LuCI.ui.Select#triggerValidation"><a href="LuCI.ui.Select.html#triggerValidation">triggerValidation</a></li>
  1927. </ul>
  1928. <ul class="events itemMembers">
  1929. </ul>
  1930. </li>
  1931. <li class="item" data-name="LuCI.ui.tabs">
  1932. <span class="title">
  1933. <a href="LuCI.ui.tabs.html">LuCI.ui.tabs</a>
  1934. </span>
  1935. <ul class="members itemMembers">
  1936. </ul>
  1937. <ul class="typedefs itemMembers">
  1938. </ul>
  1939. <ul class="typedefs itemMembers">
  1940. </ul>
  1941. <ul class="methods itemMembers">
  1942. <span class="subtitle">Methods</span>
  1943. <li data-name="LuCI.ui.tabs#initTabGroup"><a href="LuCI.ui.tabs.html#initTabGroup">initTabGroup</a></li>
  1944. <li data-name="LuCI.ui.tabs#isEmptyPane"><a href="LuCI.ui.tabs.html#isEmptyPane">isEmptyPane</a></li>
  1945. </ul>
  1946. <ul class="events itemMembers">
  1947. </ul>
  1948. </li>
  1949. <li class="item" data-name="LuCI.ui.Textarea">
  1950. <span class="title">
  1951. <a href="LuCI.ui.Textarea.html">LuCI.ui.Textarea</a>
  1952. </span>
  1953. <ul class="members itemMembers">
  1954. </ul>
  1955. <ul class="typedefs itemMembers">
  1956. <span class="subtitle">Typedefs</span>
  1957. <li data-name="LuCI.ui.Textarea.InitOptions"><a href="LuCI.ui.Textarea.html#.InitOptions">InitOptions</a></li>
  1958. </ul>
  1959. <ul class="typedefs itemMembers">
  1960. </ul>
  1961. <ul class="methods itemMembers">
  1962. <span class="subtitle">Methods</span>
  1963. <li data-name="LuCI.ui.Textarea#getValidationError"><a href="LuCI.ui.Textarea.html#getValidationError">getValidationError</a></li>
  1964. <li data-name="LuCI.ui.Textarea#getValue"><a href="LuCI.ui.Textarea.html#getValue">getValue</a></li>
  1965. <li data-name="LuCI.ui.Textarea#isChanged"><a href="LuCI.ui.Textarea.html#isChanged">isChanged</a></li>
  1966. <li data-name="LuCI.ui.Textarea#isValid"><a href="LuCI.ui.Textarea.html#isValid">isValid</a></li>
  1967. <li data-name="LuCI.ui.Textarea#registerEvents"><a href="LuCI.ui.Textarea.html#registerEvents">registerEvents</a></li>
  1968. <li data-name="LuCI.ui.Textarea#render"><a href="LuCI.ui.Textarea.html#render">render</a></li>
  1969. <li data-name="LuCI.ui.Textarea#setChangeEvents"><a href="LuCI.ui.Textarea.html#setChangeEvents">setChangeEvents</a></li>
  1970. <li data-name="LuCI.ui.Textarea#setPlaceholder"><a href="LuCI.ui.Textarea.html#setPlaceholder">setPlaceholder</a></li>
  1971. <li data-name="LuCI.ui.Textarea#setUpdateEvents"><a href="LuCI.ui.Textarea.html#setUpdateEvents">setUpdateEvents</a></li>
  1972. <li data-name="LuCI.ui.Textarea#setValue"><a href="LuCI.ui.Textarea.html#setValue">setValue</a></li>
  1973. <li data-name="LuCI.ui.Textarea#triggerValidation"><a href="LuCI.ui.Textarea.html#triggerValidation">triggerValidation</a></li>
  1974. </ul>
  1975. <ul class="events itemMembers">
  1976. </ul>
  1977. </li>
  1978. <li class="item" data-name="LuCI.ui.Textfield">
  1979. <span class="title">
  1980. <a href="LuCI.ui.Textfield.html">LuCI.ui.Textfield</a>
  1981. </span>
  1982. <ul class="members itemMembers">
  1983. </ul>
  1984. <ul class="typedefs itemMembers">
  1985. <span class="subtitle">Typedefs</span>
  1986. <li data-name="LuCI.ui.Textfield.InitOptions"><a href="LuCI.ui.Textfield.html#.InitOptions">InitOptions</a></li>
  1987. </ul>
  1988. <ul class="typedefs itemMembers">
  1989. </ul>
  1990. <ul class="methods itemMembers">
  1991. <span class="subtitle">Methods</span>
  1992. <li data-name="LuCI.ui.Textfield#getValidationError"><a href="LuCI.ui.Textfield.html#getValidationError">getValidationError</a></li>
  1993. <li data-name="LuCI.ui.Textfield#getValue"><a href="LuCI.ui.Textfield.html#getValue">getValue</a></li>
  1994. <li data-name="LuCI.ui.Textfield#isChanged"><a href="LuCI.ui.Textfield.html#isChanged">isChanged</a></li>
  1995. <li data-name="LuCI.ui.Textfield#isValid"><a href="LuCI.ui.Textfield.html#isValid">isValid</a></li>
  1996. <li data-name="LuCI.ui.Textfield#registerEvents"><a href="LuCI.ui.Textfield.html#registerEvents">registerEvents</a></li>
  1997. <li data-name="LuCI.ui.Textfield#render"><a href="LuCI.ui.Textfield.html#render">render</a></li>
  1998. <li data-name="LuCI.ui.Textfield#setChangeEvents"><a href="LuCI.ui.Textfield.html#setChangeEvents">setChangeEvents</a></li>
  1999. <li data-name="LuCI.ui.Textfield#setPlaceholder"><a href="LuCI.ui.Textfield.html#setPlaceholder">setPlaceholder</a></li>
  2000. <li data-name="LuCI.ui.Textfield#setUpdateEvents"><a href="LuCI.ui.Textfield.html#setUpdateEvents">setUpdateEvents</a></li>
  2001. <li data-name="LuCI.ui.Textfield#setValue"><a href="LuCI.ui.Textfield.html#setValue">setValue</a></li>
  2002. <li data-name="LuCI.ui.Textfield#triggerValidation"><a href="LuCI.ui.Textfield.html#triggerValidation">triggerValidation</a></li>
  2003. </ul>
  2004. <ul class="events itemMembers">
  2005. </ul>
  2006. </li>
  2007. <li class="item" data-name="LuCI.view">
  2008. <span class="title">
  2009. <a href="LuCI.view.html">LuCI.view</a>
  2010. </span>
  2011. <ul class="members itemMembers">
  2012. </ul>
  2013. <ul class="typedefs itemMembers">
  2014. </ul>
  2015. <ul class="typedefs itemMembers">
  2016. </ul>
  2017. <ul class="methods itemMembers">
  2018. <span class="subtitle">Methods</span>
  2019. <li data-name="LuCI.view#addFooter"><a href="LuCI.view.html#addFooter">addFooter</a></li>
  2020. <li data-name="LuCI.view#handleReset"><a href="LuCI.view.html#handleReset">handleReset</a></li>
  2021. <li data-name="LuCI.view#handleSave"><a href="LuCI.view.html#handleSave">handleSave</a></li>
  2022. <li data-name="LuCI.view#handleSaveApply"><a href="LuCI.view.html#handleSaveApply">handleSaveApply</a></li>
  2023. <li data-name="LuCI.view#load"><a href="LuCI.view.html#load">load</a></li>
  2024. <li data-name="LuCI.view#render"><a href="LuCI.view.html#render">render</a></li>
  2025. </ul>
  2026. <ul class="events itemMembers">
  2027. </ul>
  2028. </li>
  2029. <li class="item" data-name="LuCI.xhr">
  2030. <span class="title">
  2031. <a href="LuCI.xhr.html">LuCI.xhr</a>
  2032. </span>
  2033. <ul class="members itemMembers">
  2034. </ul>
  2035. <ul class="typedefs itemMembers">
  2036. </ul>
  2037. <ul class="typedefs itemMembers">
  2038. </ul>
  2039. <ul class="methods itemMembers">
  2040. <span class="subtitle">Methods</span>
  2041. <li data-name="LuCI.xhr#abort"><a href="LuCI.xhr.html#abort">abort</a></li>
  2042. <li data-name="LuCI.xhr#busy"><a href="LuCI.xhr.html#busy">busy</a></li>
  2043. <li data-name="LuCI.xhr#cancel"><a href="LuCI.xhr.html#cancel">cancel</a></li>
  2044. <li data-name="LuCI.xhr#get"><a href="LuCI.xhr.html#get">get</a></li>
  2045. <li data-name="LuCI.xhr#post"><a href="LuCI.xhr.html#post">post</a></li>
  2046. <li data-name="LuCI.xhr#send_form"><a href="LuCI.xhr.html#send_form">send_form</a></li>
  2047. </ul>
  2048. <ul class="events itemMembers">
  2049. </ul>
  2050. </li>
  2051. </ul>
  2052. </div>
  2053. <div class="main">
  2054. <h1 class="page-title" data-filename="network.js.html">Source: network.js</h1>
  2055. <section>
  2056. <article>
  2057. <pre id="source-code" class="prettyprint source "><code>'use strict';
  2058. 'require uci';
  2059. 'require rpc';
  2060. 'require validation';
  2061. 'require baseclass';
  2062. 'require firewall';
  2063. var proto_errors = {
  2064. CONNECT_FAILED: _('Connection attempt failed'),
  2065. INVALID_ADDRESS: _('IP address is invalid'),
  2066. INVALID_GATEWAY: _('Gateway address is invalid'),
  2067. INVALID_LOCAL_ADDRESS: _('Local IP address is invalid'),
  2068. MISSING_ADDRESS: _('IP address is missing'),
  2069. MISSING_PEER_ADDRESS: _('Peer address is missing'),
  2070. NO_DEVICE: _('Network device is not present'),
  2071. NO_IFACE: _('Unable to determine device name'),
  2072. NO_IFNAME: _('Unable to determine device name'),
  2073. NO_WAN_ADDRESS: _('Unable to determine external IP address'),
  2074. NO_WAN_LINK: _('Unable to determine upstream interface'),
  2075. PEER_RESOLVE_FAIL: _('Unable to resolve peer host name'),
  2076. PIN_FAILED: _('PIN code rejected')
  2077. };
  2078. var iface_patterns_ignore = [
  2079. /^wmaster\d+/,
  2080. /^wifi\d+/,
  2081. /^hwsim\d+/,
  2082. /^imq\d+/,
  2083. /^ifb\d+/,
  2084. /^mon\.wlan\d+/,
  2085. /^sit\d+/,
  2086. /^gre\d+/,
  2087. /^gretap\d+/,
  2088. /^ip6gre\d+/,
  2089. /^ip6tnl\d+/,
  2090. /^tunl\d+/,
  2091. /^lo$/
  2092. ];
  2093. var iface_patterns_wireless = [
  2094. /^wlan\d+/,
  2095. /^wl\d+/,
  2096. /^ath\d+/,
  2097. /^\w+\.network\d+/
  2098. ];
  2099. var iface_patterns_virtual = [ ];
  2100. var callLuciNetworkDevices = rpc.declare({
  2101. object: 'luci-rpc',
  2102. method: 'getNetworkDevices',
  2103. expect: { '': {} }
  2104. });
  2105. var callLuciWirelessDevices = rpc.declare({
  2106. object: 'luci-rpc',
  2107. method: 'getWirelessDevices',
  2108. expect: { '': {} }
  2109. });
  2110. var callLuciBoardJSON = rpc.declare({
  2111. object: 'luci-rpc',
  2112. method: 'getBoardJSON'
  2113. });
  2114. var callLuciHostHints = rpc.declare({
  2115. object: 'luci-rpc',
  2116. method: 'getHostHints',
  2117. expect: { '': {} }
  2118. });
  2119. var callIwinfoAssoclist = rpc.declare({
  2120. object: 'iwinfo',
  2121. method: 'assoclist',
  2122. params: [ 'device', 'mac' ],
  2123. expect: { results: [] }
  2124. });
  2125. var callIwinfoScan = rpc.declare({
  2126. object: 'iwinfo',
  2127. method: 'scan',
  2128. params: [ 'device' ],
  2129. nobatch: true,
  2130. expect: { results: [] }
  2131. });
  2132. var callNetworkInterfaceDump = rpc.declare({
  2133. object: 'network.interface',
  2134. method: 'dump',
  2135. expect: { 'interface': [] }
  2136. });
  2137. var callNetworkProtoHandlers = rpc.declare({
  2138. object: 'network',
  2139. method: 'get_proto_handlers',
  2140. expect: { '': {} }
  2141. });
  2142. var _init = null,
  2143. _state = null,
  2144. _protocols = {},
  2145. _protospecs = {};
  2146. function getProtocolHandlers(cache) {
  2147. return callNetworkProtoHandlers().then(function(protos) {
  2148. /* Register "none" protocol */
  2149. if (!protos.hasOwnProperty('none'))
  2150. Object.assign(protos, { none: { no_device: false } });
  2151. /* Hack: emulate relayd protocol */
  2152. if (!protos.hasOwnProperty('relay') &amp;&amp; L.hasSystemFeature('relayd'))
  2153. Object.assign(protos, { relay: { no_device: true } });
  2154. Object.assign(_protospecs, protos);
  2155. return Promise.all(Object.keys(protos).map(function(p) {
  2156. return Promise.resolve(L.require('protocol.%s'.format(p))).catch(function(err) {
  2157. if (L.isObject(err) &amp;&amp; err.name != 'NetworkError')
  2158. L.error(err);
  2159. });
  2160. })).then(function() {
  2161. return protos;
  2162. });
  2163. }).catch(function() {
  2164. return {};
  2165. });
  2166. }
  2167. function getWifiStateBySid(sid) {
  2168. var s = uci.get('wireless', sid);
  2169. if (s != null &amp;&amp; s['.type'] == 'wifi-iface') {
  2170. for (var radioname in _state.radios) {
  2171. for (var i = 0; i &lt; _state.radios[radioname].interfaces.length; i++) {
  2172. var netstate = _state.radios[radioname].interfaces[i];
  2173. if (typeof(netstate.section) != 'string')
  2174. continue;
  2175. var s2 = uci.get('wireless', netstate.section);
  2176. if (s2 != null &amp;&amp; s['.type'] == s2['.type'] &amp;&amp; s['.name'] == s2['.name']) {
  2177. if (s2['.anonymous'] == false &amp;&amp; netstate.section.charAt(0) == '@')
  2178. return null;
  2179. return [ radioname, _state.radios[radioname], netstate ];
  2180. }
  2181. }
  2182. }
  2183. }
  2184. return null;
  2185. }
  2186. function getWifiStateByIfname(ifname) {
  2187. for (var radioname in _state.radios) {
  2188. for (var i = 0; i &lt; _state.radios[radioname].interfaces.length; i++) {
  2189. var netstate = _state.radios[radioname].interfaces[i];
  2190. if (typeof(netstate.ifname) != 'string')
  2191. continue;
  2192. if (netstate.ifname == ifname)
  2193. return [ radioname, _state.radios[radioname], netstate ];
  2194. }
  2195. }
  2196. return null;
  2197. }
  2198. function isWifiIfname(ifname) {
  2199. for (var i = 0; i &lt; iface_patterns_wireless.length; i++)
  2200. if (iface_patterns_wireless[i].test(ifname))
  2201. return true;
  2202. return false;
  2203. }
  2204. function getWifiSidByNetid(netid) {
  2205. var m = /^(\w+)\.network(\d+)$/.exec(netid);
  2206. if (m) {
  2207. var sections = uci.sections('wireless', 'wifi-iface');
  2208. for (var i = 0, n = 0; i &lt; sections.length; i++) {
  2209. if (sections[i].device != m[1])
  2210. continue;
  2211. if (++n == +m[2])
  2212. return sections[i]['.name'];
  2213. }
  2214. }
  2215. return null;
  2216. }
  2217. function getWifiSidByIfname(ifname) {
  2218. var sid = getWifiSidByNetid(ifname);
  2219. if (sid != null)
  2220. return sid;
  2221. var res = getWifiStateByIfname(ifname);
  2222. if (res != null &amp;&amp; L.isObject(res[2]) &amp;&amp; typeof(res[2].section) == 'string')
  2223. return res[2].section;
  2224. return null;
  2225. }
  2226. function getWifiNetidBySid(sid) {
  2227. var s = uci.get('wireless', sid);
  2228. if (s != null &amp;&amp; s['.type'] == 'wifi-iface') {
  2229. var radioname = s.device;
  2230. if (typeof(radioname) == 'string') {
  2231. var sections = uci.sections('wireless', 'wifi-iface');
  2232. for (var i = 0, n = 0; i &lt; sections.length; i++) {
  2233. if (sections[i].device != s.device)
  2234. continue;
  2235. n++;
  2236. if (sections[i]['.name'] != s['.name'])
  2237. continue;
  2238. return [ '%s.network%d'.format(s.device, n), s.device ];
  2239. }
  2240. }
  2241. }
  2242. return null;
  2243. }
  2244. function getWifiNetidByNetname(name) {
  2245. var sections = uci.sections('wireless', 'wifi-iface');
  2246. for (var i = 0; i &lt; sections.length; i++) {
  2247. if (typeof(sections[i].network) != 'string')
  2248. continue;
  2249. var nets = sections[i].network.split(/\s+/);
  2250. for (var j = 0; j &lt; nets.length; j++) {
  2251. if (nets[j] != name)
  2252. continue;
  2253. return getWifiNetidBySid(sections[i]['.name']);
  2254. }
  2255. }
  2256. return null;
  2257. }
  2258. function isVirtualIfname(ifname) {
  2259. for (var i = 0; i &lt; iface_patterns_virtual.length; i++)
  2260. if (iface_patterns_virtual[i].test(ifname))
  2261. return true;
  2262. return false;
  2263. }
  2264. function isIgnoredIfname(ifname) {
  2265. for (var i = 0; i &lt; iface_patterns_ignore.length; i++)
  2266. if (iface_patterns_ignore[i].test(ifname))
  2267. return true;
  2268. return false;
  2269. }
  2270. function appendValue(config, section, option, value) {
  2271. var values = uci.get(config, section, option),
  2272. isArray = Array.isArray(values),
  2273. rv = false;
  2274. if (isArray == false)
  2275. values = L.toArray(values);
  2276. if (values.indexOf(value) == -1) {
  2277. values.push(value);
  2278. rv = true;
  2279. }
  2280. uci.set(config, section, option, isArray ? values : values.join(' '));
  2281. return rv;
  2282. }
  2283. function removeValue(config, section, option, value) {
  2284. var values = uci.get(config, section, option),
  2285. isArray = Array.isArray(values),
  2286. rv = false;
  2287. if (isArray == false)
  2288. values = L.toArray(values);
  2289. for (var i = values.length - 1; i >= 0; i--) {
  2290. if (values[i] == value) {
  2291. values.splice(i, 1);
  2292. rv = true;
  2293. }
  2294. }
  2295. if (values.length > 0)
  2296. uci.set(config, section, option, isArray ? values : values.join(' '));
  2297. else
  2298. uci.unset(config, section, option);
  2299. return rv;
  2300. }
  2301. function prefixToMask(bits, v6) {
  2302. var w = v6 ? 128 : 32,
  2303. m = [];
  2304. if (bits > w)
  2305. return null;
  2306. for (var i = 0; i &lt; w / 16; i++) {
  2307. var b = Math.min(16, bits);
  2308. m.push((0xffff &lt;&lt; (16 - b)) &amp; 0xffff);
  2309. bits -= b;
  2310. }
  2311. if (v6)
  2312. return String.prototype.format.apply('%x:%x:%x:%x:%x:%x:%x:%x', m).replace(/:0(?::0)+$/, '::');
  2313. else
  2314. return '%d.%d.%d.%d'.format(m[0] >>> 8, m[0] &amp; 0xff, m[1] >>> 8, m[1] &amp; 0xff);
  2315. }
  2316. function maskToPrefix(mask, v6) {
  2317. var m = v6 ? validation.parseIPv6(mask) : validation.parseIPv4(mask);
  2318. if (!m)
  2319. return null;
  2320. var bits = 0;
  2321. for (var i = 0, z = false; i &lt; m.length; i++) {
  2322. z = z || !m[i];
  2323. while (!z &amp;&amp; (m[i] &amp; (v6 ? 0x8000 : 0x80))) {
  2324. m[i] = (m[i] &lt;&lt; 1) &amp; (v6 ? 0xffff : 0xff);
  2325. bits++;
  2326. }
  2327. if (m[i])
  2328. return null;
  2329. }
  2330. return bits;
  2331. }
  2332. function initNetworkState(refresh) {
  2333. if (_state == null || refresh) {
  2334. _init = _init || Promise.all([
  2335. L.resolveDefault(callNetworkInterfaceDump(), []),
  2336. L.resolveDefault(callLuciBoardJSON(), {}),
  2337. L.resolveDefault(callLuciNetworkDevices(), {}),
  2338. L.resolveDefault(callLuciWirelessDevices(), {}),
  2339. L.resolveDefault(callLuciHostHints(), {}),
  2340. getProtocolHandlers(),
  2341. L.resolveDefault(uci.load('network')),
  2342. L.resolveDefault(uci.load('wireless')),
  2343. L.resolveDefault(uci.load('luci'))
  2344. ]).then(function(data) {
  2345. var netifd_ifaces = data[0],
  2346. board_json = data[1],
  2347. luci_devs = data[2];
  2348. var s = {
  2349. isTunnel: {}, isBridge: {}, isSwitch: {}, isWifi: {},
  2350. ifaces: netifd_ifaces, radios: data[3], hosts: data[4],
  2351. netdevs: {}, bridges: {}, switches: {}, hostapd: {}
  2352. };
  2353. for (var name in luci_devs) {
  2354. var dev = luci_devs[name];
  2355. if (isVirtualIfname(name))
  2356. s.isTunnel[name] = true;
  2357. if (!s.isTunnel[name] &amp;&amp; isIgnoredIfname(name))
  2358. continue;
  2359. s.netdevs[name] = s.netdevs[name] || {
  2360. idx: dev.ifindex,
  2361. name: name,
  2362. rawname: name,
  2363. flags: dev.flags,
  2364. link: dev.link,
  2365. stats: dev.stats,
  2366. macaddr: dev.mac,
  2367. type: dev.type,
  2368. devtype: dev.devtype,
  2369. mtu: dev.mtu,
  2370. qlen: dev.qlen,
  2371. wireless: dev.wireless,
  2372. parent: dev.parent,
  2373. ipaddrs: [],
  2374. ip6addrs: []
  2375. };
  2376. if (Array.isArray(dev.ipaddrs))
  2377. for (var i = 0; i &lt; dev.ipaddrs.length; i++)
  2378. s.netdevs[name].ipaddrs.push(dev.ipaddrs[i].address + '/' + dev.ipaddrs[i].netmask);
  2379. if (Array.isArray(dev.ip6addrs))
  2380. for (var i = 0; i &lt; dev.ip6addrs.length; i++)
  2381. s.netdevs[name].ip6addrs.push(dev.ip6addrs[i].address + '/' + dev.ip6addrs[i].netmask);
  2382. }
  2383. for (var name in luci_devs) {
  2384. var dev = luci_devs[name];
  2385. if (!dev.bridge)
  2386. continue;
  2387. var b = {
  2388. name: name,
  2389. id: dev.id,
  2390. stp: dev.stp,
  2391. ifnames: []
  2392. };
  2393. for (var i = 0; dev.ports &amp;&amp; i &lt; dev.ports.length; i++) {
  2394. var subdev = s.netdevs[dev.ports[i]];
  2395. if (subdev == null)
  2396. continue;
  2397. b.ifnames.push(subdev);
  2398. subdev.bridge = b;
  2399. }
  2400. s.bridges[name] = b;
  2401. s.isBridge[name] = true;
  2402. }
  2403. for (var name in luci_devs) {
  2404. var dev = luci_devs[name];
  2405. if (!dev.parent || dev.devtype != 'dsa')
  2406. continue;
  2407. s.isSwitch[dev.parent] = true;
  2408. s.isSwitch[name] = true;
  2409. }
  2410. if (L.isObject(board_json.switch)) {
  2411. for (var switchname in board_json.switch) {
  2412. var layout = board_json.switch[switchname],
  2413. netdevs = {},
  2414. nports = {},
  2415. ports = [],
  2416. pnum = null,
  2417. role = null;
  2418. if (L.isObject(layout) &amp;&amp; Array.isArray(layout.ports)) {
  2419. for (var i = 0, port; (port = layout.ports[i]) != null; i++) {
  2420. if (typeof(port) == 'object' &amp;&amp; typeof(port.num) == 'number' &amp;&amp;
  2421. (typeof(port.role) == 'string' || typeof(port.device) == 'string')) {
  2422. var spec = {
  2423. num: port.num,
  2424. role: port.role || 'cpu',
  2425. index: (port.index != null) ? port.index : port.num
  2426. };
  2427. if (port.device != null) {
  2428. spec.device = port.device;
  2429. spec.tagged = spec.need_tag;
  2430. netdevs[port.num] = port.device;
  2431. }
  2432. ports.push(spec);
  2433. if (port.role != null)
  2434. nports[port.role] = (nports[port.role] || 0) + 1;
  2435. }
  2436. }
  2437. ports.sort(function(a, b) {
  2438. return L.naturalCompare(a.role, b.role) || L.naturalCompare(a.index, b.index);
  2439. });
  2440. for (var i = 0, port; (port = ports[i]) != null; i++) {
  2441. if (port.role != role) {
  2442. role = port.role;
  2443. pnum = 1;
  2444. }
  2445. if (role == 'cpu')
  2446. port.label = 'CPU (%s)'.format(port.device);
  2447. else if (nports[role] > 1)
  2448. port.label = '%s %d'.format(role.toUpperCase(), pnum++);
  2449. else
  2450. port.label = role.toUpperCase();
  2451. delete port.role;
  2452. delete port.index;
  2453. }
  2454. s.switches[switchname] = {
  2455. ports: ports,
  2456. netdevs: netdevs
  2457. };
  2458. }
  2459. }
  2460. }
  2461. if (L.isObject(board_json.dsl) &amp;&amp; L.isObject(board_json.dsl.modem)) {
  2462. s.hasDSLModem = board_json.dsl.modem;
  2463. }
  2464. _init = null;
  2465. var objects = [];
  2466. if (L.isObject(s.radios))
  2467. for (var radio in s.radios)
  2468. if (L.isObject(s.radios[radio]) &amp;&amp; Array.isArray(s.radios[radio].interfaces))
  2469. for (var i = 0; i &lt; s.radios[radio].interfaces.length; i++)
  2470. if (L.isObject(s.radios[radio].interfaces[i]) &amp;&amp; s.radios[radio].interfaces[i].ifname)
  2471. objects.push('hostapd.%s'.format(s.radios[radio].interfaces[i].ifname));
  2472. return (objects.length ? L.resolveDefault(rpc.list.apply(rpc, objects), {}) : Promise.resolve({})).then(function(res) {
  2473. for (var k in res) {
  2474. var m = k.match(/^hostapd\.(.+)$/);
  2475. if (m)
  2476. s.hostapd[m[1]] = res[k];
  2477. }
  2478. return (_state = s);
  2479. });
  2480. });
  2481. }
  2482. return (_state != null ? Promise.resolve(_state) : _init);
  2483. }
  2484. function ifnameOf(obj) {
  2485. if (obj instanceof Protocol)
  2486. return obj.getIfname();
  2487. else if (obj instanceof Device)
  2488. return obj.getName();
  2489. else if (obj instanceof WifiDevice)
  2490. return obj.getName();
  2491. else if (obj instanceof WifiNetwork)
  2492. return obj.getIfname();
  2493. else if (typeof(obj) == 'string')
  2494. return obj.replace(/:.+$/, '');
  2495. return null;
  2496. }
  2497. function networkSort(a, b) {
  2498. return L.naturalCompare(a.getName(), b.getName());
  2499. }
  2500. function deviceSort(a, b) {
  2501. var typeWeigth = { wifi: 2, alias: 3 };
  2502. return L.naturalCompare(typeWeigth[a.getType()] || 1, typeWeigth[b.getType()] || 1) ||
  2503. L.naturalCompare(a.getName(), b.getName());
  2504. }
  2505. function formatWifiEncryption(enc) {
  2506. if (!L.isObject(enc))
  2507. return null;
  2508. if (!enc.enabled)
  2509. return 'None';
  2510. var ciphers = Array.isArray(enc.ciphers)
  2511. ? enc.ciphers.map(function(c) { return c.toUpperCase() }) : [ 'NONE' ];
  2512. if (Array.isArray(enc.wep)) {
  2513. var has_open = false,
  2514. has_shared = false;
  2515. for (var i = 0; i &lt; enc.wep.length; i++)
  2516. if (enc.wep[i] == 'open')
  2517. has_open = true;
  2518. else if (enc.wep[i] == 'shared')
  2519. has_shared = true;
  2520. if (has_open &amp;&amp; has_shared)
  2521. return 'WEP Open/Shared (%s)'.format(ciphers.join(', '));
  2522. else if (has_open)
  2523. return 'WEP Open System (%s)'.format(ciphers.join(', '));
  2524. else if (has_shared)
  2525. return 'WEP Shared Auth (%s)'.format(ciphers.join(', '));
  2526. return 'WEP';
  2527. }
  2528. if (Array.isArray(enc.wpa)) {
  2529. var versions = [],
  2530. suites = Array.isArray(enc.authentication)
  2531. ? enc.authentication.map(function(a) { return a.toUpperCase() }) : [ 'NONE' ];
  2532. for (var i = 0; i &lt; enc.wpa.length; i++)
  2533. switch (enc.wpa[i]) {
  2534. case 1:
  2535. versions.push('WPA');
  2536. break;
  2537. default:
  2538. versions.push('WPA%d'.format(enc.wpa[i]));
  2539. break;
  2540. }
  2541. if (versions.length > 1)
  2542. return 'mixed %s %s (%s)'.format(versions.join('/'), suites.join(', '), ciphers.join(', '));
  2543. return '%s %s (%s)'.format(versions[0], suites.join(', '), ciphers.join(', '));
  2544. }
  2545. return 'Unknown';
  2546. }
  2547. function enumerateNetworks() {
  2548. var uciInterfaces = uci.sections('network', 'interface'),
  2549. networks = {};
  2550. for (var i = 0; i &lt; uciInterfaces.length; i++)
  2551. networks[uciInterfaces[i]['.name']] = this.instantiateNetwork(uciInterfaces[i]['.name']);
  2552. for (var i = 0; i &lt; _state.ifaces.length; i++)
  2553. if (networks[_state.ifaces[i].interface] == null)
  2554. networks[_state.ifaces[i].interface] =
  2555. this.instantiateNetwork(_state.ifaces[i].interface, _state.ifaces[i].proto);
  2556. var rv = [];
  2557. for (var network in networks)
  2558. if (networks.hasOwnProperty(network))
  2559. rv.push(networks[network]);
  2560. rv.sort(networkSort);
  2561. return rv;
  2562. }
  2563. var Hosts, Network, Protocol, Device, WifiDevice, WifiNetwork;
  2564. /**
  2565. * @class network
  2566. * @memberof LuCI
  2567. * @hideconstructor
  2568. * @classdesc
  2569. *
  2570. * The `LuCI.network` class combines data from multiple `ubus` APIs to
  2571. * provide an abstraction of the current network configuration state.
  2572. *
  2573. * It provides methods to enumerate interfaces and devices, to query
  2574. * current configuration details and to manipulate settings.
  2575. */
  2576. Network = baseclass.extend(/** @lends LuCI.network.prototype */ {
  2577. /**
  2578. * Converts the given prefix size in bits to a netmask.
  2579. *
  2580. * @method
  2581. *
  2582. * @param {number} bits
  2583. * The prefix size in bits.
  2584. *
  2585. * @param {boolean} [v6=false]
  2586. * Whether to convert the bits value into an IPv4 netmask (`false`) or
  2587. * an IPv6 netmask (`true`).
  2588. *
  2589. * @returns {null|string}
  2590. * Returns a string containing the netmask corresponding to the bit count
  2591. * or `null` when the given amount of bits exceeds the maximum possible
  2592. * value of `32` for IPv4 or `128` for IPv6.
  2593. */
  2594. prefixToMask: prefixToMask,
  2595. /**
  2596. * Converts the given netmask to a prefix size in bits.
  2597. *
  2598. * @method
  2599. *
  2600. * @param {string} netmask
  2601. * The netmask to convert into a bits count.
  2602. *
  2603. * @param {boolean} [v6=false]
  2604. * Whether to parse the given netmask as IPv4 (`false`) or IPv6 (`true`)
  2605. * address.
  2606. *
  2607. * @returns {null|number}
  2608. * Returns the number of prefix bits contained in the netmask or `null`
  2609. * if the given netmask value was invalid.
  2610. */
  2611. maskToPrefix: maskToPrefix,
  2612. /**
  2613. * An encryption entry describes active wireless encryption settings
  2614. * such as the used key management protocols, active ciphers and
  2615. * protocol versions.
  2616. *
  2617. * @typedef {Object&lt;string, boolean|Array&lt;number|string>>} LuCI.network.WifiEncryption
  2618. * @memberof LuCI.network
  2619. *
  2620. * @property {boolean} enabled
  2621. * Specifies whether any kind of encryption, such as `WEP` or `WPA` is
  2622. * enabled. If set to `false`, then no encryption is active and the
  2623. * corresponding network is open.
  2624. *
  2625. * @property {string[]} [wep]
  2626. * When the `wep` property exists, the network uses WEP encryption.
  2627. * In this case, the property is set to an array of active WEP modes
  2628. * which might be either `open`, `shared` or both.
  2629. *
  2630. * @property {number[]} [wpa]
  2631. * When the `wpa` property exists, the network uses WPA security.
  2632. * In this case, the property is set to an array containing the WPA
  2633. * protocol versions used, e.g. `[ 1, 2 ]` for WPA/WPA2 mixed mode or
  2634. * `[ 3 ]` for WPA3-SAE.
  2635. *
  2636. * @property {string[]} [authentication]
  2637. * The `authentication` property only applies to WPA encryption and
  2638. * is defined when the `wpa` property is set as well. It points to
  2639. * an array of active authentication suites used by the network, e.g.
  2640. * `[ "psk" ]` for a WPA(2)-PSK network or `[ "psk", "sae" ]` for
  2641. * mixed WPA2-PSK/WPA3-SAE encryption.
  2642. *
  2643. * @property {string[]} [ciphers]
  2644. * If either WEP or WPA encryption is active, then the `ciphers`
  2645. * property will be set to an array describing the active encryption
  2646. * ciphers used by the network, e.g. `[ "tkip", "ccmp" ]` for a
  2647. * WPA/WPA2-PSK mixed network or `[ "wep-40", "wep-104" ]` for an
  2648. * WEP network.
  2649. */
  2650. /**
  2651. * Converts a given {@link LuCI.network.WifiEncryption encryption entry}
  2652. * into a human readable string such as `mixed WPA/WPA2 PSK (TKIP, CCMP)`
  2653. * or `WPA3 SAE (CCMP)`.
  2654. *
  2655. * @method
  2656. *
  2657. * @param {LuCI.network.WifiEncryption} encryption
  2658. * The wireless encryption entry to convert.
  2659. *
  2660. * @returns {null|string}
  2661. * Returns the description string for the given encryption entry or
  2662. * `null` if the given entry was invalid.
  2663. */
  2664. formatWifiEncryption: formatWifiEncryption,
  2665. /**
  2666. * Flushes the local network state cache and fetches updated information
  2667. * from the remote `ubus` apis.
  2668. *
  2669. * @returns {Promise&lt;Object>}
  2670. * Returns a promise resolving to the internal network state object.
  2671. */
  2672. flushCache: function() {
  2673. initNetworkState(true);
  2674. return _init;
  2675. },
  2676. /**
  2677. * Instantiates the given {@link LuCI.network.Protocol Protocol} back-end,
  2678. * optionally using the given network name.
  2679. *
  2680. * @param {string} protoname
  2681. * The protocol back-end to use, e.g. `static` or `dhcp`.
  2682. *
  2683. * @param {string} [netname=__dummy__]
  2684. * The network name to use for the instantiated protocol. This should be
  2685. * usually set to one of the interfaces described in /etc/config/network
  2686. * but it is allowed to omit it, e.g. to query protocol capabilities
  2687. * without the need for an existing interface.
  2688. *
  2689. * @returns {null|LuCI.network.Protocol}
  2690. * Returns the instantiated protocol back-end class or `null` if the given
  2691. * protocol isn't known.
  2692. */
  2693. getProtocol: function(protoname, netname) {
  2694. var v = _protocols[protoname];
  2695. if (v != null)
  2696. return new v(netname || '__dummy__');
  2697. return null;
  2698. },
  2699. /**
  2700. * Obtains instances of all known {@link LuCI.network.Protocol Protocol}
  2701. * back-end classes.
  2702. *
  2703. * @returns {Array&lt;LuCI.network.Protocol>}
  2704. * Returns an array of protocol class instances.
  2705. */
  2706. getProtocols: function() {
  2707. var rv = [];
  2708. for (var protoname in _protocols)
  2709. rv.push(new _protocols[protoname]('__dummy__'));
  2710. return rv;
  2711. },
  2712. /**
  2713. * Registers a new {@link LuCI.network.Protocol Protocol} subclass
  2714. * with the given methods and returns the resulting subclass value.
  2715. *
  2716. * This functions internally calls
  2717. * {@link LuCI.Class.extend Class.extend()} on the `Network.Protocol`
  2718. * base class.
  2719. *
  2720. * @param {string} protoname
  2721. * The name of the new protocol to register.
  2722. *
  2723. * @param {Object&lt;string, *>} methods
  2724. * The member methods and values of the new `Protocol` subclass to
  2725. * be passed to {@link LuCI.Class.extend Class.extend()}.
  2726. *
  2727. * @returns {LuCI.network.Protocol}
  2728. * Returns the new `Protocol` subclass.
  2729. */
  2730. registerProtocol: function(protoname, methods) {
  2731. var spec = L.isObject(_protospecs) ? _protospecs[protoname] : null;
  2732. var proto = Protocol.extend(Object.assign({
  2733. getI18n: function() {
  2734. return protoname;
  2735. },
  2736. isFloating: function() {
  2737. return false;
  2738. },
  2739. isVirtual: function() {
  2740. return (L.isObject(spec) &amp;&amp; spec.no_device == true);
  2741. },
  2742. renderFormOptions: function(section) {
  2743. }
  2744. }, methods, {
  2745. __init__: function(name) {
  2746. this.sid = name;
  2747. },
  2748. getProtocol: function() {
  2749. return protoname;
  2750. }
  2751. }));
  2752. _protocols[protoname] = proto;
  2753. return proto;
  2754. },
  2755. /**
  2756. * Registers a new regular expression pattern to recognize
  2757. * virtual interfaces.
  2758. *
  2759. * @param {RegExp} pat
  2760. * A `RegExp` instance to match a virtual interface name
  2761. * such as `6in4-wan` or `tun0`.
  2762. */
  2763. registerPatternVirtual: function(pat) {
  2764. iface_patterns_virtual.push(pat);
  2765. },
  2766. /**
  2767. * Registers a new human readable translation string for a `Protocol`
  2768. * error code.
  2769. *
  2770. * @param {string} code
  2771. * The `ubus` protocol error code to register a translation for, e.g.
  2772. * `NO_DEVICE`.
  2773. *
  2774. * @param {string} message
  2775. * The message to use as translation for the given protocol error code.
  2776. *
  2777. * @returns {boolean}
  2778. * Returns `true` if the error code description has been added or `false`
  2779. * if either the arguments were invalid or if there already was a
  2780. * description for the given code.
  2781. */
  2782. registerErrorCode: function(code, message) {
  2783. if (typeof(code) == 'string' &amp;&amp;
  2784. typeof(message) == 'string' &amp;&amp;
  2785. !proto_errors.hasOwnProperty(code)) {
  2786. proto_errors[code] = message;
  2787. return true;
  2788. }
  2789. return false;
  2790. },
  2791. /**
  2792. * Adds a new network of the given name and update it with the given
  2793. * uci option values.
  2794. *
  2795. * If a network with the given name already exist but is empty, then
  2796. * this function will update its option, otherwise it will do nothing.
  2797. *
  2798. * @param {string} name
  2799. * The name of the network to add. Must be in the format `[a-zA-Z0-9_]+`.
  2800. *
  2801. * @param {Object&lt;string, string|string[]>} [options]
  2802. * An object of uci option values to set on the new network or to
  2803. * update in an existing, empty network.
  2804. *
  2805. * @returns {Promise&lt;null|LuCI.network.Protocol>}
  2806. * Returns a promise resolving to the `Protocol` subclass instance
  2807. * describing the added network or resolving to `null` if the name
  2808. * was invalid or if a non-empty network of the given name already
  2809. * existed.
  2810. */
  2811. addNetwork: function(name, options) {
  2812. return this.getNetwork(name).then(L.bind(function(existingNetwork) {
  2813. if (name != null &amp;&amp; /^[a-zA-Z0-9_]+$/.test(name) &amp;&amp; existingNetwork == null) {
  2814. var sid = uci.add('network', 'interface', name);
  2815. if (sid != null) {
  2816. if (L.isObject(options))
  2817. for (var key in options)
  2818. if (options.hasOwnProperty(key))
  2819. uci.set('network', sid, key, options[key]);
  2820. return this.instantiateNetwork(sid);
  2821. }
  2822. }
  2823. else if (existingNetwork != null &amp;&amp; existingNetwork.isEmpty()) {
  2824. if (L.isObject(options))
  2825. for (var key in options)
  2826. if (options.hasOwnProperty(key))
  2827. existingNetwork.set(key, options[key]);
  2828. return existingNetwork;
  2829. }
  2830. }, this));
  2831. },
  2832. /**
  2833. * Get a {@link LuCI.network.Protocol Protocol} instance describing
  2834. * the network with the given name.
  2835. *
  2836. * @param {string} name
  2837. * The logical interface name of the network get, e.g. `lan` or `wan`.
  2838. *
  2839. * @returns {Promise&lt;null|LuCI.network.Protocol>}
  2840. * Returns a promise resolving to a
  2841. * {@link LuCI.network.Protocol Protocol} subclass instance describing
  2842. * the network or `null` if the network did not exist.
  2843. */
  2844. getNetwork: function(name) {
  2845. return initNetworkState().then(L.bind(function() {
  2846. var section = (name != null) ? uci.get('network', name) : null;
  2847. if (section != null &amp;&amp; section['.type'] == 'interface') {
  2848. return this.instantiateNetwork(name);
  2849. }
  2850. else if (name != null) {
  2851. for (var i = 0; i &lt; _state.ifaces.length; i++)
  2852. if (_state.ifaces[i].interface == name)
  2853. return this.instantiateNetwork(name, _state.ifaces[i].proto);
  2854. }
  2855. return null;
  2856. }, this));
  2857. },
  2858. /**
  2859. * Gets an array containing all known networks.
  2860. *
  2861. * @returns {Promise&lt;Array&lt;LuCI.network.Protocol>>}
  2862. * Returns a promise resolving to a name-sorted array of
  2863. * {@link LuCI.network.Protocol Protocol} subclass instances
  2864. * describing all known networks.
  2865. */
  2866. getNetworks: function() {
  2867. return initNetworkState().then(L.bind(enumerateNetworks, this));
  2868. },
  2869. /**
  2870. * Deletes the given network and its references from the network and
  2871. * firewall configuration.
  2872. *
  2873. * @param {string} name
  2874. * The name of the network to delete.
  2875. *
  2876. * @returns {Promise&lt;boolean>}
  2877. * Returns a promise resolving to either `true` if the network and
  2878. * references to it were successfully deleted from the configuration or
  2879. * `false` if the given network could not be found.
  2880. */
  2881. deleteNetwork: function(name) {
  2882. var requireFirewall = Promise.resolve(L.require('firewall')).catch(function() {}),
  2883. loadDHCP = L.resolveDefault(uci.load('dhcp')),
  2884. network = this.instantiateNetwork(name);
  2885. return Promise.all([ requireFirewall, loadDHCP, initNetworkState() ]).then(function(res) {
  2886. var uciInterface = uci.get('network', name),
  2887. firewall = res[0];
  2888. if (uciInterface != null &amp;&amp; uciInterface['.type'] == 'interface') {
  2889. return Promise.resolve(network ? network.deleteConfiguration() : null).then(function() {
  2890. uci.remove('network', name);
  2891. uci.sections('luci', 'ifstate', function(s) {
  2892. if (s.interface == name)
  2893. uci.remove('luci', s['.name']);
  2894. });
  2895. uci.sections('network', null, function(s) {
  2896. switch (s['.type']) {
  2897. case 'alias':
  2898. case 'route':
  2899. case 'route6':
  2900. if (s.interface == name)
  2901. uci.remove('network', s['.name']);
  2902. break;
  2903. case 'rule':
  2904. case 'rule6':
  2905. if (s.in == name || s.out == name)
  2906. uci.remove('network', s['.name']);
  2907. break;
  2908. }
  2909. });
  2910. uci.sections('wireless', 'wifi-iface', function(s) {
  2911. var networks = L.toArray(s.network).filter(function(network) { return network != name });
  2912. if (networks.length > 0)
  2913. uci.set('wireless', s['.name'], 'network', networks.join(' '));
  2914. else
  2915. uci.unset('wireless', s['.name'], 'network');
  2916. });
  2917. uci.sections('dhcp', 'dhcp', function(s) {
  2918. if (s.interface == name)
  2919. uci.remove('dhcp', s['.name']);
  2920. });
  2921. if (firewall)
  2922. return firewall.deleteNetwork(name).then(function() { return true });
  2923. return true;
  2924. }).catch(function() {
  2925. return false;
  2926. });
  2927. }
  2928. return false;
  2929. });
  2930. },
  2931. /**
  2932. * Rename the given network and its references to a new name.
  2933. *
  2934. * @param {string} oldName
  2935. * The current name of the network.
  2936. *
  2937. * @param {string} newName
  2938. * The name to rename the network to, must be in the format
  2939. * `[a-z-A-Z0-9_]+`.
  2940. *
  2941. * @returns {Promise&lt;boolean>}
  2942. * Returns a promise resolving to either `true` if the network was
  2943. * successfully renamed or `false` if the new name was invalid, if
  2944. * a network with the new name already exists or if the network to
  2945. * rename could not be found.
  2946. */
  2947. renameNetwork: function(oldName, newName) {
  2948. return initNetworkState().then(function() {
  2949. if (newName == null || !/^[a-zA-Z0-9_]+$/.test(newName) || uci.get('network', newName) != null)
  2950. return false;
  2951. var oldNetwork = uci.get('network', oldName);
  2952. if (oldNetwork == null || oldNetwork['.type'] != 'interface')
  2953. return false;
  2954. var sid = uci.add('network', 'interface', newName);
  2955. for (var key in oldNetwork)
  2956. if (oldNetwork.hasOwnProperty(key) &amp;&amp; key.charAt(0) != '.')
  2957. uci.set('network', sid, key, oldNetwork[key]);
  2958. uci.sections('luci', 'ifstate', function(s) {
  2959. if (s.interface == oldName)
  2960. uci.set('luci', s['.name'], 'interface', newName);
  2961. });
  2962. uci.sections('network', 'alias', function(s) {
  2963. if (s.interface == oldName)
  2964. uci.set('network', s['.name'], 'interface', newName);
  2965. });
  2966. uci.sections('network', 'route', function(s) {
  2967. if (s.interface == oldName)
  2968. uci.set('network', s['.name'], 'interface', newName);
  2969. });
  2970. uci.sections('network', 'route6', function(s) {
  2971. if (s.interface == oldName)
  2972. uci.set('network', s['.name'], 'interface', newName);
  2973. });
  2974. uci.sections('wireless', 'wifi-iface', function(s) {
  2975. var networks = L.toArray(s.network).map(function(network) { return (network == oldName ? newName : network) });
  2976. if (networks.length > 0)
  2977. uci.set('wireless', s['.name'], 'network', networks.join(' '));
  2978. });
  2979. uci.remove('network', oldName);
  2980. return true;
  2981. });
  2982. },
  2983. /**
  2984. * Get a {@link LuCI.network.Device Device} instance describing the
  2985. * given network device.
  2986. *
  2987. * @param {string} name
  2988. * The name of the network device to get, e.g. `eth0` or `br-lan`.
  2989. *
  2990. * @returns {Promise&lt;null|LuCI.network.Device>}
  2991. * Returns a promise resolving to the `Device` instance describing
  2992. * the network device or `null` if the given device name could not
  2993. * be found.
  2994. */
  2995. getDevice: function(name) {
  2996. return initNetworkState().then(L.bind(function() {
  2997. if (name == null)
  2998. return null;
  2999. if (_state.netdevs.hasOwnProperty(name))
  3000. return this.instantiateDevice(name);
  3001. var netid = getWifiNetidBySid(name);
  3002. if (netid != null)
  3003. return this.instantiateDevice(netid[0]);
  3004. return null;
  3005. }, this));
  3006. },
  3007. /**
  3008. * Get a sorted list of all found network devices.
  3009. *
  3010. * @returns {Promise&lt;Array&lt;LuCI.network.Device>>}
  3011. * Returns a promise resolving to a sorted array of `Device` class
  3012. * instances describing the network devices found on the system.
  3013. */
  3014. getDevices: function() {
  3015. return initNetworkState().then(L.bind(function() {
  3016. var devices = {};
  3017. /* find simple devices */
  3018. var uciInterfaces = uci.sections('network', 'interface');
  3019. for (var i = 0; i &lt; uciInterfaces.length; i++) {
  3020. var ifnames = L.toArray(uciInterfaces[i].ifname);
  3021. for (var j = 0; j &lt; ifnames.length; j++) {
  3022. if (ifnames[j].charAt(0) == '@')
  3023. continue;
  3024. if (isIgnoredIfname(ifnames[j]) || isVirtualIfname(ifnames[j]) || isWifiIfname(ifnames[j]))
  3025. continue;
  3026. devices[ifnames[j]] = this.instantiateDevice(ifnames[j]);
  3027. }
  3028. }
  3029. for (var ifname in _state.netdevs) {
  3030. if (devices.hasOwnProperty(ifname))
  3031. continue;
  3032. if (isIgnoredIfname(ifname) || isWifiIfname(ifname))
  3033. continue;
  3034. if (_state.netdevs[ifname].wireless)
  3035. continue;
  3036. devices[ifname] = this.instantiateDevice(ifname);
  3037. }
  3038. /* find VLAN devices */
  3039. var uciSwitchVLANs = uci.sections('network', 'switch_vlan');
  3040. for (var i = 0; i &lt; uciSwitchVLANs.length; i++) {
  3041. if (typeof(uciSwitchVLANs[i].ports) != 'string' ||
  3042. typeof(uciSwitchVLANs[i].device) != 'string' ||
  3043. !_state.switches.hasOwnProperty(uciSwitchVLANs[i].device))
  3044. continue;
  3045. var ports = uciSwitchVLANs[i].ports.split(/\s+/);
  3046. for (var j = 0; j &lt; ports.length; j++) {
  3047. var m = ports[j].match(/^(\d+)([tu]?)$/);
  3048. if (m == null)
  3049. continue;
  3050. var netdev = _state.switches[uciSwitchVLANs[i].device].netdevs[m[1]];
  3051. if (netdev == null)
  3052. continue;
  3053. if (!devices.hasOwnProperty(netdev))
  3054. devices[netdev] = this.instantiateDevice(netdev);
  3055. _state.isSwitch[netdev] = true;
  3056. if (m[2] != 't')
  3057. continue;
  3058. var vid = uciSwitchVLANs[i].vid || uciSwitchVLANs[i].vlan;
  3059. vid = (vid != null ? +vid : null);
  3060. if (vid == null || vid &lt; 0 || vid > 4095)
  3061. continue;
  3062. var vlandev = '%s.%d'.format(netdev, vid);
  3063. if (!devices.hasOwnProperty(vlandev))
  3064. devices[vlandev] = this.instantiateDevice(vlandev);
  3065. _state.isSwitch[vlandev] = true;
  3066. }
  3067. }
  3068. /* find bridge VLAN devices */
  3069. var uciBridgeVLANs = uci.sections('network', 'bridge-vlan');
  3070. for (var i = 0; i &lt; uciBridgeVLANs.length; i++) {
  3071. var basedev = uciBridgeVLANs[i].device,
  3072. local = uciBridgeVLANs[i].local,
  3073. alias = uciBridgeVLANs[i].alias,
  3074. vid = +uciBridgeVLANs[i].vlan,
  3075. ports = L.toArray(uciBridgeVLANs[i].ports);
  3076. if (local == '0')
  3077. continue;
  3078. if (isNaN(vid) || vid &lt; 0 || vid > 4095)
  3079. continue;
  3080. var vlandev = '%s.%s'.format(basedev, alias || vid);
  3081. _state.isBridge[basedev] = true;
  3082. if (!_state.bridges.hasOwnProperty(basedev))
  3083. _state.bridges[basedev] = {
  3084. name: basedev,
  3085. ifnames: []
  3086. };
  3087. if (!devices.hasOwnProperty(vlandev))
  3088. devices[vlandev] = this.instantiateDevice(vlandev);
  3089. ports.forEach(function(port_name) {
  3090. var m = port_name.match(/^([^:]+)(?::[ut*]+)?$/),
  3091. p = m ? m[1] : null;
  3092. if (!p)
  3093. return;
  3094. if (_state.bridges[basedev].ifnames.filter(function(sd) { return sd.name == p }).length)
  3095. return;
  3096. _state.netdevs[p] = _state.netdevs[p] || {
  3097. name: p,
  3098. ipaddrs: [],
  3099. ip6addrs: [],
  3100. type: 1,
  3101. devtype: 'ethernet',
  3102. stats: {},
  3103. flags: {}
  3104. };
  3105. _state.bridges[basedev].ifnames.push(_state.netdevs[p]);
  3106. _state.netdevs[p].bridge = _state.bridges[basedev];
  3107. });
  3108. }
  3109. /* find wireless interfaces */
  3110. var uciWifiIfaces = uci.sections('wireless', 'wifi-iface'),
  3111. networkCount = {};
  3112. for (var i = 0; i &lt; uciWifiIfaces.length; i++) {
  3113. if (typeof(uciWifiIfaces[i].device) != 'string')
  3114. continue;
  3115. networkCount[uciWifiIfaces[i].device] = (networkCount[uciWifiIfaces[i].device] || 0) + 1;
  3116. var netid = '%s.network%d'.format(uciWifiIfaces[i].device, networkCount[uciWifiIfaces[i].device]);
  3117. devices[netid] = this.instantiateDevice(netid);
  3118. }
  3119. /* find uci declared devices */
  3120. var uciDevices = uci.sections('network', 'device');
  3121. for (var i = 0; i &lt; uciDevices.length; i++) {
  3122. var type = uciDevices[i].type,
  3123. name = uciDevices[i].name;
  3124. if (!type || !name || devices.hasOwnProperty(name))
  3125. continue;
  3126. if (type == 'bridge')
  3127. _state.isBridge[name] = true;
  3128. devices[name] = this.instantiateDevice(name);
  3129. }
  3130. var rv = [];
  3131. for (var netdev in devices)
  3132. if (devices.hasOwnProperty(netdev))
  3133. rv.push(devices[netdev]);
  3134. rv.sort(deviceSort);
  3135. return rv;
  3136. }, this));
  3137. },
  3138. /**
  3139. * Test if a given network device name is in the list of patterns for
  3140. * device names to ignore.
  3141. *
  3142. * Ignored device names are usually Linux network devices which are
  3143. * spawned implicitly by kernel modules such as `tunl0` or `hwsim0`
  3144. * and which are unsuitable for use in network configuration.
  3145. *
  3146. * @param {string} name
  3147. * The device name to test.
  3148. *
  3149. * @returns {boolean}
  3150. * Returns `true` if the given name is in the ignore pattern list,
  3151. * else returns `false`.
  3152. */
  3153. isIgnoredDevice: function(name) {
  3154. return isIgnoredIfname(name);
  3155. },
  3156. /**
  3157. * Get a {@link LuCI.network.WifiDevice WifiDevice} instance describing
  3158. * the given wireless radio.
  3159. *
  3160. * @param {string} devname
  3161. * The configuration name of the wireless radio to look up, e.g. `radio0`
  3162. * for the first mac80211 phy on the system.
  3163. *
  3164. * @returns {Promise&lt;null|LuCI.network.WifiDevice>}
  3165. * Returns a promise resolving to the `WifiDevice` instance describing
  3166. * the underlying radio device or `null` if the wireless radio could not
  3167. * be found.
  3168. */
  3169. getWifiDevice: function(devname) {
  3170. return initNetworkState().then(L.bind(function() {
  3171. var existingDevice = uci.get('wireless', devname);
  3172. if (existingDevice == null || existingDevice['.type'] != 'wifi-device')
  3173. return null;
  3174. return this.instantiateWifiDevice(devname, _state.radios[devname] || {});
  3175. }, this));
  3176. },
  3177. /**
  3178. * Obtain a list of all configured radio devices.
  3179. *
  3180. * @returns {Promise&lt;Array&lt;LuCI.network.WifiDevice>>}
  3181. * Returns a promise resolving to an array of `WifiDevice` instances
  3182. * describing the wireless radios configured in the system.
  3183. * The order of the array corresponds to the order of the radios in
  3184. * the configuration.
  3185. */
  3186. getWifiDevices: function() {
  3187. return initNetworkState().then(L.bind(function() {
  3188. var uciWifiDevices = uci.sections('wireless', 'wifi-device'),
  3189. rv = [];
  3190. for (var i = 0; i &lt; uciWifiDevices.length; i++) {
  3191. var devname = uciWifiDevices[i]['.name'];
  3192. rv.push(this.instantiateWifiDevice(devname, _state.radios[devname] || {}));
  3193. }
  3194. return rv;
  3195. }, this));
  3196. },
  3197. /**
  3198. * Get a {@link LuCI.network.WifiNetwork WifiNetwork} instance describing
  3199. * the given wireless network.
  3200. *
  3201. * @param {string} netname
  3202. * The name of the wireless network to look up. This may be either an uci
  3203. * configuration section ID, a network ID in the form `radio#.network#`
  3204. * or a Linux network device name like `wlan0` which is resolved to the
  3205. * corresponding configuration section through `ubus` runtime information.
  3206. *
  3207. * @returns {Promise&lt;null|LuCI.network.WifiNetwork>}
  3208. * Returns a promise resolving to the `WifiNetwork` instance describing
  3209. * the wireless network or `null` if the corresponding network could not
  3210. * be found.
  3211. */
  3212. getWifiNetwork: function(netname) {
  3213. return initNetworkState()
  3214. .then(L.bind(this.lookupWifiNetwork, this, netname));
  3215. },
  3216. /**
  3217. * Get an array of all {@link LuCI.network.WifiNetwork WifiNetwork}
  3218. * instances describing the wireless networks present on the system.
  3219. *
  3220. * @returns {Promise&lt;Array&lt;LuCI.network.WifiNetwork>>}
  3221. * Returns a promise resolving to an array of `WifiNetwork` instances
  3222. * describing the wireless networks. The array will be empty if no networks
  3223. * are found.
  3224. */
  3225. getWifiNetworks: function() {
  3226. return initNetworkState().then(L.bind(function() {
  3227. var wifiIfaces = uci.sections('wireless', 'wifi-iface'),
  3228. rv = [];
  3229. for (var i = 0; i &lt; wifiIfaces.length; i++)
  3230. rv.push(this.lookupWifiNetwork(wifiIfaces[i]['.name']));
  3231. rv.sort(function(a, b) {
  3232. return L.naturalCompare(a.getID(), b.getID());
  3233. });
  3234. return rv;
  3235. }, this));
  3236. },
  3237. /**
  3238. * Adds a new wireless network to the configuration and sets its options
  3239. * to the provided values.
  3240. *
  3241. * @param {Object&lt;string, string|string[]>} options
  3242. * The options to set for the newly added wireless network. This object
  3243. * must at least contain a `device` property which is set to the radio
  3244. * name the new network belongs to.
  3245. *
  3246. * @returns {Promise&lt;null|LuCI.network.WifiNetwork>}
  3247. * Returns a promise resolving to a `WifiNetwork` instance describing
  3248. * the newly added wireless network or `null` if the given options
  3249. * were invalid or if the associated radio device could not be found.
  3250. */
  3251. addWifiNetwork: function(options) {
  3252. return initNetworkState().then(L.bind(function() {
  3253. if (options == null ||
  3254. typeof(options) != 'object' ||
  3255. typeof(options.device) != 'string')
  3256. return null;
  3257. var existingDevice = uci.get('wireless', options.device);
  3258. if (existingDevice == null || existingDevice['.type'] != 'wifi-device')
  3259. return null;
  3260. /* XXX: need to add a named section (wifinet#) here */
  3261. var sid = uci.add('wireless', 'wifi-iface');
  3262. for (var key in options)
  3263. if (options.hasOwnProperty(key))
  3264. uci.set('wireless', sid, key, options[key]);
  3265. var radioname = existingDevice['.name'],
  3266. netid = getWifiNetidBySid(sid) || [];
  3267. return this.instantiateWifiNetwork(sid, radioname, _state.radios[radioname], netid[0], null);
  3268. }, this));
  3269. },
  3270. /**
  3271. * Deletes the given wireless network from the configuration.
  3272. *
  3273. * @param {string} netname
  3274. * The name of the network to remove. This may be either a
  3275. * network ID in the form `radio#.network#` or a Linux network device
  3276. * name like `wlan0` which is resolved to the corresponding configuration
  3277. * section through `ubus` runtime information.
  3278. *
  3279. * @returns {Promise&lt;boolean>}
  3280. * Returns a promise resolving to `true` if the wireless network has been
  3281. * successfully deleted from the configuration or `false` if it could not
  3282. * be found.
  3283. */
  3284. deleteWifiNetwork: function(netname) {
  3285. return initNetworkState().then(L.bind(function() {
  3286. var sid = getWifiSidByIfname(netname);
  3287. if (sid == null)
  3288. return false;
  3289. uci.remove('wireless', sid);
  3290. return true;
  3291. }, this));
  3292. },
  3293. /* private */
  3294. getStatusByRoute: function(addr, mask) {
  3295. return initNetworkState().then(L.bind(function() {
  3296. var rv = [];
  3297. for (var i = 0; i &lt; _state.ifaces.length; i++) {
  3298. if (!Array.isArray(_state.ifaces[i].route))
  3299. continue;
  3300. for (var j = 0; j &lt; _state.ifaces[i].route.length; j++) {
  3301. if (typeof(_state.ifaces[i].route[j]) != 'object' ||
  3302. typeof(_state.ifaces[i].route[j].target) != 'string' ||
  3303. typeof(_state.ifaces[i].route[j].mask) != 'number')
  3304. continue;
  3305. if (_state.ifaces[i].route[j].table)
  3306. continue;
  3307. if (_state.ifaces[i].route[j].target != addr ||
  3308. _state.ifaces[i].route[j].mask != mask)
  3309. continue;
  3310. rv.push(_state.ifaces[i]);
  3311. }
  3312. }
  3313. rv.sort(function(a, b) {
  3314. return L.naturalCompare(a.metric, b.metric) || L.naturalCompare(a.interface, b.interface);
  3315. });
  3316. return rv;
  3317. }, this));
  3318. },
  3319. /* private */
  3320. getStatusByAddress: function(addr) {
  3321. return initNetworkState().then(L.bind(function() {
  3322. var rv = [];
  3323. for (var i = 0; i &lt; _state.ifaces.length; i++) {
  3324. if (Array.isArray(_state.ifaces[i]['ipv4-address']))
  3325. for (var j = 0; j &lt; _state.ifaces[i]['ipv4-address'].length; j++)
  3326. if (typeof(_state.ifaces[i]['ipv4-address'][j]) == 'object' &amp;&amp;
  3327. _state.ifaces[i]['ipv4-address'][j].address == addr)
  3328. return _state.ifaces[i];
  3329. if (Array.isArray(_state.ifaces[i]['ipv6-address']))
  3330. for (var j = 0; j &lt; _state.ifaces[i]['ipv6-address'].length; j++)
  3331. if (typeof(_state.ifaces[i]['ipv6-address'][j]) == 'object' &amp;&amp;
  3332. _state.ifaces[i]['ipv6-address'][j].address == addr)
  3333. return _state.ifaces[i];
  3334. if (Array.isArray(_state.ifaces[i]['ipv6-prefix-assignment']))
  3335. for (var j = 0; j &lt; _state.ifaces[i]['ipv6-prefix-assignment'].length; j++)
  3336. if (typeof(_state.ifaces[i]['ipv6-prefix-assignment'][j]) == 'object' &amp;&amp;
  3337. typeof(_state.ifaces[i]['ipv6-prefix-assignment'][j]['local-address']) == 'object' &amp;&amp;
  3338. _state.ifaces[i]['ipv6-prefix-assignment'][j]['local-address'].address == addr)
  3339. return _state.ifaces[i];
  3340. }
  3341. return null;
  3342. }, this));
  3343. },
  3344. /**
  3345. * Get IPv4 wan networks.
  3346. *
  3347. * This function looks up all networks having a default `0.0.0.0/0` route
  3348. * and returns them as array.
  3349. *
  3350. * @returns {Promise&lt;Array&lt;LuCI.network.Protocol>>}
  3351. * Returns a promise resolving to an array of `Protocol` subclass
  3352. * instances describing the found default route interfaces.
  3353. */
  3354. getWANNetworks: function() {
  3355. return this.getStatusByRoute('0.0.0.0', 0).then(L.bind(function(statuses) {
  3356. var rv = [], seen = {};
  3357. for (var i = 0; i &lt; statuses.length; i++) {
  3358. if (!seen.hasOwnProperty(statuses[i].interface)) {
  3359. rv.push(this.instantiateNetwork(statuses[i].interface, statuses[i].proto));
  3360. seen[statuses[i].interface] = true;
  3361. }
  3362. }
  3363. return rv;
  3364. }, this));
  3365. },
  3366. /**
  3367. * Get IPv6 wan networks.
  3368. *
  3369. * This function looks up all networks having a default `::/0` route
  3370. * and returns them as array.
  3371. *
  3372. * @returns {Promise&lt;Array&lt;LuCI.network.Protocol>>}
  3373. * Returns a promise resolving to an array of `Protocol` subclass
  3374. * instances describing the found IPv6 default route interfaces.
  3375. */
  3376. getWAN6Networks: function() {
  3377. return this.getStatusByRoute('::', 0).then(L.bind(function(statuses) {
  3378. var rv = [], seen = {};
  3379. for (var i = 0; i &lt; statuses.length; i++) {
  3380. if (!seen.hasOwnProperty(statuses[i].interface)) {
  3381. rv.push(this.instantiateNetwork(statuses[i].interface, statuses[i].proto));
  3382. seen[statuses[i].interface] = true;
  3383. }
  3384. }
  3385. return rv;
  3386. }, this));
  3387. },
  3388. /**
  3389. * Describes a swconfig switch topology by specifying the CPU
  3390. * connections and external port labels of a switch.
  3391. *
  3392. * @typedef {Object&lt;string, Object|Array>} SwitchTopology
  3393. * @memberof LuCI.network
  3394. *
  3395. * @property {Object&lt;number, string>} netdevs
  3396. * The `netdevs` property points to an object describing the CPU port
  3397. * connections of the switch. The numeric key of the enclosed object is
  3398. * the port number, the value contains the Linux network device name the
  3399. * port is hardwired to.
  3400. *
  3401. * @property {Array&lt;Object&lt;string, boolean|number|string>>} ports
  3402. * The `ports` property points to an array describing the populated
  3403. * ports of the switch in the external label order. Each array item is
  3404. * an object containing the following keys:
  3405. * - `num` - the internal switch port number
  3406. * - `label` - the label of the port, e.g. `LAN 1` or `CPU (eth0)`
  3407. * - `device` - the connected Linux network device name (CPU ports only)
  3408. * - `tagged` - a boolean indicating whether the port must be tagged to
  3409. * function (CPU ports only)
  3410. */
  3411. /**
  3412. * Returns the topologies of all swconfig switches found on the system.
  3413. *
  3414. * @returns {Promise&lt;Object&lt;string, LuCI.network.SwitchTopology>>}
  3415. * Returns a promise resolving to an object containing the topologies
  3416. * of each switch. The object keys correspond to the name of the switches
  3417. * such as `switch0`, the values are
  3418. * {@link LuCI.network.SwitchTopology SwitchTopology} objects describing
  3419. * the layout.
  3420. */
  3421. getSwitchTopologies: function() {
  3422. return initNetworkState().then(function() {
  3423. return _state.switches;
  3424. });
  3425. },
  3426. /* private */
  3427. instantiateNetwork: function(name, proto) {
  3428. if (name == null)
  3429. return null;
  3430. proto = (proto == null ? uci.get('network', name, 'proto') : proto);
  3431. var protoClass = _protocols[proto] || Protocol;
  3432. return new protoClass(name);
  3433. },
  3434. /* private */
  3435. instantiateDevice: function(name, network, extend) {
  3436. if (extend != null)
  3437. return new (Device.extend(extend))(name, network);
  3438. return new Device(name, network);
  3439. },
  3440. /* private */
  3441. instantiateWifiDevice: function(radioname, radiostate) {
  3442. return new WifiDevice(radioname, radiostate);
  3443. },
  3444. /* private */
  3445. instantiateWifiNetwork: function(sid, radioname, radiostate, netid, netstate, hostapd) {
  3446. return new WifiNetwork(sid, radioname, radiostate, netid, netstate, hostapd);
  3447. },
  3448. /* private */
  3449. lookupWifiNetwork: function(netname) {
  3450. var sid, res, netid, radioname, radiostate, netstate;
  3451. sid = getWifiSidByNetid(netname);
  3452. if (sid != null) {
  3453. res = getWifiStateBySid(sid);
  3454. netid = netname;
  3455. radioname = res ? res[0] : null;
  3456. radiostate = res ? res[1] : null;
  3457. netstate = res ? res[2] : null;
  3458. }
  3459. else {
  3460. res = getWifiStateByIfname(netname);
  3461. if (res != null) {
  3462. radioname = res[0];
  3463. radiostate = res[1];
  3464. netstate = res[2];
  3465. sid = netstate.section;
  3466. netid = L.toArray(getWifiNetidBySid(sid))[0];
  3467. }
  3468. else {
  3469. res = getWifiStateBySid(netname);
  3470. if (res != null) {
  3471. radioname = res[0];
  3472. radiostate = res[1];
  3473. netstate = res[2];
  3474. sid = netname;
  3475. netid = L.toArray(getWifiNetidBySid(sid))[0];
  3476. }
  3477. else {
  3478. res = getWifiNetidBySid(netname);
  3479. if (res != null) {
  3480. netid = res[0];
  3481. radioname = res[1];
  3482. sid = netname;
  3483. }
  3484. }
  3485. }
  3486. }
  3487. return this.instantiateWifiNetwork(sid || netname, radioname,
  3488. radiostate, netid, netstate,
  3489. netstate ? _state.hostapd[netstate.ifname] : null);
  3490. },
  3491. /**
  3492. * Obtains the network device name of the given object.
  3493. *
  3494. * @param {LuCI.network.Protocol|LuCI.network.Device|LuCI.network.WifiDevice|LuCI.network.WifiNetwork|string} obj
  3495. * The object to get the device name from.
  3496. *
  3497. * @returns {null|string}
  3498. * Returns a string containing the device name or `null` if the given
  3499. * object could not be converted to a name.
  3500. */
  3501. getIfnameOf: function(obj) {
  3502. return ifnameOf(obj);
  3503. },
  3504. /**
  3505. * Queries the internal DSL modem type from board information.
  3506. *
  3507. * @returns {Promise&lt;null|string>}
  3508. * Returns a promise resolving to the type of the internal modem
  3509. * (e.g. `vdsl`) or to `null` if no internal modem is present.
  3510. */
  3511. getDSLModemType: function() {
  3512. return initNetworkState().then(function() {
  3513. return _state.hasDSLModem ? _state.hasDSLModem.type : null;
  3514. });
  3515. },
  3516. /**
  3517. * Queries aggregated information about known hosts.
  3518. *
  3519. * This function aggregates information from various sources such as
  3520. * DHCP lease databases, ARP and IPv6 neighbour entries, wireless
  3521. * association list etc. and returns a {@link LuCI.network.Hosts Hosts}
  3522. * class instance describing the found hosts.
  3523. *
  3524. * @returns {Promise&lt;LuCI.network.Hosts>}
  3525. * Returns a `Hosts` instance describing host known on the system.
  3526. */
  3527. getHostHints: function() {
  3528. return initNetworkState().then(function() {
  3529. return new Hosts(_state.hosts);
  3530. });
  3531. }
  3532. });
  3533. /**
  3534. * @class
  3535. * @memberof LuCI.network
  3536. * @hideconstructor
  3537. * @classdesc
  3538. *
  3539. * The `LuCI.network.Hosts` class encapsulates host information aggregated
  3540. * from multiple sources and provides convenience functions to access the
  3541. * host information by different criteria.
  3542. */
  3543. Hosts = baseclass.extend(/** @lends LuCI.network.Hosts.prototype */ {
  3544. __init__: function(hosts) {
  3545. this.hosts = hosts;
  3546. },
  3547. /**
  3548. * Look up the hostname associated with the given MAC address.
  3549. *
  3550. * @param {string} mac
  3551. * The MAC address to look up.
  3552. *
  3553. * @returns {null|string}
  3554. * Returns the hostname associated with the given MAC or `null` if
  3555. * no matching host could be found or if no hostname is known for
  3556. * the corresponding host.
  3557. */
  3558. getHostnameByMACAddr: function(mac) {
  3559. return this.hosts[mac]
  3560. ? (this.hosts[mac].name || null)
  3561. : null;
  3562. },
  3563. /**
  3564. * Look up the IPv4 address associated with the given MAC address.
  3565. *
  3566. * @param {string} mac
  3567. * The MAC address to look up.
  3568. *
  3569. * @returns {null|string}
  3570. * Returns the IPv4 address associated with the given MAC or `null` if
  3571. * no matching host could be found or if no IPv4 address is known for
  3572. * the corresponding host.
  3573. */
  3574. getIPAddrByMACAddr: function(mac) {
  3575. return this.hosts[mac]
  3576. ? (L.toArray(this.hosts[mac].ipaddrs || this.hosts[mac].ipv4)[0] || null)
  3577. : null;
  3578. },
  3579. /**
  3580. * Look up the IPv6 address associated with the given MAC address.
  3581. *
  3582. * @param {string} mac
  3583. * The MAC address to look up.
  3584. *
  3585. * @returns {null|string}
  3586. * Returns the IPv6 address associated with the given MAC or `null` if
  3587. * no matching host could be found or if no IPv6 address is known for
  3588. * the corresponding host.
  3589. */
  3590. getIP6AddrByMACAddr: function(mac) {
  3591. return this.hosts[mac]
  3592. ? (L.toArray(this.hosts[mac].ip6addrs || this.hosts[mac].ipv6)[0] || null)
  3593. : null;
  3594. },
  3595. /**
  3596. * Look up the hostname associated with the given IPv4 address.
  3597. *
  3598. * @param {string} ipaddr
  3599. * The IPv4 address to look up.
  3600. *
  3601. * @returns {null|string}
  3602. * Returns the hostname associated with the given IPv4 or `null` if
  3603. * no matching host could be found or if no hostname is known for
  3604. * the corresponding host.
  3605. */
  3606. getHostnameByIPAddr: function(ipaddr) {
  3607. for (var mac in this.hosts) {
  3608. if (this.hosts[mac].name == null)
  3609. continue;
  3610. var addrs = L.toArray(this.hosts[mac].ipaddrs || this.hosts[mac].ipv4);
  3611. for (var i = 0; i &lt; addrs.length; i++)
  3612. if (addrs[i] == ipaddr)
  3613. return this.hosts[mac].name;
  3614. }
  3615. return null;
  3616. },
  3617. /**
  3618. * Look up the MAC address associated with the given IPv4 address.
  3619. *
  3620. * @param {string} ipaddr
  3621. * The IPv4 address to look up.
  3622. *
  3623. * @returns {null|string}
  3624. * Returns the MAC address associated with the given IPv4 or `null` if
  3625. * no matching host could be found or if no MAC address is known for
  3626. * the corresponding host.
  3627. */
  3628. getMACAddrByIPAddr: function(ipaddr) {
  3629. for (var mac in this.hosts) {
  3630. var addrs = L.toArray(this.hosts[mac].ipaddrs || this.hosts[mac].ipv4);
  3631. for (var i = 0; i &lt; addrs.length; i++)
  3632. if (addrs[i] == ipaddr)
  3633. return mac;
  3634. }
  3635. return null;
  3636. },
  3637. /**
  3638. * Look up the hostname associated with the given IPv6 address.
  3639. *
  3640. * @param {string} ip6addr
  3641. * The IPv6 address to look up.
  3642. *
  3643. * @returns {null|string}
  3644. * Returns the hostname associated with the given IPv6 or `null` if
  3645. * no matching host could be found or if no hostname is known for
  3646. * the corresponding host.
  3647. */
  3648. getHostnameByIP6Addr: function(ip6addr) {
  3649. for (var mac in this.hosts) {
  3650. if (this.hosts[mac].name == null)
  3651. continue;
  3652. var addrs = L.toArray(this.hosts[mac].ip6addrs || this.hosts[mac].ipv6);
  3653. for (var i = 0; i &lt; addrs.length; i++)
  3654. if (addrs[i] == ip6addr)
  3655. return this.hosts[mac].name;
  3656. }
  3657. return null;
  3658. },
  3659. /**
  3660. * Look up the MAC address associated with the given IPv6 address.
  3661. *
  3662. * @param {string} ip6addr
  3663. * The IPv6 address to look up.
  3664. *
  3665. * @returns {null|string}
  3666. * Returns the MAC address associated with the given IPv6 or `null` if
  3667. * no matching host could be found or if no MAC address is known for
  3668. * the corresponding host.
  3669. */
  3670. getMACAddrByIP6Addr: function(ip6addr) {
  3671. for (var mac in this.hosts) {
  3672. var addrs = L.toArray(this.hosts[mac].ip6addrs || this.hosts[mac].ipv6);
  3673. for (var i = 0; i &lt; addrs.length; i++)
  3674. if (addrs[i] == ip6addr)
  3675. return mac;
  3676. }
  3677. return null;
  3678. },
  3679. /**
  3680. * Return an array of (MAC address, name hint) tuples sorted by
  3681. * MAC address.
  3682. *
  3683. * @param {boolean} [preferIp6=false]
  3684. * Whether to prefer IPv6 addresses (`true`) or IPv4 addresses (`false`)
  3685. * as name hint when no hostname is known for a specific MAC address.
  3686. *
  3687. * @returns {Array&lt;Array&lt;string>>}
  3688. * Returns an array of arrays containing a name hint for each found
  3689. * MAC address on the system. The array is sorted ascending by MAC.
  3690. *
  3691. * Each item of the resulting array is a two element array with the
  3692. * MAC being the first element and the name hint being the second
  3693. * element. The name hint is either the hostname, an IPv4 or an IPv6
  3694. * address related to the MAC address.
  3695. *
  3696. * If no hostname but both IPv4 and IPv6 addresses are known, the
  3697. * `preferIP6` flag specifies whether the IPv6 or the IPv4 address
  3698. * is used as hint.
  3699. */
  3700. getMACHints: function(preferIp6) {
  3701. var rv = [];
  3702. for (var mac in this.hosts) {
  3703. var hint = this.hosts[mac].name ||
  3704. L.toArray(this.hosts[mac][preferIp6 ? 'ip6addrs' : 'ipaddrs'] || this.hosts[mac][preferIp6 ? 'ipv6' : 'ipv4'])[0] ||
  3705. L.toArray(this.hosts[mac][preferIp6 ? 'ipaddrs' : 'ip6addrs'] || this.hosts[mac][preferIp6 ? 'ipv4' : 'ipv6'])[0];
  3706. rv.push([mac, hint]);
  3707. }
  3708. return rv.sort(function(a, b) {
  3709. return L.naturalCompare(a[0], b[0]);
  3710. });
  3711. }
  3712. });
  3713. /**
  3714. * @class
  3715. * @memberof LuCI.network
  3716. * @hideconstructor
  3717. * @classdesc
  3718. *
  3719. * The `Network.Protocol` class serves as base for protocol specific
  3720. * subclasses which describe logical UCI networks defined by `config
  3721. * interface` sections in `/etc/config/network`.
  3722. */
  3723. Protocol = baseclass.extend(/** @lends LuCI.network.Protocol.prototype */ {
  3724. __init__: function(name) {
  3725. this.sid = name;
  3726. },
  3727. _get: function(opt) {
  3728. var val = uci.get('network', this.sid, opt);
  3729. if (Array.isArray(val))
  3730. return val.join(' ');
  3731. return val || '';
  3732. },
  3733. _ubus: function(field) {
  3734. for (var i = 0; i &lt; _state.ifaces.length; i++) {
  3735. if (_state.ifaces[i].interface != this.sid)
  3736. continue;
  3737. return (field != null ? _state.ifaces[i][field] : _state.ifaces[i]);
  3738. }
  3739. },
  3740. /**
  3741. * Read the given UCI option value of this network.
  3742. *
  3743. * @param {string} opt
  3744. * The UCI option name to read.
  3745. *
  3746. * @returns {null|string|string[]}
  3747. * Returns the UCI option value or `null` if the requested option is
  3748. * not found.
  3749. */
  3750. get: function(opt) {
  3751. return uci.get('network', this.sid, opt);
  3752. },
  3753. /**
  3754. * Set the given UCI option of this network to the given value.
  3755. *
  3756. * @param {string} opt
  3757. * The name of the UCI option to set.
  3758. *
  3759. * @param {null|string|string[]} val
  3760. * The value to set or `null` to remove the given option from the
  3761. * configuration.
  3762. */
  3763. set: function(opt, val) {
  3764. return uci.set('network', this.sid, opt, val);
  3765. },
  3766. /**
  3767. * Get the associated Linux network device of this network.
  3768. *
  3769. * @returns {null|string}
  3770. * Returns the name of the associated network device or `null` if
  3771. * it could not be determined.
  3772. */
  3773. getIfname: function() {
  3774. var ifname;
  3775. if (this.isFloating())
  3776. ifname = this._ubus('l3_device');
  3777. else
  3778. ifname = this._ubus('device') || this._ubus('l3_device');
  3779. if (ifname != null)
  3780. return ifname;
  3781. var res = getWifiNetidByNetname(this.sid);
  3782. return (res != null ? res[0] : null);
  3783. },
  3784. /**
  3785. * Get the name of this network protocol class.
  3786. *
  3787. * This function will be overwritten by subclasses created by
  3788. * {@link LuCI.network#registerProtocol Network.registerProtocol()}.
  3789. *
  3790. * @abstract
  3791. * @returns {string}
  3792. * Returns the name of the network protocol implementation, e.g.
  3793. * `static` or `dhcp`.
  3794. */
  3795. getProtocol: function() {
  3796. return null;
  3797. },
  3798. /**
  3799. * Return a human readable description for the protocol, such as
  3800. * `Static address` or `DHCP client`.
  3801. *
  3802. * This function should be overwritten by subclasses.
  3803. *
  3804. * @abstract
  3805. * @returns {string}
  3806. * Returns the description string.
  3807. */
  3808. getI18n: function() {
  3809. switch (this.getProtocol()) {
  3810. case 'none': return _('Unmanaged');
  3811. case 'static': return _('Static address');
  3812. case 'dhcp': return _('DHCP client');
  3813. default: return _('Unknown');
  3814. }
  3815. },
  3816. /**
  3817. * Get the type of the underlying interface.
  3818. *
  3819. * This function actually is a convenience wrapper around
  3820. * `proto.get("type")` and is mainly used by other `LuCI.network` code
  3821. * to check whether the interface is declared as bridge in UCI.
  3822. *
  3823. * @returns {null|string}
  3824. * Returns the value of the `type` option of the associated logical
  3825. * interface or `null` if no `type` option is set.
  3826. */
  3827. getType: function() {
  3828. return this._get('type');
  3829. },
  3830. /**
  3831. * Get the name of the associated logical interface.
  3832. *
  3833. * @returns {string}
  3834. * Returns the logical interface name, such as `lan` or `wan`.
  3835. */
  3836. getName: function() {
  3837. return this.sid;
  3838. },
  3839. /**
  3840. * Get the uptime of the logical interface.
  3841. *
  3842. * @returns {number}
  3843. * Returns the uptime of the associated interface in seconds.
  3844. */
  3845. getUptime: function() {
  3846. return this._ubus('uptime') || 0;
  3847. },
  3848. /**
  3849. * Get the logical interface expiry time in seconds.
  3850. *
  3851. * For protocols that have a concept of a lease, such as DHCP or
  3852. * DHCPv6, this function returns the remaining time in seconds
  3853. * until the lease expires.
  3854. *
  3855. * @returns {number}
  3856. * Returns the amount of seconds until the lease expires or `-1`
  3857. * if it isn't applicable to the associated protocol.
  3858. */
  3859. getExpiry: function() {
  3860. var u = this._ubus('uptime'),
  3861. d = this._ubus('data'),
  3862. v6_prefixes = this._ubus('ipv6-prefix'),
  3863. v6_addresses = this._ubus('ipv6-address');
  3864. if (typeof(u) == 'number' &amp;&amp; d != null) {
  3865. // DHCPv4 or leasetime in data
  3866. if(typeof(d) == 'object' &amp;&amp; typeof(d.leasetime) == 'number') {
  3867. var r = d.leasetime - (u % d.leasetime);
  3868. return (r > 0 ? r : 0);
  3869. }
  3870. // DHCPv6, we can have multiple IPs and prefixes
  3871. if (Array.isArray(v6_prefixes) || Array.isArray(v6_addresses)) {
  3872. var prefixes = [...v6_prefixes, ...v6_addresses];
  3873. if(prefixes.length &amp;&amp; typeof(prefixes[0].valid) == 'number') {
  3874. var r = prefixes[0].valid;
  3875. return (r > 0 ? r : 0);
  3876. }
  3877. }
  3878. }
  3879. return -1;
  3880. },
  3881. /**
  3882. * Get the metric value of the logical interface.
  3883. *
  3884. * @returns {number}
  3885. * Returns the current metric value used for device and network
  3886. * routes spawned by the associated logical interface.
  3887. */
  3888. getMetric: function() {
  3889. return this._ubus('metric') || 0;
  3890. },
  3891. /**
  3892. * Get the requested firewall zone name of the logical interface.
  3893. *
  3894. * Some protocol implementations request a specific firewall zone
  3895. * to trigger inclusion of their resulting network devices into the
  3896. * firewall rule set.
  3897. *
  3898. * @returns {null|string}
  3899. * Returns the requested firewall zone name as published in the
  3900. * `ubus` runtime information or `null` if the remote protocol
  3901. * handler didn't request a zone.
  3902. */
  3903. getZoneName: function() {
  3904. var d = this._ubus('data');
  3905. if (L.isObject(d) &amp;&amp; typeof(d.zone) == 'string')
  3906. return d.zone;
  3907. return null;
  3908. },
  3909. /**
  3910. * Query the first (primary) IPv4 address of the logical interface.
  3911. *
  3912. * @returns {null|string}
  3913. * Returns the primary IPv4 address registered by the protocol handler
  3914. * or `null` if no IPv4 addresses were set.
  3915. */
  3916. getIPAddr: function() {
  3917. var addrs = this._ubus('ipv4-address');
  3918. return ((Array.isArray(addrs) &amp;&amp; addrs.length) ? addrs[0].address : null);
  3919. },
  3920. /**
  3921. * Query all IPv4 addresses of the logical interface.
  3922. *
  3923. * @returns {string[]}
  3924. * Returns an array of IPv4 addresses in CIDR notation which have been
  3925. * registered by the protocol handler. The order of the resulting array
  3926. * follows the order of the addresses in `ubus` runtime information.
  3927. */
  3928. getIPAddrs: function() {
  3929. var addrs = this._ubus('ipv4-address'),
  3930. rv = [];
  3931. if (Array.isArray(addrs))
  3932. for (var i = 0; i &lt; addrs.length; i++)
  3933. rv.push('%s/%d'.format(addrs[i].address, addrs[i].mask));
  3934. return rv;
  3935. },
  3936. /**
  3937. * Query the first (primary) IPv4 netmask of the logical interface.
  3938. *
  3939. * @returns {null|string}
  3940. * Returns the netmask of the primary IPv4 address registered by the
  3941. * protocol handler or `null` if no IPv4 addresses were set.
  3942. */
  3943. getNetmask: function() {
  3944. var addrs = this._ubus('ipv4-address');
  3945. if (Array.isArray(addrs) &amp;&amp; addrs.length)
  3946. return prefixToMask(addrs[0].mask, false);
  3947. },
  3948. /**
  3949. * Query the gateway (nexthop) of the default route associated with
  3950. * this logical interface.
  3951. *
  3952. * @returns {string}
  3953. * Returns a string containing the IPv4 nexthop address of the associated
  3954. * default route or `null` if no default route was found.
  3955. */
  3956. getGatewayAddr: function() {
  3957. var routes = this._ubus('route');
  3958. if (Array.isArray(routes))
  3959. for (var i = 0; i &lt; routes.length; i++)
  3960. if (typeof(routes[i]) == 'object' &amp;&amp;
  3961. routes[i].target == '0.0.0.0' &amp;&amp;
  3962. routes[i].mask == 0)
  3963. return routes[i].nexthop;
  3964. return null;
  3965. },
  3966. /**
  3967. * Query the IPv4 DNS servers associated with the logical interface.
  3968. *
  3969. * @returns {string[]}
  3970. * Returns an array of IPv4 DNS servers registered by the remote
  3971. * protocol back-end.
  3972. */
  3973. getDNSAddrs: function() {
  3974. var addrs = this._ubus('dns-server'),
  3975. rv = [];
  3976. if (Array.isArray(addrs))
  3977. for (var i = 0; i &lt; addrs.length; i++)
  3978. if (!/:/.test(addrs[i]))
  3979. rv.push(addrs[i]);
  3980. return rv;
  3981. },
  3982. /**
  3983. * Query the first (primary) IPv6 address of the logical interface.
  3984. *
  3985. * @returns {null|string}
  3986. * Returns the primary IPv6 address registered by the protocol handler
  3987. * in CIDR notation or `null` if no IPv6 addresses were set.
  3988. */
  3989. getIP6Addr: function() {
  3990. var addrs = this._ubus('ipv6-address');
  3991. if (Array.isArray(addrs) &amp;&amp; L.isObject(addrs[0]))
  3992. return '%s/%d'.format(addrs[0].address, addrs[0].mask);
  3993. addrs = this._ubus('ipv6-prefix-assignment');
  3994. if (Array.isArray(addrs) &amp;&amp; L.isObject(addrs[0]) &amp;&amp; L.isObject(addrs[0]['local-address']))
  3995. return '%s/%d'.format(addrs[0]['local-address'].address, addrs[0]['local-address'].mask);
  3996. return null;
  3997. },
  3998. /**
  3999. * Query all IPv6 addresses of the logical interface.
  4000. *
  4001. * @returns {string[]}
  4002. * Returns an array of IPv6 addresses in CIDR notation which have been
  4003. * registered by the protocol handler. The order of the resulting array
  4004. * follows the order of the addresses in `ubus` runtime information.
  4005. */
  4006. getIP6Addrs: function() {
  4007. var addrs = this._ubus('ipv6-address'),
  4008. rv = [];
  4009. if (Array.isArray(addrs))
  4010. for (var i = 0; i &lt; addrs.length; i++)
  4011. if (L.isObject(addrs[i]))
  4012. rv.push('%s/%d'.format(addrs[i].address, addrs[i].mask));
  4013. addrs = this._ubus('ipv6-prefix-assignment');
  4014. if (Array.isArray(addrs))
  4015. for (var i = 0; i &lt; addrs.length; i++)
  4016. if (L.isObject(addrs[i]) &amp;&amp; L.isObject(addrs[i]['local-address']))
  4017. rv.push('%s/%d'.format(addrs[i]['local-address'].address, addrs[i]['local-address'].mask));
  4018. return rv;
  4019. },
  4020. /**
  4021. * Query the gateway (nexthop) of the IPv6 default route associated with
  4022. * this logical interface.
  4023. *
  4024. * @returns {string}
  4025. * Returns a string containing the IPv6 nexthop address of the associated
  4026. * default route or `null` if no default route was found.
  4027. */
  4028. getGateway6Addr: function() {
  4029. var routes = this._ubus('route');
  4030. if (Array.isArray(routes))
  4031. for (var i = 0; i &lt; routes.length; i++)
  4032. if (typeof(routes[i]) == 'object' &amp;&amp;
  4033. routes[i].target == '::' &amp;&amp;
  4034. routes[i].mask == 0)
  4035. return routes[i].nexthop;
  4036. return null;
  4037. },
  4038. /**
  4039. * Query the IPv6 DNS servers associated with the logical interface.
  4040. *
  4041. * @returns {string[]}
  4042. * Returns an array of IPv6 DNS servers registered by the remote
  4043. * protocol back-end.
  4044. */
  4045. getDNS6Addrs: function() {
  4046. var addrs = this._ubus('dns-server'),
  4047. rv = [];
  4048. if (Array.isArray(addrs))
  4049. for (var i = 0; i &lt; addrs.length; i++)
  4050. if (/:/.test(addrs[i]))
  4051. rv.push(addrs[i]);
  4052. return rv;
  4053. },
  4054. /**
  4055. * Query the routed IPv6 prefix associated with the logical interface.
  4056. *
  4057. * @returns {null|string}
  4058. * Returns the routed IPv6 prefix registered by the remote protocol
  4059. * handler or `null` if no prefix is present.
  4060. */
  4061. getIP6Prefix: function() {
  4062. var prefixes = this._ubus('ipv6-prefix');
  4063. if (Array.isArray(prefixes) &amp;&amp; L.isObject(prefixes[0]))
  4064. return '%s/%d'.format(prefixes[0].address, prefixes[0].mask);
  4065. return null;
  4066. },
  4067. /**
  4068. * Query the routed IPv6 prefixes associated with the logical interface.
  4069. *
  4070. * @returns {null|string[]}
  4071. * Returns an array of the routed IPv6 prefixes registered by the remote
  4072. * protocol handler or `null` if no prefixes are present.
  4073. */
  4074. getIP6Prefixes: function() {
  4075. var prefixes = this._ubus('ipv6-prefix');
  4076. var rv = [];
  4077. if (Array.isArray(prefixes))
  4078. for (var i = 0; i &lt; prefixes.length; i++)
  4079. if (L.isObject(prefixes[i]))
  4080. rv.push('%s/%d'.format(prefixes[i].address, prefixes[i].mask));
  4081. return rv.length > 0 ? rv: null;
  4082. },
  4083. /**
  4084. * Query interface error messages published in `ubus` runtime state.
  4085. *
  4086. * Interface errors are emitted by remote protocol handlers if the setup
  4087. * of the underlying logical interface failed, e.g. due to bad
  4088. * configuration or network connectivity issues.
  4089. *
  4090. * This function will translate the found error codes to human readable
  4091. * messages using the descriptions registered by
  4092. * {@link LuCI.network#registerErrorCode Network.registerErrorCode()}
  4093. * and fall back to `"Unknown error (%s)"` where `%s` is replaced by the
  4094. * error code in case no translation can be found.
  4095. *
  4096. * @returns {string[]}
  4097. * Returns an array of translated interface error messages.
  4098. */
  4099. getErrors: function() {
  4100. var errors = this._ubus('errors'),
  4101. rv = null;
  4102. if (Array.isArray(errors)) {
  4103. for (var i = 0; i &lt; errors.length; i++) {
  4104. if (!L.isObject(errors[i]) || typeof(errors[i].code) != 'string')
  4105. continue;
  4106. rv = rv || [];
  4107. rv.push(proto_errors[errors[i].code] || _('Unknown error (%s)').format(errors[i].code));
  4108. }
  4109. }
  4110. return rv;
  4111. },
  4112. /**
  4113. * Checks whether the underlying logical interface is declared as bridge.
  4114. *
  4115. * @returns {boolean}
  4116. * Returns `true` when the interface is declared with `option type bridge`
  4117. * and when the associated protocol implementation is not marked virtual
  4118. * or `false` when the logical interface is no bridge.
  4119. */
  4120. isBridge: function() {
  4121. return (!this.isVirtual() &amp;&amp; this.getType() == 'bridge');
  4122. },
  4123. /**
  4124. * Get the name of the opkg package providing the protocol functionality.
  4125. *
  4126. * This function should be overwritten by protocol specific subclasses.
  4127. *
  4128. * @abstract
  4129. *
  4130. * @returns {string}
  4131. * Returns the name of the opkg package required for the protocol to
  4132. * function, e.g. `odhcp6c` for the `dhcpv6` protocol.
  4133. */
  4134. getOpkgPackage: function() {
  4135. return null;
  4136. },
  4137. /**
  4138. * Check function for the protocol handler if a new interface is creatable.
  4139. *
  4140. * This function should be overwritten by protocol specific subclasses.
  4141. *
  4142. * @abstract
  4143. *
  4144. * @param {string} ifname
  4145. * The name of the interface to be created.
  4146. *
  4147. * @returns {Promise&lt;void>}
  4148. * Returns a promise resolving if new interface is creatable, else
  4149. * rejects with an error message string.
  4150. */
  4151. isCreateable: function(ifname) {
  4152. return Promise.resolve(null);
  4153. },
  4154. /**
  4155. * Checks whether the protocol functionality is installed.
  4156. *
  4157. * This function exists for compatibility with old code, it always
  4158. * returns `true`.
  4159. *
  4160. * @deprecated
  4161. * @abstract
  4162. *
  4163. * @returns {boolean}
  4164. * Returns `true` if the protocol support is installed, else `false`.
  4165. */
  4166. isInstalled: function() {
  4167. return true;
  4168. },
  4169. /**
  4170. * Checks whether this protocol is "virtual".
  4171. *
  4172. * A "virtual" protocol is a protocol which spawns its own interfaces
  4173. * on demand instead of using existing physical interfaces.
  4174. *
  4175. * Examples for virtual protocols are `6in4` which `gre` spawn tunnel
  4176. * network device on startup, examples for non-virtual protocols are
  4177. * `dhcp` or `static` which apply IP configuration to existing interfaces.
  4178. *
  4179. * This function should be overwritten by subclasses.
  4180. *
  4181. * @returns {boolean}
  4182. * Returns a boolean indicating whether the underlying protocol spawns
  4183. * dynamic interfaces (`true`) or not (`false`).
  4184. */
  4185. isVirtual: function() {
  4186. return false;
  4187. },
  4188. /**
  4189. * Checks whether this protocol is "floating".
  4190. *
  4191. * A "floating" protocol is a protocol which spawns its own interfaces
  4192. * on demand, like a virtual one but which relies on an existing lower
  4193. * level interface to initiate the connection.
  4194. *
  4195. * An example for such a protocol is "pppoe".
  4196. *
  4197. * This function exists for backwards compatibility with older code
  4198. * but should not be used anymore.
  4199. *
  4200. * @deprecated
  4201. * @returns {boolean}
  4202. * Returns a boolean indicating whether this protocol is floating (`true`)
  4203. * or not (`false`).
  4204. */
  4205. isFloating: function() {
  4206. return false;
  4207. },
  4208. /**
  4209. * Checks whether this logical interface is dynamic.
  4210. *
  4211. * A dynamic interface is an interface which has been created at runtime,
  4212. * e.g. as sub-interface of another interface, but which is not backed by
  4213. * any user configuration. Such dynamic interfaces cannot be edited but
  4214. * only brought down or restarted.
  4215. *
  4216. * @returns {boolean}
  4217. * Returns a boolean indicating whether this interface is dynamic (`true`)
  4218. * or not (`false`).
  4219. */
  4220. isDynamic: function() {
  4221. return (this._ubus('dynamic') == true);
  4222. },
  4223. /**
  4224. * Checks whether this interface is an alias interface.
  4225. *
  4226. * Alias interfaces are interfaces layering on top of another interface
  4227. * and are denoted by a special `@interfacename` notation in the
  4228. * underlying `device` option.
  4229. *
  4230. * @returns {null|string}
  4231. * Returns the name of the parent interface if this logical interface
  4232. * is an alias or `null` if it is not an alias interface.
  4233. */
  4234. isAlias: function() {
  4235. var ifnames = L.toArray(uci.get('network', this.sid, 'device')),
  4236. parent = null;
  4237. for (var i = 0; i &lt; ifnames.length; i++)
  4238. if (ifnames[i].charAt(0) == '@')
  4239. parent = ifnames[i].substr(1);
  4240. else if (parent != null)
  4241. parent = null;
  4242. return parent;
  4243. },
  4244. /**
  4245. * Checks whether this logical interface is "empty", where empty means that it
  4246. * has no network devices attached.
  4247. *
  4248. * @returns {boolean}
  4249. * Returns `true` if this logical interface is empty, else `false`.
  4250. */
  4251. isEmpty: function() {
  4252. if (this.isFloating())
  4253. return false;
  4254. var empty = true,
  4255. device = this._get('device');
  4256. if (device != null &amp;&amp; device.match(/\S+/))
  4257. empty = false;
  4258. if (empty == true &amp;&amp; getWifiNetidBySid(this.sid) != null)
  4259. empty = false;
  4260. return empty;
  4261. },
  4262. /**
  4263. * Checks whether this logical interface is configured and running.
  4264. *
  4265. * @returns {boolean}
  4266. * Returns `true` when the interface is active or `false` when it is not.
  4267. */
  4268. isUp: function() {
  4269. return (this._ubus('up') == true);
  4270. },
  4271. /**
  4272. * Add the given network device to the logical interface.
  4273. *
  4274. * @param {LuCI.network.Protocol|LuCI.network.Device|LuCI.network.WifiDevice|LuCI.network.WifiNetwork|string} device
  4275. * The object or device name to add to the logical interface. In case the
  4276. * given argument is not a string, it is resolved though the
  4277. * {@link LuCI.network#getIfnameOf Network.getIfnameOf()} function.
  4278. *
  4279. * @returns {boolean}
  4280. * Returns `true` if the device name has been added or `false` if any
  4281. * argument was invalid, if the device was already part of the logical
  4282. * interface or if the logical interface is virtual.
  4283. */
  4284. addDevice: function(device) {
  4285. device = ifnameOf(device);
  4286. if (device == null || this.isFloating())
  4287. return false;
  4288. var wif = getWifiSidByIfname(device);
  4289. if (wif != null)
  4290. return appendValue('wireless', wif, 'network', this.sid);
  4291. return appendValue('network', this.sid, 'device', device);
  4292. },
  4293. /**
  4294. * Remove the given network device from the logical interface.
  4295. *
  4296. * @param {LuCI.network.Protocol|LuCI.network.Device|LuCI.network.WifiDevice|LuCI.network.WifiNetwork|string} device
  4297. * The object or device name to remove from the logical interface. In case
  4298. * the given argument is not a string, it is resolved though the
  4299. * {@link LuCI.network#getIfnameOf Network.getIfnameOf()} function.
  4300. *
  4301. * @returns {boolean}
  4302. * Returns `true` if the device name has been added or `false` if any
  4303. * argument was invalid, if the device was already part of the logical
  4304. * interface or if the logical interface is virtual.
  4305. */
  4306. deleteDevice: function(device) {
  4307. var rv = false;
  4308. device = ifnameOf(device);
  4309. if (device == null || this.isFloating())
  4310. return false;
  4311. var wif = getWifiSidByIfname(device);
  4312. if (wif != null)
  4313. rv = removeValue('wireless', wif, 'network', this.sid);
  4314. if (removeValue('network', this.sid, 'device', device))
  4315. rv = true;
  4316. return rv;
  4317. },
  4318. /**
  4319. * Returns the Linux network device associated with this logical
  4320. * interface.
  4321. *
  4322. * @returns {LuCI.network.Device}
  4323. * Returns a `Network.Device` class instance representing the
  4324. * expected Linux network device according to the configuration.
  4325. */
  4326. getDevice: function() {
  4327. if (this.isVirtual()) {
  4328. var ifname = '%s-%s'.format(this.getProtocol(), this.sid);
  4329. _state.isTunnel[this.getProtocol() + '-' + this.sid] = true;
  4330. return Network.prototype.instantiateDevice(ifname, this);
  4331. }
  4332. else if (this.isBridge()) {
  4333. var ifname = 'br-%s'.format(this.sid);
  4334. _state.isBridge[ifname] = true;
  4335. return new Device(ifname, this);
  4336. }
  4337. else {
  4338. var ifnames = L.toArray(uci.get('network', this.sid, 'device'));
  4339. for (var i = 0; i &lt; ifnames.length; i++) {
  4340. var m = ifnames[i].match(/^([^:/]+)/);
  4341. return ((m &amp;&amp; m[1]) ? Network.prototype.instantiateDevice(m[1], this) : null);
  4342. }
  4343. ifname = getWifiNetidByNetname(this.sid);
  4344. return (ifname != null ? Network.prototype.instantiateDevice(ifname[0], this) : null);
  4345. }
  4346. },
  4347. /**
  4348. * Returns the layer 2 Linux network device currently associated
  4349. * with this logical interface.
  4350. *
  4351. * @returns {LuCI.network.Device}
  4352. * Returns a `Network.Device` class instance representing the Linux
  4353. * network device currently associated with the logical interface.
  4354. */
  4355. getL2Device: function() {
  4356. var ifname = this._ubus('device');
  4357. return (ifname != null ? Network.prototype.instantiateDevice(ifname, this) : null);
  4358. },
  4359. /**
  4360. * Returns the layer 3 Linux network device currently associated
  4361. * with this logical interface.
  4362. *
  4363. * @returns {LuCI.network.Device}
  4364. * Returns a `Network.Device` class instance representing the Linux
  4365. * network device currently associated with the logical interface.
  4366. */
  4367. getL3Device: function() {
  4368. var ifname = this._ubus('l3_device');
  4369. return (ifname != null ? Network.prototype.instantiateDevice(ifname, this) : null);
  4370. },
  4371. /**
  4372. * Returns a list of network sub-devices associated with this logical
  4373. * interface.
  4374. *
  4375. * @returns {null|Array&lt;LuCI.network.Device>}
  4376. * Returns an array of `Network.Device` class instances representing
  4377. * the sub-devices attached to this logical interface or `null` if the
  4378. * logical interface does not support sub-devices, e.g. because it is
  4379. * virtual and not a bridge.
  4380. */
  4381. getDevices: function() {
  4382. var rv = [];
  4383. if (!this.isBridge() &amp;&amp; !(this.isVirtual() &amp;&amp; !this.isFloating()))
  4384. return null;
  4385. var device = uci.get('network', this.sid, 'device');
  4386. if (device &amp;&amp; device.charAt(0) != '@') {
  4387. var m = device.match(/^([^:/]+)/);
  4388. if (m != null)
  4389. rv.push(Network.prototype.instantiateDevice(m[1], this));
  4390. }
  4391. var uciWifiIfaces = uci.sections('wireless', 'wifi-iface');
  4392. for (var i = 0; i &lt; uciWifiIfaces.length; i++) {
  4393. if (typeof(uciWifiIfaces[i].device) != 'string')
  4394. continue;
  4395. var networks = L.toArray(uciWifiIfaces[i].network);
  4396. for (var j = 0; j &lt; networks.length; j++) {
  4397. if (networks[j] != this.sid)
  4398. continue;
  4399. var netid = getWifiNetidBySid(uciWifiIfaces[i]['.name']);
  4400. if (netid != null)
  4401. rv.push(Network.prototype.instantiateDevice(netid[0], this));
  4402. }
  4403. }
  4404. rv.sort(deviceSort);
  4405. return rv;
  4406. },
  4407. /**
  4408. * Checks whether this logical interface contains the given device
  4409. * object.
  4410. *
  4411. * @param {LuCI.network.Protocol|LuCI.network.Device|LuCI.network.WifiDevice|LuCI.network.WifiNetwork|string} device
  4412. * The object or device name to check. In case the given argument is not
  4413. * a string, it is resolved though the
  4414. * {@link LuCI.network#getIfnameOf Network.getIfnameOf()} function.
  4415. *
  4416. * @returns {boolean}
  4417. * Returns `true` when this logical interface contains the given network
  4418. * device or `false` if not.
  4419. */
  4420. containsDevice: function(device) {
  4421. device = ifnameOf(device);
  4422. if (device == null)
  4423. return false;
  4424. else if (this.isVirtual() &amp;&amp; '%s-%s'.format(this.getProtocol(), this.sid) == device)
  4425. return true;
  4426. else if (this.isBridge() &amp;&amp; 'br-%s'.format(this.sid) == device)
  4427. return true;
  4428. var name = uci.get('network', this.sid, 'device');
  4429. if (name) {
  4430. var m = name.match(/^([^:/]+)/);
  4431. if (m != null &amp;&amp; m[1] == device)
  4432. return true;
  4433. }
  4434. var wif = getWifiSidByIfname(device);
  4435. if (wif != null) {
  4436. var networks = L.toArray(uci.get('wireless', wif, 'network'));
  4437. for (var i = 0; i &lt; networks.length; i++)
  4438. if (networks[i] == this.sid)
  4439. return true;
  4440. }
  4441. return false;
  4442. },
  4443. /**
  4444. * Cleanup related configuration entries.
  4445. *
  4446. * This function will be invoked if an interface is about to be removed
  4447. * from the configuration and is responsible for performing any required
  4448. * cleanup tasks, such as unsetting uci entries in related configurations.
  4449. *
  4450. * It should be overwritten by protocol specific subclasses.
  4451. *
  4452. * @abstract
  4453. *
  4454. * @returns {*|Promise&lt;*>}
  4455. * This function may return a promise which is awaited before the rest of
  4456. * the configuration is removed. Any non-promise return value and any
  4457. * resolved promise value is ignored. If the returned promise is rejected,
  4458. * the interface removal will be aborted.
  4459. */
  4460. deleteConfiguration: function() {}
  4461. });
  4462. /**
  4463. * @class
  4464. * @memberof LuCI.network
  4465. * @hideconstructor
  4466. * @classdesc
  4467. *
  4468. * A `Network.Device` class instance represents an underlying Linux network
  4469. * device and allows querying device details such as packet statistics or MTU.
  4470. */
  4471. Device = baseclass.extend(/** @lends LuCI.network.Device.prototype */ {
  4472. __init__: function(device, network) {
  4473. var wif = getWifiSidByIfname(device);
  4474. if (wif != null) {
  4475. var res = getWifiStateBySid(wif) || [],
  4476. netid = getWifiNetidBySid(wif) || [];
  4477. this.wif = new WifiNetwork(wif, res[0], res[1], netid[0], res[2], { ifname: device });
  4478. this.device = this.wif.getIfname();
  4479. }
  4480. this.device = this.device || device;
  4481. this.dev = Object.assign({}, _state.netdevs[this.device]);
  4482. this.network = network;
  4483. var conf;
  4484. uci.sections('network', 'device', function(s) {
  4485. if (s.name == device)
  4486. conf = s;
  4487. });
  4488. this.config = Object.assign({}, conf);
  4489. },
  4490. _devstate: function(/* ... */) {
  4491. var rv = this.dev;
  4492. for (var i = 0; i &lt; arguments.length; i++)
  4493. if (L.isObject(rv))
  4494. rv = rv[arguments[i]];
  4495. else
  4496. return null;
  4497. return rv;
  4498. },
  4499. /**
  4500. * Get the name of the network device.
  4501. *
  4502. * @returns {string}
  4503. * Returns the name of the device, e.g. `eth0` or `wlan0`.
  4504. */
  4505. getName: function() {
  4506. return (this.wif != null ? this.wif.getIfname() : this.device);
  4507. },
  4508. /**
  4509. * Get the MAC address of the device.
  4510. *
  4511. * @returns {null|string}
  4512. * Returns the MAC address of the device or `null` if not applicable,
  4513. * e.g. for non-Ethernet tunnel devices.
  4514. */
  4515. getMAC: function() {
  4516. var mac = this._devstate('macaddr');
  4517. return mac ? mac.toUpperCase() : null;
  4518. },
  4519. /**
  4520. * Get the MTU of the device.
  4521. *
  4522. * @returns {number}
  4523. * Returns the MTU of the device.
  4524. */
  4525. getMTU: function() {
  4526. return this._devstate('mtu');
  4527. },
  4528. /**
  4529. * Get the IPv4 addresses configured on the device.
  4530. *
  4531. * @returns {string[]}
  4532. * Returns an array of IPv4 address strings.
  4533. */
  4534. getIPAddrs: function() {
  4535. var addrs = this._devstate('ipaddrs');
  4536. return (Array.isArray(addrs) ? addrs : []);
  4537. },
  4538. /**
  4539. * Get the IPv6 addresses configured on the device.
  4540. *
  4541. * @returns {string[]}
  4542. * Returns an array of IPv6 address strings.
  4543. */
  4544. getIP6Addrs: function() {
  4545. var addrs = this._devstate('ip6addrs');
  4546. return (Array.isArray(addrs) ? addrs : []);
  4547. },
  4548. /**
  4549. * Get the type of the device.
  4550. *
  4551. * @returns {string}
  4552. * Returns a string describing the type of the network device:
  4553. * - `alias` if it is an abstract alias device (`@` notation)
  4554. * - `wifi` if it is a wireless interface (e.g. `wlan0`)
  4555. * - `bridge` if it is a bridge device (e.g. `br-lan`)
  4556. * - `tunnel` if it is a tun or tap device (e.g. `tun0`)
  4557. * - `vlan` if it is a vlan device (e.g. `eth0.1`)
  4558. * - `switch` if it is a switch device (e.g.`eth1` connected to switch0)
  4559. * - `ethernet` for all other device types
  4560. */
  4561. getType: function() {
  4562. if (this.device != null &amp;&amp; this.device.charAt(0) == '@')
  4563. return 'alias';
  4564. else if (this.dev.devtype == 'wlan' || this.wif != null || isWifiIfname(this.device))
  4565. return 'wifi';
  4566. else if (this.dev.devtype == 'bridge' || _state.isBridge[this.device])
  4567. return 'bridge';
  4568. else if (_state.isTunnel[this.device])
  4569. return 'tunnel';
  4570. else if (this.dev.devtype == 'vlan' || this.device.indexOf('.') > -1)
  4571. return 'vlan';
  4572. else if (this.dev.devtype == 'dsa' || _state.isSwitch[this.device])
  4573. return 'switch';
  4574. else if (this.config.type == '8021q' || this.config.type == '8021ad')
  4575. return 'vlan';
  4576. else if (this.config.type == 'bridge')
  4577. return 'bridge';
  4578. else
  4579. return 'ethernet';
  4580. },
  4581. /**
  4582. * Get a short description string for the device.
  4583. *
  4584. * @returns {string}
  4585. * Returns the device name for non-WiFi devices or a string containing
  4586. * the operation mode and SSID for WiFi devices.
  4587. */
  4588. getShortName: function() {
  4589. if (this.wif != null)
  4590. return this.wif.getShortName();
  4591. return this.device;
  4592. },
  4593. /**
  4594. * Get a long description string for the device.
  4595. *
  4596. * @returns {string}
  4597. * Returns a string containing the type description and device name
  4598. * for non-WiFi devices or operation mode and SSID for WiFi ones.
  4599. */
  4600. getI18n: function() {
  4601. if (this.wif != null) {
  4602. return '%s: %s "%s"'.format(
  4603. _('Wireless Network'),
  4604. this.wif.getActiveMode(),
  4605. this.wif.getActiveSSID() || this.wif.getActiveBSSID() || this.wif.getID() || '?');
  4606. }
  4607. return '%s: "%s"'.format(this.getTypeI18n(), this.getName());
  4608. },
  4609. /**
  4610. * Get a string describing the device type.
  4611. *
  4612. * @returns {string}
  4613. * Returns a string describing the type, e.g. "Wireless Adapter" or
  4614. * "Bridge".
  4615. */
  4616. getTypeI18n: function() {
  4617. switch (this.getType()) {
  4618. case 'alias':
  4619. return _('Alias Interface');
  4620. case 'wifi':
  4621. return _('Wireless Adapter');
  4622. case 'bridge':
  4623. return _('Bridge');
  4624. case 'switch':
  4625. return (_state.netdevs[this.device] &amp;&amp; _state.netdevs[this.device].devtype == 'dsa')
  4626. ? _('Switch port') : _('Ethernet Switch');
  4627. case 'vlan':
  4628. return (_state.isSwitch[this.device] ? _('Switch VLAN') : _('Software VLAN'));
  4629. case 'tunnel':
  4630. return _('Tunnel Interface');
  4631. default:
  4632. return _('Ethernet Adapter');
  4633. }
  4634. },
  4635. /**
  4636. * Get the associated bridge ports of the device.
  4637. *
  4638. * @returns {null|Array&lt;LuCI.network.Device>}
  4639. * Returns an array of `Network.Device` instances representing the ports
  4640. * (slave interfaces) of the bridge or `null` when this device isn't
  4641. * a Linux bridge.
  4642. */
  4643. getPorts: function() {
  4644. var br = _state.bridges[this.device],
  4645. rv = [];
  4646. if (br == null || !Array.isArray(br.ifnames))
  4647. return null;
  4648. for (var i = 0; i &lt; br.ifnames.length; i++)
  4649. rv.push(Network.prototype.instantiateDevice(br.ifnames[i].name));
  4650. rv.sort(deviceSort);
  4651. return rv;
  4652. },
  4653. /**
  4654. * Get the bridge ID
  4655. *
  4656. * @returns {null|string}
  4657. * Returns the ID of this network bridge or `null` if this network
  4658. * device is not a Linux bridge.
  4659. */
  4660. getBridgeID: function() {
  4661. var br = _state.bridges[this.device];
  4662. return (br != null ? br.id : null);
  4663. },
  4664. /**
  4665. * Get the bridge STP setting
  4666. *
  4667. * @returns {boolean}
  4668. * Returns `true` when this device is a Linux bridge and has `stp`
  4669. * enabled, else `false`.
  4670. */
  4671. getBridgeSTP: function() {
  4672. var br = _state.bridges[this.device];
  4673. return (br != null ? !!br.stp : false);
  4674. },
  4675. /**
  4676. * Checks whether this device is up.
  4677. *
  4678. * @returns {boolean}
  4679. * Returns `true` when the associated device is running pr `false`
  4680. * when it is down or absent.
  4681. */
  4682. isUp: function() {
  4683. var up = this._devstate('flags', 'up');
  4684. if (up == null)
  4685. up = (this.getType() == 'alias');
  4686. return up;
  4687. },
  4688. /**
  4689. * Checks whether this device is a Linux bridge.
  4690. *
  4691. * @returns {boolean}
  4692. * Returns `true` when the network device is present and a Linux bridge,
  4693. * else `false`.
  4694. */
  4695. isBridge: function() {
  4696. return (this.getType() == 'bridge');
  4697. },
  4698. /**
  4699. * Checks whether this device is part of a Linux bridge.
  4700. *
  4701. * @returns {boolean}
  4702. * Returns `true` when this network device is part of a bridge,
  4703. * else `false`.
  4704. */
  4705. isBridgePort: function() {
  4706. return (this._devstate('bridge') != null);
  4707. },
  4708. /**
  4709. * Get the amount of transmitted bytes.
  4710. *
  4711. * @returns {number}
  4712. * Returns the amount of bytes transmitted by the network device.
  4713. */
  4714. getTXBytes: function() {
  4715. var stat = this._devstate('stats');
  4716. return (stat != null ? stat.tx_bytes || 0 : 0);
  4717. },
  4718. /**
  4719. * Get the amount of received bytes.
  4720. *
  4721. * @returns {number}
  4722. * Returns the amount of bytes received by the network device.
  4723. */
  4724. getRXBytes: function() {
  4725. var stat = this._devstate('stats');
  4726. return (stat != null ? stat.rx_bytes || 0 : 0);
  4727. },
  4728. /**
  4729. * Get the amount of transmitted packets.
  4730. *
  4731. * @returns {number}
  4732. * Returns the amount of packets transmitted by the network device.
  4733. */
  4734. getTXPackets: function() {
  4735. var stat = this._devstate('stats');
  4736. return (stat != null ? stat.tx_packets || 0 : 0);
  4737. },
  4738. /**
  4739. * Get the amount of received packets.
  4740. *
  4741. * @returns {number}
  4742. * Returns the amount of packets received by the network device.
  4743. */
  4744. getRXPackets: function() {
  4745. var stat = this._devstate('stats');
  4746. return (stat != null ? stat.rx_packets || 0 : 0);
  4747. },
  4748. /**
  4749. * Get the carrier state of the network device.
  4750. *
  4751. * @returns {boolean}
  4752. * Returns true if the device has a carrier, e.g. when a cable is
  4753. * inserted into an Ethernet port of false if there is none.
  4754. */
  4755. getCarrier: function() {
  4756. var link = this._devstate('link');
  4757. return (link != null ? link.carrier || false : false);
  4758. },
  4759. /**
  4760. * Get the current link speed of the network device if available.
  4761. *
  4762. * @returns {number|null}
  4763. * Returns the current speed of the network device in Mbps. If the
  4764. * device supports no Ethernet speed levels, null is returned.
  4765. * If the device supports Ethernet speeds but has no carrier, -1 is
  4766. * returned.
  4767. */
  4768. getSpeed: function() {
  4769. var link = this._devstate('link');
  4770. return (link != null ? link.speed || null : null);
  4771. },
  4772. /**
  4773. * Get the current duplex mode of the network device if available.
  4774. *
  4775. * @returns {string|null}
  4776. * Returns the current duplex mode of the network device. Returns
  4777. * either "full" or "half" if the device supports duplex modes or
  4778. * null if the duplex mode is unknown or unsupported.
  4779. */
  4780. getDuplex: function() {
  4781. var link = this._devstate('link'),
  4782. duplex = link ? link.duplex : null;
  4783. return (duplex != 'unknown') ? duplex : null;
  4784. },
  4785. /**
  4786. * Get the primary logical interface this device is assigned to.
  4787. *
  4788. * @returns {null|LuCI.network.Protocol}
  4789. * Returns a `Network.Protocol` instance representing the logical
  4790. * interface this device is attached to or `null` if it is not
  4791. * assigned to any logical interface.
  4792. */
  4793. getNetwork: function() {
  4794. return this.getNetworks()[0];
  4795. },
  4796. /**
  4797. * Get the logical interfaces this device is assigned to.
  4798. *
  4799. * @returns {Array&lt;LuCI.network.Protocol>}
  4800. * Returns an array of `Network.Protocol` instances representing the
  4801. * logical interfaces this device is assigned to.
  4802. */
  4803. getNetworks: function() {
  4804. if (this.networks == null) {
  4805. this.networks = [];
  4806. var networks = enumerateNetworks.apply(L.network);
  4807. for (var i = 0; i &lt; networks.length; i++)
  4808. if (networks[i].containsDevice(this.device) || networks[i].getIfname() == this.device)
  4809. this.networks.push(networks[i]);
  4810. this.networks.sort(networkSort);
  4811. }
  4812. return this.networks;
  4813. },
  4814. /**
  4815. * Get the related wireless network this device is related to.
  4816. *
  4817. * @returns {null|LuCI.network.WifiNetwork}
  4818. * Returns a `Network.WifiNetwork` instance representing the wireless
  4819. * network corresponding to this network device or `null` if this device
  4820. * is not a wireless device.
  4821. */
  4822. getWifiNetwork: function() {
  4823. return (this.wif != null ? this.wif : null);
  4824. },
  4825. /**
  4826. * Get the logical parent device of this device.
  4827. *
  4828. * In case of DSA switch ports, the parent device will be the DSA switch
  4829. * device itself, for VLAN devices, the parent refers to the base device
  4830. * etc.
  4831. *
  4832. * @returns {null|LuCI.network.Device}
  4833. * Returns a `Network.Device` instance representing the parent device or
  4834. * `null` when this device has no parent, as it is the case for e.g.
  4835. * ordinary Ethernet interfaces.
  4836. */
  4837. getParent: function() {
  4838. if (this.dev.parent)
  4839. return Network.prototype.instantiateDevice(this.dev.parent);
  4840. if ((this.config.type == '8021q' || this.config.type == '802ad') &amp;&amp; typeof(this.config.ifname) == 'string')
  4841. return Network.prototype.instantiateDevice(this.config.ifname);
  4842. return null;
  4843. }
  4844. });
  4845. /**
  4846. * @class
  4847. * @memberof LuCI.network
  4848. * @hideconstructor
  4849. * @classdesc
  4850. *
  4851. * A `Network.WifiDevice` class instance represents a wireless radio device
  4852. * present on the system and provides wireless capability information as
  4853. * well as methods for enumerating related wireless networks.
  4854. */
  4855. WifiDevice = baseclass.extend(/** @lends LuCI.network.WifiDevice.prototype */ {
  4856. __init__: function(name, radiostate) {
  4857. var uciWifiDevice = uci.get('wireless', name);
  4858. if (uciWifiDevice != null &amp;&amp;
  4859. uciWifiDevice['.type'] == 'wifi-device' &amp;&amp;
  4860. uciWifiDevice['.name'] != null) {
  4861. this.sid = uciWifiDevice['.name'];
  4862. }
  4863. this.sid = this.sid || name;
  4864. this._ubusdata = {
  4865. radio: name,
  4866. dev: radiostate
  4867. };
  4868. },
  4869. /* private */
  4870. ubus: function(/* ... */) {
  4871. var v = this._ubusdata;
  4872. for (var i = 0; i &lt; arguments.length; i++)
  4873. if (L.isObject(v))
  4874. v = v[arguments[i]];
  4875. else
  4876. return null;
  4877. return v;
  4878. },
  4879. /**
  4880. * Read the given UCI option value of this wireless device.
  4881. *
  4882. * @param {string} opt
  4883. * The UCI option name to read.
  4884. *
  4885. * @returns {null|string|string[]}
  4886. * Returns the UCI option value or `null` if the requested option is
  4887. * not found.
  4888. */
  4889. get: function(opt) {
  4890. return uci.get('wireless', this.sid, opt);
  4891. },
  4892. /**
  4893. * Set the given UCI option of this network to the given value.
  4894. *
  4895. * @param {string} opt
  4896. * The name of the UCI option to set.
  4897. *
  4898. * @param {null|string|string[]} value
  4899. * The value to set or `null` to remove the given option from the
  4900. * configuration.
  4901. */
  4902. set: function(opt, value) {
  4903. return uci.set('wireless', this.sid, opt, value);
  4904. },
  4905. /**
  4906. * Checks whether this wireless radio is disabled.
  4907. *
  4908. * @returns {boolean}
  4909. * Returns `true` when the wireless radio is marked as disabled in `ubus`
  4910. * runtime state or when the `disabled` option is set in the corresponding
  4911. * UCI configuration.
  4912. */
  4913. isDisabled: function() {
  4914. return this.ubus('dev', 'disabled') || this.get('disabled') == '1';
  4915. },
  4916. /**
  4917. * Get the configuration name of this wireless radio.
  4918. *
  4919. * @returns {string}
  4920. * Returns the UCI section name (e.g. `radio0`) of the corresponding
  4921. * radio configuration which also serves as unique logical identifier
  4922. * for the wireless phy.
  4923. */
  4924. getName: function() {
  4925. return this.sid;
  4926. },
  4927. /**
  4928. * Gets a list of supported hwmodes.
  4929. *
  4930. * The hwmode values describe the frequency band and wireless standard
  4931. * versions supported by the wireless phy.
  4932. *
  4933. * @returns {string[]}
  4934. * Returns an array of valid hwmode values for this radio. Currently
  4935. * known mode values are:
  4936. * - `a` - Legacy 802.11a mode, 5 GHz, up to 54 Mbit/s
  4937. * - `b` - Legacy 802.11b mode, 2.4 GHz, up to 11 Mbit/s
  4938. * - `g` - Legacy 802.11g mode, 2.4 GHz, up to 54 Mbit/s
  4939. * - `n` - IEEE 802.11n mode, 2.4 or 5 GHz, up to 600 Mbit/s
  4940. * - `ac` - IEEE 802.11ac mode, 5 GHz, up to 6770 Mbit/s
  4941. * - `ax` - IEEE 802.11ax mode, 2.4 or 5 GHz
  4942. * - 'be' - IEEE 802.11be mode, 2.4, 5 or 6 GHz
  4943. */
  4944. getHWModes: function() {
  4945. var hwmodes = this.ubus('dev', 'iwinfo', 'hwmodes');
  4946. return Array.isArray(hwmodes) ? hwmodes : [ 'b', 'g' ];
  4947. },
  4948. /**
  4949. * Gets a list of supported htmodes.
  4950. *
  4951. * The htmode values describe the wide-frequency options supported by
  4952. * the wireless phy.
  4953. *
  4954. * @returns {string[]}
  4955. * Returns an array of valid htmode values for this radio. Currently
  4956. * known mode values are:
  4957. * - `HT20` - applicable to IEEE 802.11n, 20 MHz wide channels
  4958. * - `HT40` - applicable to IEEE 802.11n, 40 MHz wide channels
  4959. * - `VHT20` - applicable to IEEE 802.11ac, 20 MHz wide channels
  4960. * - `VHT40` - applicable to IEEE 802.11ac, 40 MHz wide channels
  4961. * - `VHT80` - applicable to IEEE 802.11ac, 80 MHz wide channels
  4962. * - `VHT160` - applicable to IEEE 802.11ac, 160 MHz wide channels
  4963. * - `HE20` - applicable to IEEE 802.11ax, 20 MHz wide channels
  4964. * - `HE40` - applicable to IEEE 802.11ax, 40 MHz wide channels
  4965. * - `HE80` - applicable to IEEE 802.11ax, 80 MHz wide channels
  4966. * - `HE160` - applicable to IEEE 802.11ax, 160 MHz wide channels
  4967. * - `EHT20` - applicable to IEEE 802.11be, 20 MHz wide channels
  4968. * - `EHT40` - applicable to IEEE 802.11be, 40 MHz wide channels
  4969. * - `EHT80` - applicable to IEEE 802.11be, 80 MHz wide channels
  4970. * - `EHT160` - applicable to IEEE 802.11be, 160 MHz wide channels
  4971. * - `EHT320` - applicable to IEEE 802.11be, 320 MHz wide channels
  4972. */
  4973. getHTModes: function() {
  4974. var htmodes = this.ubus('dev', 'iwinfo', 'htmodes');
  4975. return (Array.isArray(htmodes) &amp;&amp; htmodes.length) ? htmodes : null;
  4976. },
  4977. /**
  4978. * Get a string describing the wireless radio hardware.
  4979. *
  4980. * @returns {string}
  4981. * Returns the description string.
  4982. */
  4983. getI18n: function() {
  4984. var hw = this.ubus('dev', 'iwinfo', 'hardware'),
  4985. type = L.isObject(hw) ? hw.name : null;
  4986. var modes = this.ubus('dev', 'iwinfo', 'hwmodes_text');
  4987. if (this.ubus('dev', 'iwinfo', 'type') == 'wl')
  4988. type = 'Broadcom';
  4989. return '%s %s Wireless Controller (%s)'.format(
  4990. type || 'Generic',
  4991. modes ? '802.11' + modes : 'unknown',
  4992. this.getName());
  4993. },
  4994. /**
  4995. * A wireless scan result object describes a neighbouring wireless
  4996. * network found in the vicinity.
  4997. *
  4998. * @typedef {Object&lt;string, number|string|LuCI.network.WifiEncryption>} WifiScanResult
  4999. * @memberof LuCI.network
  5000. *
  5001. * @property {string} ssid
  5002. * The SSID / Mesh ID of the network.
  5003. *
  5004. * @property {string} bssid
  5005. * The BSSID if the network.
  5006. *
  5007. * @property {string} mode
  5008. * The operation mode of the network (`Master`, `Ad-Hoc`, `Mesh Point`).
  5009. *
  5010. * @property {number} channel
  5011. * The wireless channel of the network.
  5012. *
  5013. * @property {number} signal
  5014. * The received signal strength of the network in dBm.
  5015. *
  5016. * @property {number} quality
  5017. * The numeric quality level of the signal, can be used in conjunction
  5018. * with `quality_max` to calculate a quality percentage.
  5019. *
  5020. * @property {number} quality_max
  5021. * The maximum possible quality level of the signal, can be used in
  5022. * conjunction with `quality` to calculate a quality percentage.
  5023. *
  5024. * @property {LuCI.network.WifiEncryption} encryption
  5025. * The encryption used by the wireless network.
  5026. */
  5027. /**
  5028. * Trigger a wireless scan on this radio device and obtain a list of
  5029. * nearby networks.
  5030. *
  5031. * @returns {Promise&lt;Array&lt;LuCI.network.WifiScanResult>>}
  5032. * Returns a promise resolving to an array of scan result objects
  5033. * describing the networks found in the vicinity.
  5034. */
  5035. getScanList: function() {
  5036. return callIwinfoScan(this.sid);
  5037. },
  5038. /**
  5039. * Check whether the wireless radio is marked as up in the `ubus`
  5040. * runtime state.
  5041. *
  5042. * @returns {boolean}
  5043. * Returns `true` when the radio device is up, else `false`.
  5044. */
  5045. isUp: function() {
  5046. if (L.isObject(_state.radios[this.sid]))
  5047. return (_state.radios[this.sid].up == true);
  5048. return false;
  5049. },
  5050. /**
  5051. * Get the wifi network of the given name belonging to this radio device
  5052. *
  5053. * @param {string} network
  5054. * The name of the wireless network to look up. This may be either an uci
  5055. * configuration section ID, a network ID in the form `radio#.network#`
  5056. * or a Linux network device name like `wlan0` which is resolved to the
  5057. * corresponding configuration section through `ubus` runtime information.
  5058. *
  5059. * @returns {Promise&lt;LuCI.network.WifiNetwork>}
  5060. * Returns a promise resolving to a `Network.WifiNetwork` instance
  5061. * representing the wireless network and rejecting with `null` if
  5062. * the given network could not be found or is not associated with
  5063. * this radio device.
  5064. */
  5065. getWifiNetwork: function(network) {
  5066. return Network.prototype.getWifiNetwork(network).then(L.bind(function(networkInstance) {
  5067. var uciWifiIface = (networkInstance.sid ? uci.get('wireless', networkInstance.sid) : null);
  5068. if (uciWifiIface == null || uciWifiIface['.type'] != 'wifi-iface' || uciWifiIface.device != this.sid)
  5069. return Promise.reject();
  5070. return networkInstance;
  5071. }, this));
  5072. },
  5073. /**
  5074. * Get all wireless networks associated with this wireless radio device.
  5075. *
  5076. * @returns {Promise&lt;Array&lt;LuCI.network.WifiNetwork>>}
  5077. * Returns a promise resolving to an array of `Network.WifiNetwork`
  5078. * instances representing the wireless networks associated with this
  5079. * radio device.
  5080. */
  5081. getWifiNetworks: function() {
  5082. return Network.prototype.getWifiNetworks().then(L.bind(function(networks) {
  5083. var rv = [];
  5084. for (var i = 0; i &lt; networks.length; i++)
  5085. if (networks[i].getWifiDeviceName() == this.getName())
  5086. rv.push(networks[i]);
  5087. return rv;
  5088. }, this));
  5089. },
  5090. /**
  5091. * Adds a new wireless network associated with this radio device to the
  5092. * configuration and sets its options to the provided values.
  5093. *
  5094. * @param {Object&lt;string, string|string[]>} [options]
  5095. * The options to set for the newly added wireless network.
  5096. *
  5097. * @returns {Promise&lt;null|LuCI.network.WifiNetwork>}
  5098. * Returns a promise resolving to a `WifiNetwork` instance describing
  5099. * the newly added wireless network or `null` if the given options
  5100. * were invalid.
  5101. */
  5102. addWifiNetwork: function(options) {
  5103. if (!L.isObject(options))
  5104. options = {};
  5105. options.device = this.sid;
  5106. return Network.prototype.addWifiNetwork(options);
  5107. },
  5108. /**
  5109. * Deletes the wireless network with the given name associated with this
  5110. * radio device.
  5111. *
  5112. * @param {string} network
  5113. * The name of the wireless network to look up. This may be either an uci
  5114. * configuration section ID, a network ID in the form `radio#.network#`
  5115. * or a Linux network device name like `wlan0` which is resolved to the
  5116. * corresponding configuration section through `ubus` runtime information.
  5117. *
  5118. * @returns {Promise&lt;boolean>}
  5119. * Returns a promise resolving to `true` when the wireless network was
  5120. * successfully deleted from the configuration or `false` when the given
  5121. * network could not be found or if the found network was not associated
  5122. * with this wireless radio device.
  5123. */
  5124. deleteWifiNetwork: function(network) {
  5125. var sid = null;
  5126. if (network instanceof WifiNetwork) {
  5127. sid = network.sid;
  5128. }
  5129. else {
  5130. var uciWifiIface = uci.get('wireless', network);
  5131. if (uciWifiIface == null || uciWifiIface['.type'] != 'wifi-iface')
  5132. sid = getWifiSidByIfname(network);
  5133. }
  5134. if (sid == null || uci.get('wireless', sid, 'device') != this.sid)
  5135. return Promise.resolve(false);
  5136. uci.delete('wireless', network);
  5137. return Promise.resolve(true);
  5138. }
  5139. });
  5140. /**
  5141. * @class
  5142. * @memberof LuCI.network
  5143. * @hideconstructor
  5144. * @classdesc
  5145. *
  5146. * A `Network.WifiNetwork` instance represents a wireless network (vif)
  5147. * configured on top of a radio device and provides functions for querying
  5148. * the runtime state of the network. Most radio devices support multiple
  5149. * such networks in parallel.
  5150. */
  5151. WifiNetwork = baseclass.extend(/** @lends LuCI.network.WifiNetwork.prototype */ {
  5152. __init__: function(sid, radioname, radiostate, netid, netstate, hostapd) {
  5153. this.sid = sid;
  5154. this.netid = netid;
  5155. this._ubusdata = {
  5156. hostapd: hostapd,
  5157. radio: radioname,
  5158. dev: radiostate,
  5159. net: netstate
  5160. };
  5161. },
  5162. ubus: function(/* ... */) {
  5163. var v = this._ubusdata;
  5164. for (var i = 0; i &lt; arguments.length; i++)
  5165. if (L.isObject(v))
  5166. v = v[arguments[i]];
  5167. else
  5168. return null;
  5169. return v;
  5170. },
  5171. /**
  5172. * Read the given UCI option value of this wireless network.
  5173. *
  5174. * @param {string} opt
  5175. * The UCI option name to read.
  5176. *
  5177. * @returns {null|string|string[]}
  5178. * Returns the UCI option value or `null` if the requested option is
  5179. * not found.
  5180. */
  5181. get: function(opt) {
  5182. return uci.get('wireless', this.sid, opt);
  5183. },
  5184. /**
  5185. * Set the given UCI option of this network to the given value.
  5186. *
  5187. * @param {string} opt
  5188. * The name of the UCI option to set.
  5189. *
  5190. * @param {null|string|string[]} value
  5191. * The value to set or `null` to remove the given option from the
  5192. * configuration.
  5193. */
  5194. set: function(opt, value) {
  5195. return uci.set('wireless', this.sid, opt, value);
  5196. },
  5197. /**
  5198. * Checks whether this wireless network is disabled.
  5199. *
  5200. * @returns {boolean}
  5201. * Returns `true` when the wireless radio is marked as disabled in `ubus`
  5202. * runtime state or when the `disabled` option is set in the corresponding
  5203. * UCI configuration.
  5204. */
  5205. isDisabled: function() {
  5206. return this.ubus('dev', 'disabled') || this.get('disabled') == '1';
  5207. },
  5208. /**
  5209. * Get the configured operation mode of the wireless network.
  5210. *
  5211. * @returns {string}
  5212. * Returns the configured operation mode. Possible values are:
  5213. * - `ap` - Master (Access Point) mode
  5214. * - `sta` - Station (client) mode
  5215. * - `adhoc` - Ad-Hoc (IBSS) mode
  5216. * - `mesh` - Mesh (IEEE 802.11s) mode
  5217. * - `monitor` - Monitor mode
  5218. */
  5219. getMode: function() {
  5220. return this.ubus('net', 'config', 'mode') || this.get('mode') || 'ap';
  5221. },
  5222. /**
  5223. * Get the configured SSID of the wireless network.
  5224. *
  5225. * @returns {null|string}
  5226. * Returns the configured SSID value or `null` when this network is
  5227. * in mesh mode.
  5228. */
  5229. getSSID: function() {
  5230. if (this.getMode() == 'mesh')
  5231. return null;
  5232. return this.ubus('net', 'config', 'ssid') || this.get('ssid');
  5233. },
  5234. /**
  5235. * Get the configured Mesh ID of the wireless network.
  5236. *
  5237. * @returns {null|string}
  5238. * Returns the configured mesh ID value or `null` when this network
  5239. * is not in mesh mode.
  5240. */
  5241. getMeshID: function() {
  5242. if (this.getMode() != 'mesh')
  5243. return null;
  5244. return this.ubus('net', 'config', 'mesh_id') || this.get('mesh_id');
  5245. },
  5246. /**
  5247. * Get the configured BSSID of the wireless network.
  5248. *
  5249. * @returns {null|string}
  5250. * Returns the BSSID value or `null` if none has been specified.
  5251. */
  5252. getBSSID: function() {
  5253. return this.ubus('net', 'config', 'bssid') || this.get('bssid');
  5254. },
  5255. /**
  5256. * Get the names of the logical interfaces this wireless network is
  5257. * attached to.
  5258. *
  5259. * @returns {string[]}
  5260. * Returns an array of logical interface names.
  5261. */
  5262. getNetworkNames: function() {
  5263. return L.toArray(this.ubus('net', 'config', 'network') || this.get('network'));
  5264. },
  5265. /**
  5266. * Get the internal network ID of this wireless network.
  5267. *
  5268. * The network ID is a LuCI specific identifier in the form
  5269. * `radio#.network#` to identify wireless networks by their corresponding
  5270. * radio and network index numbers.
  5271. *
  5272. * @returns {string}
  5273. * Returns the LuCI specific network ID.
  5274. */
  5275. getID: function() {
  5276. return this.netid;
  5277. },
  5278. /**
  5279. * Get the configuration ID of this wireless network.
  5280. *
  5281. * @returns {string}
  5282. * Returns the corresponding UCI section ID of the network.
  5283. */
  5284. getName: function() {
  5285. return this.sid;
  5286. },
  5287. /**
  5288. * Get the Linux network device name.
  5289. *
  5290. * @returns {null|string}
  5291. * Returns the current Linux network device name as resolved from
  5292. * `ubus` runtime information or `null` if this network has no
  5293. * associated network device, e.g. when not configured or up.
  5294. */
  5295. getIfname: function() {
  5296. var ifname = this.ubus('net', 'ifname') || this.ubus('net', 'iwinfo', 'ifname');
  5297. if (ifname == null || ifname.match(/^(wifi|radio)\d/))
  5298. ifname = this.netid;
  5299. return ifname;
  5300. },
  5301. /**
  5302. * Get the Linux VLAN network device names.
  5303. *
  5304. * @returns {string[]}
  5305. * Returns the current Linux VLAN network device name as resolved
  5306. * from `ubus` runtime information or empty array if this network
  5307. * has no associated VLAN network devices.
  5308. */
  5309. getVlanIfnames: function() {
  5310. var vlans = L.toArray(this.ubus('net', 'vlans')),
  5311. ifnames = [];
  5312. for (var i = 0; i &lt; vlans.length; i++)
  5313. ifnames.push(vlans[i]['ifname']);
  5314. return ifnames;
  5315. },
  5316. /**
  5317. * Get the name of the corresponding WiFi radio device.
  5318. *
  5319. * @returns {null|string}
  5320. * Returns the name of the radio device this network is configured on
  5321. * or `null` if it cannot be determined.
  5322. */
  5323. getWifiDeviceName: function() {
  5324. return this.ubus('radio') || this.get('device');
  5325. },
  5326. /**
  5327. * Get the corresponding WiFi radio device.
  5328. *
  5329. * @returns {null|LuCI.network.WifiDevice}
  5330. * Returns a `Network.WifiDevice` instance representing the corresponding
  5331. * WiFi radio device or `null` if the related radio device could not be
  5332. * found.
  5333. */
  5334. getWifiDevice: function() {
  5335. var radioname = this.getWifiDeviceName();
  5336. if (radioname == null)
  5337. return Promise.reject();
  5338. return Network.prototype.getWifiDevice(radioname);
  5339. },
  5340. /**
  5341. * Check whether the radio network is up.
  5342. *
  5343. * This function actually queries the up state of the related radio
  5344. * device and assumes this network to be up as well when the parent
  5345. * radio is up. This is due to the fact that OpenWrt does not control
  5346. * virtual interfaces individually but within one common hostapd
  5347. * instance.
  5348. *
  5349. * @returns {boolean}
  5350. * Returns `true` when the network is up, else `false`.
  5351. */
  5352. isUp: function() {
  5353. var device = this.getDevice();
  5354. if (device == null)
  5355. return false;
  5356. return device.isUp();
  5357. },
  5358. /**
  5359. * Query the current operation mode from runtime information.
  5360. *
  5361. * @returns {string}
  5362. * Returns the human readable mode name as reported by iwinfo or uci mode.
  5363. * Possible returned values are:
  5364. * - `Master`
  5365. * - `Ad-Hoc`
  5366. * - `Client`
  5367. * - `Monitor`
  5368. * - `Master (VLAN)`
  5369. * - `WDS`
  5370. * - `Mesh Point`
  5371. * - `P2P Client`
  5372. * - `P2P Go`
  5373. * - `Unknown`
  5374. */
  5375. getActiveMode: function() {
  5376. var mode = this.ubus('net', 'iwinfo', 'mode') || this.getMode();
  5377. switch (mode) {
  5378. case 'ap': return 'Master';
  5379. case 'sta': return 'Client';
  5380. case 'adhoc': return 'Ad-Hoc';
  5381. case 'mesh': return 'Mesh Point';
  5382. case 'monitor': return 'Monitor';
  5383. default: return mode;
  5384. }
  5385. },
  5386. /**
  5387. * Query the current operation mode from runtime information as
  5388. * translated string.
  5389. *
  5390. * @returns {string}
  5391. * Returns the translated, human readable mode name as reported by
  5392. *`ubus` runtime state.
  5393. */
  5394. getActiveModeI18n: function() {
  5395. var mode = this.getActiveMode();
  5396. switch (mode) {
  5397. case 'Master': return _('Access Point');
  5398. case 'Ad-Hoc': return _('Ad-Hoc');
  5399. case 'Client': return _('Client');
  5400. case 'Monitor': return _('Monitor');
  5401. case 'Master(VLAN)': return _('Master (VLAN)');
  5402. case 'WDS': return _('WDS');
  5403. case 'Mesh Point': return _('Mesh Point');
  5404. case 'P2P Client': return _('P2P Client');
  5405. case 'P2P Go': return _('P2P Go');
  5406. case 'Unknown': return _('Unknown');
  5407. default: return mode;
  5408. }
  5409. },
  5410. /**
  5411. * Query the current SSID from runtime information.
  5412. *
  5413. * @returns {string}
  5414. * Returns the current SSID or Mesh ID as reported by `ubus` runtime
  5415. * information.
  5416. */
  5417. getActiveSSID: function() {
  5418. return this.ubus('net', 'iwinfo', 'ssid') || this.ubus('net', 'config', 'ssid') || this.get('ssid');
  5419. },
  5420. /**
  5421. * Query the current BSSID from runtime information.
  5422. *
  5423. * @returns {string}
  5424. * Returns the current BSSID or Mesh ID as reported by `ubus` runtime
  5425. * information.
  5426. */
  5427. getActiveBSSID: function() {
  5428. return this.ubus('net', 'iwinfo', 'bssid') || this.ubus('net', 'config', 'bssid') || this.get('bssid');
  5429. },
  5430. /**
  5431. * Query the current encryption settings from runtime information.
  5432. *
  5433. * @returns {string}
  5434. * Returns a string describing the current encryption or `-` if the
  5435. * encryption state could not be found in `ubus` runtime information.
  5436. */
  5437. getActiveEncryption: function() {
  5438. return formatWifiEncryption(this.ubus('net', 'iwinfo', 'encryption')) || '-';
  5439. },
  5440. /**
  5441. * A wireless peer entry describes the properties of a remote wireless
  5442. * peer associated with a local network.
  5443. *
  5444. * @typedef {Object&lt;string, boolean|number|string|LuCI.network.WifiRateEntry>} WifiPeerEntry
  5445. * @memberof LuCI.network
  5446. *
  5447. * @property {string} mac
  5448. * The MAC address (BSSID).
  5449. *
  5450. * @property {number} signal
  5451. * The received signal strength.
  5452. *
  5453. * @property {number} [signal_avg]
  5454. * The average signal strength if supported by the driver.
  5455. *
  5456. * @property {number} [noise]
  5457. * The current noise floor of the radio. May be `0` or absent if not
  5458. * supported by the driver.
  5459. *
  5460. * @property {number} inactive
  5461. * The amount of milliseconds the peer has been inactive, e.g. due
  5462. * to power-saving.
  5463. *
  5464. * @property {number} connected_time
  5465. * The amount of milliseconds the peer is associated to this network.
  5466. *
  5467. * @property {number} [thr]
  5468. * The estimated throughput of the peer, May be `0` or absent if not
  5469. * supported by the driver.
  5470. *
  5471. * @property {boolean} authorized
  5472. * Specifies whether the peer is authorized to associate to this network.
  5473. *
  5474. * @property {boolean} authenticated
  5475. * Specifies whether the peer completed authentication to this network.
  5476. *
  5477. * @property {string} preamble
  5478. * The preamble mode used by the peer. May be `long` or `short`.
  5479. *
  5480. * @property {boolean} wme
  5481. * Specifies whether the peer supports WME/WMM capabilities.
  5482. *
  5483. * @property {boolean} mfp
  5484. * Specifies whether management frame protection is active.
  5485. *
  5486. * @property {boolean} tdls
  5487. * Specifies whether TDLS is active.
  5488. *
  5489. * @property {number} [mesh llid]
  5490. * The mesh LLID, may be `0` or absent if not applicable or supported
  5491. * by the driver.
  5492. *
  5493. * @property {number} [mesh plid]
  5494. * The mesh PLID, may be `0` or absent if not applicable or supported
  5495. * by the driver.
  5496. *
  5497. * @property {string} [mesh plink]
  5498. * The mesh peer link state description, may be an empty string (`''`)
  5499. * or absent if not applicable or supported by the driver.
  5500. *
  5501. * The following states are known:
  5502. * - `LISTEN`
  5503. * - `OPN_SNT`
  5504. * - `OPN_RCVD`
  5505. * - `CNF_RCVD`
  5506. * - `ESTAB`
  5507. * - `HOLDING`
  5508. * - `BLOCKED`
  5509. * - `UNKNOWN`
  5510. *
  5511. * @property {number} [mesh local PS]
  5512. * The local power-save mode for the peer link, may be an empty
  5513. * string (`''`) or absent if not applicable or supported by
  5514. * the driver.
  5515. *
  5516. * The following modes are known:
  5517. * - `ACTIVE` (no power save)
  5518. * - `LIGHT SLEEP`
  5519. * - `DEEP SLEEP`
  5520. * - `UNKNOWN`
  5521. *
  5522. * @property {number} [mesh peer PS]
  5523. * The remote power-save mode for the peer link, may be an empty
  5524. * string (`''`) or absent if not applicable or supported by
  5525. * the driver.
  5526. *
  5527. * The following modes are known:
  5528. * - `ACTIVE` (no power save)
  5529. * - `LIGHT SLEEP`
  5530. * - `DEEP SLEEP`
  5531. * - `UNKNOWN`
  5532. *
  5533. * @property {number} [mesh non-peer PS]
  5534. * The power-save mode for all non-peer neighbours, may be an empty
  5535. * string (`''`) or absent if not applicable or supported by the driver.
  5536. *
  5537. * The following modes are known:
  5538. * - `ACTIVE` (no power save)
  5539. * - `LIGHT SLEEP`
  5540. * - `DEEP SLEEP`
  5541. * - `UNKNOWN`
  5542. *
  5543. * @property {LuCI.network.WifiRateEntry} rx
  5544. * Describes the receiving wireless rate from the peer.
  5545. *
  5546. * @property {LuCI.network.WifiRateEntry} tx
  5547. * Describes the transmitting wireless rate to the peer.
  5548. */
  5549. /**
  5550. * A wireless rate entry describes the properties of a wireless
  5551. * transmission rate to or from a peer.
  5552. *
  5553. * @typedef {Object&lt;string, boolean|number>} WifiRateEntry
  5554. * @memberof LuCI.network
  5555. *
  5556. * @property {number} [drop_misc]
  5557. * The amount of received misc. packages that have been dropped, e.g.
  5558. * due to corruption or missing authentication. Only applicable to
  5559. * receiving rates.
  5560. *
  5561. * @property {number} packets
  5562. * The amount of packets that have been received or sent.
  5563. *
  5564. * @property {number} bytes
  5565. * The amount of bytes that have been received or sent.
  5566. *
  5567. * @property {number} [failed]
  5568. * The amount of failed transmission attempts. Only applicable to
  5569. * transmit rates.
  5570. *
  5571. * @property {number} [retries]
  5572. * The amount of retried transmissions. Only applicable to transmit
  5573. * rates.
  5574. *
  5575. * @property {boolean} is_ht
  5576. * Specifies whether this rate is an HT (IEEE 802.11n) rate.
  5577. *
  5578. * @property {boolean} is_vht
  5579. * Specifies whether this rate is an VHT (IEEE 802.11ac) rate.
  5580. *
  5581. * @property {number} mhz
  5582. * The channel width in MHz used for the transmission.
  5583. *
  5584. * @property {number} rate
  5585. * The bitrate in bit/s of the transmission.
  5586. *
  5587. * @property {number} [mcs]
  5588. * The MCS index of the used transmission rate. Only applicable to
  5589. * HT or VHT rates.
  5590. *
  5591. * @property {number} [40mhz]
  5592. * Specifies whether the transmission rate used 40MHz wide channel.
  5593. * Only applicable to HT or VHT rates.
  5594. *
  5595. * Note: this option exists for backwards compatibility only and its
  5596. * use is discouraged. The `mhz` field should be used instead to
  5597. * determine the channel width.
  5598. *
  5599. * @property {boolean} [short_gi]
  5600. * Specifies whether a short guard interval is used for the transmission.
  5601. * Only applicable to HT or VHT rates.
  5602. *
  5603. * @property {number} [nss]
  5604. * Specifies the number of spatial streams used by the transmission.
  5605. * Only applicable to VHT rates.
  5606. *
  5607. * @property {boolean} [he]
  5608. * Specifies whether this rate is an HE (IEEE 802.11ax) rate.
  5609. *
  5610. * @property {number} [he_gi]
  5611. * Specifies whether the guard interval used for the transmission.
  5612. * Only applicable to HE rates.
  5613. *
  5614. * @property {number} [he_dcm]
  5615. * Specifies whether dual concurrent modulation is used for the transmission.
  5616. * Only applicable to HE rates.
  5617. *
  5618. * @property {boolean} [eht]
  5619. * Specifies whether this rate is an EHT (IEEE 802.11be) rate.
  5620. *
  5621. * @property {number} [eht_gi]
  5622. * Specifies whether the guard interval used for the transmission.
  5623. * Only applicable to EHT rates.
  5624. *
  5625. * @property {number} [eht_dcm]
  5626. * Specifies whether dual concurrent modulation is used for the transmission.
  5627. * Only applicable to EHT rates.
  5628. */
  5629. /**
  5630. * Fetch the list of associated peers.
  5631. *
  5632. * @returns {Promise&lt;Array&lt;LuCI.network.WifiPeerEntry>>}
  5633. * Returns a promise resolving to an array of wireless peers associated
  5634. * with this network.
  5635. */
  5636. getAssocList: function() {
  5637. var tasks = [];
  5638. var ifnames = [ this.getIfname() ].concat(this.getVlanIfnames());
  5639. for (var i = 0; i &lt; ifnames.length; i++)
  5640. tasks.push(callIwinfoAssoclist(ifnames[i]));
  5641. return Promise.all(tasks).then(function(values) {
  5642. return Array.prototype.concat.apply([], values);
  5643. });
  5644. },
  5645. /**
  5646. * Query the current operating frequency of the wireless network.
  5647. *
  5648. * @returns {null|string}
  5649. * Returns the current operating frequency of the network from `ubus`
  5650. * runtime information in GHz or `null` if the information is not
  5651. * available.
  5652. */
  5653. getFrequency: function() {
  5654. var freq = this.ubus('net', 'iwinfo', 'frequency');
  5655. if (freq != null &amp;&amp; freq > 0)
  5656. return '%.03f'.format(freq / 1000);
  5657. return null;
  5658. },
  5659. /**
  5660. * Query the current average bit-rate of all peers associated to this
  5661. * wireless network.
  5662. *
  5663. * @returns {null|number}
  5664. * Returns the average bit rate among all peers associated to the network
  5665. * as reported by `ubus` runtime information or `null` if the information
  5666. * is not available.
  5667. */
  5668. getBitRate: function() {
  5669. var rate = this.ubus('net', 'iwinfo', 'bitrate');
  5670. if (rate != null &amp;&amp; rate > 0)
  5671. return (rate / 1000);
  5672. return null;
  5673. },
  5674. /**
  5675. * Query the current wireless channel.
  5676. *
  5677. * @returns {null|number}
  5678. * Returns the wireless channel as reported by `ubus` runtime information
  5679. * or `null` if it cannot be determined.
  5680. */
  5681. getChannel: function() {
  5682. return this.ubus('net', 'iwinfo', 'channel') || this.ubus('dev', 'config', 'channel') || this.get('channel');
  5683. },
  5684. /**
  5685. * Query the current wireless signal.
  5686. *
  5687. * @returns {null|number}
  5688. * Returns the wireless signal in dBm as reported by `ubus` runtime
  5689. * information or `null` if it cannot be determined.
  5690. */
  5691. getSignal: function() {
  5692. return this.ubus('net', 'iwinfo', 'signal') || 0;
  5693. },
  5694. /**
  5695. * Query the current radio noise floor.
  5696. *
  5697. * @returns {number}
  5698. * Returns the radio noise floor in dBm as reported by `ubus` runtime
  5699. * information or `0` if it cannot be determined.
  5700. */
  5701. getNoise: function() {
  5702. return this.ubus('net', 'iwinfo', 'noise') || 0;
  5703. },
  5704. /**
  5705. * Query the current country code.
  5706. *
  5707. * @returns {string}
  5708. * Returns the wireless country code as reported by `ubus` runtime
  5709. * information or `00` if it cannot be determined.
  5710. */
  5711. getCountryCode: function() {
  5712. return this.ubus('net', 'iwinfo', 'country') || this.ubus('dev', 'config', 'country') || '00';
  5713. },
  5714. /**
  5715. * Query the current radio TX power.
  5716. *
  5717. * @returns {null|number}
  5718. * Returns the wireless network transmit power in dBm as reported by
  5719. * `ubus` runtime information or `null` if it cannot be determined.
  5720. */
  5721. getTXPower: function() {
  5722. return this.ubus('net', 'iwinfo', 'txpower');
  5723. },
  5724. /**
  5725. * Query the radio TX power offset.
  5726. *
  5727. * Some wireless radios have a fixed power offset, e.g. due to the
  5728. * use of external amplifiers.
  5729. *
  5730. * @returns {number}
  5731. * Returns the wireless network transmit power offset in dBm as reported
  5732. * by `ubus` runtime information or `0` if there is no offset, or if it
  5733. * cannot be determined.
  5734. */
  5735. getTXPowerOffset: function() {
  5736. return this.ubus('net', 'iwinfo', 'txpower_offset') || 0;
  5737. },
  5738. /**
  5739. * Calculate the current signal.
  5740. *
  5741. * @deprecated
  5742. * @returns {number}
  5743. * Returns the calculated signal level, which is the difference between
  5744. * noise and signal (SNR), divided by 5.
  5745. */
  5746. getSignalLevel: function(signal, noise) {
  5747. if (this.getActiveBSSID() == '00:00:00:00:00:00')
  5748. return -1;
  5749. signal = signal || this.getSignal();
  5750. noise = noise || this.getNoise();
  5751. if (signal &lt; 0 &amp;&amp; noise &lt; 0) {
  5752. var snr = -1 * (noise - signal);
  5753. return Math.floor(snr / 5);
  5754. }
  5755. return 0;
  5756. },
  5757. /**
  5758. * Calculate the current signal quality percentage.
  5759. *
  5760. * @returns {number}
  5761. * Returns the calculated signal quality in percent. The value is
  5762. * calculated from the `quality` and `quality_max` indicators reported
  5763. * by `ubus` runtime state.
  5764. */
  5765. getSignalPercent: function() {
  5766. var qc = this.ubus('net', 'iwinfo', 'quality') || 0,
  5767. qm = this.ubus('net', 'iwinfo', 'quality_max') || 0;
  5768. if (qc > 0 &amp;&amp; qm > 0)
  5769. return Math.floor((100 / qm) * qc);
  5770. return 0;
  5771. },
  5772. /**
  5773. * Get a short description string for this wireless network.
  5774. *
  5775. * @returns {string}
  5776. * Returns a string describing this network, consisting of the
  5777. * active operation mode, followed by either the SSID, BSSID or
  5778. * internal network ID, depending on which information is available.
  5779. */
  5780. getShortName: function() {
  5781. return '%s "%s"'.format(
  5782. this.getActiveModeI18n(),
  5783. this.getActiveSSID() || this.getActiveBSSID() || this.getID());
  5784. },
  5785. /**
  5786. * Get a description string for this wireless network.
  5787. *
  5788. * @returns {string}
  5789. * Returns a string describing this network, consisting of the
  5790. * term `Wireless Network`, followed by the active operation mode,
  5791. * the SSID, BSSID or internal network ID and the Linux network device
  5792. * name, depending on which information is available.
  5793. */
  5794. getI18n: function() {
  5795. return '%s: %s "%s" (%s)'.format(
  5796. _('Wireless Network'),
  5797. this.getActiveModeI18n(),
  5798. this.getActiveSSID() || this.getActiveBSSID() || this.getID(),
  5799. this.getIfname());
  5800. },
  5801. /**
  5802. * Get the primary logical interface this network is attached to.
  5803. *
  5804. * @returns {null|LuCI.network.Protocol}
  5805. * Returns a `Network.Protocol` instance representing the logical
  5806. * interface or `null` if this network is not attached to any logical
  5807. * interface.
  5808. */
  5809. getNetwork: function() {
  5810. return this.getNetworks()[0];
  5811. },
  5812. /**
  5813. * Get the logical interfaces this network is attached to.
  5814. *
  5815. * @returns {Array&lt;LuCI.network.Protocol>}
  5816. * Returns an array of `Network.Protocol` instances representing the
  5817. * logical interfaces this wireless network is attached to.
  5818. */
  5819. getNetworks: function() {
  5820. var networkNames = this.getNetworkNames(),
  5821. networks = [];
  5822. for (var i = 0; i &lt; networkNames.length; i++) {
  5823. var uciInterface = uci.get('network', networkNames[i]);
  5824. if (uciInterface == null || uciInterface['.type'] != 'interface')
  5825. continue;
  5826. networks.push(Network.prototype.instantiateNetwork(networkNames[i]));
  5827. }
  5828. networks.sort(networkSort);
  5829. return networks;
  5830. },
  5831. /**
  5832. * Get the associated Linux network device.
  5833. *
  5834. * @returns {LuCI.network.Device}
  5835. * Returns a `Network.Device` instance representing the Linux network
  5836. * device associated with this wireless network.
  5837. */
  5838. getDevice: function() {
  5839. return Network.prototype.instantiateDevice(this.getIfname());
  5840. },
  5841. /**
  5842. * Check whether this WiFi network supports de-authenticating clients.
  5843. *
  5844. * @returns {boolean}
  5845. * Returns `true` when this WiFi network instance supports forcibly
  5846. * de-authenticating clients, otherwise `false`.
  5847. */
  5848. isClientDisconnectSupported: function() {
  5849. return L.isObject(this.ubus('hostapd', 'del_client'));
  5850. },
  5851. /**
  5852. * Forcibly disconnect the given client from the wireless network.
  5853. *
  5854. * @param {string} mac
  5855. * The MAC address of the client to disconnect.
  5856. *
  5857. * @param {boolean} [deauth=false]
  5858. * Specifies whether to de-authenticate (`true`) or disassociate (`false`)
  5859. * the client.
  5860. *
  5861. * @param {number} [reason=1]
  5862. * Specifies the IEEE 802.11 reason code to disassoc/deauth the client
  5863. * with. Default is `1` which corresponds to `Unspecified reason`.
  5864. *
  5865. * @param {number} [ban_time=0]
  5866. * Specifies the amount of milliseconds to ban the client from
  5867. * reconnecting. By default, no ban time is set which allows the client
  5868. * to re-associate / reauthenticate immediately.
  5869. *
  5870. * @returns {Promise&lt;number>}
  5871. * Returns a promise resolving to the underlying ubus call result code
  5872. * which is typically `0`, even for not existing MAC addresses.
  5873. * The promise might reject with an error in case invalid arguments
  5874. * are passed.
  5875. */
  5876. disconnectClient: function(mac, deauth, reason, ban_time) {
  5877. if (reason == null || reason == 0)
  5878. reason = 1;
  5879. if (ban_time == 0)
  5880. ban_time = null;
  5881. return rpc.declare({
  5882. object: 'hostapd.%s'.format(this.getIfname()),
  5883. method: 'del_client',
  5884. params: [ 'addr', 'deauth', 'reason', 'ban_time' ]
  5885. })(mac, deauth, reason, ban_time);
  5886. }
  5887. });
  5888. return Network;
  5889. </code></pre>
  5890. </article>
  5891. </section>
  5892. <footer>
  5893. Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.11</a> on Wed Nov 27 2024 20:43:36 GMT+0000 (Coordinated Universal Time)
  5894. </footer>
  5895. </div>
  5896. </div>
  5897. <script>prettyPrint();</script>
  5898. <script src="scripts/jaguar.js"></script>
  5899. </body>
  5900. </html>