Re-nest settings sub-pages into configuration
This commit is contained in:
parent
b292f47d47
commit
a5299f0cae
6 changed files with 75 additions and 68 deletions
|
|
@ -66,36 +66,43 @@
|
|||
<div class="table-responsive mb-3">
|
||||
<table class="table table-borderless">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td width="30%"><strong>OAuth Token Status</strong></td>
|
||||
<td>
|
||||
{{ if not .C.ArcGISOAuth.InvalidatedAt.IsNull }}
|
||||
<span class="status-inactive">
|
||||
<i class="bi bi-x-circle-fill me-1"></i> Invalidated
|
||||
</span>
|
||||
{{ else if hasPassed .C.ArcGISOAuth.AccessTokenExpires }}
|
||||
<span class="status-inactive">
|
||||
<i class="bi bi-x-circle-fill me-1"></i> Expired
|
||||
</span>
|
||||
{{ else }}
|
||||
<span class="status-active">
|
||||
<i class="bi bi-check-circle-fill me-1"></i> Active
|
||||
</span>
|
||||
{{ end }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>Token Expiration</strong></td>
|
||||
<td>{{ .C.ArcGISOAuth.AccessTokenExpires|timeRelative }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>Integration Method</strong></td>
|
||||
<td>Polling</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>Permission Level</strong></td>
|
||||
<td>Read</td>
|
||||
</tr>
|
||||
{{ if not .C.ArcGISOAuth }}
|
||||
<tr>
|
||||
<td>Not integrated</td>
|
||||
</tr>
|
||||
{{ else }}
|
||||
<tr>
|
||||
<td width="30%"><strong>OAuth Token Status</strong></td>
|
||||
<td>None</td>
|
||||
<td>
|
||||
{{ if not .C.ArcGISOAuth.InvalidatedAt.IsNull }}
|
||||
<span class="status-inactive">
|
||||
<i class="bi bi-x-circle-fill me-1"></i> Invalidated
|
||||
</span>
|
||||
{{ else if hasPassed .C.ArcGISOAuth.AccessTokenExpires }}
|
||||
<span class="status-inactive">
|
||||
<i class="bi bi-x-circle-fill me-1"></i> Expired
|
||||
</span>
|
||||
{{ else }}
|
||||
<span class="status-active">
|
||||
<i class="bi bi-check-circle-fill me-1"></i> Active
|
||||
</span>
|
||||
{{ end }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>Token Expiration</strong></td>
|
||||
<td>{{ .C.ArcGISOAuth.AccessTokenExpires|timeRelative }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>Integration Method</strong></td>
|
||||
<td>Polling</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>Permission Level</strong></td>
|
||||
<td>Read</td>
|
||||
</tr>
|
||||
{{ end }}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
|
@ -103,7 +110,10 @@
|
|||
<a class="btn btn-primary" href="{{ .URL.OAuthRefreshArcGIS }}">
|
||||
<i class="bi bi-arrow-repeat me-2"></i>Refresh OAuth Token
|
||||
</a>
|
||||
<a class="btn btn-outline-danger" href="{{ .URL.Setting.ArcGIS }}">
|
||||
<a
|
||||
class="btn btn-outline-danger"
|
||||
href="{{ .URL.Configuration.ArcGIS }}"
|
||||
>
|
||||
<i class="bi bi-gear me-2"></i>Configure
|
||||
</a>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@
|
|||
<div class="d-flex justify-content-between align-items-center mb-4">
|
||||
<h1 class="mb-0">Pesticide Products Configuration</h1>
|
||||
<a
|
||||
href="{{ .URL.SettingPesticideAdd }}"
|
||||
href="{{ .URL.Configuration.PesticideAdd }}"
|
||||
class="btn btn-primary"
|
||||
id="addProductBtn"
|
||||
>
|
||||
|
|
|
|||
|
|
@ -28,7 +28,10 @@
|
|||
organization.
|
||||
</p>
|
||||
<div class="d-flex justify-content-between align-items-center">
|
||||
<a href="{{ .URL.Setting.User }}" class="btn btn-outline-primary">
|
||||
<a
|
||||
href="{{ .URL.Configuration.User }}"
|
||||
class="btn btn-outline-primary"
|
||||
>
|
||||
Manage Users
|
||||
<i class="bi bi-arrow-right ms-1"></i>
|
||||
</a>
|
||||
|
|
@ -50,7 +53,7 @@
|
|||
</p>
|
||||
<div class="d-flex justify-content-between align-items-center">
|
||||
<a
|
||||
href="{{ .URL.Setting.Pesticide }}"
|
||||
href="{{ .URL.Configuration.Pesticide }}"
|
||||
class="btn btn-outline-success"
|
||||
>
|
||||
Manage Products
|
||||
|
|
@ -75,7 +78,7 @@
|
|||
</p>
|
||||
<div class="d-flex justify-content-between align-items-center">
|
||||
<a
|
||||
href="{{ .URL.Setting.Integration }}"
|
||||
href="{{ .URL.Configuration.Integration }}"
|
||||
class="btn btn-outline-primary"
|
||||
>
|
||||
Manage Integrations
|
||||
|
|
@ -99,7 +102,7 @@
|
|||
</p>
|
||||
<div class="d-flex justify-content-between align-items-center">
|
||||
<a
|
||||
href="{{ .URL.Setting.Organization }}"
|
||||
href="{{ .URL.Configuration.Organization }}"
|
||||
class="btn btn-outline-danger"
|
||||
>
|
||||
Manage Organization
|
||||
|
|
|
|||
|
|
@ -139,7 +139,10 @@
|
|||
|
||||
<!-- Form actions -->
|
||||
<div class="d-flex justify-content-end gap-2">
|
||||
<a href="{{ .URL.SettingUser }}" class="btn btn-secondary">
|
||||
<a
|
||||
href="{{ .URL.Configuration.User }}"
|
||||
class="btn btn-secondary"
|
||||
>
|
||||
Cancel
|
||||
</a>
|
||||
<button type="submit" class="btn btn-primary">
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
<div class="d-flex justify-content-between align-items-center mb-4">
|
||||
<h1 class="mb-0">User Management</h1>
|
||||
<a
|
||||
href="{{ .URL.SettingUserAdd }}"
|
||||
href="{{ .URL.Configuration.UserAdd }}"
|
||||
class="btn btn-primary"
|
||||
id="addUserBtn"
|
||||
>
|
||||
|
|
|
|||
51
sync/url.go
51
sync/url.go
|
|
@ -22,20 +22,37 @@ func newContentURL() contentURL {
|
|||
Root: config.MakeURLNidus("/"),
|
||||
Route: config.MakeURLNidus("/route"),
|
||||
SamplePoolCSV: config.MakeURLNidus("/static/file/sample-pool.csv"),
|
||||
Setting: newContentURLSetting(),
|
||||
Sidebar: newContentURLSidebar(),
|
||||
Tegola: config.MakeURLTegola("/"),
|
||||
UploadCSVPool: config.MakeURLNidus("/upload/pool"),
|
||||
UploadCSVPool: config.MakeURLNidus("/configuration/upload/pool"),
|
||||
}
|
||||
}
|
||||
|
||||
type contentURLConfiguration struct {
|
||||
Upload string
|
||||
ArcGIS string
|
||||
Fieldseeker string
|
||||
Integration string
|
||||
Organization string
|
||||
Pesticide string
|
||||
PesticideAdd string
|
||||
Root string
|
||||
User string
|
||||
Upload string
|
||||
UserAdd string
|
||||
}
|
||||
|
||||
func newContentURLConfiguration() contentURLConfiguration {
|
||||
return contentURLConfiguration{
|
||||
Upload: config.MakeURLNidus("/configuration/upload"),
|
||||
ArcGIS: config.MakeURLNidus("/configuration/integration/arcgis"),
|
||||
Fieldseeker: config.MakeURLNidus("/configuration/integration/fieldseeker"),
|
||||
Integration: config.MakeURLNidus("/configuration/integration"),
|
||||
Organization: config.MakeURLNidus("/configuration/organization"),
|
||||
Pesticide: config.MakeURLNidus("/configuration/pesticide"),
|
||||
PesticideAdd: config.MakeURLNidus("/configuration/pesticide/add"),
|
||||
Root: config.MakeURLNidus("/configuration"),
|
||||
User: config.MakeURLNidus("/configuration/user"),
|
||||
Upload: config.MakeURLNidus("/configuration/upload"),
|
||||
UserAdd: config.MakeURLNidus("/configuration/user/add"),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -58,29 +75,3 @@ func newContentURLSidebar() contentURLSidebar {
|
|||
Review: config.MakeURLNidus("/review"),
|
||||
}
|
||||
}
|
||||
|
||||
type contentURLSetting struct {
|
||||
ArcGIS string
|
||||
Fieldseeker string
|
||||
Integration string
|
||||
Organization string
|
||||
Pesticide string
|
||||
PesticideAdd string
|
||||
Root string
|
||||
User string
|
||||
UserAdd string
|
||||
}
|
||||
|
||||
func newContentURLSetting() contentURLSetting {
|
||||
return contentURLSetting{
|
||||
ArcGIS: config.MakeURLNidus("/setting/integration/arcgis"),
|
||||
Fieldseeker: config.MakeURLNidus("/setting/integration/fieldseeker"),
|
||||
Integration: config.MakeURLNidus("/setting/integration"),
|
||||
Organization: config.MakeURLNidus("/setting/organization"),
|
||||
Pesticide: config.MakeURLNidus("/setting/pesticide"),
|
||||
PesticideAdd: config.MakeURLNidus("/setting/pesticide/add"),
|
||||
Root: config.MakeURLNidus("/setting"),
|
||||
User: config.MakeURLNidus("/setting/user"),
|
||||
UserAdd: config.MakeURLNidus("/setting/user/add"),
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue