mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-02 17:20:53 +02:00
add admin op: delete missing repos
This commit is contained in:
1 parent
81d7359fdd
commit
efea642d6c
5 files changed
+51
-5
No files matched your search
@@ -760,6 +760,8 @@ dashboard.delete_inactivate_accounts = Delete all inactive accounts
|
|||||||
dashboard.delete_inactivate_accounts_success = All inactivate accounts have been deleted successfully.
|
dashboard.delete_inactivate_accounts_success = All inactivate accounts have been deleted successfully.
|
||||||
dashboard.delete_repo_archives = Delete all repositories archives
|
dashboard.delete_repo_archives = Delete all repositories archives
|
||||||
dashboard.delete_repo_archives_success = All repositories archives have been deleted successfully.
|
dashboard.delete_repo_archives_success = All repositories archives have been deleted successfully.
|
||||||
|
dashboard.delete_missing_repos = Delete all repository records that lost Git files
|
||||||
|
dashboard.delete_missing_repos_success = All repository records that lost Git files have been deleted successfully.
|
||||||
dashboard.git_gc_repos = Do garbage collection on repositories
|
dashboard.git_gc_repos = Do garbage collection on repositories
|
||||||
dashboard.git_gc_repos_success = All repositories have done garbage collection successfully.
|
dashboard.git_gc_repos_success = All repositories have done garbage collection successfully.
|
||||||
dashboard.resync_all_sshkeys = Rewrite '.ssh/authorized_keys' file (caution: non-Gogs keys will be lost)
|
dashboard.resync_all_sshkeys = Rewrite '.ssh/authorized_keys' file (caution: non-Gogs keys will be lost)
|
||||||
|
|||||||
@@ -1325,6 +1325,42 @@ func DeleteRepositoryArchives() error {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// DeleteMissingRepositories deletes all repository records that lost Git files.
|
||||||
|
func DeleteMissingRepositories() error {
|
||||||
|
repos := make([]*Repository, 0, 5)
|
||||||
|
if err := x.Where("id > 0").Iterate(new(Repository),
|
||||||
|
func(idx int, bean interface{}) error {
|
||||||
|
repo := bean.(*Repository)
|
||||||
|
repoPath, err := repo.RepoPath()
|
||||||
|
if err != nil {
|
||||||
|
return fmt.Errorf("RepoPath [%d]: %v", repo.ID, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if !com.IsDir(repoPath) {
|
||||||
|
repos = append(repos, repo)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}); err != nil {
|
||||||
|
if err2 := CreateRepositoryNotice(fmt.Sprintf("DeleteMissingRepositories: %v", err)); err2 != nil {
|
||||||
|
log.Error(4, "CreateRepositoryNotice: %v", err2)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(repos) == 0 {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
for _, repo := range repos {
|
||||||
|
if err := DeleteRepository(repo.OwnerID, repo.ID); err != nil {
|
||||||
|
if err2 := CreateRepositoryNotice(fmt.Sprintf("DeleteRepository [%d]: %v", repo.ID, err)); err2 != nil {
|
||||||
|
log.Error(4, "CreateRepositoryNotice: %v", err2)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
// RewriteRepositoryUpdateHook rewrites all repositories' update hook.
|
// RewriteRepositoryUpdateHook rewrites all repositories' update hook.
|
||||||
func RewriteRepositoryUpdateHook() error {
|
func RewriteRepositoryUpdateHook() error {
|
||||||
return x.Where("id > 0").Iterate(new(Repository),
|
return x.Where("id > 0").Iterate(new(Repository),
|
||||||
|
|||||||
@@ -4364,7 +4364,7 @@ func confLocaleLocale_deDeIni() (*asset, error) {
|
|||||||
return a, nil
|
return a, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
var _confLocaleLocale_enUsIni = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xbc\x7d\xeb\x72\xdc\x48\xae\xe6\x7f\x3e\x05\xdb\x27\x1c\xb6\x23\xe4\x72\x74\xf7\xde\xa2\xa3\xed\x5e\x59\x6a\x5f\xe6\x58\x96\xc6\x52\xcf\xec\xac\xc3\xc1\x66\x15\xa9\x2a\x8e\xab\xc8\x6a\x92\xe5\xb2\xfa\xc4\x89\xd8\x07\xd8\x07\xd8\x7d\xbd\xf3\x24\x0b\x7c\x00\xf2\x42\xb2\x24\xbb\x67\x62\xfd\xc3\x62\x65\x22\x6f\x48\x24\x12\x89\x04\x90\xf9\x76\x9b\x15\x65\xb7\x48\x9f\xa6\xc7\xe9\x36\xaf\xea\x75\xd9\x75\x69\x57\xae\xaf\x1f\xaf\x9a\xae\x2f\x8b\xf4\x65\xd5\xd3\xef\xf6\x53\xb5\x28\x93\x64\xd5\x6c\x4a\x02\x7d\x45\x7f\x92\x22\xef\x56\xf3\x26\x6f\x0b\x4a\x38\xb5\xef\xa4\xfc\xbc\x5d\x37\x2d\x03\xfd\x2c\x5f\xc9\xaa\x5c\x6f\xb9\x0c\xfd\x49\xba\x6a\x59\x67\x55\x4d\x3f\x2f\xe9\x2b\x7d\x5d\x4b\x4a\xb3\xeb\x2d\xe9\x7c\xd7\x4b\xda\x6e\x6b\x49\xbf\x6c\x93\xb6\x5c\x56\xd4\x9b\x96\x92\xde\xe9\x67\xb2\x2f\xe7\x5d\xd5\x73\x4b\x7f\x95\xaf\xe4\x53\xd9\x76\x55\xc3\xb5\xff\x45\xbe\x92\x6d\xbe\x64\x80\x0b\xfa\x93\xf4\xe5\x66\xbb\xce\x51\xe0\x4a\x3f\x93\x75\x5e\x2f\x77\x02\xf3\x46\x3f\x93\x45\x5b\x52\x56\x56\x97\x7b\x4a\x3d\xc1\x8f\xd9\x6c\x96\xec\x08\x09\xd9\xb6\x6d\xae\xab\x75\x99\xe5\x75\x91\x6d\x64\x98\xbf\x50\x7a\xaa\xe9\x29\xa5\xa7\x9c\x8e\x21\x94\x05\x0d\x35\xcb\x3b\x1d\x07\xe1\x92\x46\x9e\x77\x09\xaa\xaa\xf3\x8d\x95\xe6\xcf\xa4\xdc\xe4\xd5\x9a\xb1\xf6\x98\x3f\xa8\xe3\x5d\xb7\x6f\x80\xdb\x0b\xfd\x24\x24\x64\xfd\xcd\xb6\x04\x0e\x1e\x5f\xd1\x57\xb2\xc8\xb7\xfd\x62\x95\x73\x3f\xe5\x2b\x21\xa0\x6d\x43\xc8\x68\xda\x1b\xc0\xd9\x8f\xa4\x69\x97\x79\x5d\xfd\x9e\xf7\x82\xa0\xf3\xe0\x67\xb2\xa9\xda\xb6\x61\xdc\x9e\xe1\x23\xa1\xa1\x67\x5c\x0f\xa5\xbc\x25\x2c\x04\xb5\x70\xce\xa6\x5a\xb6\x82\x46\xce\x3c\xc3\x2f\xae\x85\xf3\xae\x9b\xf6\xa3\x66\xbc\xe0\xcf\x41\x51\xea\x84\xe6\xc6\xed\xe7\x35\x21\x5e\x73\xcf\xf0\x23\x02\xe8\x92\xbc\xd8\x10\x2a\xb7\x79\x5d\x32\x8e\x8e\xf9\x17\xe1\x85\x7e\x25\xf9\x62\xd1\xec\xea\x3e\xeb\xca\xbe\xaf\xea\x25\x23\xfb\x58\x92\xd2\x4b\x4d\x4a\x82\x3c\x97\x76\xd3\xec\xdc\x74\x52\xfa\xdf\xe8\x67\x7a\x21\x3f\x25\x2f\x28\x84\x4c\x57\x92\x47\xd2\x65\xd7\x65\x59\xc8\x58\xba\xf4\x05\x7d\x27\xdb\xdd\x7a\x4d\x58\xfb\x6d\x57\x76\x3d\x17\xba\xa0\xdf\x34\x7e\xf9\x9d\x54\x5d\x47\x1f\x94\xfc\x1a\x1f\x09\x4d\x5d\xbd\xc0\x60\x4e\xf0\x91\x24\xef\xbb\x32\x6f\x17\xab\x0f\x89\xfc\x45\x5f\xf9\x83\x69\xef\xd0\xa4\x32\x21\x29\x11\x49\x0b\xd6\x40\xb2\x68\x0a\xfe\x71\x42\x7f\xa8\xea\xaa\xee\xfa\x7c\xbd\xfe\x90\xe8\x07\x83\xc9\x97\x4c\x40\x5f\xf5\xc0\x82\x26\xa6\x97\x7d\xb9\xed\x78\x06\xd3\x17\x55\xdb\xf5\x8f\xfb\x8a\x88\xf5\xdd\xae\x4e\x8a\x66\xf1\x91\x96\x01\x2f\x69\xb4\xfc\xfa\x3a\x25\x64\x3d\xa0\x85\xd0\xee\xea\x9a\xd0\x93\xbe\x6c\x08\x65\xd4\x4c\x45\xed\x9f\x02\xfa\x28\xdd\xae\xcb\xbc\x23\x90\x32\x2f\xd2\x1f\xf3\xb4\xcf\xdb\x65\xd9\x3f\xbd\x97\xcd\x69\xf9\x7d\xbc\x97\xae\xda\xf2\xfa\xe9\xbd\xfb\xdd\xbd\x67\x2f\x77\x54\x6c\x5d\xd5\x65\xf7\xe3\x93\xfc\x59\xba\xc8\x29\x87\xd0\x78\x93\xce\xcb\x6b\x5e\x6d\xd4\x56\x4a\x54\x5e\x2f\x79\xa5\xdd\xf4\x2b\x6e\x90\x28\x81\x3e\xba\x94\x97\xfa\x37\x09\x4f\x00\xb1\x82\xac\x98\x1b\x5b\x43\x87\x90\xdc\xd2\x04\x9c\xdd\x5c\xfe\xf9\xcd\x51\x7a\x41\xbc\x6d\xd9\x96\xf8\xa6\xff\xa8\xc4\xf7\x29\x8d\xf6\xaa\x3a\x7d\x3e\x4b\xa8\xac\x21\xe4\x34\xef\xf3\x39\xf7\xdd\xcd\x3e\x67\xca\x22\x74\x79\x58\x8a\xcc\x2d\xc1\x19\xbb\x3e\x9a\x96\xa9\x85\x4c\x75\xe8\xf2\x77\x75\xbc\x65\x1e\x40\xe9\x0e\xb3\x17\x82\x33\xaa\x2a\x7d\xfd\xf6\xed\xf9\xe9\xf3\xb4\xac\x97\x84\x99\x74\x5f\xf5\xab\x74\xd7\x5f\xff\xb7\x6c\x59\xd6\x65\x9b\xaf\xb3\x45\xc5\x48\x69\x89\x60\x53\xc2\x92\x0c\x71\x96\x74\xdd\x9a\x58\x14\xa8\xe0\xf2\xf2\x4d\x7a\xc6\x94\xb0\xcd\xfb\x15\x3a\xd2\xaf\x92\xee\xb7\x35\x23\xca\x35\x78\xb5\x2a\x53\x2c\x06\x00\x35\xd7\x43\xbc\xa4\x85\xf6\x75\x96\x94\x6d\x9b\x11\x07\xed\x6f\x18\xcd\x5a\xe7\x21\x68\xa9\x8e\xa8\xbd\x6e\x7a\x9a\xc6\x14\xe5\xa4\x8a\xaa\xfe\x94\xaf\xab\x82\x90\xed\x11\x12\x97\x45\x62\xd1\xd0\xbc\x71\x69\xa2\xcc\x66\x8f\xa1\xe6\x0b\xda\x00\xba\xf4\xde\xec\x1e\x38\xee\xbd\xc7\xf7\x66\x49\xdd\x64\xc2\x25\x98\x37\x17\x55\x97\xcf\x89\x4f\xcb\xbe\xd1\x1a\xd7\xfb\x1b\xd3\x8f\x74\x45\x21\xd2\x08\x82\x71\xcb\x7b\x11\xb6\x00\x26\xae\x9c\x18\x36\x98\x8d\xb2\x99\x70\xec\xc6\x93\xdc\xfc\x0a\x5b\x72\x09\xa3\x31\x27\x36\x61\x46\x5d\xc7\xdb\xed\xba\x5a\x48\xd3\x2f\x25\xcf\x13\x1a\xef\xcc\x8a\x94\x10\x0e\x84\x62\x79\x01\xb9\x50\xaf\x99\x6d\xa5\x11\x9f\x47\xf9\x55\x49\x2b\x67\xb5\x5b\xca\xee\xb4\x6e\x76\xc5\x37\x60\x28\x36\x73\x9e\x9f\xa4\xef\x1a\xea\x30\xa8\xc3\x01\xf8\x26\x8e\x89\x31\xb0\x30\xd0\x96\x9b\xa6\x67\xc4\x69\xb1\x8a\xa6\x67\x5f\x51\x26\x8d\xb4\xcb\x3f\x11\x5b\xec\x1b\x59\x92\x05\x2d\xb9\x05\x57\x4c\x1c\x6c\x47\x3b\xba\x2c\x0b\xe2\x23\xb2\x34\x2c\x2d\xa6\x41\x40\x6d\x76\xb4\x9a\x56\x54\x19\x23\x9e\x25\x12\xaa\x72\xaa\x9f\x18\x12\xd5\x83\x55\x4e\x2b\xb7\xa1\xcd\x93\x27\xfa\x14\x1f\xfa\x3b\xac\x9f\x7a\x95\x5f\x5f\x53\xaf\x3a\x5a\x15\xaf\xd2\xc5\xba\xa1\x25\xf5\xcb\xbb\x37\x1d\x2f\x98\x55\xb6\x6d\x5a\x48\x22\x94\x75\x41\x9f\x2e\x2d\x40\x34\x43\xd4\xbb\xcd\x9c\x7e\xed\x57\x15\x31\x6a\xa0\x9d\x4b\xb0\x94\x44\xa9\xd4\xc4\xae\xa3\x29\x3c\x4a\x69\x09\xdLine truncated
|
var _confLocaleLocale_enUsIni = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xbc\x7d\xeb\x72\xdc\x48\xae\xe6\x7f\x3e\x05\xdb\x27\x1c\xb6\x23\xe4\x72\x74\xf7\xde\xa2\xa3\xed\x5e\x59\x6a\x5f\xe6\x58\x96\xc6\x52\xcf\xec\xac\xc3\xc1\x66\x15\xa9\x2a\x8e\xab\xc8\x6a\x92\xe5\xb2\xfa\xc4\x89\xd8\x07\xd8\x07\xd8\x7d\xbd\xf3\x24\x0b\x7c\x00\xf2\x42\xb2\x24\xbb\x67\x62\xfd\xc3\x62\x65\x22\x6f\x48\x24\x12\x89\x04\x90\xf9\x76\x9b\x15\x65\xb7\x48\x9f\xa6\xc7\xe9\x36\xaf\xea\x75\xd9\x75\x69\x57\xae\xaf\x1f\xaf\x9a\xae\x2f\x8b\xf4\x65\xd5\xd3\xef\xf6\x53\xb5\x28\x93\x64\xd5\x6c\x4a\x02\x7d\x45\x7f\x92\x22\xef\x56\xf3\x26\x6f\x0b\x4a\x38\xb5\xef\xa4\xfc\xbc\x5d\x37\x2d\x03\xfd\x2c\x5f\xc9\xaa\x5c\x6f\xb9\x0c\xfd\x49\xba\x6a\x59\x67\x55\x4d\x3f\x2f\xe9\x2b\x7d\x5d\x4b\x4a\xb3\xeb\x2d\xe9\x7c\xd7\x4b\xda\x6e\x6b\x49\xbf\x6c\x93\xb6\x5c\x56\xd4\x9b\x96\x92\xde\xe9\x67\xb2\x2f\xe7\x5d\xd5\x73\x4b\x7f\x95\xaf\xe4\x53\xd9\x76\x55\xc3\xb5\xff\x45\xbe\x92\x6d\xbe\x64\x80\x0b\xfa\x93\xf4\xe5\x66\xbb\xce\x51\xe0\x4a\x3f\x93\x75\x5e\x2f\x77\x02\xf3\x46\x3f\x93\x45\x5b\x52\x56\x56\x97\x7b\x4a\x3d\xc1\x8f\xd9\x6c\x96\xec\x08\x09\xd9\xb6\x6d\xae\xab\x75\x99\xe5\x75\x91\x6d\x64\x98\xbf\x50\x7a\xaa\xe9\x29\xa5\xa7\x9c\x8e\x21\x94\x05\x0d\x35\xcb\x3b\x1d\x07\xe1\x92\x46\x9e\x77\x09\xaa\xaa\xf3\x8d\x95\xe6\xcf\xa4\xdc\xe4\xd5\x9a\xb1\xf6\x98\x3f\xa8\xe3\x5d\xb7\x6f\x80\xdb\x0b\xfd\x24\x24\x64\xfd\xcd\xb6\x04\x0e\x1e\x5f\xd1\x57\xb2\xc8\xb7\xfd\x62\x95\x73\x3f\xe5\x2b\x21\xa0\x6d\x43\xc8\x68\xda\x1b\xc0\xd9\x8f\xa4\x69\x97\x79\x5d\xfd\x9e\xf7\x82\xa0\xf3\xe0\x67\xb2\xa9\xda\xb6\x61\xdc\x9e\xe1\x23\xa1\xa1\x67\x5c\x0f\xa5\xbc\x25\x2c\x04\xb5\x70\xce\xa6\x5a\xb6\x82\x46\xce\x3c\xc3\x2f\xae\x85\xf3\xae\x9b\xf6\xa3\x66\xbc\xe0\xcf\x41\x51\xea\x84\xe6\xc6\xed\xe7\x35\x21\x5e\x73\xcf\xf0\x23\x02\xe8\x92\xbc\xd8\x10\x2a\xb7\x79\x5d\x32\x8e\x8e\xf9\x17\xe1\x85\x7e\x25\xf9\x62\xd1\xec\xea\x3e\xeb\xca\xbe\xaf\xea\x25\x23\xfb\x58\x92\xd2\x4b\x4d\x4a\x82\x3c\x97\x76\xd3\xec\xdc\x74\x52\xfa\xdf\xe8\x67\x7a\x21\x3f\x25\x2f\x28\x84\x4c\x57\x92\x47\xd2\x65\xd7\x65\x59\xc8\x58\xba\xf4\x05\x7d\x27\xdb\xdd\x7a\x4d\x58\xfb\x6d\x57\x76\x3d\x17\xba\xa0\xdf\x34\x7e\xf9\x9d\x54\x5d\x47\x1f\x94\xfc\x1a\x1f\x09\x4d\x5d\xbd\xc0\x60\x4e\xf0\x91\x24\xef\xbb\x32\x6f\x17\xab\x0f\x89\xfc\x45\x5f\xf9\x83\x69\xef\xd0\xa4\x32\x21\x29\x11\x49\x0b\xd6\x40\xb2\x68\x0a\xfe\x71\x42\x7f\xa8\xea\xaa\xee\xfa\x7c\xbd\xfe\x90\xe8\x07\x83\xc9\x97\x4c\x40\x5f\xf5\xc0\x82\x26\xa6\x97\x7d\xb9\xed\x78\x06\xd3\x17\x55\xdb\xf5\x8f\xfb\x8a\x88\xf5\xdd\xae\x4e\x8a\x66\xf1\x91\x96\x01\x2f\x69\xb4\xfc\xfa\x3a\x25\x64\x3d\xa0\x85\xd0\xee\xea\x9a\xd0\x93\xbe\x6c\x08\x65\xd4\x4c\x45\xed\x9f\x02\xfa\x28\xdd\xae\xcb\xbc\x23\x90\x32\x2f\xd2\x1f\xf3\xb4\xcf\xdb\x65\xd9\x3f\xbd\x97\xcd\x69\xf9\x7d\xbc\x97\xae\xda\xf2\xfa\xe9\xbd\xfb\xdd\xbd\x67\x2f\x77\x54\x6c\x5d\xd5\x65\xf7\xe3\x93\xfc\x59\xba\xc8\x29\x87\xd0\x78\x93\xce\xcb\x6b\x5e\x6d\xd4\x56\x4a\x54\x5e\x2f\x79\xa5\xdd\xf4\x2b\x6e\x90\x28\x81\x3e\xba\x94\x97\xfa\x37\x09\x4f\x00\xb1\x82\xac\x98\x1b\x5b\x43\x87\x90\xdc\xd2\x04\x9c\xdd\x5c\xfe\xf9\xcd\x51\x7a\x41\xbc\x6d\xd9\x96\xf8\xa6\xff\xa8\xc4\xf7\x29\x8d\xf6\xaa\x3a\x7d\x3e\x4b\xa8\xac\x21\xe4\x34\xef\xf3\x39\xf7\xdd\xcd\x3e\x67\xca\x22\x74\x79\x58\x8a\xcc\x2d\xc1\x19\xbb\x3e\x9a\x96\xa9\x85\x4c\x75\xe8\xf2\x77\x75\xbc\x65\x1e\x40\xe9\x0e\xb3\x17\x82\x33\xaa\x2a\x7d\xfd\xf6\xed\xf9\xe9\xf3\xb4\xac\x97\x84\x99\x74\x5f\xf5\xab\x74\xd7\x5f\xff\xb7\x6c\x59\xd6\x65\x9b\xaf\xb3\x45\xc5\x48\x69\x89\x60\x53\xc2\x92\x0c\x71\x96\x74\xdd\x9a\x58\x14\xa8\xe0\xf2\xf2\x4d\x7a\xc6\x94\xb0\xcd\xfb\x15\x3a\xd2\xaf\x92\xee\xb7\x35\x23\xca\x35\x78\xb5\x2a\x53\x2c\x06\x00\x35\xd7\x43\xbc\xa4\x85\xf6\x75\x96\x94\x6d\x9b\x11\x07\xed\x6f\x18\xcd\x5a\xe7\x21\x68\xa9\x8e\xa8\xbd\x6e\x7a\x9a\xc6\x14\xe5\xa4\x8a\xaa\xfe\x94\xaf\xab\x82\x90\xed\x11\x12\x97\x45\x62\xd1\xd0\xbc\x71\x69\xa2\xcc\x66\x8f\xa1\xe6\x0b\xda\x00\xba\xf4\xde\xec\x1e\x38\xee\xbd\xc7\xf7\x66\x49\xdd\x64\xc2\x25\x98\x37\x17\x55\x97\xcf\x89\x4f\xcb\xbe\xd1\x1a\xd7\xfb\x1b\xd3\x8f\x74\x45\x21\xd2\x08\x82\x71\xcb\x7b\x11\xb6\x00\x26\xae\x9c\x18\x36\x98\x8d\xb2\x99\x70\xec\xc6\x93\xdc\xfc\x0a\x5b\x72\x09\xa3\x31\x27\x36\x61\x46\x5d\xc7\xdb\xed\xba\x5a\x48\xd3\x2f\x25\xcf\x13\x1a\xef\xcc\x8a\x94\x10\x0e\x84\x62\x79\x01\xb9\x50\xaf\x99\x6d\xa5\x11\x9f\x47\xf9\x55\x49\x2b\x67\xb5\x5b\xca\xee\xb4\x6e\x76\xc5\x37\x60\x28\x36\x73\x9e\x9f\xa4\xef\x1a\xea\x30\xa8\xc3\x01\xf8\x26\x8e\x89\x31\xb0\x30\xd0\x96\x9b\xa6\x67\xc4\x69\xb1\x8a\xa6\x67\x5f\x51\x26\x8d\xb4\xcb\x3f\x11\x5b\xec\x1b\x59\x92\x05\x2d\xb9\x05\x57\x4c\x1c\x6c\x47\x3b\xba\x2c\x0b\xe2\x23\xb2\x34\x2c\x2d\xa6\x41\x40\x6d\x76\xb4\x9a\x56\x54\x19\x23\x9e\x25\x12\xaa\x72\xaa\x9f\x18\x12\xd5\x83\x55\x4e\x2b\xb7\xa1\xcd\x93\x27\xfa\x14\x1f\xfa\x3b\xac\x9f\x7a\x95\x5f\x5f\x53\xaf\x3a\x5a\x15\xaf\xd2\xc5\xba\xa1\x25\xf5\xcb\xbb\x37\x1d\x2f\x98\x55\xb6\x6d\x5a\x48\x22\x94\x75\x41\x9f\x2e\x2d\x40\x34\x43\xd4\xbb\xcd\x9c\x7e\xed\x57\x15\x31\x6a\xa0\x9d\x4b\xb0\x94\x44\xa9\xd4\xc4\xae\xa3\x29\x3c\x4a\x69\x09\xdLine truncated
|
||||||
|
|
||||||
func confLocaleLocale_enUsIniBytes() ([]byte, error) {
|
func confLocaleLocale_enUsIniBytes() ([]byte, error) {
|
||||||
return bindataRead(
|
return bindataRead(
|
||||||
@@ -4379,7 +4379,7 @@ func confLocaleLocale_enUsIni() (*asset, error) {
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
info := bindataFileInfo{name: "conf/locale/locale_en-US.ini", size: 44924, mode: os.FileMode(420), modTime: time.Unix(1447876625, 0)}
|
info := bindataFileInfo{name: "conf/locale/locale_en-US.ini", size: 45123, mode: os.FileMode(420), modTime: time.Unix(1447878366, 0)}
|
||||||
a := &asset{bytes: bytes, info: info}
|
a := &asset{bytes: bytes, info: info}
|
||||||
return a, nil
|
return a, nil
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -116,6 +116,7 @@ type AdminOperation int
|
|||||||
const (
|
const (
|
||||||
CLEAN_INACTIVATE_USER AdminOperation = iota + 1
|
CLEAN_INACTIVATE_USER AdminOperation = iota + 1
|
||||||
CLEAN_REPO_ARCHIVES
|
CLEAN_REPO_ARCHIVES
|
||||||
|
CLEAN_MISSING_REPOS
|
||||||
GIT_GC_REPOS
|
GIT_GC_REPOS
|
||||||
SYNC_SSH_AUTHORIZED_KEY
|
SYNC_SSH_AUTHORIZED_KEY
|
||||||
SYNC_REPOSITORY_UPDATE_HOOK
|
SYNC_REPOSITORY_UPDATE_HOOK
|
||||||
@@ -139,6 +140,9 @@ func Dashboard(ctx *middleware.Context) {
|
|||||||
case CLEAN_REPO_ARCHIVES:
|
case CLEAN_REPO_ARCHIVES:
|
||||||
success = ctx.Tr("admin.dashboard.delete_repo_archives_success")
|
success = ctx.Tr("admin.dashboard.delete_repo_archives_success")
|
||||||
err = models.DeleteRepositoryArchives()
|
err = models.DeleteRepositoryArchives()
|
||||||
|
case CLEAN_MISSING_REPOS:
|
||||||
|
success = ctx.Tr("admin.dashboard.delete_missing_repos_success")
|
||||||
|
err = models.DeleteMissingRepositories()
|
||||||
case GIT_GC_REPOS:
|
case GIT_GC_REPOS:
|
||||||
success = ctx.Tr("admin.dashboard.git_gc_repos_success")
|
success = ctx.Tr("admin.dashboard.git_gc_repos_success")
|
||||||
err = models.GitGcRepos()
|
err = models.GitGcRepos()
|
||||||
|
|||||||
@@ -28,17 +28,21 @@
|
|||||||
<td><i class="fa fa-caret-square-o-right"></i> <a href="{{AppSubUrl}}/admin?op=2">{{.i18n.Tr "admin.dashboard.operation_run"}}</a></td>
|
<td><i class="fa fa-caret-square-o-right"></i> <a href="{{AppSubUrl}}/admin?op=2">{{.i18n.Tr "admin.dashboard.operation_run"}}</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{.i18n.Tr "admin.dashboard.git_gc_repos"}}</td>
|
<td>{{.i18n.Tr "admin.dashboard.delete_missing_repos"}}</td>
|
||||||
<td><i class="fa fa-caret-square-o-right"></i> <a href="{{AppSubUrl}}/admin?op=3">{{.i18n.Tr "admin.dashboard.operation_run"}}</a></td>
|
<td><i class="fa fa-caret-square-o-right"></i> <a href="{{AppSubUrl}}/admin?op=3">{{.i18n.Tr "admin.dashboard.operation_run"}}</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{.i18n.Tr "admin.dashboard.resync_all_sshkeys"}}</td>
|
<td>{{.i18n.Tr "admin.dashboard.git_gc_repos"}}</td>
|
||||||
<td><i class="fa fa-caret-square-o-right"></i> <a href="{{AppSubUrl}}/admin?op=4">{{.i18n.Tr "admin.dashboard.operation_run"}}</a></td>
|
<td><i class="fa fa-caret-square-o-right"></i> <a href="{{AppSubUrl}}/admin?op=4">{{.i18n.Tr "admin.dashboard.operation_run"}}</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{.i18n.Tr "admin.dashboard.resync_all_update_hooks"}}</td>
|
<td>{{.i18n.Tr "admin.dashboard.resync_all_sshkeys"}}</td>
|
||||||
<td><i class="fa fa-caret-square-o-right"></i> <a href="{{AppSubUrl}}/admin?op=5">{{.i18n.Tr "admin.dashboard.operation_run"}}</a></td>
|
<td><i class="fa fa-caret-square-o-right"></i> <a href="{{AppSubUrl}}/admin?op=5">{{.i18n.Tr "admin.dashboard.operation_run"}}</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>{{.i18n.Tr "admin.dashboard.resync_all_update_hooks"}}</td>
|
||||||
|
<td><i class="fa fa-caret-square-o-right"></i> <a href="{{AppSubUrl}}/admin?op=6">{{.i18n.Tr "admin.dashboard.operation_run"}}</a></td>
|
||||||
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in new issue
Block a user