2018-10-02 06:21:14 +00:00
{{define "title"}}Statup | Settings{{end}}
{{define "content"}}
2018-06-24 11:51:07 +00:00
< div class = "container col-md-7 col-sm-12 mt-md-5 bg-light" >
2018-06-11 03:41:02 +00:00
{{template "nav"}}
2018-06-30 22:22:56 +00:00
< div class = "col-12" >
< div class = "row" >
2018-10-02 06:21:14 +00:00
< div class = "col-md-3 col-sm-12 mb-4 mb-md-0" >
< div class = "nav flex-column nav-pills" id = "v-pills-tab" role = "tablist" aria-orientation = "vertical" >
2018-10-21 16:22:26 +00:00
< a class = "nav-link active" id = "v-pills-home-tab" data-toggle = "pill" href = "#v-pills-home" role = "tab" aria-controls = "v-pills-home" aria-selected = "true" > < i class = "fa fa-cogs" > < / i > Settings< / a >
< a class = "nav-link" id = "v-pills-style-tab" data-toggle = "pill" href = "#v-pills-style" role = "tab" aria-controls = "v-pills-style" aria-selected = "false" > < i class = "fa fa-image" > < / i > Theme Editor< / a >
2018-10-02 06:21:14 +00:00
{{ range .Notifications }}
2018-10-21 16:22:26 +00:00
< a class = "nav-link text-capitalize" id = "v-pills-{{underscore .Select.Method}}-tab" data-toggle = "pill" href = "#v-pills-{{underscore .Select.Method}}" role = "tab" aria-controls = "v-pills-{{underscore .Select.Method}}" aria-selected = "false" > < i class = "{{.Select.Icon}}" > < / i > {{.Select.Method}}< / a >
2018-10-02 06:21:14 +00:00
{{ end }}
< a class = "nav-link d-none" id = "v-pills-backups-tab" data-toggle = "pill" href = "#v-pills-backups" role = "tab" aria-controls = "v-pills-backups" aria-selected = "false" > Backups< / a >
{{ range .Plugins }}
< a class = "nav-link text-capitalize" id = "v-pills-{{underscore .Name}}-tab" data-toggle = "pill" href = "#v-pills-{{underscore .Name}}" role = "tab" aria-controls = "v-pills-profile" aria-selected = "false" > {{.Name}}< / a >
{{end}}
< / div >
2018-06-11 03:41:02 +00:00
< / div >
2018-11-06 07:15:55 +00:00
< div class = "col-md-9 col-sm-12" >
2018-09-15 05:07:17 +00:00
{{if Error}}
< div class = "alert alert-danger" role = "alert" > {{Error}}< / div >
{{end}}
2018-10-02 06:21:14 +00:00
< div class = "tab-content" id = "v-pills-tabContent" >
< div class = "tab-pane fade show active" id = "v-pills-home" role = "tabpanel" aria-labelledby = "v-pills-home-tab" >
< h3 > Settings< / h3 >
2018-06-19 00:01:03 +00:00
2018-10-02 06:21:14 +00:00
< form method = "POST" action = "/settings" >
< div class = "form-group" >
< label for = "project" > Project Name< / label >
< input type = "text" name = "project" class = "form-control" value = "{{ .Name }}" id = "project" placeholder = "Great Uptime" >
< / div >
2018-06-19 00:01:03 +00:00
2018-10-02 06:21:14 +00:00
< div class = "form-group" >
< label for = "description" > Project Description< / label >
< input type = "text" name = "description" class = "form-control" value = "{{ .Description }}" id = "description" placeholder = "Great Uptime" >
2018-07-07 05:02:47 +00:00
< / div >
2018-10-02 06:21:14 +00:00
< div class = "form-group row" >
< div class = "col-8 col-sm-9" >
< label for = "domain" > Domain< / label >
< input type = "text" name = "domain" class = "form-control" value = "{{ .Domain }}" id = "domain" >
< / div >
< div class = "col-4 col-sm-3 mt-sm-1 mt-0" >
< label for = "enable_cdn" class = "d-inline d-sm-none" > Enable CDN< / label >
< label for = "enable_cdn" class = "d-none d-sm-block" > Enable CDN< / label >
< span class = "switch" >
2018-08-23 07:28:48 +00:00
< input type = "checkbox" name = "enable_cdn" class = "switch" id = "switch-normal" { { if USE_CDN } } checked { { end } } { { if . UsingAssets } } disabled { { end } } >
2018-09-15 10:06:31 +00:00
< label for = "switch-normal" class = "mt-2 mt-sm-0" > < / label >
2018-07-07 05:02:47 +00:00
< / span >
2018-10-02 06:21:14 +00:00
< / div >
2018-06-19 00:01:03 +00:00
2018-07-17 09:18:20 +00:00
< / div >
2018-06-30 03:40:00 +00:00
2018-10-02 06:21:14 +00:00
< div class = "form-group" >
< label for = "footer" > Custom Footer< / label >
2018-11-07 05:06:44 +00:00
< textarea rows = "4" name = "footer" class = "form-control" id = "footer" > {{ .Footer.String }}< / textarea >
2018-07-17 09:18:20 +00:00
< / div >
2018-06-19 00:01:03 +00:00
2018-10-02 06:21:14 +00:00
< div class = "form-group" >
< label for = "timezone" > Timezone< / label > < span class = "mt-1 small float-right" > Current: {{.CurrentTime}}< / span >
< select class = "form-control" name = "timezone" id = "timezone" >
< option value = "-12.0" { { if eq ( ToString . Timezone ) " -12 " } } selected { { end } } > (GMT -12:00) Eniwetok, Kwajalein< / option >
< option value = "-11.0" { { if eq ( ToString . Timezone ) " -11 " } } selected { { end } } > (GMT -11:00) Midway Island, Samoa< / option >
< option value = "-10.0" { { if eq ( ToString . Timezone ) " -10 " } } selected { { end } } > (GMT -10:00) Hawaii< / option >
< option value = "-9.0" { { if eq ( ToString . Timezone ) " -9 " } } selected { { end } } > (GMT -9:00) Alaska< / option >
< option value = "-8.0" { { if eq ( ToString . Timezone ) " -8 " } } selected { { end } } > (GMT -8:00) Pacific Time (US & Canada)< / option >
< option value = "-7.0" { { if eq ( ToString . Timezone ) " -7 " } } selected { { end } } > (GMT -7:00) Mountain Time (US & Canada)< / option >
< option value = "-6.0" { { if eq ( ToString . Timezone ) " -6 " } } selected { { end } } > (GMT -6:00) Central Time (US & Canada), Mexico City< / option >
< option value = "-5.0" { { if eq ( ToString . Timezone ) " -5 " } } selected { { end } } > (GMT -5:00) Eastern Time (US & Canada), Bogota, Lima< / option >
< option value = "-4.0" { { if eq ( ToString . Timezone ) " -4 " } } selected { { end } } > (GMT -4:00) Atlantic Time (Canada), Caracas, La Paz< / option >
< option value = "-3.5" { { if eq ( ToString . Timezone ) " -3 . 5 " } } selected { { end } } > (GMT -3:30) Newfoundland< / option >
< option value = "-3.0" { { if eq ( ToString . Timezone ) " -3 " } } selected { { end } } > (GMT -3:00) Brazil, Buenos Aires, Georgetown< / option >
< option value = "-2.0" { { if eq ( ToString . Timezone ) " -2 " } } selected { { end } } > (GMT -2:00) Mid-Atlantic< / option >
< option value = "-1.0" { { if eq ( ToString . Timezone ) " -1 " } } selected { { end } } > (GMT -1:00 hour) Azores, Cape Verde Islands< / option >
< option value = "0.0" { { if eq ( ToString . Timezone ) " 0 " } } selected { { end } } > (GMT) Western Europe Time, London, Lisbon, Casablanca< / option >
< option value = "1.0" { { if eq ( ToString . Timezone ) " 1 " } } selected { { end } } > (GMT +1:00 hour) Brussels, Copenhagen, Madrid, Paris< / option >
< option value = "2.0" { { if eq ( ToString . Timezone ) " 2 " } } selected { { end } } > (GMT +2:00) Kaliningrad, South Africa< / option >
< option value = "3.0" { { if eq ( ToString . Timezone ) " 3 " } } selected { { end } } > (GMT +3:00) Baghdad, Riyadh, Moscow, St. Petersburg< / option >
< option value = "3.5" { { if eq ( ToString . Timezone ) " 3 . 5 " } } selected { { end } } > (GMT +3:30) Tehran< / option >
< option value = "4.0" { { if eq ( ToString . Timezone ) " 4 " } } selected { { end } } > (GMT +4:00) Abu Dhabi, Muscat, Baku, Tbilisi< / option >
< option value = "4.5" { { if eq ( ToString . Timezone ) " 4 . 5 " } } selected { { end } } > (GMT +4:30) Kabul< / option >
< option value = "5.0" { { if eq ( ToString . Timezone ) " 5 " } } selected { { end } } > (GMT +5:00) Ekaterinburg, Islamabad, Karachi, Tashkent< / option >
< option value = "5.5" { { if eq ( ToString . Timezone ) " 5 . 5 " } } selected { { end } } > (GMT +5:30) Bombay, Calcutta, Madras, New Delhi< / option >
< option value = "5.75" { { if eq ( ToString . Timezone ) " 5 . 75 " } } selected { { end } } > (GMT +5:45) Kathmandu< / option >
< option value = "6.0" { { if eq ( ToString . Timezone ) " 6 " } } selected { { end } } > (GMT +6:00) Almaty, Dhaka, Colombo< / option >
< option value = "7.0" { { if eq ( ToString . Timezone ) " 7 " } } selected { { end } } > (GMT +7:00) Bangkok, Hanoi, Jakarta< / option >
< option value = "8.0" { { if eq ( ToString . Timezone ) " 8 " } } selected { { end } } > (GMT +8:00) Beijing, Perth, Singapore, Hong Kong< / option >
< option value = "9.0" { { if eq ( ToString . Timezone ) " 9 " } } selected { { end } } > (GMT +9:00) Tokyo, Seoul, Osaka, Sapporo, Yakutsk< / option >
< option value = "9.5" { { if eq ( ToString . Timezone ) " 9 . 5 " } } selected { { end } } > (GMT +9:30) Adelaide, Darwin< / option >
< option value = "10.0" { { if eq ( ToString . Timezone ) " 10 . 5 " } } selected { { end } } > (GMT +10:00) Eastern Australia, Guam, Vladivostok< / option >
< option value = "11.0" { { if eq ( ToString . Timezone ) " 11 " } } selected { { end } } > (GMT +11:00) Magadan, Solomon Islands, New Caledonia< / option >
< option value = "12.0" { { if eq ( ToString . Timezone ) " 12 " } } selected { { end } } > (GMT +12:00) Auckland, Wellington, Fiji, Kamchatka< / option >
< / select >
2018-06-28 07:28:07 +00:00
< / div >
2018-09-26 15:26:16 +00:00
2018-10-02 06:21:14 +00:00
< button type = "submit" class = "btn btn-primary btn-block" > Save Settings< / button >
2018-07-17 09:18:20 +00:00
2018-10-02 06:21:14 +00:00
< div class = "form-group row mt-3" >
< label for = "api_key" class = "col-sm-3 col-form-label" > API Key< / label >
< div class = "col-sm-9" >
< input type = "text" class = "form-control select-input" value = "{{ .ApiKey }}" id = "api_key" readonly >
< / div >
2018-09-15 05:07:17 +00:00
< / div >
2018-10-02 06:21:14 +00:00
< div class = "form-group row" >
< label for = "api_secret" class = "col-sm-3 col-form-label" > API Secret< / label >
< div class = "col-sm-9" >
< input type = "text" class = "form-control select-input" value = "{{ .ApiSecret }}" id = "api_secret" readonly >
< small class = "form-text text-muted" > You can < a href = "/api/renew" > Regenerate API Keys< / a > if you need to.< / small >
< / div >
2018-09-15 05:07:17 +00:00
< / div >
2018-07-17 09:18:20 +00:00
2018-10-02 06:21:14 +00:00
< div class = "row" >
< a href = "/settings/export" class = "btn btn-sm btn-secondary float-right" > Export Settings< / a >
2018-11-06 07:15:55 +00:00
< a href = "#" class = "btn btn-sm btn-secondary float-right ml-1" > Authentication QR Code< / a >
< / div >
< div class = "row align-content-center" >
2018-11-09 09:03:37 +00:00
< img class = "rounded text-center" width = "300" height = "300" src = "https://chart.googleapis.com/chart?chs=500x500&cht=qr&chl={{ QrAuth }}" >
2018-10-02 06:21:14 +00:00
< / div >
2018-09-15 05:07:17 +00:00
2018-10-02 06:21:14 +00:00
< / form >
2018-09-26 15:26:16 +00:00
2018-07-10 12:05:20 +00:00
< / div >
2018-10-02 06:21:14 +00:00
< div class = "tab-pane" id = "v-pills-style" role = "tabpanel" aria-labelledby = "v-pills-style-tab" >
{{if not .UsingAssets }}
2018-11-13 19:28:21 +00:00
< div class = "jumbotron jumbotron-fluid" >
< div class = "text-center col-12" >
< h1 class = "display-5" > Enable Local Assets< / h1 >
< a class = "lead" > Customize your status page design by enabling local assets. This will create a 'assets' directory containing all CSS.< p > < a href = "/settings/build" class = "btn btn-primary mt-3" { { if USE_CDN } } disabled { { end } } > Enable Local Assets< / a > < / p > < / p >
< / div >
< / div >
2018-10-02 06:21:14 +00:00
{{ else }}
< form method = "POST" action = "/settings/css" >
< ul class = "nav nav-pills mb-3" id = "pills-tab" role = "tablist" >
< li class = "nav-item col text-center" >
< a class = "nav-link active" id = "pills-vars-tab" data-toggle = "pill" href = "#pills-vars" role = "tab" aria-controls = "pills-vars" aria-selected = "true" > Variables< / a >
< / li >
< li class = "nav-item col text-center" >
< a class = "nav-link" id = "pills-theme-tab" data-toggle = "pill" href = "#pills-theme" role = "tab" aria-controls = "pills-theme" aria-selected = "false" > Base Theme< / a >
< / li >
< li class = "nav-item col text-center" >
< a class = "nav-link" id = "pills-mobile-tab" data-toggle = "pill" href = "#pills-mobile" role = "tab" aria-controls = "pills-mobile" aria-selected = "false" > Mobile< / a >
< / li >
< / ul >
< div class = "tab-content" id = "pills-tabContent" >
< div class = "tab-pane show active" id = "pills-vars" role = "tabpanel" aria-labelledby = "pills-vars-tab" >
< textarea name = "variables" id = "sass_vars" > {{ .SassVars }}< / textarea >
< / div >
< div class = "tab-pane" id = "pills-theme" role = "tabpanel" aria-labelledby = "pills-theme-tab" >
< textarea name = "theme" id = "theme_css" > {{ .BaseSASS }}< / textarea >
< / div >
< div class = "tab-pane" id = "pills-mobile" role = "tabpanel" aria-labelledby = "pills-mobile-tab" >
< textarea name = "mobile" id = "mobile_css" > {{ .MobileSASS }}< / textarea >
< / div >
2018-09-26 15:26:16 +00:00
< / div >
2018-10-02 06:21:14 +00:00
< button type = "submit" class = "btn btn-primary btn-block mt-2" > Save Style< / button >
< a href = "/settings/delete_assets" class = "btn btn-danger btn-block confirm-btn" > Delete All Assets< / a >
< / form >
2018-09-15 05:07:17 +00:00
{{end}}
2018-10-02 06:21:14 +00:00
< / div >
2018-09-15 05:07:17 +00:00
2018-10-02 06:21:14 +00:00
{{ range .Notifications }}
{{$n := .Select}}
2018-10-21 19:36:11 +00:00
< div class = "tab-pane fade" id = "v-pills-{{underscore $n.Method}}" role = "tabpanel" aria-labelledby = "v-pills-{{underscore $n.Method }}-tab" >
2018-09-15 05:07:17 +00:00
2018-10-02 06:21:14 +00:00
{{template "form_notifier" .}}
2018-07-17 09:18:20 +00:00
2018-10-02 06:21:14 +00:00
{{ if $n.Logs }}
Sent {{$n.SentLastHour}} in the last hour< br >
2018-09-10 09:01:04 +00:00
{{ range $n.Logs }}
2018-07-17 09:18:20 +00:00
< div class = "card mt-1" >
< div class = "card-body" >
2018-10-02 06:21:14 +00:00
{{.Message}}
< p class = "card-text" > < small class = "text-muted" > Sent {{.Time.Ago}}< / small > < / p >
2018-07-17 09:18:20 +00:00
< / div >
< / div >
{{ end }}
2018-10-02 06:21:14 +00:00
{{ end }}
< / div >
2018-07-17 09:18:20 +00:00
{{ end }}
2018-07-10 12:05:20 +00:00
2018-10-02 06:21:14 +00:00
< div class = "tab-pane fade" id = "v-pills-browse" role = "tabpanel" aria-labelledby = "v-pills-browse-tab" >
{{ range .Repos }}
2018-06-12 07:21:16 +00:00
< div class = "card col-6" style = "width: 18rem;" >
< div class = "card-body" >
< h5 class = "card-title" > {{ .Name }}< / h5 >
< p class = "card-text" > {{ .Description }}< / p >
< a href = "/plugins/download/{{ .Name }}" class = "card-link" > Add< / a >
< / div >
< / div >
2018-10-02 06:21:14 +00:00
{{ end }}
< / div >
2018-06-11 09:58:41 +00:00
2018-07-20 05:26:41 +00:00
2018-10-02 06:21:14 +00:00
< div class = "tab-pane fade" id = "v-pills-backups" role = "tabpanel" aria-labelledby = "v-pills-backups-tab" >
< a href = "/backups/create" class = "btn btn-primary btn-block" > Backup Database< / a >
< / div >
2018-07-20 05:26:41 +00:00
2018-06-12 05:23:30 +00:00
{{ range .Plugins }}
2018-06-14 06:38:15 +00:00
2018-06-19 06:00:56 +00:00
< div class = "tab-pane fade" id = "v-pills-{{underscore .Name}}" role = "tabpanel" aria-labelledby = "v-pills-{{underscore .Name}}-tab" >
2018-06-14 01:19:00 +00:00
< h4 class = "text-capitalize" > {{ .Name }}< / h4 >
< span class = "text-muted" > {{ .Description }}< / span >
2018-06-19 06:17:43 +00:00
< div class = "mt-1" >
2018-06-19 06:00:56 +00:00
{{ safe .Form }}
2018-06-19 06:17:43 +00:00
< / div >
2018-06-19 06:00:56 +00:00
2018-06-12 05:23:30 +00:00
< / div >
{{end}}
2018-06-11 09:58:41 +00:00
2018-10-02 06:21:14 +00:00
< / div >
2018-06-11 03:41:02 +00:00
< / div >
2018-06-10 01:31:13 +00:00
2018-10-02 06:21:14 +00:00
< / div >
2018-06-10 01:31:13 +00:00
< / div >
< / div >
2018-07-07 05:02:47 +00:00
{{end}}
2018-10-02 06:21:14 +00:00
{{define "extra_css"}}
< link rel = "stylesheet" href = "https://assets.statup.io/codemirror.css" >
< link rel = "stylesheet" href = "https://assets.statup.io/codemirror-colorpicker.css" / >
{{end}}
{{define "extra_scripts"}}
2018-06-28 07:28:07 +00:00
< script src = "https://assets.statup.io/codemirror.js" > < / script >
< script src = "https://assets.statup.io/css.js" > < / script >
< script src = "https://assets.statup.io/codemirror-colorpicker.min.js" > < / script >
2018-07-07 05:02:47 +00:00
{{end}}