summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* package: Adjust profile generation creation to current API.David Thompson2015-06-151-10/+15
| | | | | | | | * guix-web/package.scm (install-new-profile-generation): New procedure. (package-install): Use it. Call 'set-guile-for-build' before 'profile-derivation'. Written-By: Ludovic Courtès <ludo@gnu.org>
* package: Use the right state directory rather than a hardcoded one.David Thompson2015-06-151-2/+9
| | | | | | | * guix/web/package.scm (%profile): Use %STATE-DIRECTORY, as well as the 'USER' and 'LOGNAME' environment variables, like 'guix package' does. Written-By: Ludovic Courtès <ludo@gnu.org>
* Fix configure script.Ricardo Wurmus2015-06-121-1/+0
| | | | | * configure.ac: Remove AC_CONFIG_SRCDIR because it set $srcdir to ".." instead of ".".
* Add "guix" to environment.Ricardo Wurmus2015-06-121-0/+2
| | | | * env.scm: Add "guix" to inputs.
* I'm dumb.David Thompson2015-02-091-1/+1
|
* Update environment.David Thompson2015-02-091-2/+10
| | | | * env.scm: Update.
* js: Overhaul UI with FRP!David Thompson2015-02-0913-574/+3190
| | | | | | | | | | | | | | | | | | | | * css/guix.css: New loading spinner. * js/lib/kefir.js: New file. * js/model/packages.js (guix.packages.Packages): Cache result. (guix.packages.Sorter, guix.packages.Pager): Delete. (guix.packages.installPackage): New function. * js/utils.js (K): New variable. (guix.withEmit, guix.withEmitAttr, guix.makeModule): New functions. * js/view/ui.js (guix.ui.paginate, guix.ui.spinUntil): New functions. (guix.ui.spinner): New variable. * js/controller/generations.js: Rewrite. * js/controller/packageInfo.js: Rewrite * js/controller/packages.js: Rewrite. * js/view/packages.js: Rewrite. * js/view/generations.js: Delete. * js/view/packageInfo.js: Delete. * js/routes.js: Use new modules. * guix/web/view/html.scm (javascripts): Update list.
* js: packages: Filter list oninput rather than onchange.David Thompson2015-02-081-1/+1
| | | | * js/view/packages.js (guix.packages.view): s/onchange/oninput/
* Move all modules into the 'guix web' namespace.David Thompson2015-01-3111-34/+34
| | | | | | | | | | | | | | | | | | | | | | | * guix-web/config.scm: Delete. * guix-web/controller.scm: Delete. * guix-web/package.scm: Delete. * guix-web/render.scm: Delete. * guix-web/server.scm: Delete. * guix-web/sxml.scm: Delete. * guix-web/util.scm: Delete. * guix-web/view/html.scm: Delete. * guix-web/view/json.scm: Delete. * guix/web/config.scm: New file. * guix/web/controller.scm: New file. * guix/web/package.scm: New file. * guix/web/render.scm: New file. * guix/web/server.scm: New file. * guix/web/sxml.scm: New file. * guix/web/util.scm: New file. * guix/web/view/html.scm: New file. * guix/web/view/json.scm: New file. * guix/scripts/web.scm: Tweak imports. * Makefile.am (SOURCES): Add new files and remove deleted ones.
* Make guix-web a subcommand of guix.David Thompson2015-01-313-20/+13
| | | | | | | | * scripts/guix-web: Delete. * guix/scripts/web.scm: New file. * Makefile.am (SOURCES): Add it. (dev-server): Delete. * README.md (Use): Tweak usage instructions.
* Render package details on the client.David Thompson2015-01-307-75/+133
| | | | | | | | | | | | * js/routes.js: Add new route. * js/controller/packageInfo.js: New file. * js/view/packageInfo.js: New file. * js/model/packages.js (guix.packages.PackagesByName): New function. * js/view/ui.js (guix.ui.licenseList): New function. * js/view/packages.js (guix.packages.view): Render package links as Mithril URLs. Remove factorized inner 'renderLicese' function. * guix-web/view/html.scm (javascripts): Add new JS files. (view-package): Delete.
* Use JavaScript naming conventions for package JSON fields.David Thompson2015-01-301-2/+2
| | | | | * guix-web/view/json.scm (package->json): Change 'native-inputs' to 'nativeInputs'. Change 'propagated-inputs' to 'propagatedInputs'.
* Make /package a JSON only route.David Thompson2015-01-301-9/+10
| | | | | * guix-web/controller.scm (extract-package-name): New procedure. (controller): Only render JSON for '/package' routes.
* js: layout: Update copyright year in footer.David Thompson2015-01-301-1/+1
| | | | * js/view/layout.js (guix.withLayout): Add © 2015.
* js: Fix package sorting.David Thompson2015-01-301-4/+9
| | | | | | | * js/controllers/packages.js (guix.packages.controller.sortAndPage): New function. (guix.packages.controller): Use 'sortAndPage'. (guix.packages.controller.doSearch): Likewise.
* js: Fix display when there are 0 search resultsDavid Thompson2015-01-303-3/+5
| | | | | | | | | | * js/controller/packages.js (guix.packages.packages): Default to empty array. * js/model/packages.js (guix.packages.Pager.currentPage): Always return an array * js/view/packages.js (guix.packages.view): Show spinner when there are 0 packages loaded from the server, not when there are 0 pages of results.
* Add AUTHORS and THANKS files.David Thompson2015-01-302-0/+2
| | | | | * AUTHORS: New file. * THANKS: New file.
* js: Factorize headerWithBadge function.David Thompson2015-01-303-8/+9
| | | | | | * js/view/ui.js (guix.ui.headerWithBadge): New function. * js/view/packages.js (guix.view.packages): Use it. * js/view/generations.js (guix.view.generations): Likewise.
* js: Extract modal creation function.David Thompson2015-01-303-17/+43
| | | | | | * js/view/ui.js: New file. * guix-web/view/html.scm (javascripts): Add it. * js/view/packages.js (guix.packages.view): Use 'guix.ui.modal' function.
* Add sxml module.David Thompson2015-01-304-6/+373
| | | | | | | * guix-web/sxml.scm: New file. * Makefile.am (SOURCES): Add it. * guix-web/render.scm (render-html): Use 'sxml->html'. * guix-web/view/html.scm (render-javascript): Remove hack.
* view: html: Rename script-tag to render-javascript.David Thompson2015-01-301-2/+2
| | | | | | * guix-web/view/html.scm (script-tag): Rename to... (render-javascript): ...this. (all-packages): Use new procedure name.
* view: html: Add render-stylesheet procedure.David Thompson2015-01-301-10/+16
| | | | | | * guix-web/view/html.scm (render-stylesheet): New procedure. (main-layout): Use it. (stylesheets): New variable.
* Extract HTML and JSON views to separate modules.David Thompson2015-01-304-69/+99
| | | | | | | | * guix-web/view.scm: Delete. * guix-web/view/html.scm: New file. * guix-web/view/json.scm: New file. * guix-web/controller.scm: Import new modules. * Makefile.am (SOURCES): Add new files. Remove deleted one.
* package: Add %all-packages.David Thompson2015-01-302-2/+6
| | | | | * guix-web/package.scm (%all-packages): New variable. * guix-web/view.scm (all-packages-json): Use it.
* css: Improve appearance of counter badges next to headers.David Thompson2015-01-303-2/+7
| | | | | | | * css/guix.css (.header .badge): New style. * js/view/generations.js (guix.generations.view): Add 'header' class to h2 element. * js/view/packages.js (guix.packages.view): Likewise.
* js: Clean up packageCount function.David Thompson2015-01-302-3/+11
| | | | | | * js/utils.js (guix.add): New function. * js/controllers/packages.js (guix.packages.controller.packageCount): Reimplement.
* Replace package.scm with env.scm.David Thompson2015-01-302-4/+3
| | | | | | * env.scm: New file. * package.scm: Delete. * README.md (Development): s/package/env/
* js: Extract pagination model.David Thompson2014-10-164-49/+82
| | | | | | | | | | * js/utils.js (guix.clamp): New function. * js/controller/packages.js (guix.packages.controller): Remove 'pages', 'currentPageIndex', and 'pageSize' properties. Add 'pager' prop. Delete 'paginate', 'currentPage', 'isFirstPage', 'isLastPage', and 'isCurrentPage' methods. * js/model/packages.js (guix.packages.Pager): New function. * js/view/packages.js (guix.packages.view): Use new Pager API.
* Add generations view.David Thompson2014-10-168-7/+161
| | | | | | | | | | | | * guix-web/controller.scm (controller): Add '/generations' route. * guix-web/package.scm (profile-generations*): New procedure. * guix-web/view.scm (generations-json): New procedure. (javascripts): Add new JS files. * js/model/generations.js: New file. * js/controller/generations.js: New file. * js/view/generations.js: New file. * js/view/layout.js (guix.withLayout): Add 'Generations' navbar entry. * js/routes.js: Add '/generations' route.
* js: Hook up navbar to routes.David Thompson2014-10-151-1/+6
| | | | | * js/view/layout.js (guix.withLayout): Add click handler for 'Packages' link.
* js: Add loading spinner to packages page.David Thompson2014-10-155-9/+124
| | | | | | | | | | | * css/guix.css: Add spinner styles. * js/controller/packages.js (guix.packages.view): Explicitly redraw after loading packages. * js/model/packages.js (guix.packages.Packages): Load packages in the background. * js/view/layout.js (guix.withLayout): Cast elem to array if needed. * js/view/packages.js (guix.packages.view): Render spinner when there are no packages to display.
* librejs: Render full path to file on weblabels page.David Thompson2014-10-151-1/+1
| | | | * guix-web/view.scm (librejs): Show full path in first table column.
* Render footer on client instead of server.David Thompson2014-10-152-49/+55
| | | | | | | * guix-web/view.scm (main-layout): Remove footer. (all-packages): Remove '#guix' div. (librejs): Add container and logo. * js/view/layout.js (guix.withLayout): Render footer.
* js: utils file initializes guix namespace with certainty.David Thompson2014-10-151-1/+1
| | | | * js/utils.js (guix): Don't check for existing value (there isn't one).
* js: Break package components into model/view/controller files.David Thompson2014-10-156-389/+428
| | | | | | | | | * js/packages.js: Delete. * js/model/packages.js: New file. * js/view/packages.js: New file. * js/controller/packages.js: New file. * js/routes.js: Use new namespace for packages. * guix-web/view.scm (javascripts): Add new JS files.
* Restructure JavaScript files.David Thompson2014-10-159-24/+100
| | | | | | | | | | | | | | | * js/guix-packages.js: Delete. * js/mithril.js: Delete. * js/underscore.js: Delete. * js/lib/mithril.js: New file. * js/lib/underscore.js: New file. * js/packages.js: New file. * js/routes.js: New file. * js/utils.js: New file. * js/view/layout.js: New file. * guix-web/view.scm (javascripts): Add new files. Delete old ones. * css/guix.css (logo): New class. * images/logo.png: Shrink logo.
* Allow hostname customization.David Thompson2014-10-132-2/+4
| | | | | | * guix-web/config.scm (guix-web-host): New variable. * guix-web/render.scm (render-static-asset, redirect): Use 'guix-web-host'.
* Fix 404 rendering for static assets.David Thompson2014-10-131-1/+4
| | | | * guix-web/render.scm (render-static-asset): Build proper URI.
* view: Fix 'format' warning.David Thompson2014-10-121-0/+1
| | | | * guix-web/view.scm: Import (ice-9 format).
* Decouple static asset rendering from core server logic.David Thompson2014-10-123-22/+21
| | | | | | | * guix-web/server.scm (file-mime-types, serve-static-asset): Delete. * guix-web/render.scm (file-mine-types): New variable. (render-static-asset): New procedure. * guix-web/controller.scm (controller): Add static asset rendering.
* controller: Use match-lambda.David Thompson2014-10-121-25/+25
| | | | * guix-web/controller.scm (controller): Use 'match-lambda'.
* Add configurable HTTP server port.David Thompson2014-10-123-3/+6
| | | | | | * guix-web/config.scm (guix-web-port): New variable. * guix-web/render.scm (redirect): Use it. * guix-web/server.scm (start-guix-web): Ditto.
* Add development package.David Thompson2014-10-112-0/+31
| | | | | * package.scm: New file. * README.md ('Development'): New section.
* Makefile: Add 'dev-server' target.David Thompson2014-10-112-2/+5
| | | | | * Makefile.am (dev-server): New target. * README.md ('Use'): Document it.
* test: Add coverage for render module.David Thompson2014-09-122-0/+69
| | | | * tests/guix-web/render.scm: New file.
* test: Fix directory? test.David Thompson2014-09-121-2/+2
| | | | * tests/guix-web/util.scm ("directory?"): Use getcwd instead of ".".
* js: Extract more rendering to functions.David Thompson2014-08-301-35/+43
| | | | | * js/guix-packages.js (guix.view): Extract renderPackageTable and renderSearchBox functions.
* Add basic autotools files.David Thompson2014-08-308-6/+130
| | | | | | | | | | * Makefile.am: New file. * autogen.sh: New file. * configure.ac: New file. * env.in: New file. * guile.am: New file. * pre-inst-env.in: New file. * .gitignore: Ignore auto-generated files.
* Ignore .go files.David Thompson2014-08-301-0/+1
| | | | * .gitignore: New file.
* package: Do not open store connection upon module load.David Thompson2014-08-291-14/+14
| | | | | * guix-web/package.scm (%store): Delete it. (package-install): Use with-store.