From 1932e594d1cc5433bce26b11abb165bb57088f4f Mon Sep 17 00:00:00 2001 From: Christian Richter Date: Tue, 12 Apr 2022 10:18:35 +0200 Subject: [PATCH] refactor graph-explorer Signed-off-by: Christian Richter --- .../graph-explorer}/.dockerignore | 0 .../graph-explorer}/Makefile | 12 +- .../graph-explorer}/assets/.keep | 0 extensions/graph-explorer/assets/index.html | 50 +++++++ .../graph-explorer/assets/src/custom.css | 131 ++++++++++++++++++ .../graph-explorer/cmd/graph-explorer/main.go | 14 ++ .../docker/Dockerfile.linux.amd64 | 0 .../docker/Dockerfile.linux.arm | 0 .../docker/Dockerfile.linux.arm64 | 0 .../graph-explorer}/docker/manifest.tmpl | 0 .../graph-explorer}/graph_explorer.go | 0 .../graph-explorer}/pkg/assets/option.go | 4 +- .../graph-explorer}/pkg/command/health.go | 6 +- .../graph-explorer}/pkg/command/root.go | 2 +- .../graph-explorer}/pkg/command/server.go | 14 +- .../graph-explorer}/pkg/command/version.go | 2 +- .../graph-explorer}/pkg/config/config.go | 0 .../graph-explorer}/pkg/config/debug.go | 0 .../pkg/config/defaults/defaultconfig.go | 2 +- .../graph-explorer}/pkg/config/http.go | 0 .../graph-explorer}/pkg/config/log.go | 0 .../pkg/config/parser/parse.go | 4 +- .../graph-explorer}/pkg/config/service.go | 0 .../graph-explorer}/pkg/config/tracing.go | 0 .../graph-explorer}/pkg/logging/logging.go | 2 +- .../graph-explorer}/pkg/metrics/metrics.go | 0 .../pkg/server/debug/option.go | 2 +- .../pkg/server/debug/server.go | 2 +- .../graph-explorer}/pkg/server/http/option.go | 4 +- .../graph-explorer}/pkg/server/http/server.go | 2 +- .../pkg/service/v0/instrument.go | 2 +- .../graph-explorer}/pkg/service/v0/logging.go | 0 .../graph-explorer}/pkg/service/v0/option.go | 2 +- .../graph-explorer}/pkg/service/v0/service.go | 4 +- .../graph-explorer}/pkg/service/v0/tracing.go | 0 .../graph-explorer}/pkg/tracing/tracing.go | 2 +- .../graph-explorer}/reflex.conf | 0 graph-explorer/cmd/graph-explorer/main.go | 14 -- ocis-pkg/config/config.go | 2 +- ocis-pkg/config/defaultconfig.go | 2 +- ocis/pkg/command/graphexplorer.go | 2 +- ocis/pkg/runtime/service/service.go | 2 +- 42 files changed, 233 insertions(+), 52 deletions(-) rename {graph-explorer => extensions/graph-explorer}/.dockerignore (100%) rename {graph-explorer => extensions/graph-explorer}/Makefile (83%) rename {graph-explorer => extensions/graph-explorer}/assets/.keep (100%) create mode 100644 extensions/graph-explorer/assets/index.html create mode 100644 extensions/graph-explorer/assets/src/custom.css create mode 100644 extensions/graph-explorer/cmd/graph-explorer/main.go rename {graph-explorer => extensions/graph-explorer}/docker/Dockerfile.linux.amd64 (100%) rename {graph-explorer => extensions/graph-explorer}/docker/Dockerfile.linux.arm (100%) rename {graph-explorer => extensions/graph-explorer}/docker/Dockerfile.linux.arm64 (100%) rename {graph-explorer => extensions/graph-explorer}/docker/manifest.tmpl (100%) rename {graph-explorer => extensions/graph-explorer}/graph_explorer.go (100%) rename {graph-explorer => extensions/graph-explorer}/pkg/assets/option.go (88%) rename {graph-explorer => extensions/graph-explorer}/pkg/command/health.go (82%) rename {graph-explorer => extensions/graph-explorer}/pkg/command/root.go (95%) rename {graph-explorer => extensions/graph-explorer}/pkg/command/server.go (81%) rename {graph-explorer => extensions/graph-explorer}/pkg/command/version.go (95%) rename {graph-explorer => extensions/graph-explorer}/pkg/config/config.go (100%) rename {graph-explorer => extensions/graph-explorer}/pkg/config/debug.go (100%) rename {graph-explorer => extensions/graph-explorer}/pkg/config/defaults/defaultconfig.go (96%) rename {graph-explorer => extensions/graph-explorer}/pkg/config/http.go (100%) rename {graph-explorer => extensions/graph-explorer}/pkg/config/log.go (100%) rename {graph-explorer => extensions/graph-explorer}/pkg/config/parser/parse.go (83%) rename {graph-explorer => extensions/graph-explorer}/pkg/config/service.go (100%) rename {graph-explorer => extensions/graph-explorer}/pkg/config/tracing.go (100%) rename {graph-explorer => extensions/graph-explorer}/pkg/logging/logging.go (83%) rename {graph-explorer => extensions/graph-explorer}/pkg/metrics/metrics.go (100%) rename {graph-explorer => extensions/graph-explorer}/pkg/server/debug/option.go (93%) rename {graph-explorer => extensions/graph-explorer}/pkg/server/debug/server.go (96%) rename {graph-explorer => extensions/graph-explorer}/pkg/server/http/option.go (91%) rename {graph-explorer => extensions/graph-explorer}/pkg/server/http/server.go (94%) rename {graph-explorer => extensions/graph-explorer}/pkg/service/v0/instrument.go (89%) rename {graph-explorer => extensions/graph-explorer}/pkg/service/v0/logging.go (100%) rename {graph-explorer => extensions/graph-explorer}/pkg/service/v0/option.go (93%) rename {graph-explorer => extensions/graph-explorer}/pkg/service/v0/service.go (95%) rename {graph-explorer => extensions/graph-explorer}/pkg/service/v0/tracing.go (100%) rename {graph-explorer => extensions/graph-explorer}/pkg/tracing/tracing.go (88%) rename {graph-explorer => extensions/graph-explorer}/reflex.conf (100%) delete mode 100644 graph-explorer/cmd/graph-explorer/main.go diff --git a/graph-explorer/.dockerignore b/extensions/graph-explorer/.dockerignore similarity index 100% rename from graph-explorer/.dockerignore rename to extensions/graph-explorer/.dockerignore diff --git a/graph-explorer/Makefile b/extensions/graph-explorer/Makefile similarity index 83% rename from graph-explorer/Makefile rename to extensions/graph-explorer/Makefile index 6c70999805..e83211bd58 100644 --- a/graph-explorer/Makefile +++ b/extensions/graph-explorer/Makefile @@ -1,27 +1,27 @@ SHELL := bash NAME := graph-explorer -include ../.make/recursion.mk +include ../../.make/recursion.mk ############ tooling ############ ifneq (, $(shell which go 2> /dev/null)) # suppress `command not found warnings` for non go targets in CI -include ../.bingo/Variables.mk +include ../../.bingo/Variables.mk endif ############ go tooling ############ -include ../.make/go.mk +include ../../.make/go.mk ############ release ############ -include ../.make/release.mk +include ../../.make/release.mk ############ docs generate ############ -include ../.make/docs.mk +include ../../.make/docs.mk .PHONY: docs-generate docs-generate: config-docs-generate ############ generate ############ -include ../.make/generate.mk +include ../../.make/generate.mk .PHONY: ci-go-generate ci-go-generate: # CI runs ci-node-generate automatically before this target diff --git a/graph-explorer/assets/.keep b/extensions/graph-explorer/assets/.keep similarity index 100% rename from graph-explorer/assets/.keep rename to extensions/graph-explorer/assets/.keep diff --git a/extensions/graph-explorer/assets/index.html b/extensions/graph-explorer/assets/index.html new file mode 100644 index 0000000000..934aa2d5e4 --- /dev/null +++ b/extensions/graph-explorer/assets/index.html @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/extensions/graph-explorer/assets/src/custom.css b/extensions/graph-explorer/assets/src/custom.css new file mode 100644 index 0000000000..1ca079d903 --- /dev/null +++ b/extensions/graph-explorer/assets/src/custom.css @@ -0,0 +1,131 @@ +/* ------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +// ------------------------------------------------------------------------------*/ +.ace_editor { + box-shadow: none !important; + position: relative; +} + +#response-viewer-labels { + margin-top: 10px; +} + +.ms-Pivot-link:focus { + outline: none; +} + +#jsonViewer, #response-header-viewer { + height: 50vh; + border: 1px solid #ccc; +} + +.ace_link_marker { + position: absolute; + border-bottom: 1px solid blue; +} + +.ace-tm .ace_invalid { + color: inherit; + background-color: inherit; +} + +#graph-version-select #-Other { + display: none; +} + +api-explorer button { + min-width: initial; +} + +.ms-Spinner-circle { + background-color: white !important; +} + +api-explorer .c-select-menu>a:after, api-explorer .c-select-menu>button:after { + position: absolute; + font-size: 8px; + color: rgba(0,0,0,.8); + font-weight: 700; + background: white; + height: 100%; + padding-right: 5px; + right: 0px; + top: 0px; + padding-top: 14px; + padding-left: 5px; +} + +#httpMethodSelect button { + color: white; + width: 85px; + text-align: center; +} + +#httpMethodSelect.GET .c-select-menu.f-border button { + background-color: #000fdf; +} + +#httpMethodSelect.POST .c-select-menu.f-border button { + background-color: #008412; +} + +#httpMethodSelect.PATCH .c-select-menu.f-border button { + background-color: #be8b00; +} + +#httpMethodSelect.DELETE .c-select-menu.f-border button { + background-color: #a10000; +} + +#httpMethodSelect.PUT .c-select-menu.f-border button { + background-color: #5C005C; +} + +.m-auto-suggest .c-menu-item strong { + font-weight: normal; +} + + +/*override mwf*/ +.fixed-with-mwf-menu ul.c-menu { + width: 100px !important; +} + +/* frontdoor */ +.ms-PanelHost { + z-index: 3000002; +} + +#deltaUi { + display: none; +} + +.ms-Overlay.is-visible { + z-index: 990; +} + +.c-menu-item { + margin-bottom: 0px; +} + +.ms-Panel.is-open { + z-index: 999; +} + +.c-search input[type=search] { + padding: 7px; + max-height: 32px; + padding-right: 0px; +} + +.ms-Dialog { + z-index: 999; +} + +*:focus { + outline: 2px solid #4fc3f7; +} + +.link { + color: #006cd8 !important; +} \ No newline at end of file diff --git a/extensions/graph-explorer/cmd/graph-explorer/main.go b/extensions/graph-explorer/cmd/graph-explorer/main.go new file mode 100644 index 0000000000..7ef911df6c --- /dev/null +++ b/extensions/graph-explorer/cmd/graph-explorer/main.go @@ -0,0 +1,14 @@ +package main + +import ( + "os" + + "github.com/owncloud/ocis/extensions/graph-explorer/pkg/command" + "github.com/owncloud/ocis/extensions/graph-explorer/pkg/config/defaults" +) + +func main() { + if err := command.Execute(defaults.DefaultConfig()); err != nil { + os.Exit(1) + } +} diff --git a/graph-explorer/docker/Dockerfile.linux.amd64 b/extensions/graph-explorer/docker/Dockerfile.linux.amd64 similarity index 100% rename from graph-explorer/docker/Dockerfile.linux.amd64 rename to extensions/graph-explorer/docker/Dockerfile.linux.amd64 diff --git a/graph-explorer/docker/Dockerfile.linux.arm b/extensions/graph-explorer/docker/Dockerfile.linux.arm similarity index 100% rename from graph-explorer/docker/Dockerfile.linux.arm rename to extensions/graph-explorer/docker/Dockerfile.linux.arm diff --git a/graph-explorer/docker/Dockerfile.linux.arm64 b/extensions/graph-explorer/docker/Dockerfile.linux.arm64 similarity index 100% rename from graph-explorer/docker/Dockerfile.linux.arm64 rename to extensions/graph-explorer/docker/Dockerfile.linux.arm64 diff --git a/graph-explorer/docker/manifest.tmpl b/extensions/graph-explorer/docker/manifest.tmpl similarity index 100% rename from graph-explorer/docker/manifest.tmpl rename to extensions/graph-explorer/docker/manifest.tmpl diff --git a/graph-explorer/graph_explorer.go b/extensions/graph-explorer/graph_explorer.go similarity index 100% rename from graph-explorer/graph_explorer.go rename to extensions/graph-explorer/graph_explorer.go diff --git a/graph-explorer/pkg/assets/option.go b/extensions/graph-explorer/pkg/assets/option.go similarity index 88% rename from graph-explorer/pkg/assets/option.go rename to extensions/graph-explorer/pkg/assets/option.go index 228dff7fc2..7b6d12a34c 100644 --- a/graph-explorer/pkg/assets/option.go +++ b/extensions/graph-explorer/pkg/assets/option.go @@ -3,8 +3,8 @@ package assets import ( "net/http" - graphexplorer "github.com/owncloud/ocis/graph-explorer" - "github.com/owncloud/ocis/graph-explorer/pkg/config" + graphexplorer "github.com/owncloud/ocis/extensions/graph-explorer" + "github.com/owncloud/ocis/extensions/graph-explorer/pkg/config" "github.com/owncloud/ocis/ocis-pkg/assetsfs" "github.com/owncloud/ocis/ocis-pkg/log" ) diff --git a/graph-explorer/pkg/command/health.go b/extensions/graph-explorer/pkg/command/health.go similarity index 82% rename from graph-explorer/pkg/command/health.go rename to extensions/graph-explorer/pkg/command/health.go index b25e795c26..a6122e5af7 100644 --- a/graph-explorer/pkg/command/health.go +++ b/extensions/graph-explorer/pkg/command/health.go @@ -4,9 +4,9 @@ import ( "fmt" "net/http" - "github.com/owncloud/ocis/graph-explorer/pkg/config" - "github.com/owncloud/ocis/graph-explorer/pkg/config/parser" - "github.com/owncloud/ocis/graph-explorer/pkg/logging" + "github.com/owncloud/ocis/extensions/graph-explorer/pkg/config" + "github.com/owncloud/ocis/extensions/graph-explorer/pkg/config/parser" + "github.com/owncloud/ocis/extensions/graph-explorer/pkg/logging" "github.com/urfave/cli/v2" ) diff --git a/graph-explorer/pkg/command/root.go b/extensions/graph-explorer/pkg/command/root.go similarity index 95% rename from graph-explorer/pkg/command/root.go rename to extensions/graph-explorer/pkg/command/root.go index f2acd3460a..34bc27c09a 100644 --- a/graph-explorer/pkg/command/root.go +++ b/extensions/graph-explorer/pkg/command/root.go @@ -4,7 +4,7 @@ import ( "context" "os" - "github.com/owncloud/ocis/graph-explorer/pkg/config" + "github.com/owncloud/ocis/extensions/graph-explorer/pkg/config" "github.com/owncloud/ocis/ocis-pkg/clihelper" ociscfg "github.com/owncloud/ocis/ocis-pkg/config" "github.com/thejerf/suture/v4" diff --git a/graph-explorer/pkg/command/server.go b/extensions/graph-explorer/pkg/command/server.go similarity index 81% rename from graph-explorer/pkg/command/server.go rename to extensions/graph-explorer/pkg/command/server.go index 711ae3a0b8..093cbe60b3 100644 --- a/graph-explorer/pkg/command/server.go +++ b/extensions/graph-explorer/pkg/command/server.go @@ -5,13 +5,13 @@ import ( "fmt" "github.com/oklog/run" - "github.com/owncloud/ocis/graph-explorer/pkg/config" - "github.com/owncloud/ocis/graph-explorer/pkg/config/parser" - "github.com/owncloud/ocis/graph-explorer/pkg/logging" - "github.com/owncloud/ocis/graph-explorer/pkg/metrics" - "github.com/owncloud/ocis/graph-explorer/pkg/server/debug" - "github.com/owncloud/ocis/graph-explorer/pkg/server/http" - "github.com/owncloud/ocis/graph-explorer/pkg/tracing" + "github.com/owncloud/ocis/extensions/graph-explorer/pkg/config" + "github.com/owncloud/ocis/extensions/graph-explorer/pkg/config/parser" + "github.com/owncloud/ocis/extensions/graph-explorer/pkg/logging" + "github.com/owncloud/ocis/extensions/graph-explorer/pkg/metrics" + "github.com/owncloud/ocis/extensions/graph-explorer/pkg/server/debug" + "github.com/owncloud/ocis/extensions/graph-explorer/pkg/server/http" + "github.com/owncloud/ocis/extensions/graph-explorer/pkg/tracing" "github.com/owncloud/ocis/ocis-pkg/version" "github.com/urfave/cli/v2" ) diff --git a/graph-explorer/pkg/command/version.go b/extensions/graph-explorer/pkg/command/version.go similarity index 95% rename from graph-explorer/pkg/command/version.go rename to extensions/graph-explorer/pkg/command/version.go index 39b1cadb44..a6e0866328 100644 --- a/graph-explorer/pkg/command/version.go +++ b/extensions/graph-explorer/pkg/command/version.go @@ -8,7 +8,7 @@ import ( "github.com/owncloud/ocis/ocis-pkg/version" tw "github.com/olekukonko/tablewriter" - "github.com/owncloud/ocis/graph-explorer/pkg/config" + "github.com/owncloud/ocis/extensions/graph-explorer/pkg/config" "github.com/urfave/cli/v2" ) diff --git a/graph-explorer/pkg/config/config.go b/extensions/graph-explorer/pkg/config/config.go similarity index 100% rename from graph-explorer/pkg/config/config.go rename to extensions/graph-explorer/pkg/config/config.go diff --git a/graph-explorer/pkg/config/debug.go b/extensions/graph-explorer/pkg/config/debug.go similarity index 100% rename from graph-explorer/pkg/config/debug.go rename to extensions/graph-explorer/pkg/config/debug.go diff --git a/graph-explorer/pkg/config/defaults/defaultconfig.go b/extensions/graph-explorer/pkg/config/defaults/defaultconfig.go similarity index 96% rename from graph-explorer/pkg/config/defaults/defaultconfig.go rename to extensions/graph-explorer/pkg/config/defaults/defaultconfig.go index 860d0fdf39..a343da50af 100644 --- a/graph-explorer/pkg/config/defaults/defaultconfig.go +++ b/extensions/graph-explorer/pkg/config/defaults/defaultconfig.go @@ -3,7 +3,7 @@ package defaults import ( "strings" - "github.com/owncloud/ocis/graph-explorer/pkg/config" + "github.com/owncloud/ocis/extensions/graph-explorer/pkg/config" ) func FullDefaultConfig() *config.Config { diff --git a/graph-explorer/pkg/config/http.go b/extensions/graph-explorer/pkg/config/http.go similarity index 100% rename from graph-explorer/pkg/config/http.go rename to extensions/graph-explorer/pkg/config/http.go diff --git a/graph-explorer/pkg/config/log.go b/extensions/graph-explorer/pkg/config/log.go similarity index 100% rename from graph-explorer/pkg/config/log.go rename to extensions/graph-explorer/pkg/config/log.go diff --git a/graph-explorer/pkg/config/parser/parse.go b/extensions/graph-explorer/pkg/config/parser/parse.go similarity index 83% rename from graph-explorer/pkg/config/parser/parse.go rename to extensions/graph-explorer/pkg/config/parser/parse.go index b9801ba948..499fbb8f36 100644 --- a/graph-explorer/pkg/config/parser/parse.go +++ b/extensions/graph-explorer/pkg/config/parser/parse.go @@ -3,8 +3,8 @@ package parser import ( "errors" - "github.com/owncloud/ocis/graph-explorer/pkg/config" - "github.com/owncloud/ocis/graph-explorer/pkg/config/defaults" + "github.com/owncloud/ocis/extensions/graph-explorer/pkg/config" + "github.com/owncloud/ocis/extensions/graph-explorer/pkg/config/defaults" ociscfg "github.com/owncloud/ocis/ocis-pkg/config" "github.com/owncloud/ocis/ocis-pkg/config/envdecode" diff --git a/graph-explorer/pkg/config/service.go b/extensions/graph-explorer/pkg/config/service.go similarity index 100% rename from graph-explorer/pkg/config/service.go rename to extensions/graph-explorer/pkg/config/service.go diff --git a/graph-explorer/pkg/config/tracing.go b/extensions/graph-explorer/pkg/config/tracing.go similarity index 100% rename from graph-explorer/pkg/config/tracing.go rename to extensions/graph-explorer/pkg/config/tracing.go diff --git a/graph-explorer/pkg/logging/logging.go b/extensions/graph-explorer/pkg/logging/logging.go similarity index 83% rename from graph-explorer/pkg/logging/logging.go rename to extensions/graph-explorer/pkg/logging/logging.go index 24a2567a1b..506cb623de 100644 --- a/graph-explorer/pkg/logging/logging.go +++ b/extensions/graph-explorer/pkg/logging/logging.go @@ -1,7 +1,7 @@ package logging import ( - "github.com/owncloud/ocis/graph-explorer/pkg/config" + "github.com/owncloud/ocis/extensions/graph-explorer/pkg/config" "github.com/owncloud/ocis/ocis-pkg/log" ) diff --git a/graph-explorer/pkg/metrics/metrics.go b/extensions/graph-explorer/pkg/metrics/metrics.go similarity index 100% rename from graph-explorer/pkg/metrics/metrics.go rename to extensions/graph-explorer/pkg/metrics/metrics.go diff --git a/graph-explorer/pkg/server/debug/option.go b/extensions/graph-explorer/pkg/server/debug/option.go similarity index 93% rename from graph-explorer/pkg/server/debug/option.go rename to extensions/graph-explorer/pkg/server/debug/option.go index b74a46e04f..8f8078e34e 100644 --- a/graph-explorer/pkg/server/debug/option.go +++ b/extensions/graph-explorer/pkg/server/debug/option.go @@ -3,7 +3,7 @@ package debug import ( "context" - "github.com/owncloud/ocis/graph-explorer/pkg/config" + "github.com/owncloud/ocis/extensions/graph-explorer/pkg/config" "github.com/owncloud/ocis/ocis-pkg/log" ) diff --git a/graph-explorer/pkg/server/debug/server.go b/extensions/graph-explorer/pkg/server/debug/server.go similarity index 96% rename from graph-explorer/pkg/server/debug/server.go rename to extensions/graph-explorer/pkg/server/debug/server.go index 1165097394..84ffb3cafa 100644 --- a/graph-explorer/pkg/server/debug/server.go +++ b/extensions/graph-explorer/pkg/server/debug/server.go @@ -4,7 +4,7 @@ import ( "io" "net/http" - "github.com/owncloud/ocis/graph-explorer/pkg/config" + "github.com/owncloud/ocis/extensions/graph-explorer/pkg/config" "github.com/owncloud/ocis/ocis-pkg/service/debug" "github.com/owncloud/ocis/ocis-pkg/version" ) diff --git a/graph-explorer/pkg/server/http/option.go b/extensions/graph-explorer/pkg/server/http/option.go similarity index 91% rename from graph-explorer/pkg/server/http/option.go rename to extensions/graph-explorer/pkg/server/http/option.go index 92b4e268c4..327f6968ed 100644 --- a/graph-explorer/pkg/server/http/option.go +++ b/extensions/graph-explorer/pkg/server/http/option.go @@ -3,8 +3,8 @@ package http import ( "context" - "github.com/owncloud/ocis/graph-explorer/pkg/config" - "github.com/owncloud/ocis/graph-explorer/pkg/metrics" + "github.com/owncloud/ocis/extensions/graph-explorer/pkg/config" + "github.com/owncloud/ocis/extensions/graph-explorer/pkg/metrics" "github.com/owncloud/ocis/ocis-pkg/log" "github.com/urfave/cli/v2" ) diff --git a/graph-explorer/pkg/server/http/server.go b/extensions/graph-explorer/pkg/server/http/server.go similarity index 94% rename from graph-explorer/pkg/server/http/server.go rename to extensions/graph-explorer/pkg/server/http/server.go index 33c85458e1..3883399a65 100644 --- a/graph-explorer/pkg/server/http/server.go +++ b/extensions/graph-explorer/pkg/server/http/server.go @@ -2,7 +2,7 @@ package http import ( chimiddleware "github.com/go-chi/chi/v5/middleware" - svc "github.com/owncloud/ocis/graph-explorer/pkg/service/v0" + svc "github.com/owncloud/ocis/extensions/graph-explorer/pkg/service/v0" "github.com/owncloud/ocis/ocis-pkg/middleware" "github.com/owncloud/ocis/ocis-pkg/service/http" "github.com/owncloud/ocis/ocis-pkg/version" diff --git a/graph-explorer/pkg/service/v0/instrument.go b/extensions/graph-explorer/pkg/service/v0/instrument.go similarity index 89% rename from graph-explorer/pkg/service/v0/instrument.go rename to extensions/graph-explorer/pkg/service/v0/instrument.go index 1a97f90468..72407096e3 100644 --- a/graph-explorer/pkg/service/v0/instrument.go +++ b/extensions/graph-explorer/pkg/service/v0/instrument.go @@ -3,7 +3,7 @@ package svc import ( "net/http" - "github.com/owncloud/ocis/graph-explorer/pkg/metrics" + "github.com/owncloud/ocis/extensions/graph-explorer/pkg/metrics" ) // NewInstrument returns a service that instruments metrics. diff --git a/graph-explorer/pkg/service/v0/logging.go b/extensions/graph-explorer/pkg/service/v0/logging.go similarity index 100% rename from graph-explorer/pkg/service/v0/logging.go rename to extensions/graph-explorer/pkg/service/v0/logging.go diff --git a/graph-explorer/pkg/service/v0/option.go b/extensions/graph-explorer/pkg/service/v0/option.go similarity index 93% rename from graph-explorer/pkg/service/v0/option.go rename to extensions/graph-explorer/pkg/service/v0/option.go index 3207c74db4..06a2b1fc7f 100644 --- a/graph-explorer/pkg/service/v0/option.go +++ b/extensions/graph-explorer/pkg/service/v0/option.go @@ -3,7 +3,7 @@ package svc import ( "net/http" - "github.com/owncloud/ocis/graph-explorer/pkg/config" + "github.com/owncloud/ocis/extensions/graph-explorer/pkg/config" "github.com/owncloud/ocis/ocis-pkg/log" ) diff --git a/graph-explorer/pkg/service/v0/service.go b/extensions/graph-explorer/pkg/service/v0/service.go similarity index 95% rename from graph-explorer/pkg/service/v0/service.go rename to extensions/graph-explorer/pkg/service/v0/service.go index d2d0820bd4..cb1f210d9d 100644 --- a/graph-explorer/pkg/service/v0/service.go +++ b/extensions/graph-explorer/pkg/service/v0/service.go @@ -7,8 +7,8 @@ import ( "strings" "github.com/go-chi/chi/v5" - "github.com/owncloud/ocis/graph-explorer/pkg/assets" - "github.com/owncloud/ocis/graph-explorer/pkg/config" + "github.com/owncloud/ocis/extensions/graph-explorer/pkg/assets" + "github.com/owncloud/ocis/extensions/graph-explorer/pkg/config" "github.com/owncloud/ocis/ocis-pkg/log" ) diff --git a/graph-explorer/pkg/service/v0/tracing.go b/extensions/graph-explorer/pkg/service/v0/tracing.go similarity index 100% rename from graph-explorer/pkg/service/v0/tracing.go rename to extensions/graph-explorer/pkg/service/v0/tracing.go diff --git a/graph-explorer/pkg/tracing/tracing.go b/extensions/graph-explorer/pkg/tracing/tracing.go similarity index 88% rename from graph-explorer/pkg/tracing/tracing.go rename to extensions/graph-explorer/pkg/tracing/tracing.go index 73b4c863c6..1825338f02 100644 --- a/graph-explorer/pkg/tracing/tracing.go +++ b/extensions/graph-explorer/pkg/tracing/tracing.go @@ -1,7 +1,7 @@ package tracing import ( - "github.com/owncloud/ocis/graph-explorer/pkg/config" + "github.com/owncloud/ocis/extensions/graph-explorer/pkg/config" pkgtrace "github.com/owncloud/ocis/ocis-pkg/tracing" "go.opentelemetry.io/otel/trace" ) diff --git a/graph-explorer/reflex.conf b/extensions/graph-explorer/reflex.conf similarity index 100% rename from graph-explorer/reflex.conf rename to extensions/graph-explorer/reflex.conf diff --git a/graph-explorer/cmd/graph-explorer/main.go b/graph-explorer/cmd/graph-explorer/main.go deleted file mode 100644 index aca5c050f6..0000000000 --- a/graph-explorer/cmd/graph-explorer/main.go +++ /dev/null @@ -1,14 +0,0 @@ -package main - -import ( - "os" - - "github.com/owncloud/ocis/graph-explorer/pkg/command" - "github.com/owncloud/ocis/graph-explorer/pkg/config/defaults" -) - -func main() { - if err := command.Execute(defaults.DefaultConfig()); err != nil { - os.Exit(1) - } -} diff --git a/ocis-pkg/config/config.go b/ocis-pkg/config/config.go index 1877a9cff1..6c922efbd2 100644 --- a/ocis-pkg/config/config.go +++ b/ocis-pkg/config/config.go @@ -6,8 +6,8 @@ import ( audit "github.com/owncloud/ocis/audit/pkg/config" accounts "github.com/owncloud/ocis/extensions/accounts/pkg/config" glauth "github.com/owncloud/ocis/extensions/glauth/pkg/config" + graphExplorer "github.com/owncloud/ocis/extensions/graph-explorer/pkg/config" graph "github.com/owncloud/ocis/extensions/graph/pkg/config" - graphExplorer "github.com/owncloud/ocis/graph-explorer/pkg/config" idm "github.com/owncloud/ocis/idm/pkg/config" idp "github.com/owncloud/ocis/idp/pkg/config" nats "github.com/owncloud/ocis/nats/pkg/config" diff --git a/ocis-pkg/config/defaultconfig.go b/ocis-pkg/config/defaultconfig.go index e9878e66f5..38cf5f6e1d 100644 --- a/ocis-pkg/config/defaultconfig.go +++ b/ocis-pkg/config/defaultconfig.go @@ -4,8 +4,8 @@ import ( audit "github.com/owncloud/ocis/audit/pkg/config/defaults" accounts "github.com/owncloud/ocis/extensions/accounts/pkg/config/defaults" glauth "github.com/owncloud/ocis/extensions/glauth/pkg/config/defaults" + graphExplorer "github.com/owncloud/ocis/extensions/graph-explorer/pkg/config/defaults" graph "github.com/owncloud/ocis/extensions/graph/pkg/config/defaults" - graphExplorer "github.com/owncloud/ocis/graph-explorer/pkg/config/defaults" idm "github.com/owncloud/ocis/idm/pkg/config/defaults" idp "github.com/owncloud/ocis/idp/pkg/config/defaults" nats "github.com/owncloud/ocis/nats/pkg/config/defaults" diff --git a/ocis/pkg/command/graphexplorer.go b/ocis/pkg/command/graphexplorer.go index d88135d0b9..95be9e503f 100644 --- a/ocis/pkg/command/graphexplorer.go +++ b/ocis/pkg/command/graphexplorer.go @@ -1,7 +1,7 @@ package command import ( - "github.com/owncloud/ocis/graph-explorer/pkg/command" + "github.com/owncloud/ocis/extensions/graph-explorer/pkg/command" "github.com/owncloud/ocis/ocis-pkg/config" "github.com/owncloud/ocis/ocis-pkg/config/parser" "github.com/owncloud/ocis/ocis/pkg/register" diff --git a/ocis/pkg/runtime/service/service.go b/ocis/pkg/runtime/service/service.go index 35a86f7579..91ba341883 100644 --- a/ocis/pkg/runtime/service/service.go +++ b/ocis/pkg/runtime/service/service.go @@ -21,8 +21,8 @@ import ( accounts "github.com/owncloud/ocis/extensions/accounts/pkg/command" glauth "github.com/owncloud/ocis/extensions/glauth/pkg/command" + graphExplorer "github.com/owncloud/ocis/extensions/graph-explorer/pkg/command" graph "github.com/owncloud/ocis/extensions/graph/pkg/command" - graphExplorer "github.com/owncloud/ocis/graph-explorer/pkg/command" idm "github.com/owncloud/ocis/idm/pkg/command" idp "github.com/owncloud/ocis/idp/pkg/command" nats "github.com/owncloud/ocis/nats/pkg/command"