summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* Add first unit tests.David Thompson2014-08-291-0/+48
| | | | * tests/guix-web/util.scm: New file.
* README: Add screenshot.David Thompson2014-08-161-0/+2
| | | | * README.md: Add screenshot.
* Use unquote-splicing feature of guile-json 0.4.0.David Thompson2014-08-162-22/+16
| | | | | * README.md ("Dependencies"): Specify guile-json >= 0.4.0. * guix-web/view.scm (package->json): Use unquote-splicing to dedupe code.
* Add a currently useless abort button to the package install modal.David Thompson2014-08-151-1/+1
| | | | * js/guix-packages.js (guix.view): Render abort button in derivation phase.
* Use the current user's guix profile.David Thompson2014-08-151-1/+3
| | | | * guix-web/package.scm (%profile): Use the per-user profile of $USER.
* Tweak messaging during package installation.David Thompson2014-08-151-1/+7
| | | | * js/guix-packages.js (guix.view): Tweak messaging during derivation phase.
* Always return to the first page of results after searching.David Thompson2014-08-151-0/+2
| | | | | * js/guix-packages.js (guix.controller.prototype.doSearch): Reset currentPageIndex to 0.
* Show close button on modal when installation fails.David Thompson2014-08-151-1/+1
| | | | * js/guix-packages.js (guix.view): Show close button on the error phase.
* Wrap controller procedure in a trampoline.David Thompson2014-08-151-1/+1
| | | | * scripts/guix-web: Trampoline it.
* Add basic, hacky package installation.David Thompson2014-08-154-4/+192
| | | | | | | | | | | * guix-web/controller.scm (controller): Add package installation route. * guix-web/package.scm: New file. * guix-web/render.scm (unprocessable-entity, created): New procedures. * js/guix-packages.js (guix.PHASE_NONE, guix.PHASE_PROMPT, guix.PHASE_DERIVATION, guix.PHASE_SUCCESS, guix.PHASE_ERROR): New variables. (guix.controller.phase, guix.controller.selectedPackage): New properties. (guix.controller.prototype.installSelectedPackage): New method. (guix.view): Add modal for package installation UI.
* Better encapsulate JS data types.David Thompson2014-08-131-88/+98
| | | | | * js/guix-packages.js (guix.Sorter, guix.controller): Use module pattern to encapsulate data type creation.
* Make logo link to package list.David Thompson2014-08-131-1/+2
| | | | * guix-web/view.scm (main-layout): Wrap image tag in anchor tag.
* Add javascript record type.David Thompson2014-08-131-15/+31
| | | | | | | | * guix-web/view.scm (<javascript>): New record type. (javascript, javascript?, javascript-source-uri, javascript-license, javascript-license-uri): New procedures. (javascripts): Use javascript constructor. (script-tag, librejs): Use new javascript procedures.
* Add column sorting to package table.David Thompson2014-08-133-9/+66
| | | | | | | | | | | * css/guix.css: New file. * guix-web/view.scm (main-layout): Include guix.css. * js/guix-packages.js (guix.Sorter.prototype.reverse): New method. (guix.controller.sorter): Make property. (guix.controller.columns): New variable. (guix.controller.prototype.paginate): Use sorter property. (guix.controller.prototype.sortBy): New method. (guix.view): Render column sorting UI.
* Add package sorting.David Thompson2014-08-131-0/+12
| | | | | | * guix-packages.js (guix.Sorter): New data type. (guix.Soter.prototype.sort): New method. (guix.controller): Sort by name by default.
* Move pagination function to controller prototype.David Thompson2014-08-131-6/+6
| | | | | | * js/guix-packages.js (guix.paginate): Delete it. (guix.controller): Use new paginate method. (guix.controller.prototype.paginate): New method.
* Add copyright and licensing information to page footer.David Thompson2014-08-111-3/+16
|
* Create utility module.David Thompson2014-08-092-9/+45
| | | | | | * guix-web/server.scm (file-extension, directory?, request-path-components): Delete them. * guix-web/util.scm: New module.
* Fix view-package.David Thompson2014-08-091-1/+2
| | | | * guix-web/view.scm (view-package): Filter out non-package inputs.
* README: Rephrase features.David Thompson2014-08-091-2/+2
| | | | * README.md ("Features"): Rephrase.