diff options
author | Unknwon <u@gogs.io> | 2015-08-19 00:34:11 +0800 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2015-08-19 00:34:11 +0800 |
commit | 81b8427438d4d37d38a46d0fec4c22aee60f91fa (patch) | |
tree | 19138f3cf6bdaa2d4bde0dfb3355df10703174cb /templates | |
parent | 6fdc881bd4ffb0a97a9a3f6ec65182575c5b0bde (diff) | |
download | gitea-81b8427438d4d37d38a46d0fec4c22aee60f91fa.tar.gz gitea-81b8427438d4d37d38a46d0fec4c22aee60f91fa.zip |
new UI on admin/monitor
Diffstat (limited to 'templates')
-rw-r--r-- | templates/admin/monitor.tmpl | 133 | ||||
-rw-r--r-- | templates/admin/navbar.tmpl | 29 | ||||
-rw-r--r-- | templates/repo/settings/deploy_keys.tmpl | 114 |
3 files changed, 148 insertions, 128 deletions
diff --git a/templates/admin/monitor.tmpl b/templates/admin/monitor.tmpl index a7942e09c3..8092082563 100644 --- a/templates/admin/monitor.tmpl +++ b/templates/admin/monitor.tmpl @@ -1,74 +1,65 @@ -{{template "ng/base/head" .}} -{{template "ng/base/header" .}} -<div id="admin-wrapper"> - <div id="setting-wrapper" class="main-wrapper"> - <div id="admin-setting" class="container clear"> - {{template "admin/nav" .}} - <div class="grid-4-5 left"> - <div class="setting-content"> - {{template "ng/base/alert" .}} - <div id="setting-content"> - <div class="panel panel-radius"> - <div class="panel-header"> - <strong>{{.i18n.Tr "admin.monitor.cron"}}</strong> - </div> - <div class="panel-body admin-panel"> - <table class="table table-striped"> - <thead> - <tr> - <th>{{.i18n.Tr "admin.monitor.name"}}</th> - <th>{{.i18n.Tr "admin.monitor.schedule"}}</th> - <th>{{.i18n.Tr "admin.monitor.next"}}</th> - <th>{{.i18n.Tr "admin.monitor.previous"}}</th> - <th>{{.i18n.Tr "admin.monitor.execute_times"}}</th> - </tr> - </thead> - <tbody> - {{range .Entries}} - <tr> - <td>{{.Description}}</td> - <td>{{.Spec}}</td> - <td>{{.Next}}</td> - <td>{{.Prev}}</td> - <td>{{.ExecTimes}}</td> - </tr> - {{end}} - </tbody> - </table> - </div> - </div> - <br> - <div class="panel panel-radius"> - <div class="panel-header"> - <strong>{{.i18n.Tr "admin.monitor.process"}}</strong> - </div> - <div class="panel-body admin-panel"> - <table class="table table-striped"> - <thead> - <tr> - <th>Pid</th> - <th>{{.i18n.Tr "admin.monitor.desc"}}</th> - <th>{{.i18n.Tr "admin.monitor.start"}}</th> - <th>{{.i18n.Tr "admin.monitor.execute_time"}}</th> - </tr> - </thead> - <tbody> - {{range .Processes}} - <tr> - <td>{{.Pid}}</td> - <td>{{.Description}}</td> - <td>{{.Start}}</td> - <td>{{TimeSince .Start $.Lang}}</td> - </tr> - {{end}} - </tbody> - </table> - </div> - </div> - </div> - </div> - </div> +{{template "base/head" .}} +<div class="admin monitor"> + <div class="ui container"> + <div class="ui grid"> + {{template "admin/navbar" .}} + <div class="twelve wide column content"> + {{template "base/alert" .}} + <h4 class="ui top attached header"> + {{.i18n.Tr "admin.monitor.cron"}} + </h4> + <div class="ui attached table segment"> + <table class="ui very basic striped table"> + <thead> + <tr> + <th>{{.i18n.Tr "admin.monitor.name"}}</th> + <th>{{.i18n.Tr "admin.monitor.schedule"}}</th> + <th>{{.i18n.Tr "admin.monitor.next"}}</th> + <th>{{.i18n.Tr "admin.monitor.previous"}}</th> + <th>{{.i18n.Tr "admin.monitor.execute_times"}}</th> + </tr> + </thead> + <tbody> + {{range .Entries}} + <tr> + <td>{{.Description}}</td> + <td>{{.Spec}}</td> + <td>{{DateFmtLong .Next}}</td> + <td>{{if gt .Prev.Year 1 }}{{DateFmtLong .Prev}}{{else}}N/A{{end}}</td> + <td>{{.ExecTimes}}</td> + </tr> + {{end}} + </tbody> + </table> </div> + + <h4 class="ui top attached header"> + {{.i18n.Tr "admin.monitor.process"}} + </h4> + <div class="ui attached table segment"> + <table class="ui very basic striped table"> + <thead> + <tr> + <th>Pid</th> + <th>{{.i18n.Tr "admin.monitor.desc"}}</th> + <th>{{.i18n.Tr "admin.monitor.start"}}</th> + <th>{{.i18n.Tr "admin.monitor.execute_time"}}</th> + </tr> + </thead> + <tbody> + {{range .Processes}} + <tr> + <td>{{.Pid}}</td> + <td>{{.Description}}</td> + <td>{{DateFmtLong .Start}}</td> + <td>{{TimeSince .Start $.Lang}}</td> + </tr> + {{end}} + </tbody> + </table> + </div> + </div> </div> + </div> </div> -{{template "ng/base/footer" .}}
\ No newline at end of file +{{template "base/footer" .}}
\ No newline at end of file diff --git a/templates/admin/navbar.tmpl b/templates/admin/navbar.tmpl new file mode 100644 index 0000000000..e85fa24fbf --- /dev/null +++ b/templates/admin/navbar.tmpl @@ -0,0 +1,29 @@ +<div class="four wide column"> + <div class="ui vertical menu"> + <div class="header item">{{.i18n.Tr "admin_panel"}}</div> + <a class="{{if .PageIsAdminDashboard}}active{{end}} item" href="{{AppSubUrl}}/admin"> + {{.i18n.Tr "admin.dashboard"}} + </a> + <a class="{{if .PageIsAdminUsers}}active{{end}} item" href="{{AppSubUrl}}/admin/users"> + {{.i18n.Tr "admin.users"}} + </a> + <a class="{{if .PageIsAdminOrganizations}}active{{end}} item" href="{{AppSubUrl}}/admin/orgs"> + {{.i18n.Tr "admin.organizations"}} + </a> + <a class="{{if .PageIsAdminRepositories}}active{{end}} item" href="{{AppSubUrl}}/admin/repos"> + {{.i18n.Tr "admin.repositories"}} + </a> + <a class="{{if .PageIsAdminAuthentications}}active{{end}} item" href="{{AppSubUrl}}/admin/auths"> + {{.i18n.Tr "admin.authentication"}} + </a> + <a class="{{if .PageIsAdminConfig}}active{{end}} item" href="{{AppSubUrl}}/admin/config"> + {{.i18n.Tr "admin.config"}} + </a> + <a class="{{if .PageIsAdminNotices}}active{{end}} item" href="{{AppSubUrl}}/admin/notices"> + {{.i18n.Tr "admin.notices"}} + </a> + <a class="{{if .PageIsAdminMonitor}}active{{end}} item" href="{{AppSubUrl}}/admin/monitor"> + {{.i18n.Tr "admin.monitor"}} + </a> + </div> +</div>
\ No newline at end of file diff --git a/templates/repo/settings/deploy_keys.tmpl b/templates/repo/settings/deploy_keys.tmpl index 769376b649..af8b35a2aa 100644 --- a/templates/repo/settings/deploy_keys.tmpl +++ b/templates/repo/settings/deploy_keys.tmpl @@ -2,73 +2,73 @@ <div class="repository settings"> {{template "repo/header" .}} <div class="ui container"> - <div class="ui grid"> - {{template "repo/settings/navbar" .}} - <div class="twelve wide column content"> - {{template "base/alert" .}} - <h4 class="ui top attached header"> - {{.i18n.Tr "repo.settings.deploy_keys"}} - <div class="ui right"> - <div id="add-deploy-key" class="ui blue tiny button">{{.i18n.Tr "repo.settings.add_deploy_key"}}</div> - </div> - </h4> - <div class="ui attached segment"> - {{if .Deploykeys}} - <div class="ui key list"> - {{range .Deploykeys}} - <div class="item ui grid"> - <div class="one wide column"> - <i class="ssh-key-state-indicator fa fa-circle{{if .HasRecentActivity}} active invert poping up{{else}}-o{{end}}" {{if .HasRecentActivity}}data-content="{{$.i18n.Tr "settings.key_state_desc"}}" data-variation="inverted"{{end}}></i> - </div> - <div class="one wide column"> - <i class="mega-octicon octicon-key left"></i> - </div> - <div class="eleven wide column"> - <strong>{{.Name}}</strong> - <div class="print meta"> - {{.Fingerprint}} + <div class="ui grid"> + {{template "repo/settings/navbar" .}} + <div class="twelve wide column content"> + {{template "base/alert" .}} + <h4 class="ui top attached header"> + {{.i18n.Tr "repo.settings.deploy_keys"}} + <div class="ui right"> + <div id="add-deploy-key" class="ui blue tiny button">{{.i18n.Tr "repo.settings.add_deploy_key"}}</div> + </div> + </h4> + <div class="ui attached segment"> + {{if .Deploykeys}} + <div class="ui key list"> + {{range .Deploykeys}} + <div class="item ui grid"> + <div class="one wide column"> + <i class="ssh-key-state-indicator fa fa-circle{{if .HasRecentActivity}} active invert poping up{{else}}-o{{end}}" {{if .HasRecentActivity}}data-content="{{$.i18n.Tr "settings.key_state_desc"}}" data-variation="inverted"{{end}}></i> </div> - <div class="activity meta"> - <i>{{$.i18n.Tr "settings.add_on"}} <span>{{DateFmtShort .Created}}</span> — <i class="octicon octicon-info"></i> {{if .HasUsed}}{{$.i18n.Tr "settings.last_used"}} <span>{{DateFmtShort .Updated}}</span>{{else}}{{$.i18n.Tr "settings.no_activity"}}{{end}}</i> + <div class="one wide column"> + <i class="mega-octicon octicon-key left"></i> + </div> + <div class="eleven wide column"> + <strong>{{.Name}}</strong> + <div class="print meta"> + {{.Fingerprint}} + </div> + <div class="activity meta"> + <i>{{$.i18n.Tr "settings.add_on"}} <span>{{DateFmtShort .Created}}</span> — <i class="octicon octicon-info"></i> {{if .HasUsed}}{{$.i18n.Tr "settings.last_used"}} <span>{{DateFmtShort .Updated}}</span>{{else}}{{$.i18n.Tr "settings.no_activity"}}{{end}}</i> + </div> + </div> + <div class="two wide column"> + <button class="ui red tiny button delete-button" data-url="{{$.Link}}/delete" data-id="{{.ID}}"> + {{$.i18n.Tr "settings.delete_key"}} + </button> </div> </div> - <div class="two wide column"> - <button class="ui red tiny button delete-button" data-url="{{$.Link}}/delete" data-id="{{.ID}}"> - {{$.i18n.Tr "settings.delete_key"}} - </button> - </div> + {{end}} </div> + {{else}} + {{.i18n.Tr "repo.settings.no_deploy_keys"}} {{end}} </div> - {{else}} - {{.i18n.Tr "repo.settings.no_deploy_keys"}} - {{end}} - </div> - <br> - <div {{if not .HasError}}class="hide"{{end}} id="add-deploy-key-panel"> - <h4 class="ui top attached header"> - {{.i18n.Tr "repo.settings.add_deploy_key"}} - </h4> - <div class="ui attached segment"> - <form class="ui form" action="{{.Link}}" method="post"> - {{.CsrfTokenHtml}} - <div class="field {{if .Err_Title}}error{{end}}"> - <label>{{.i18n.Tr "repo.settings.title"}}</label> - <input name="title" value="{{.title}}" autofocus required> - </div> - <div class="field {{if .Err_Content}}error{{end}}"> - <label>{{.i18n.Tr "repo.settings.deploy_key_content"}}</label> - <textarea name="content" required>{{.content}}</textarea> - </div> - <button class="ui green button"> - {{.i18n.Tr "repo.settings.add_deploy_key"}} - </button> - </form> + <br> + <div {{if not .HasError}}class="hide"{{end}} id="add-deploy-key-panel"> + <h4 class="ui top attached header"> + {{.i18n.Tr "repo.settings.add_deploy_key"}} + </h4> + <div class="ui attached segment"> + <form class="ui form" action="{{.Link}}" method="post"> + {{.CsrfTokenHtml}} + <div class="field {{if .Err_Title}}error{{end}}"> + <label>{{.i18n.Tr "repo.settings.title"}}</label> + <input name="title" value="{{.title}}" autofocus required> + </div> + <div class="field {{if .Err_Content}}error{{end}}"> + <label>{{.i18n.Tr "repo.settings.deploy_key_content"}}</label> + <textarea name="content" required>{{.content}}</textarea> + </div> + <button class="ui green button"> + {{.i18n.Tr "repo.settings.add_deploy_key"}} + </button> + </form> + </div> </div> </div> </div> </div> - </div> </div> <div class="ui small basic delete modal"> |