1
1
mirror of https://github.com/aelve/guide.git synced 2024-11-26 12:42:30 +03:00
Commit Graph

50 Commits

Author SHA1 Message Date
Artyom Kazak
c9e95986ba
Commit the JS bundle for the old frontend into the repo (#396) 2019-09-10 09:24:54 +03:00
Artyom Kazak
6b7d36d1ad Remove unused imports 2019-08-29 12:07:07 +03:00
Artyom Kazak
101d8ba04a Move Uid into a separate module (#388) 2019-08-23 13:27:21 +00:00
Artyom Kazak
ea604a4155 Style 2019-08-23 11:37:40 +03:00
Vladislav Sabanov
e371f8d129 Load into postgres and check it. (#383)
* Insert all categories from Acid to Postgres

* Check postgres == acidstate

* Fix schema

* Redo the way undocumented definitions are counted (#381)

* Redo the way undocumented definitions are counted

* Fix YAML

* Fix a typo

* Generate swagger.json for branches (#380)

* Generate swagger.json for branches

* Fix

* Fix again

* Fix once more

* [skip ci] Regenerate swagger.json

* Don't log debug info to stdout

* Push even if the branch is ahead

* Fix

* Empty

* [skip ci] Regenerate swagger.json

* Don't use "skip ci"

* Enable all unobjectionable extensions (#384)

* Enable OverloadedStrings by default

* Remove pragmas for default extensions

* Enable some other extensions

* Enable TemplateHaskell

* Add logger

* Update cli

* Fix orders updater

* Cut UTC off. Precision 12 -> 9

* Delete item (trait) from category (item) if it marked 'deleted'
And add item (trait) to category (item) if it not marked 'deleted'

* Remove pragmas

* Update makefile, and check untill True with remote base

* Add check equality in travis

* Fix travis: wait for postgres

* Fix travis. Use native service

* Fix redirection

* Fix condition

* Make checks simple

* Refactor on comments. Everything but the last one.
Dumb or not dumb is still the question. (Concerning queries)
2019-08-23 07:49:44 +00:00
Artyom Kazak
c1b9780bc9 Add Named to Imports.hs (#387) 2019-08-22 10:24:23 +00:00
Artyom Kazak
0e86f61494 Fix acid-state loading (#386)
* Die when the state could not be loaded

* Fix database loading

* Don't throw exitSuccess
2019-08-21 03:41:57 +00:00
Artyom Kazak
0c50de646b Enable all unobjectionable extensions (#384)
* Enable OverloadedStrings by default

* Remove pragmas for default extensions

* Enable some other extensions

* Enable TemplateHaskell
2019-08-20 04:40:28 +00:00
Artyom Kazak
ce62066598
Generate swagger.json for branches (#380)
* Generate swagger.json for branches

* Fix

* Fix again

* Fix once more

* [skip ci] Regenerate swagger.json

* Don't log debug info to stdout

* Push even if the branch is ahead

* Fix

* Empty

* [skip ci] Regenerate swagger.json

* Don't use "skip ci"
2019-08-19 17:58:24 +03:00
Artyom Kazak
0d170b3e30 Migrate to to-1.2.0 (#382)
* Migrate to to-1.1.0

* Migrate to to-1.2.0
2019-08-19 10:41:34 +00:00
Artyom Kazak
29a2fb718c Fix Postgres TODOs (#379)
* Use $(fields) in Guide.Database.Queries.Select

* Checking schema hash is hard and not really necessary

* Explain why we store deleted objects
2019-08-18 12:41:46 +00:00
Artyom Kazak
c1c815b3ce Reorganize queries (#378)
* Reorganize queries

* Hlint
2019-08-18 07:47:50 +00:00
Artyom Kazak
b5e2bb4d99 Migrate to hpack (#377)
* Migrate to hpack

* Small fixes to hpack

* Remove exposed modules

* Get rid of a warning

* Unify default-extensions

* exposed-modules
2019-08-17 15:25:31 +00:00
Vladislav Sabanov
8c5cec5aad Add CLI (#376)
* Add CLI

* fix makefile

* Add comments

* Update back/src/Guide/Cli.hs

Co-Authored-By: Artyom Kazak <artyom@aelve.com>

* Update back/src/Guide/Cli.hs

Co-Authored-By: Artyom Kazak <artyom@aelve.com>

* Refactor on review

* Fix tests

* Rename some functions, add comments, minor formatting
2019-08-17 12:38:07 +00:00
Artyom Kazak
ee8a6e551c Don't use explicit imports for Guide.Types.Core (#375) 2019-08-14 19:42:26 +00:00
Vladislav Sabanov
156d794991 Add deleted field to category (#373)
* Add deleted field to category

* fix forgotten
2019-08-14 16:37:42 +00:00
Artyom Kazak
83f77c9309 Move 'To' out of Guide (#371)
* Move 'To' out

* Fix compilation errors
2019-08-13 18:56:52 +00:00
Artyom Kazak
ec49dad1be Implement and use hasql classes (#370)
* Implement hasql classes and generic machinery

* Add support for lists and sets

* Export ToPostgres and FromPostgres

* Add instances for one-tuples (Identity)

* Add instances for types from Guide.Types.Core

* Migrate Guide.Database.Set

* Migrate Guide.Database.Add

* Migrate Guide.Database.Get

* Remove Guide.Database.Convert

* Split makeStatement into makeStatement and makePreparedStatement

* Add helper functions

* Migrate Guide.Database.Schema

* Fix HLint

* Rename

* Use SingleRow and SingleColumn

* Use quasiquoters

* Documentation

* More documentation

* Make makeStatement a pure wrapper

* Slightly more docs

* Write about prepared queries

* s/queryRow/queryRowMaybe/

* s to sql

* Improve docs
2019-08-13 17:54:10 +00:00
Artyom Kazak
285dd6b7f3 Don't use 'show' on Markdown (#368) 2019-08-11 14:06:02 +00:00
Artyom Kazak
b4f339cf0c Remove EKG and unused dependencies (found via 'weeder') (#366)
* Remove EKG

* Remove unused dependencies, found via 'weeder'
2019-08-11 12:59:42 +00:00
Artyom Kazak
94e0939d7b Make HLint usable (#367)
* Apply Hlint's suggestions and suppress others

* Add hints about qualified imports and CPP
2019-08-11 12:57:49 +00:00
Artyom Kazak
bd51f87bed Cleanup the way we work with record fields (#365)
* Use 'fields' where appropriate

* Don't use makeFields

* Rename fields of Config

* Don't use makeFields for Markdown types
2019-08-11 10:19:39 +00:00
Vladislav Sabanov
c259052b6d Remove temp tests (#364) 2019-08-10 13:38:33 +00:00
Vladislav Sabanov
593cb30fc5
Add insert/update transactions (#355)
* add insert transactions

* Fix Add, Add Set[wip], Test them

* Set function is completed and delete one also

* Add moveItem

* Add moveTrait

* Use ItemRow (#356)

* fix travis

* make corrections to the comments

* Add rest row types

* prettify

* Update back/src/Guide/Database/Set.hs

Co-Authored-By: Artyom Kazak <artyom@aelve.com>

* Add row types to get functions. Make ttype convertions

* Formatting

* Use 'do' for constructing rows

* Rename "column" to "columns"

* Fix an article

* Fix boolean capitalization

* Fix Haddock

* Rename TraitType constructors

* Fix sql query

* Fix select in schema

* Reexport more modules from Guide.Database

* Name the #created UTCTime arg

* Restore consistency

* Expand _order comments

* Rename mismatched row fields

* Add lenses for rows

* Replace set functions with 'modifyCategoryRow' and so on

* Document 'exposeFields' and 'exposeFieldsPrefixed'

* Rename exposeFields

* Improve logging in 'setupDatabase'

* Abstract 'makeLensesWith' to Utils module

* Less default parameters in 'addCategory'

* Rewrite docs for makeClassWithLenses
2019-08-10 17:13:40 +05:00
Artyom Kazak
41c3523323
Remove item groups (#347) 2019-07-26 20:00:22 +03:00
Artyom Kazak
10b50a2451
Remove -XTemplateHaskell from default extensions (#346) 2019-07-25 19:55:12 +03:00
Vladislav Sabanov
36a92f9bf7 Add get functions for categories, traits and items (#339) 2019-07-25 15:17:29 +03:00
Artyom Kazak
9f8f0a2262 Fix case one-liner breaking Ormolu 2019-07-25 15:13:54 +03:00
Artyom Kazak
46aed4fdcf
'npm audit fix' in guidejs (#338) 2019-07-15 11:05:40 +03:00
Artyom Kazak
16da2924cf Allow setting more properties (Hackage, etc) when creating an item (#333)
* Allow setting more properties when creating an item

* Fix tests

* Frontend for creating items with more properties

* Unused imports removed
2019-07-14 11:54:32 +04:00
dependabot[bot]
5fe6103dfa Bump lodash from 4.17.4 to 4.17.14 in /back/guidejs (#336)
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.4 to 4.17.14.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.4...4.17.14)

Signed-off-by: dependabot[bot] <support@github.com>
2019-07-13 23:15:44 +03:00
Artyom Kazak
9fee264fe3
Simplify client types (#332)
* Add more comment headings, remove an unnecessary instance

* Get rid of ?
2019-07-12 18:05:34 +03:00
Vladislav Sabanov
9e0f432408
Create tables with hasql (#328)
* create tables with hasql

* Fixes 1

* fix failing

* add todo

* Add more comments

* fix commits

* Mention that libpq has to be installed

* Minor fixes

* Migrations

* Fix wording

* Wording 2
2019-07-11 22:12:14 +05:00
Artyom Kazak
2b380cccc2
Don't store user actions (#304) 2019-06-28 14:27:34 +03:00
Artyom Kazak
0a0092a205
[backend] Don't check for category title duplication (#301) 2019-06-26 12:42:28 +03:00
Artyom Kazak
1b22041506
Migrate to LTS 13 and Ubuntu Xenial (#302) 2019-06-26 11:35:52 +03:00
Vladislav Sabanov
892d5c7558
Swap slave with async (#273)
* Swap slave with async

* Refactor with mapConcurrently_

* Move functions from let to high level

* Separate ekg and spock

* Fix comments
2019-03-20 11:49:02 +05:00
Vladislav Sabanov
93236f1542
Add imports to test (#272)
* Add imports to test

And swap with imports in other modules.

* Add comments

* Fix travis and add comments

* Fix travis config
2019-03-17 10:21:44 +05:00
Vladislav Sabanov
3be9fa30a3
Fix json instances for toc (#270)
* Fix json instances for toc

* Add CTocHeading type
2019-03-08 15:44:50 +05:00
Vladislav Sabanov
2ed5e51e15
Add section info to getCategory (#269)
* Add section info to _getCategory

* Fix consistent
2019-03-03 21:50:45 +05:00
Dmitrij Pavluk
fbc949f3e4 Task/log monad (#264)
* monad DiT

* addition of monad DiT to gaider

* add deriving

* fix of exceptions

* Logger.hs

* logging

* configs

* fix

* cathing of exception

* logger structure

* configs fixes

* log format

* add time format to config

* add logs

* add logs

* add show instances to db actions

* add log to matomo

* add emptyOnExceptyon

* fixing of tests

* add test for logs

* add test for api

* add test for api

* sdd tests to api

* fix of tests

* fix of tests

* fix of errors

* add api tests

* add new tests for log

* add new tests for log

* add new tests for log

* add new tests for log & api

* ordering of API.hs

* add test of traits to api

* fixes to tests

* fixes of test

* add atributes to log

* attributes to logs

* fix to log

* Fix proposals

* Fix error level style

* Try to fix travis tests

* Add comment to servant error log

* Revert openFile to check travis tests

* Abstract withTempFile

* Rework the way handlers are logged

* Fix typos

* Don't use pack

* Add explicit export lists and warn about missing export lists

* Fix comments

* Get rid of useless H.

* Make export lists consistent

* Rewrite config comments

* Log to stderr by default, not to /var/log/guide.log

* Don't use module X

* Rewrite Guider.Logger.Init slightly

* No {- -} comments

* Separate logTests from webspec module

* Swap throwM with Di.Core.throw

* Fix logging

* No more .ghci

* Formatting, etc

* Remove loggers we're not going to use

* Comment

* Typo

* Comments

* searchQuery -> query

It's called "query" in the API

* Rename

* More logging

* Reorder things

* Fix test compilation

* Api -> ApiSpec

* Remove constantly failing footer test

* Rename logTest

* Fix failing log test

* TODO

* We don't do caching anymore

* Increase test time for move item up

* Add haddocked test

* Add uncommented function for test

* Up haddock test

* Add quotes

* Remove ':'

* Add curl stack

* Delete test function

* Up beforeHaddocked to 251

* Increase second threadDelay to 1 million

* Check test fixes

* Remove commented code

* Return bracket function

* Add comment
2019-02-26 10:40:42 +05:00
Dmitrij Pavluk
9147ad47f0
API for requesting a single category/item/trait (#262)
* addition of metode for request of 1 item

* add traversal version of lebses "getById"

* add getTraitById

* fix to tests
2019-01-23 16:30:43 +03:00
Vladislav Sabanov
846003d037
Post edit log to matomo (#259)
* Post edit log to matomo

* Update back/src/Guide/Api/Matomo.hs

Co-Authored-By: willbasky <vladislav.sabanov@gmail.com>

* Update back/src/Guide/Api/Matomo.hs

Co-Authored-By: willbasky <vladislav.sabanov@gmail.com>

* Make postMatomo async

* Fix async, manager and link

* Update comments

* Categorize

* Update back/src/Guide/Matomo.hs

Co-Authored-By: willbasky <vladislav.sabanov@gmail.com>

* Fix proposals
2019-01-23 17:36:40 +05:00
Artyom Kazak
9f0e7cdd6a
Add HLint rules and fix some suggestions (#261) 2019-01-23 09:29:39 +01:00
Dmitrij Pavluk
19241c46ad Renami "uid" to "id" everywhere 2019-01-22 09:04:30 +03:00
Vladislav Sabanov
a59f01c83e
Hide db and requestDetails in Guider context (#258)
* Hide db and request in guider

* Update back/src/Guide/Api/Guider.hs

Co-Authored-By: willbasky <vladislav.sabanov@gmail.com>

* Hide more in context

* Drop the "h"
2019-01-13 08:02:51 +05:00
Vladislav Sabanov
bb83966631
Make json fields optional for item info (#256)
* Make json fields optional for item info

* Add second Maybe

* Fix ToJSON CItemInfo

* Resurrect CItemInfo

* Don't break model refs

* Parse null correctly

* frontend updated according to api changes
2019-01-10 22:56:14 +05:00
Vladislav Sabanov
67beea7d6f
Move item or trait (#254)
* Move item or trait

* Make body request

* Create trait as body with type and text

* Update back/src/Guide/Api/Methods.hs

Co-Authored-By: willbasky <vladislav.sabanov@gmail.com>

* Update back/src/Guide/Api/Methods.hs

Co-Authored-By: willbasky <vladislav.sabanov@gmail.com>

* Update back/src/Guide/Api/Types.hs

Co-Authored-By: willbasky <vladislav.sabanov@gmail.com>

* Fix style

* Remove spaces
2019-01-07 02:29:59 +05:00
Vladislav Sabanov
65800eda6a
[WIP] Remove kinds and add hackage as option (#249)
* Split hackage

* WIP

* Migrate to newer safecopy-migrate

* Fix migrate

* Rename description to summary for item

* Fix link to templates

* Frontend tests fix for pr #249

* Change the path back

* WIP. Fix templates

* Update back/src/Guide/Api/Types.hs

* Remove unnecessary stuff from .gitignore

* Revert style changes

* Two spaces

* _itemDescription has been renamed

* Remove the Hackage test

* name_on_hackage -> hackage

* Fix Hackage param' type

* front changes from kind to hackage

* Fix tests

* Try fix templete

* Revert last commit

* Comment front test in travis
2019-01-05 16:08:42 +05:00
Artyom Kazak
c32852ab77
Move the backend to /back/ (#240) 2018-12-09 23:02:03 +01:00