dashboard.operation_switch=Switch\r
dashboard.operation_run=Ausführen\r
dashboard.clean_unbind_oauth=ungebundene OAuths bereinigen\r
+dashboard.clean_unbind_oauth_success=Alle aufheben OAuthes erfolgreich gelöscht wurden.\r
dashboard.delete_inactivate_accounts=inaktive Konten löschen\r
+dashboard.delete_inactivate_accounts_success=Alle inaktive Konten erfolgreich gelöscht wurden.\r
+dashboard.delete_repo_archives=Alle Repositories Archive löschen\r
+dashboard.delete_repo_archives_success=Alle Repositories Archive wurden erfolgreich gelöscht.\r
dashboard.server_uptime=Server-Uptime\r
dashboard.current_goroutine=Aktuelle Goroutines\r
dashboard.current_memory_usage=Aktuelle Speichernutzung\r
website = Website
location = Location
update_profile = Update Profile
-update_profile_success = Your profile has been successfully updated.
+update_profile_success = Your profile has been updated successfully.
change_username = Username Changed
change_username_desc = Username has been changed, do you want to continue? This will affect all links relate to your account.
continue = Continue
settings.delete = Delete This Repository
settings.delete_desc = Once you delete a repository, there is no going back. Please be certain.
settings.transfer_notices = <p>- You will lose access if new owner is a individual user.</p><p>- You will remain access if new owner is an organization and you're one of the owners.</p>
-settings.update_settings_success = Repository options has been successfully updated.
+settings.update_settings_success = Repository options has been updated successfully.
settings.transfer_owner = New Owner
settings.make_transfer = Make Transfer
-settings.transfer_succeed = Repository ownership has been successfully transferred.
+settings.transfer_succeed = Repository ownership has been transferred successfully.
settings.confirm_delete = Confirm Deletion
settings.add_collaborator = Add New Collaborator
settings.add_collaborator_success = New collaborator has been added.
settings.update_settings = Update Settings
settings.change_orgname = Organization Name Changed
settings.change_orgname_desc = Organization name has been changed, do you want to continue? This will affect all links relate to this organization.
-settings.update_setting_success = Organization setting has been successfully updated.
+settings.update_setting_success = Organization setting has been updated successfully.
settings.delete = Delete Organization
settings.delete_account = Delete This Organization
settings.delete_prompt = The operation will delete this organization permanently, and <strong>CANNOT</strong> be undone!
teams.add_team_member = Add Team Member
teams.delete_team_title = Team Deletion
teams.delete_team_desc = This team is going to be deleted, do you want to continue? Members of this team may lose access to some repositories.
-teams.delete_team_success = Given team has been successfully deleted.
+teams.delete_team_success = Given team has been deleted successfully.
teams.read_permission_desc = This team grants <strong>Read</strong> access: members can view and clone the team's repositories.
teams.write_permission_desc = This team grants <strong>Write</strong> access: members can read from and push to the team's repositories.
teams.admin_permission_desc = This team grants <strong>Admin</strong> access: members can read from, push to, and add collaborators to the team's repositories.
dashboard.operation_switch = Switch
dashboard.operation_run = Run
dashboard.clean_unbind_oauth = Clean unbound OAuthes
+dashboard.clean_unbind_oauth_success = All unbind OAuthes have been deleted successfully.
dashboard.delete_inactivate_accounts = Delete all inactive accounts
+dashboard.delete_inactivate_accounts_success = All inactivate accounts have been deleted successfully.
+dashboard.delete_repo_archives = Delete all repositories archives
+dashboard.delete_repo_archives_success = All repositories archives have been deleted successfully.
dashboard.server_uptime = Server Uptime
dashboard.current_goroutine = Current Goroutines
dashboard.current_memory_usage = Current Memory Usage
users.auth_source = Authorization Source
users.local = Local
users.auth_login_name = Authorization Login Name
-users.update_profile_success = Account profile has been successfully updated.
+users.update_profile_success = Account profile has been updated successfully.
users.edit_account = Edit Account
users.is_activated = This account is activated
users.is_admin = This account has administrator permissions
auths.tips = Tips
auths.edit = Edit Authorization Setting
auths.activated = This authentication has activated
-auths.update_success = Authorization setting has been successfully updated.
+auths.update_success = Authorization setting has been updated successfully.
auths.update = Update Authorization Setting
auths.delete = Delete This Authorization
auths.delete_auth_title = Authorization Deletion
notices.type_1 = Repository
notices.desc = Description
notices.op = Op.
-notices.delete_success = System notice has been successfully deleted.
+notices.delete_success = System notice has been deleted successfully.
[action]
create_repo = created repository <a href="%s/%s">%s</a>
dashboard.operation_switch=Basculer\r
dashboard.operation_run=Exécuter\r
dashboard.clean_unbind_oauth=Nettoyer les associations OAuthes\r
+dashboard.clean_unbind_oauth_success=Tous unbind OAuthes ont été supprimés avec succès.\r
dashboard.delete_inactivate_accounts=Supprimer tous les comptes inactifs\r
+dashboard.delete_inactivate_accounts_success=Inactivent tous les comptes ont été supprimés avec succès.\r
+dashboard.delete_repo_archives=Supprimer toutes les archives de référentiels\r
+dashboard.delete_repo_archives_success=Toutes les archives de référentiels ont été supprimés avec succès.\r
dashboard.server_uptime=Durée de Marche Serveur\r
dashboard.current_goroutine=Goroutines actuelles\r
dashboard.current_memory_usage=Utilisation Mémoire actuelle\r
dashboard.operation_switch=Omschakelen\r
dashboard.operation_run=Uitvoeren\r
dashboard.clean_unbind_oauth=Clean unbound OAuths\r
+dashboard.clean_unbind_oauth_success=Alle OAuthes binding hebben verwijderd.\r
dashboard.delete_inactivate_accounts=Verwijder alle inactieve accounts\r
+dashboard.delete_inactivate_accounts_success=Alle inactivering van rekeningen hebben verwijderd.\r
+dashboard.delete_repo_archives=Verwijderen van alle repositories archieven\r
+dashboard.delete_repo_archives_success=Alle repositories archieven hebben verwijderd.\r
dashboard.server_uptime=Uptime server\r
dashboard.current_goroutine=Huidige Goroutines\r
dashboard.current_memory_usage=Huidige geheugen gebruik\r
dashboard.operation_switch=开关\r
dashboard.operation_run=执行\r
dashboard.clean_unbind_oauth=清理未绑定社交帐号\r
+dashboard.clean_unbind_oauth_success=所有未绑定社交数据清除成功!\r
dashboard.delete_inactivate_accounts=删除所有未激活帐户\r
+dashboard.delete_inactivate_accounts_success=所有未激活帐号清除成功!\r
+dashboard.delete_repo_archives=删除所有仓库存档\r
+dashboard.delete_repo_archives_success=所有仓库存档清除成功!\r
dashboard.server_uptime=服务运行时间\r
dashboard.current_goroutine=当前 Goroutines 数量\r
dashboard.current_memory_usage=当前内存使用量\r
dashboard.operation_switch=開關\r
dashboard.operation_run=執行\r
dashboard.clean_unbind_oauth=清理未綁定社交帳號\r
+dashboard.clean_unbind_oauth_success=所有未綁定社交數據清除成功!\r
dashboard.delete_inactivate_accounts=刪除所有未激活帳戶\r
+dashboard.delete_inactivate_accounts_success=所有未激活帳號清除成功!\r
+dashboard.delete_repo_archives=刪除所有倉庫存檔\r
+dashboard.delete_repo_archives_success=所有倉庫存檔清除成功!\r
dashboard.server_uptime=服務執行時間\r
dashboard.current_goroutine=當前 Goroutines 數量\r
dashboard.current_memory_usage=當前內存使用量\r
return repos, err
}
+// DeleteRepositoryArchives deletes all repositories' archives.
+func DeleteRepositoryArchives() error {
+ return x.Where("id > 0").Iterate(new(Repository),
+ func(idx int, bean interface{}) error {
+ repo := bean.(*Repository)
+ if err := repo.GetOwner(); err != nil {
+ return err
+ }
+ return os.RemoveAll(filepath.Join(RepoPath(repo.Owner.Name, repo.Name), "archives"))
+ })
+}
+
// __ __ __ .__
// / \ / \_____ _/ |_ ____ | |__
// \ \/\/ /\__ \\ __\/ ___\| | \
const (
CLEAN_UNBIND_OAUTH AdminOperation = iota + 1
CLEAN_INACTIVATE_USER
+ CLEAN_REPO_ARCHIVES
)
func Dashboard(ctx *middleware.Context) {
switch AdminOperation(op) {
case CLEAN_UNBIND_OAUTH:
- success = "All unbind OAuthes have been deleted."
+ success = ctx.Tr("admin.dashboard.clean_unbind_oauth_success")
err = models.CleanUnbindOauth()
case CLEAN_INACTIVATE_USER:
- success = "All inactivate accounts have been deleted."
+ success = ctx.Tr("admin.dashboard.delete_inactivate_accounts_success")
err = models.DeleteInactivateUsers()
+ case CLEAN_REPO_ARCHIVES:
+ success = ctx.Tr("admin.dashboard.delete_repo_archives_success")
+ err = models.DeleteRepositoryArchives()
}
if err != nil {
}
ctx.Data["Stats"] = models.GetStatistic()
+ // FIXME: update periodically
updateSystemStatus()
ctx.Data["SysStatus"] = sysStatus
ctx.HTML(200, DASHBOARD)
<td>{{.i18n.Tr "admin.dashboard.delete_inactivate_accounts"}}</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>
+ <td>{{.i18n.Tr "admin.dashboard.delete_repo_archives"}}</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>
</tbody>
</table>
</div>