summaryrefslogtreecommitdiffstats
path: root/models/admin.go
Commit message (Collapse)AuthorAgeFilesLines
* Refactor Cron and merge dashboard tasks (#10745)zeripath2020-05-161-5/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Refactor Cron and merge dashboard tasks * Merge Cron and Dashboard tasks * Make every cron task report a system notice on completion * Refactor the creation of these tasks * Ensure that execution counts of tasks is correct * Allow cron tasks to be started from the cron page * golangci-lint fixes * Enforce that only one task with the same name can be registered Signed-off-by: Andrew Thornton <art27@cantab.net> * fix name check Signed-off-by: Andrew Thornton <art27@cantab.net> * as per @guillep2k * as per @lafriks Signed-off-by: Andrew Thornton <art27@cantab.net> * Add git.CommandContext variants Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Use gitea forked macaron (#7933)Tamal Saha2019-08-231-1/+1
| | | Signed-off-by: Tamal Saha <tamal@appscode.com>
* Display ui time with customize time location (#7792)Lunny Xiao2019-08-151-3/+3
| | | | | | | | | | | | | | | | | | * display ui time with customize time location * fix lint * rename UILocation to DefaultUILocation * move time related functions to modules/timeutil * fix tests * fix tests * fix build * fix swagger
* Only warn on errors in deleting LFS orphaned files during repo deletion (#7213)zeripath2019-06-151-1/+1
|
* Better logging (#6038) (#6095)zeripath2019-04-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Panic don't fatal on create new logger Fixes #5854 Signed-off-by: Andrew Thornton <art27@cantab.net> * partial broken * Update the logging infrastrcture Signed-off-by: Andrew Thornton <art27@cantab.net> * Reset the skip levels for Fatal and Error Signed-off-by: Andrew Thornton <art27@cantab.net> * broken ncsa * More log.Error fixes Signed-off-by: Andrew Thornton <art27@cantab.net> * Remove nal * set log-levels to lowercase * Make console_test test all levels * switch to lowercased levels * OK now working * Fix vetting issues * Fix lint * Fix tests * change default logging to match current gitea * Improve log testing Signed-off-by: Andrew Thornton <art27@cantab.net> * reset error skip levels to 0 * Update documentation and access logger configuration * Redirect the router log back to gitea if redirect macaron log but also allow setting the log level - i.e. TRACE * Fix broken level caching * Refactor the router log * Add Router logger * Add colorizing options * Adjust router colors * Only create logger if they will be used * update app.ini.sample * rename Attribute ColorAttribute * Change from white to green for function * Set fatal/error levels * Restore initial trace logger * Fix Trace arguments in modules/auth/auth.go * Properly handle XORMLogger * Improve admin/config page * fix fmt * Add auto-compression of old logs * Update error log levels * Remove the unnecessary skip argument from Error, Fatal and Critical * Add stacktrace support * Fix tests * Remove x/sync from vendors? * Add stderr option to console logger * Use filepath.ToSlash to protect against Windows in tests * Remove prefixed underscores from names in colors.go * Remove not implemented database logger This was removed from Gogs on 4 Mar 2016 but left in the configuration since then. * Ensure that log paths are relative to ROOT_PATH * use path.Join * rename jsonConfig to logConfig * Rename "config" to "jsonConfig" to make it clearer * Requested changes * Requested changes: XormLogger * Try to color the windows terminal If successful default to colorizing the console logs * fixup * Colorize initially too * update vendor * Colorize logs on default and remove if this is not a colorizing logger * Fix documentation * fix test * Use go-isatty to detect if on windows we are on msys or cygwin * Fix spelling mistake * Add missing vendors * More changes * Rationalise the ANSI writer protection * Adjust colors on advice from @0x5c * Make Flags a comma separated list * Move to use the windows constant for ENABLE_VIRTUAL_TERMINAL_PROCESSING * Ensure matching is done on the non-colored message - to simpify EXPRESSION
* Remove util.RemoveAll - should have been removed since go 1.7 (#6299)zeripath2019-03-101-1/+2
|
* Refactor struct's time to remove unnecessary memory usage (#3142)Lunny Xiao2017-12-111-9/+2
| | | | | | | | | | | | | | * refactor struct's time to remove unnecessary memory usage * use AsTimePtr simple code * fix tests * fix time compare * fix template on gpg * use AddDuration instead of Add
* Replace deprecated Id method with ID (#2655)Ethan Koenig2017-10-051-1/+1
|
* Use AfterLoad instead of AfterSet on Structs (#2628)Lunny Xiao2017-10-011-7/+3
| | | | | | | | * use AfterLoad instead of AfterSet on Structs * fix the comments on AfterLoad * fix the comments on action AfterLoad
* Use created & updated instead BeforeInsert & BeforeUpdate (#2482)Lunny Xiao2017-09-131-6/+1
| | | | | | | | | | | | * use created & updated instead BeforeInsert & BeforeUpdate * fix vendor checksum * only show generated SQL when development mode * remove extra update column updated_unix * remove trace config
* refactor: remove workaround after the golang 1.7 release. (#1349)Bo-Yi Wu2017-03-291-19/+4
| | | | | | | | | | | | | | * refactor: remove workaround after the golang 1.7 release. * remove unused import. Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com> * refactor: Add remove function. * refactor: rename * refactor: update build flag
* fix delete repo will hang on postgres (#1044)Lunny Xiao2017-02-241-7/+10
|
* Unit tests for models/adminEthan Koenig2017-01-091-1/+1
|
* Create missing database indexes (#596)Andrey Nering2017-01-061-1/+1
|
* Lint models/admin.goBwko2016-11-241-0/+4
|
* use in instead string join (#155)Lunny Xiao2016-11-121-2/+1
|
* Merge remote-tracking branch 'upstream/master' into feature/rewrite-xorm-queriesThibault Meyer2016-11-101-3/+3
|\ | | | | | | | | | | | | | | | | # Conflicts: # models/git_diff.go # models/issue.go # models/org.go # models/pull.go # models/repo.go
| * Update import paths from github.com/go-gitea to code.gitea.io (#135)Sandro Santilli2016-11-101-3/+3
| | | | | | | | | | | | | | - Update import paths from github.com/go-gitea to code.gitea.io - Fix import path for travis See https://docs.travis-ci.com/user/languages/go#Go-Import-Path
* | Rewrite XORM queriesThibault Meyer2016-11-101-2/+7
|/
* More MixedCase constsSandro Santilli2016-11-071-3/+3
|
* Change import reference to match gitea instead of gogs (#37)Rémy Boulanouar2016-11-031-3/+3
|
* Remove redundant Unix timestamp method callUnknwon2016-07-231-1/+1
| | | | Unix() already uses UTC as timezone
* Add comment note (#3093)Andrey Nering2016-05-231-2/+4
|
* Fix remove folder issues, including initialization failling. (#2969)Andrey Nering2016-05-061-0/+8
| | | | - Prevent panic on creating notice if database is not available - Prevent incorrect folder on Windows ("/" instead of "\")
* #2302 Replace time.Time with Unix Timestamp (int64)Unknwon2016-03-091-1/+14
|
* Workaroud delete folder on Windows. Fix #1738Andrey Nering2016-02-071-1/+10
|
* #2558 delete local wiki copy when rename repo and userUnknwon2016-02-051-0/+15
|
* #2052 advanced select ops for system noticesUnknwon2015-12-051-1/+13
|
* #2052 Ability to batch delete system noticesUnknwon2015-12-011-0/+10
|
* New admin notice UI based on user list exampleAntoine GIRARD2015-09-251-5/+4
|
* Fix #532, add system noticeUnknwon2014-10-081-0/+64