Giter VIP home page Giter VIP logo

luci-ng's People

Contributors

aparcar avatar feckert avatar ianchi avatar jow- avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

luci-ng's Issues

Consider using Mithril+Tachyons for UI instead of Angular

Mithril is much easier to develop with and maintain than either Angular or React. I write that as someone with significant experience working with each of those.

I wrote an essay with more details on that:
https://github.com/pdfernhout/choose-mithril
"tl;dr: Choose Mithril whenever you can for JavaScript UI development because Mithril is overall easier to use, understand, debug, refactor, and maintain than most other JavaScript-based UI systems. That ease of use is due to Mithril's design emphasis on appropriate simplicity – including by leveraging the power of JavaScript to define UIs instead of using an adhoc templating system. Mithril helps you focus on the essential complexity of UI development instead of making you struggle with the accidental complexity introduced by problematically-designed tools. Many popular tools emphasize ease-of-use through looking familiar in a few narrow situations instead of emphasizing overall end-to-end simplicity which -- after a short learning curve for Mithril -- leads to greater overall ease-of-use in most situations."

Mithril (using the HyperScript API) looks a bit like some of the original LuCI code where a function is used to create an HTML node. Except for Mithril, you create a virtual dom (vdom) structure that is used to update the real DOM for efficiency. Every time the user touches the UI (like a button click or selecting something in a drop down), Mithril assumes the UI is dirty and rerenders it. That makes UI behavior much easier to reason about. And you can optimize some special cases as needed where the default behavior does not seem performant enough. Angular does something like this with dirty checking, but unfortunately Angular chose a different approach using "zones" to track changes which makes code much harder to debug. Mithril just wraps UI event handlers and so other event code which is more straightforward.

Some tutorial Mithril examples I wrote are here:
https://github.com/pdfernhout/mithril-demos/tree/master/hello-increasing-abstraction

Tachyons is an approach to writing CSS in an atomic/functional way which makes it easier to write modular code which works as expected. For example, adding a class like ".red" makes an element red, while ".ba" puts a border around it. Even if you stick with Angular, Tachyons or another atomic CSS library might we worth considering.

Even though LuCI2 runs in a browser and not on the router, on general design principles emphasizing simplicity, both Mithril and Tachyons seem to me to be a better match for the kind of thinking that surrounds small embedded devices than a bloated and opinionated framework like Angular.

JavaScript (ES6+) has also gotten much better than when TypeScript was created. While I use TypeScript on some projects, I tend to use plain ES6+ JavaScript in new ones because of the faster testing turnaround by avoiding a build or bundling step. Mithril works with TypeScript though of course.

I'd be happy to help with the transition of luci-ng to Mithril+Tachyons if desired -- as well as translating legacy LuCI views to Mithril or writing some code to do that semi-automatically.

You all might not want to switch to Mithril and/or Tachyons for all sorts of reasons, so feel free to close this issue as "won't do". In any case, please accept my thanks for working on more great software for OpenWRT.

luci2-ui-base-2018-06-12 build failed on Ubuntu 18.04, Thanks

make[3]: Entering directory '/home/lab/samba/zhangbo/18.06/feeds/luci2/luci2-ui-base'
rm -f /home/lab/samba/zhangbo/18.06/build_dir/target-mips_24kc_musl/luci2-ui-base-2018-06-12-2c1116a/.built
touch /home/lab/samba/zhangbo/18.06/build_dir/target-mips_24kc_musl/luci2-ui-base-2018-06-12-2c1116a/.built_check
make -C /home/lab/samba/zhangbo/18.06/build_dir/target-mips_24kc_musl/luci2-ui-base-2018-06-12-2c1116a
make[4]: Entering directory '/home/lab/samba/zhangbo/18.06/build_dir/target-mips_24kc_musl/luci2-ui-base-2018-06-12-2c1116a'
node ./node_modules/.bin/gulp dist
[09:34:53] Using gulpfile ~/samba/zhangbo/18.06/build_dir/target-mips_24kc_musl/luci2-ui-base-2018-06-12-2c1116a/gulpfile.js
[09:34:53] Starting 'dist'...
[09:34:53] Starting 'svg'...
[09:34:53] Starting 'copyAssets'...
[09:34:53] Starting 'svgExtractIcons'...
[09:34:53] Starting 'lintErr'...
gulp-search : [ 'md-svg-icon="router-wireless"' ]
gulp-search : null
[09:34:54] 'lintErr' errored after 372 ms
[09:34:54] Error: Syntax error in selector "angular:animation" at position 8: Expected "declaration", "expression", "function", "pattern" or "statement" but "a" found.
at tryParseSelector (/home/lab/samba/zhangbo/18.06/build_dir/target-mips_24kc_musl/luci2-ui-base-2018-06-12-2c1116a/node_modules/eslint/lib/util/node-event-generator.js:163:19)
at lodash.memoize.rawSelector (/home/lab/samba/zhangbo/18.06/build_dir/target-mips_24kc_musl/luci2-ui-base-2018-06-12-2c1116a/node_modules/eslint/lib/util/node-event-generator.js:175:28)
at memoized (/home/lab/samba/zhangbo/18.06/build_dir/target-mips_24kc_musl/luci2-ui-base-2018-06-12-2c1116a/node_modules/eslint/node_modules/lodash/lodash.js:10551:27)
at NodeEventGenerator.eventNames.forEach.rawSelector (/home/lab/samba/zhangbo/18.06/build_dir/target-mips_24kc_musl/luci2-ui-base-2018-06-12-2c1116a/node_modules/eslint/lib/util/node-event-generator.js:235:30)
at Array.forEach ()
at new NodeEventGenerator (/home/lab/samba/zhangbo/18.06/build_dir/target-mips_24kc_musl/luci2-ui-base-2018-06-12-2c1116a/node_modules/eslint/lib/util/node-event-generator.js:234:20)
at EventEmitter.module.exports.api.verify (/home/lab/samba/zhangbo/18.06/build_dir/target-mips_24kc_musl/luci2-ui-base-2018-06-12-2c1116a/node_modules/eslint/lib/eslint.js:915:34)
at processText (/home/lab/samba/zhangbo/18.06/build_dir/target-mips_24kc_musl/luci2-ui-base-2018-06-12-2c1116a/node_modules/eslint/lib/cli-engine.js:264:31)
at CLIEngine.executeOnText (/home/lab/samba/zhangbo/18.06/build_dir/target-mips_24kc_musl/luci2-ui-base-2018-06-12-2c1116a/node_modules/eslint/lib/cli-engine.js:754:26)
at verify (/home/lab/samba/zhangbo/18.06/build_dir/target-mips_24kc_musl/luci2-ui-base-2018-06-12-2c1116a/node_modules/gulp-eslint/index.js:20:25)
[09:34:54] 'dist' errored after 383 ms
[09:34:54] The following tasks did not complete: svg, copyAssets, svgExtractIcons
[09:34:54] Did you forget to signal async completion?
Makefile:30: recipe for target 'build' failed
make[4]: *** [build] Error 1
make[4]: Leaving directory '/home/lab/samba/zhangbo/18.06/build_dir/target-mips_24kc_musl/luci2-ui-base-2018-06-12-2c1116a'
Makefile:77: recipe for target '/home/lab/samba/zhangbo/18.06/build_dir/target-mips_24kc_musl/luci2-ui-base-2018-06-12-2c1116a/.built' failed
make[3]: *** [/home/lab/samba/zhangbo/18.06/build_dir/target-mips_24kc_musl/luci2-ui-base-2018-06-12-2c1116a/.built] Error 2
make[3]: Leaving directory '/home/lab/samba/zhangbo/18.06/feeds/luci2/luci2-ui-base'
Command exited with non-zero status 2
time: package/feeds/luci2/luci2-ui-base/compile#1.25#0.13#1.25
package/Makefile:107: recipe for target 'package/feeds/luci2/luci2-ui-base/compile' failed
make[2]: *** [package/feeds/luci2/luci2-ui-base/compile] Error 2
make[2]: Leaving directory '/home/lab/samba/zhangbo/18.06'
package/Makefile:103: recipe for target '/home/lab/samba/zhangbo/18.06/staging_dir/target-mips_24kc_musl/stamp/.package_compile' failed
make[1]: *** [/home/lab/samba/zhangbo/18.06/staging_dir/target-mips_24kc_musl/stamp/.package_compile] Error 2
make[1]: Leaving directory '/home/lab/samba/zhangbo/18.06'
/home/lab/samba/zhangbo/18.06/include/toplevel.mk:216: recipe for target 'world' failed
make: *** [world] Error 2

looking for a skeletal structure to create an application

@jow- I would like to start to develop the first applications for your project.

  • Dynamic DNS (ddns-scripts)
  • Cal-/Carddav server (Radicale)
  • WEB Proxy (Privoxy)
  • localisation

Could you please offer a skeletal structure where to easily start and how to implement localisation.
Many thanks

Build Failed on Openwrt 19.07.7

Build System Output:

make[4]: Entering directory '/home/zhanghua/openwrt/build_dir/target-mips_24kc_musl/luci2-ui-core-20200227'
npm run gen-schema

> [email protected] gen-schema
> rx-json-ui g -r -p ./src/tsconfig.app.json -m app/app.module#AppModule out/widgetschema

Compiling application...
Compiled OK
Found 42 widgets from 5 transitive modules
Generating schemas 1/42/home/zhanghua/openwrt/build_dir/target-mips_24kc_musl/luci2-ui-core-20200227/node_modules/typescript-json-schema/dist/typescript-json-schema.js:877
            throw new Error("type " + symbolName + " not found");
            ^

Error: type SetChartWidgetComponent not found
    at JsonSchemaGenerator.getSchemaForSymbol (/home/zhanghua/openwrt/build_dir/target-mips_24kc_musl/luci2-ui-core-20200227/node_modules/typescript-json-schema/dist/typescript-json-schema.js:877:19)
    at /home/zhanghua/openwrt/build_dir/target-mips_24kc_musl/luci2-ui-core-20200227/node_modules/rx-json-ui-cli/dist/public-api.js:82:37
    at Array.forEach (<anonymous>)
    at generateSchemas (/home/zhanghua/openwrt/build_dir/target-mips_24kc_musl/luci2-ui-core-20200227/node_modules/rx-json-ui-cli/dist/public-api.js:80:13)
    at Command.generate (/home/zhanghua/openwrt/build_dir/target-mips_24kc_musl/luci2-ui-core-20200227/node_modules/rx-json-ui-cli/dist/public-api.js:325:5)
    at Command.listener [as _actionHandler] (/home/zhanghua/openwrt/build_dir/target-mips_24kc_musl/luci2-ui-core-20200227/node_modules/rx-json-ui-cli/node_modules/commander/index.js:426:31)
    at Command._parseCommand (/home/zhanghua/openwrt/build_dir/target-mips_24kc_musl/luci2-ui-core-20200227/node_modules/rx-json-ui-cli/node_modules/commander/index.js:1002:14)
    at Command._dispatchSubcommand (/home/zhanghua/openwrt/build_dir/target-mips_24kc_musl/luci2-ui-core-20200227/node_modules/rx-json-ui-cli/node_modules/commander/index.js:953:18)
    at Command._parseCommand (/home/zhanghua/openwrt/build_dir/target-mips_24kc_musl/luci2-ui-core-20200227/node_modules/rx-json-ui-cli/node_modules/commander/index.js:970:12)
    at Command.parse (/home/zhanghua/openwrt/build_dir/target-mips_24kc_musl/luci2-ui-core-20200227/node_modules/rx-json-ui-cli/node_modules/commander/index.js:801:10)
npm ERR! code 1
npm ERR! path /home/zhanghua/openwrt/build_dir/target-mips_24kc_musl/luci2-ui-core-20200227
npm ERR! command failed
npm ERR! command sh -c rx-json-ui g -r -p ./src/tsconfig.app.json -m app/app.module#AppModule out/widgetschema

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/zhanghua/.npm/_logs/2021-03-14T03_53_48_068Z-debug.log
make[4]: *** [Makefile:18: build] Error 1
make[4]: Leaving directory '/home/zhanghua/openwrt/build_dir/target-mips_24kc_musl/luci2-ui-core-20200227'
make[3]: *** [Makefile:72: /home/zhanghua/openwrt/build_dir/target-mips_24kc_musl/luci2-ui-core-20200227/.built] Error 2
make[3]: Leaving directory '/home/zhanghua/openwrt/feeds/luci2/luci2-ui-core'
time: package/feeds/luci2/luci2-ui-core/compile#13.10#0.74#8.24
make[2]: *** [package/Makefile:113: package/feeds/luci2/luci2-ui-core/compile] Error 2
make[2]: Leaving directory '/home/zhanghua/openwrt'
make[1]: *** [package/Makefile:107: /home/zhanghua/openwrt/staging_dir/target-mips_24kc_musl/stamp/.package_compile] Error 2
make[1]: Leaving directory '/home/zhanghua/openwrt'
make: *** [/home/zhanghua/openwrt/include/toplevel.mk:227: world] Error 2

I am building firmware using nodejs on my host which nodejs version is 15.11.0 and Linux distribution is Arch Linux
Output of npm version:

$ npm version
{
  npm: '7.6.3',
  node: '15.11.0',
  v8: '8.6.395.17-node.27',
  uv: '1.41.0',
  zlib: '1.2.11',
  brotli: '1.0.9',
  ares: '1.17.1',
  modules: '88',
  nghttp2: '1.41.0',
  napi: '7',
  llhttp: '2.1.3',
  openssl: '1.1.1j',
  cldr: '38.1',
  icu: '68.2',
  tz: '2020d',
  unicode: '13.0'
}

Thank you in advance for your help.

Luci-ng general

A lot of changes where made since my last check.
I pulled in the last changes and build a new luci-ng packages.
I could log in, but i could not change the page. I always get overview page if i push the menu links.
Do I miss something?

Issues with local time

  1. The "local time" shows the time in the browser's TZ instead of in the router's TZ.
  2. There is no ubus call to set the time

The problem is that ubus system.info.localtime needs conversion to string, and when done in the browser, it uses its TZ.

@jow- I think we could add a new property localtimestr to system.info.
I couldn't find which package provides ubus methods for the system namespace.

To which namespace shoud we add a set_time method? rpc-sys? system?
In the meantime I'll add it to luci2.system

Get logged in username in subpage

@jow-
I am writing a luci2 modul to edit the password in /etc/config/rpcd.
I have problems to get extrakt the usernama in a subpage from the session.
I know that angular knows the username because, it is shown in the right corner of the the page.

Question:
How can i get the username in a submodul to make an password rpc change?

Thanks for help

Dubplicate code (luci2 and rpc-sys)

@jow-

I have seen in the C sources of luci2-rpc-base that there are the same functions implemented as in rpc-sys. (upgrade_start, upgrade_clean. upgrade_test, factory, reboot and password). I have written the Sysupgrade Modul (ready for PR) but i don´t know which rpc backend I should use (luci2 or rpc-sys)?

If you ask me :-) I would use the rpc-sys calls, because they are more general and not luci2 specific. If so the Makefile for luci2-ui-base must be extended with rpc-sys dependency. and the duplicated code in luci2 should be deleted.

Kind regards

Flo

luci-ng blocks build

Image build breaks as input is required:

[email protected] node_modules/bower
mkdir -p .tmp
touch .tmp/.npm_stamp
node ./node_modules/.bin/bower install
bower angular#~1.5.8            cached https://github.com/angular/bower-angular.git#1.5.11
bower angular#~1.5.8          validate 1.5.11 against https://github.com/angular/bower-angular.git#~1.5.8
bower angular-animate#~1.5.8    cached https://github.com/angular/bower-angular-animate.git#1.5.11
bower angular-animate#~1.5.8  validate 1.5.11 against https://github.com/angular/bower-angular-animate.git#~1.5.8
bower angular-route#~1.5.8      cached https://github.com/angular/bower-angular-route.git#1.5.11
bower angular-route#~1.5.8    validate 1.5.11 against https://github.com/angular/bower-angular-route.git#~1.5.8
bower bootstrap-css-only#~3.0.0 cached https://github.com/fyockm/bootstrap-css-only.git#3.0.3
bower bootstrap-css-only#~3.0.0         validate 3.0.3 against https://github.com/fyockm/bootstrap-css-only.git#~3.0.0
bower angular-bootstrap#~2.1.0            cached https://github.com/angular-ui/bootstrap-bower.git#2.1.4
bower angular-bootstrap#~2.1.0          validate 2.1.4 against https://github.com/angular-ui/bootstrap-bower.git#~2.1.0
bower angular-cookies#^1.6.1              cached https://github.com/angular/bower-angular-cookies.git#1.6.1
bower angular-cookies#^1.6.1            validate 1.6.1 against https://github.com/angular/bower-angular-cookies.git#^1.6.1
bower angular-gettext#^2.3.8              cached https://github.com/rubenv/angular-gettext.git#2.3.8
bower angular-gettext#^2.3.8            validate 2.3.8 against https://github.com/rubenv/angular-gettext.git#^2.3.8
bower angular#>=1.4.0                     cached https://github.com/angular/bower-angular.git#1.6.1
bower angular#>=1.4.0                   validate 1.6.1 against https://github.com/angular/bower-angular.git#>=1.4.0
bower angular#>=1.2.0                     cached https://github.com/angular/bower-angular.git#1.6.1
bower angular#>=1.2.0                   validate 1.6.1 against https://github.com/angular/bower-angular.git#>=1.2.0

Unable to find a suitable version for angular, please choose one by typing one of the numbers below:
    1) angular#1.5.11 which resolved to 1.5.11 and is required by angular-animate#1.5.11, angular-route#1.5.11
    2) angular#~1.5.8 which resolved to 1.5.11 and is required by luci-ng
    3) angular#>=1.4.0 which resolved to 1.6.1 and is required by angular-bootstrap#2.1.4
    4) angular#1.6.1 which resolved to 1.6.1 and is required by angular-cookies#1.6.1
    5) angular#>=1.2.0 which resolved to 1.6.1 and is required by angular-gettext#2.3.8

Prefix the choice with ! to persist it to bower.json

backup page with chromium

Hello Jow,

i have some problem with the backup page you recently merged from my PR. If i press the download in Chromium i don't get an respond. But the page works in Firefox/IE. Do you have any suggestion what the problem might be?

Regards

Flo

(feat) Switch to websockets based transport for Ubus

In some talks we have agreed on the benefits of using websockets instead of HttpRequests as transport for ubus calls. While being more performant for many small calls, it will enable the possibility to use UBUS subscriptions and server-push notifications. ( Some background on #42)
As this requires as a precondition to add websocktes support to uHttpd, we are leaving this issue open till that moment, to track any related discussion.
In the meantime, the approach in Luci-ng will be to implement a Ubus service as an abstraction layer, so when later changing transport it is mostly transparent for the rest of the application, and only new possibilities should be build.

How to use the new node.js tools?

Which development setup do i have to install, to benefit form "gulb" and other "node.js" tools?
Can you please write a small how to?

IRC Minutes

#luci-hackers 17.01.09
@jow- @amharris @ianchi

  1. User feedback: we agreed that is needed to orient the UI/UX redesign effort. Going full trymyui way seems too costly for the first attemp.
    It wasn't exaclty concretly agreed as a next step, but I think that we should start a thread in the forum to get this rolling right away.

  2. Releases: once some basic functionality is integrated we should aim for early alpha releases with prebuilt packages, to get more user feedback
    Alistair suggested a rolling release, being lean and releasing value where possible and in as small chunks as we can, so as to make the feedback/response and impact of each change measurable.

  3. General discussion, mainly for leveling on UCI/CBI current state.

  4. Adrian suggests to develop the auto UCI/CBI approach, with partial releases focused on LUCI, but with three "envisioning" goals:
    a- define LUCI views
    b- use the UCI description file not only for LUCI but also as a helper to UCIfy the wrapping of packages configs into UCI. It'll require sepparate sh scripts development
    c- use the description to automatically keep updated documentation in the wiki

  5. It was agreed to switch from Angular Boostrap to Angular Material

  6. Alastair suggested to change framework from angular 1 to TS + Angular2. It was agreed that first a stable code base continuing with Angular 1 should be met.

  7. Jo stated that he would preferably take a step back (from UI web development) and assist with backend and lede integration topics

(feat) Integrate legacy Luci views inside new Luci-ng app

In some talks we have agreed that it would be great to have some way to integrate legacy views in the new app, to leverage all the existing extensions.
Quoting some background on #42 from @jow-

My idea here is to build some kind of special legacy LuCI theme which removes header and footer markup but includes some special .js file instead which takes care of rendering the LuCI-NG framing around the legacy content markup. I have already started to convert legacy LuCI to ubus login sessions so that message passing between old and new LuCI becomes easier.

At this stage I am skeptical about how feasible a deeper integration is, like refactoring the old Lua/HTML CBI to output JSON schemas instead as this would require a lot of message-passing with the backend to execute embedded Lua code snippets and expose their inputs/outputs via some RPC channel.

I'm leaving this issue opened to track anything related to this topic

(feat) ui-core: save workflow

UCI Pages still lack a complete save workflow.
Some months ago we have a rather lengthy IRC chat on the topic with @jow-
I open this issue with the conclusions, to keep record and to track development:

<ianchi> Or perhaps it is simpler to cache both apply_sid and apply_user, and grant the commit if either match with the "confirm"
<jow> indeed
<jow> and the strictness or rather "looseness" can be set with the apply request
<jow> like uci/apply { rollback: true, allow_same_user: true }
<ianchi> ok
<ianchi> So, we seem to have found a middleground. I'll try to sum up to recheck:
<ianchi> 1) Do save - apply - confirm
<ianchi> 2) if confirm goes thru -> happy ending
<ianchi> 3) if it takes too much notify the user and urge to test new address, or config, or ..
<ianchi> 4) if still we are on the same page and the deadline is reached, notify that a rollback is being done
<ianchi> 5) do a resync to reload the reverted config
<ianchi> alternatively
<ianchi> 6) the user changed the address
<ianchi> 7) after "all" first load luci-ng send a "confirm", if it is rejected ignore it. If it is accepted, we could inform the user of successfull save. 
<jow> yes
<ianchi> On step 4, we could also offer the option of resaving without rollback protection
<jow> optionally, but we would need to find a way to reach the device first in order to cancel pending rollbacks
<ianchi> but at that point in time the rollback deadline is already reached and so should have been performed. If a final confirm gets thru but gets rejected, we know we are back and rollbacked
<jow> right, okay
<ianchi> All this assumes that we change rpcd-uci to add the "allow_same_user" option

Summary of the main problems being addressed:

  • Enable the rollback mechanism to ensure protection against missconfigurations
  • Have a simple intuitive workflow for the general user, without many "complicated" options
  • Keep a feature similar to the "pending changes" that many people use to learn about how various UI changes manifest in the config
  • Have uci data to re-sync itself on save to rule out any possible out-of-sync scenario (errors, changes made from other sources)
  • Solve the cross-domain problem to store/reclaim sid when the router's ip changes after some config change (needed to confirm the changes and cancel the rollback)

luci2-ui-base-2017-11-27-e439ce6 doesn't build

make[3]: Entering directory '/home/stijn/Development/LEDE/source/feeds/luci2/luci2-ui-base'
rm -f /home/stijn/Development/LEDE/source/build_dir/target-mips64_octeon_64_musl/luci2-ui-base-2017-11-27-e439ce6/.built
touch /home/stijn/Development/LEDE/source/build_dir/target-mips64_octeon_64_musl/luci2-ui-base-2017-11-27-e439ce6/.built_check
make -C /home/stijn/Development/LEDE/source/build_dir/target-mips64_octeon_64_musl/luci2-ui-base-2017-11-27-e439ce6
make[4]: Entering directory '/home/build/lede/build_dir/target-mips64_octeon_64_musl/luci2-ui-base-2017-11-27-e439ce6'
node ./node_modules/.bin/gulp dist
[13:28:47] Using gulpfile /home/build/lede/build_dir/target-mips64_octeon_64_musl/luci2-ui-base-2017-11-27-e439ce6/gulpfile.js
[13:28:47] Starting 'dist'...
[13:28:47] Starting 'svg'...
[13:28:47] Starting 'copyAssets'...
[13:28:47] Starting 'svgExtractIcons'...
[13:28:47] Starting 'lintErr'...
gulp-search :  [ 'md-svg-icon="router-wireless"' ]
gulp-search :  null
gulp-search :  [ 'md-svg-icon="chevron-right"' ]
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  [ 'md-svg-icon="dots-vertical"' ]
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  [ 'md-svg-icon="chevron-down"' ]
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  [ 'md-svg-icon="menu"' ]
gulp-search :  null
gulp-search :  [ 'md-svg-icon="account-circle"' ]
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
[13:28:54] Finished 'lintErr' after 7.15 s
[13:28:54] Starting 'inject'...
[13:28:54] Starting 'copyHtml'...
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
[13:28:54] Finished 'copyHtml' after 72 ms
[13:28:54] Starting 'injectCss'...
[13:28:54] Starting 'autoprefixCss'...
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  [ 'svgIcon: \'border-color\'',
  'svgIcon: \'content-save\'',
  'svgIcon: \'undo\'',
  'svgIcon: \'account-circle\'',
  'svgIcon: \'account-check\'',
  'svgIcon: \'tune\'',
  'svgIcon: \'lock-outline\'',
  'svgIcon: \'logout-variant\'',
  'svgIcon: \'power-settings\'',
  'svgIcon: \'reload\'',
  'svgIcon: \'translate\'',
  'svgIcon: \'palette\'' ]
[13:28:55] Finished 'autoprefixCss' after 868 ms
[13:28:55] Starting 'injectCss'...
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
[13:28:55] gulp-inject 8 files into luci-ng.html.
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
[13:28:55] Finished 'injectCss' after 58 ms
[13:28:55] Finished 'injectCss' after 928 ms
[13:28:55] Starting 'injectJs'...
[13:28:55] Starting 'prepareJs'...
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
gulp-search :  null
[13:28:55] Finished 'svgExtractIcons' after 8.77 s
[13:28:55] Starting 'svgIconset'...
[13:28:56] Finished 'svgIconset' after 883 ms
[13:28:56] Finished 'svg' after 9.66 s
[13:28:56] Finished 'copyAssets' after 9.7 s
[13:28:56] Finished 'prepareJs' after 1.52 s
[13:28:56] Starting 'injectJs'...
[13:28:56] gulp-inject 37 files into luci-ng.html.
[13:28:56] Finished 'injectJs' after 113 ms
[13:28:56] Finished 'injectJs' after 1.63 s
[13:28:56] Starting 'injectMaterial'...
[13:28:57] gulp-inject 34 files into luci-ng.html.
[13:28:57] Finished 'injectMaterial' after 95 ms
[13:28:57] Finished 'inject' after 2.73 s
[13:28:57] Starting 'injectPartials'...
[13:28:57] Starting 'partials'...
[13:28:57] Finished 'partials' after 377 ms
[13:28:57] Starting 'injectPartials'...
[13:28:57] gulp-inject 2 files into luci-ng.html.
[13:28:57] Finished 'injectPartials' after 12 ms
[13:28:57] Finished 'injectPartials' after 390 ms
[13:28:57] Starting 'build'...
[13:28:57] 'build' errored after 431 ms
[13:28:57] Error: Error: File not found with singular glob: /home/build/lede/build_dir/target-mips64_octeon_64_musl/luci2-ui-base-2017-11-27-e439ce6/.tmp/../ngMaterial.js (if this was purposeful, use `allowEmpty` option)
    at DestroyableTransform.<anonymous> (/home/build/lede/build_dir/target-mips64_octeon_64_musl/luci2-ui-base-2017-11-27-e439ce6/node_modules/gulp-useref/index.js:65:32)
    at emitOne (events.js:96:13)
    at DestroyableTransform.emit (events.js:188:7)
    at emitOne (events.js:96:13)
    at Pumpify.emit (events.js:188:7)
    at Pumpify.Duplexify._destroy (/home/build/lede/build_dir/target-mips64_octeon_64_musl/luci2-ui-base-2017-11-27-e439ce6/node_modules/duplexify/index.js:184:15)
    at /home/build/lede/build_dir/target-mips64_octeon_64_musl/luci2-ui-base-2017-11-27-e439ce6/node_modules/duplexify/index.js:175:10
    at _combinedTickCallback (internal/process/next_tick.js:73:7)
    at process._tickDomainCallback (internal/process/next_tick.js:128:9)
[13:28:57] 'dist' errored after 11 s
make[4]: *** [Makefile:30: build] Error 1
make[4]: Leaving directory '/home/build/lede/build_dir/target-mips64_octeon_64_musl/luci2-ui-base-2017-11-27-e439ce6'
make[3]: *** [Makefile:69: /home/stijn/Development/LEDE/source/build_dir/target-mips64_octeon_64_musl/luci2-ui-base-2017-11-27-e439ce6/.built] Error 2
make[3]: Leaving directory '/home/stijn/Development/LEDE/source/feeds/luci2/luci2-ui-base'
make[2]: *** [package/Makefile:111: package/feeds/luci2/luci2-ui-base/compile] Error 2
make[2]: Leaving directory '/home/stijn/Development/LEDE/source'
make[1]: *** [package/Makefile:105: /home/stijn/Development/LEDE/source/staging_dir/target-mips64_octeon_64_musl/stamp/.package_compile] Error 2
make[1]: Leaving directory '/home/stijn/Development/LEDE/source'
make: *** [/home/stijn/Development/LEDE/source/include/toplevel.mk:218: world] Error 2

luci2-io-helper: use for config download

Hello jow,

i am working on a page to download/upload conifguration. I have now some problem to understand the luci2-io-helper to download/upload the sysupgrade.tar.gz. Can you explain what i have to do to dowload/uploade a sysupgrade.tar.gz?

Is it possible to test it with curl (using the l2-session)

Kind Regards

Flo

luci2 build error openwrt 19.07.3

`cp -fpR ./src/src /home/anusha/Anusha_workspace/Projects/openwrt/openwrt_Build/openwrt_19.07.3/openwrt/build_dir/target-mipsel_24kc_musl/luci2-ui-core-20200227/src
make -C /home/anusha/Anusha_workspace/Projects/openwrt/openwrt_Build/openwrt_19.07.3/openwrt/build_dir/target-mipsel_24kc_musl/luci2-ui-core-20200227 prepare
make[4]: Entering directory '/home/anusha/Anusha_workspace/Projects/openwrt/openwrt_Build/openwrt_19.07.3/openwrt/build_dir/target-mipsel_24kc_musl/luci2-ui-core-20200227'
npm ci

Usage: npm

where is one of:
access, add-user, adduser, apihelp, author, bin, bugs, c,
cache, completion, config, ddp, dedupe, deprecate, dist-tag,
dist-tags, docs, edit, explore, faq, find, find-dupes, get,
help, help-search, home, i, info, init, install,
install-test, issues, it, la, link, list, ll, ln, login,
logout, ls, outdated, owner, pack, ping, prefix, prune,
publish, r, rb, rebuild, remove, repo, restart, rm, root,
run-script, s, se, search, set, show, shrinkwrap, star,
stars, start, stop, t, tag, team, test, tst, un, uninstall,
unlink, unpublish, unstar, up, update, upgrade, v, verison,
version, view, whoami

npm -h quick help on
npm -l display full usage info
npm faq commonly asked questions
npm help search for help on
npm help npm involved overview

Specify configs in the ini-formatted file:
/home/anusha/.npmrc
or on the command line via: npm --key value
Config info can be viewed via: npm help config

[email protected] /usr/share/npm
Makefile:10: recipe for target 'node_modules' failed
make[4]: *** [node_modules] Error 1
make[4]: Leaving directory '/home/anusha/Anusha_workspace/Projects/openwrt/openwrt_Build/openwrt_19.07.3/openwrt/build_dir/target-mipsel_24kc_musl/luci2-ui-core-20200227'
Makefile:69: recipe for target '/home/anusha/Anusha_workspace/Projects/openwrt/openwrt_Build/openwrt_19.07.3/openwrt/build_dir/target-mipsel_24kc_musl/luci2-ui-core-20200227/.prepared_f0c727cf7ad76cefc81e9b2e95ba2d35_6664517399ebbbc92a37c5bb081b5c53' failed
make[3]: *** [/home/anusha/Anusha_workspace/Projects/openwrt/openwrt_Build/openwrt_19.07.3/openwrt/build_dir/target-mipsel_24kc_musl/luci2-ui-core-20200227/.prepared_f0c727cf7ad76cefc81e9b2e95ba2d35_6664517399ebbbc92a37c5bb081b5c53] Error 2
make[3]: Leaving directory '/home/anusha/Anusha_workspace/Projects/openwrt/openwrt_Build/openwrt_19.07.3/openwrt/feeds/luci2/luci2-ui-core'
time: package/feeds/luci2/luci2-ui-core/compile#0.31#0.04#0.34
package/Makefile:111: recipe for target 'package/feeds/luci2/luci2-ui-core/compile' failed
make[2]: *** [package/feeds/luci2/luci2-ui-core/compile] Error 2
make[2]: Leaving directory '/home/anusha/Anusha_workspace/Projects/openwrt/openwrt_Build/openwrt_19.07.3/openwrt'
package/Makefile:107: recipe for target '/home/anusha/Anusha_workspace/Projects/openwrt/openwrt_Build/openwrt_19.07.3/openwrt/staging_dir/target-mipsel_24kc_musl/stamp/.package_compile' failed
make[1]: *** [/home/anusha/Anusha_workspace/Projects/openwrt/openwrt_Build/openwrt_19.07.3/openwrt/staging_dir/target-mipsel_24kc_musl/stamp/.package_compile] Error 2
make[1]: Leaving directory '/home/anusha/Anusha_workspace/Projects/openwrt/openwrt_Build/openwrt_19.07.3/openwrt'
/home/anusha/Anusha_workspace/Projects/openwrt/openwrt_Build/openwrt_19.07.3/openwrt/include/toplevel.mk:225: recipe for target 'world' failed
make: *** [world] Error 2
`
I want to install luci2 package in openwrt 19.07.3 build but i am getting this error.

static routing page

@jow- I am working on a static routing page. And i am using your l2.cbi.js class for the first time.
I have added the related options and the save button works. luci2 calls the uci add rpcd works as expected and i can see this witch ubus call uci changes '{"config":"network"}'

During development i have notices mybe some problems with the rpcd uci call back.

  • An ubus call uci changes"shows my changes i have made with luci2
  • An ubus call uci commit saves the changes to the /etc/config/network
  • Another ubus call uci changes shows already the changes i have made previously? I would expect that the output is empty?
  • And an ubus call uci revert after the luci2 add call does not work as expected? The change is already shown I can not revert?
  • And if i do another ubus call uci commit i see the last entry twice. I have added with luci2?

What is the problem? Or do i do something wrong

Kind Regards

Flo

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.