diff --git a/html/template/sync/setting-integration-arcgis.html b/html/template/sync/setting-integration-arcgis.html
new file mode 100644
index 00000000..9609f874
--- /dev/null
+++ b/html/template/sync/setting-integration-arcgis.html
@@ -0,0 +1,237 @@
+{{ template "sync/layout/authenticated.html" . }}
+
+{{ define "title" }}Settings - Integrations{{ end }}
+{{ define "extraheader" }}
+{{ end }}
+{{ define "content" }}
+
+
+
+
+
+
+
+
ArcGIS Integration
+
Configure your Esri ArcGIS connection
+
+
+
+
+
+
+
+
+
+
+ Note: Changes to feature layer selections will take
+ effect immediately after saving. Refreshing the OAuth token will
+ require re-authentication with your ArcGIS account.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Are you sure you want to delete the OAuth token and disable the
+ ArcGIS integration?
+
+
+ This action cannot be undone. You will need to
+ re-authenticate to restore the integration.
+
+
+
+
+
+
+{{ end }}
diff --git a/html/template/sync/setting-integration.html b/html/template/sync/setting-integration.html
index cd9f6154..7ac89e9b 100644
--- a/html/template/sync/setting-integration.html
+++ b/html/template/sync/setting-integration.html
@@ -48,17 +48,17 @@
-
-
+
+
diff --git a/sync/routes.go b/sync/routes.go
index 1ea8991b..02485413 100644
--- a/sync/routes.go
+++ b/sync/routes.go
@@ -59,8 +59,9 @@ func Router() chi.Router {
r.Method("GET", "/service-request", authenticatedHandler(getServiceRequestList))
r.Method("GET", "/service-request/{id}", authenticatedHandler(getServiceRequestDetail))
r.Method("GET", "/setting", authenticatedHandler(getSetting))
- r.Method("GET", "/setting/organization", authenticatedHandler(getSettingOrganization))
r.Method("GET", "/setting/integration", authenticatedHandler(getSettingIntegration))
+ r.Method("GET", "/setting/integration/arcgis", authenticatedHandler(getSettingIntegrationArcgis))
+ r.Method("GET", "/setting/organization", authenticatedHandler(getSettingOrganization))
r.Method("GET", "/setting/pesticide", authenticatedHandler(getSettingPesticide))
r.Method("GET", "/setting/pesticide/add", authenticatedHandler(getSettingPesticideAdd))
r.Method("GET", "/setting/user", authenticatedHandler(getSettingUserList))
diff --git a/sync/setting.go b/sync/setting.go
index cab6cf66..5584fb2f 100644
--- a/sync/setting.go
+++ b/sync/setting.go
@@ -76,6 +76,16 @@ func getSettingIntegration(ctx context.Context, r *http.Request, org *models.Org
}
return newResponse("sync/setting-integration.html", data), nil
}
+func getSettingIntegrationArcgis(ctx context.Context, r *http.Request, org *models.Organization, u *models.User) (*response[contentSettingIntegration], *errorWithStatus) {
+ oauth, err := arcgis.GetOAuthForUser(ctx, u)
+ if err != nil {
+ return nil, newError("Failed to get oauth: %w", err)
+ }
+ data := contentSettingIntegration{
+ ArcGISOAuth: oauth,
+ }
+ return newResponse("sync/setting-integration-arcgis.html", data), nil
+}
type contentSettingPlaceholder struct{}
diff --git a/sync/url.go b/sync/url.go
index cd6d4dd0..516ad6e7 100644
--- a/sync/url.go
+++ b/sync/url.go
@@ -15,6 +15,7 @@ type contentURL struct {
}
type contentURLSetting struct {
+ ArcGIS string
Fieldseeker string
Integration string
Organization string
@@ -38,6 +39,7 @@ func newContentURL() contentURL {
}
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"),