From 79ec1d1034039b9a1f53353226209f1c83b95105 Mon Sep 17 00:00:00 2001 From: Lukas Hirt Date: Thu, 26 Nov 2020 10:57:25 +0100 Subject: [PATCH] Remove unnecessary files --- .drone.star | 1 + .../unreleased/create-onlyoffice-extension.md | 6 +- .../extensions/onlyoffice}/_index.md | 4 +- .../extensions/onlyoffice}/building.md | 2 +- .../extensions/onlyoffice}/getting-started.md | 0 .../extensions/onlyoffice}/license.md | 0 onlyoffice/.codacy.yml | 8 - onlyoffice/.drone.star | 698 ------------------ onlyoffice/.editorconfig | 35 - onlyoffice/.github/config.yml | 12 - onlyoffice/.github/settings.yml | 98 --- onlyoffice/.gitignore | 8 - onlyoffice/Makefile | 39 - onlyoffice/README.md | 40 - onlyoffice/changelog/CHANGELOG.tmpl | 53 -- onlyoffice/changelog/README.md | 6 - onlyoffice/changelog/TEMPLATE | 11 - .../{ocis-onlyoffice => onlyoffice}/main.go | 0 onlyoffice/package.json | 2 +- onlyoffice/pkg/assets/embed.go | 4 +- onlyoffice/pkg/command/root.go | 4 +- onlyoffice/pkg/service/v0/instrument.go | 5 - onlyoffice/pkg/service/v0/logging.go | 5 - onlyoffice/pkg/service/v0/service.go | 13 - onlyoffice/pkg/service/v0/tracing.go | 5 - onlyoffice/ui/dev/public/index.html | 17 - onlyoffice/ui/dev/src/App.vue | 5 - onlyoffice/ui/dev/src/main.js | 81 -- onlyoffice/ui/dev/src/router/index.js | 12 - onlyoffice/ui/dev/src/store/index.js | 22 - 30 files changed, 12 insertions(+), 1184 deletions(-) rename {onlyoffice/docs => docs/extensions/onlyoffice}/_index.md (54%) rename {onlyoffice/docs => docs/extensions/onlyoffice}/building.md (92%) rename {onlyoffice/docs => docs/extensions/onlyoffice}/getting-started.md (100%) rename {onlyoffice/docs => docs/extensions/onlyoffice}/license.md (100%) delete mode 100644 onlyoffice/.codacy.yml delete mode 100644 onlyoffice/.drone.star delete mode 100644 onlyoffice/.editorconfig delete mode 100644 onlyoffice/.github/config.yml delete mode 100644 onlyoffice/.github/settings.yml delete mode 100644 onlyoffice/.gitignore delete mode 100644 onlyoffice/README.md delete mode 100644 onlyoffice/changelog/CHANGELOG.tmpl delete mode 100644 onlyoffice/changelog/README.md delete mode 100644 onlyoffice/changelog/TEMPLATE rename onlyoffice/cmd/{ocis-onlyoffice => onlyoffice}/main.go (100%) delete mode 100644 onlyoffice/ui/dev/public/index.html delete mode 100644 onlyoffice/ui/dev/src/App.vue delete mode 100644 onlyoffice/ui/dev/src/main.js delete mode 100644 onlyoffice/ui/dev/src/router/index.js delete mode 100644 onlyoffice/ui/dev/src/store/index.js diff --git a/.drone.star b/.drone.star index a05471e6c..f3d02bec2 100644 --- a/.drone.star +++ b/.drone.star @@ -12,6 +12,7 @@ config = { 'store':'', 'thumbnails':'', 'webdav':'', + 'onlyoffice':'' }, 'apiTests': { 'coreBranch': 'master', diff --git a/changelog/unreleased/create-onlyoffice-extension.md b/changelog/unreleased/create-onlyoffice-extension.md index 8fdb66603..18e5e80ff 100644 --- a/changelog/unreleased/create-onlyoffice-extension.md +++ b/changelog/unreleased/create-onlyoffice-extension.md @@ -1,7 +1,7 @@ -Enhancement: Create OnlyOFFICE extension +Enhancement: Create OnlyOffice extension -Tags: OnlyOFFICE +Tags: OnlyOffice -We've created an OnlyOFFICE extension which enables users to create and edit docx documents. +We've created an OnlyOffice extension which enables users to create and edit docx documents and open spreadsheets and presentations. https://github.com/owncloud/ocis/pull/857 diff --git a/onlyoffice/docs/_index.md b/docs/extensions/onlyoffice/_index.md similarity index 54% rename from onlyoffice/docs/_index.md rename to docs/extensions/onlyoffice/_index.md index 482438886..a6d7399bf 100644 --- a/onlyoffice/docs/_index.md +++ b/docs/extensions/onlyoffice/_index.md @@ -1,5 +1,5 @@ --- -title: "Onlyoffice" +title: "OnlyFffice" date: 2018-05-02T00:00:00+00:00 weight: 10 geekdocRepo: https://github.com/owncloud/ocis/onlyoffice @@ -7,4 +7,4 @@ geekdocEditPath: edit/master/docs geekdocFilePath: _index.md --- -This service provides ... +This service enables users open documents, spreadsheets and presentations in the OnlyOffice app installed in ownCloud 10. diff --git a/onlyoffice/docs/building.md b/docs/extensions/onlyoffice/building.md similarity index 92% rename from onlyoffice/docs/building.md rename to docs/extensions/onlyoffice/building.md index 5790ee8d0..bdbbd61f3 100644 --- a/onlyoffice/docs/building.md +++ b/docs/extensions/onlyoffice/building.md @@ -25,4 +25,4 @@ make generate make build {{< / highlight >}} -Finally you should have the binary within the `bin/` folder now, give it a try with `./bin/ocis-onlyoffice -h` to see all available options. +Finally you should have the binary within the `bin/` folder now, give it a try with `./bin/onlyoffice -h` to see all available options. diff --git a/onlyoffice/docs/getting-started.md b/docs/extensions/onlyoffice/getting-started.md similarity index 100% rename from onlyoffice/docs/getting-started.md rename to docs/extensions/onlyoffice/getting-started.md diff --git a/onlyoffice/docs/license.md b/docs/extensions/onlyoffice/license.md similarity index 100% rename from onlyoffice/docs/license.md rename to docs/extensions/onlyoffice/license.md diff --git a/onlyoffice/.codacy.yml b/onlyoffice/.codacy.yml deleted file mode 100644 index 855b4f298..000000000 --- a/onlyoffice/.codacy.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -exclude_paths: - - CHANGELOG.md - - changelog/** - - docs/** - - pkg/proto/** - -... diff --git a/onlyoffice/.drone.star b/onlyoffice/.drone.star deleted file mode 100644 index a204a15ed..000000000 --- a/onlyoffice/.drone.star +++ /dev/null @@ -1,698 +0,0 @@ -def main(ctx): - before = [ - testing(ctx), - ] - - stages = [ - docker(ctx, 'amd64'), - docker(ctx, 'arm64'), - docker(ctx, 'arm'), - binary(ctx, 'linux'), - binary(ctx, 'darwin'), - binary(ctx, 'windows'), - ] - - after = [ - manifest(ctx), - changelog(ctx), - readme(ctx), - badges(ctx), - website(ctx), - ] - - return before + stages + after - -def testing(ctx): - return { - 'kind': 'pipeline', - 'type': 'docker', - 'name': 'testing', - 'platform': { - 'os': 'linux', - 'arch': 'amd64', - }, - 'steps': [ - { - 'name': 'generate', - 'image': 'webhippie/golang:1.13', - 'pull': 'always', - 'commands': [ - 'make generate', - ], - 'volumes': [ - { - 'name': 'gopath', - 'path': '/srv/app', - }, - ], - }, - { - 'name': 'vet', - 'image': 'webhippie/golang:1.13', - 'pull': 'always', - 'commands': [ - 'make vet', - ], - 'volumes': [ - { - 'name': 'gopath', - 'path': '/srv/app', - }, - ], - }, - { - 'name': 'staticcheck', - 'image': 'webhippie/golang:1.13', - 'pull': 'always', - 'commands': [ - 'make staticcheck', - ], - 'volumes': [ - { - 'name': 'gopath', - 'path': '/srv/app', - }, - ], - }, - { - 'name': 'lint', - 'image': 'webhippie/golang:1.13', - 'pull': 'always', - 'commands': [ - 'make lint', - ], - 'volumes': [ - { - 'name': 'gopath', - 'path': '/srv/app', - }, - ], - }, - { - 'name': 'build', - 'image': 'webhippie/golang:1.13', - 'pull': 'always', - 'commands': [ - 'make build', - ], - 'volumes': [ - { - 'name': 'gopath', - 'path': '/srv/app', - }, - ], - }, - { - 'name': 'test', - 'image': 'webhippie/golang:1.13', - 'pull': 'always', - 'commands': [ - 'make test', - ], - 'volumes': [ - { - 'name': 'gopath', - 'path': '/srv/app', - }, - ], - }, - { - 'name': 'codacy', - 'image': 'plugins/codacy:1', - 'pull': 'always', - 'settings': { - 'token': { - 'from_secret': 'codacy_token', - }, - }, - }, - ], - 'volumes': [ - { - 'name': 'gopath', - 'temp': {}, - }, - ], - 'trigger': { - 'ref': [ - 'refs/heads/master', - 'refs/tags/**', - 'refs/pull/**', - ], - }, - } - -def docker(ctx, arch): - return { - 'kind': 'pipeline', - 'type': 'docker', - 'name': arch, - 'platform': { - 'os': 'linux', - 'arch': arch, - }, - 'steps': [ - { - 'name': 'generate', - 'image': 'webhippie/golang:1.13', - 'pull': 'always', - 'commands': [ - 'make generate', - ], - 'volumes': [ - { - 'name': 'gopath', - 'path': '/srv/app', - }, - ], - }, - { - 'name': 'build', - 'image': 'webhippie/golang:1.13', - 'pull': 'always', - 'commands': [ - 'make build', - ], - 'volumes': [ - { - 'name': 'gopath', - 'path': '/srv/app', - }, - ], - }, - { - 'name': 'dryrun', - 'image': 'plugins/docker:18.09', - 'pull': 'always', - 'settings': { - 'dry_run': True, - 'tags': 'linux-%s' % (arch), - 'dockerfile': 'docker/Dockerfile.linux.%s' % (arch), - 'repo': ctx.repo.slug, - }, - 'when': { - 'ref': { - 'include': [ - 'refs/pull/**', - ], - }, - }, - }, - { - 'name': 'docker', - 'image': 'plugins/docker:18.09', - 'pull': 'always', - 'settings': { - 'username': { - 'from_secret': 'docker_username', - }, - 'password': { - 'from_secret': 'docker_password', - }, - 'auto_tag': True, - 'auto_tag_suffix': 'linux-%s' % (arch), - 'dockerfile': 'docker/Dockerfile.linux.%s' % (arch), - 'repo': ctx.repo.slug, - }, - 'when': { - 'ref': { - 'exclude': [ - 'refs/pull/**', - ], - }, - }, - }, - ], - 'volumes': [ - { - 'name': 'gopath', - 'temp': {}, - }, - ], - 'depends_on': [ - 'testing', - ], - 'trigger': { - 'ref': [ - 'refs/heads/master', - 'refs/tags/**', - 'refs/pull/**', - ], - }, - } - -def binary(ctx, name): - if ctx.build.event == "tag": - settings = { - 'endpoint': { - 'from_secret': 's3_endpoint', - }, - 'access_key': { - 'from_secret': 'aws_access_key_id', - }, - 'secret_key': { - 'from_secret': 'aws_secret_access_key', - }, - 'bucket': { - 'from_secret': 's3_bucket', - }, - 'path_style': True, - 'strip_prefix': 'dist/release/', - 'source': 'dist/release/*', - 'target': '/ocis/%s/%s' % (ctx.repo.name.replace("ocis-", ""), ctx.build.ref.replace("refs/tags/v", "")), - } - else: - settings = { - 'endpoint': { - 'from_secret': 's3_endpoint', - }, - 'access_key': { - 'from_secret': 'aws_access_key_id', - }, - 'secret_key': { - 'from_secret': 'aws_secret_access_key', - }, - 'bucket': { - 'from_secret': 's3_bucket', - }, - 'path_style': True, - 'strip_prefix': 'dist/release/', - 'source': 'dist/release/*', - 'target': '/ocis/%s/testing' % (ctx.repo.name.replace("ocis-", "")), - } - - return { - 'kind': 'pipeline', - 'type': 'docker', - 'name': name, - 'platform': { - 'os': 'linux', - 'arch': 'amd64', - }, - 'steps': [ - { - 'name': 'generate', - 'image': 'webhippie/golang:1.13', - 'pull': 'always', - 'commands': [ - 'make generate', - ], - 'volumes': [ - { - 'name': 'gopath', - 'path': '/srv/app', - }, - ], - }, - { - 'name': 'build', - 'image': 'webhippie/golang:1.13', - 'pull': 'always', - 'commands': [ - 'make release-%s' % (name), - ], - 'volumes': [ - { - 'name': 'gopath', - 'path': '/srv/app', - }, - ], - }, - { - 'name': 'finish', - 'image': 'webhippie/golang:1.13', - 'pull': 'always', - 'commands': [ - 'make release-finish', - ], - 'volumes': [ - { - 'name': 'gopath', - 'path': '/srv/app', - }, - ], - }, - { - 'name': 'upload', - 'image': 'plugins/s3:1', - 'pull': 'always', - 'settings': settings, - 'when': { - 'ref': [ - 'refs/heads/master', - 'refs/tags/**', - ], - }, - }, - { - 'name': 'changelog', - 'image': 'toolhippie/calens:latest', - 'pull': 'always', - 'commands': [ - 'calens --version %s -o dist/CHANGELOG.md' % ctx.build.ref.replace("refs/tags/v", "").split("-")[0], - ], - 'when': { - 'ref': [ - 'refs/tags/**', - ], - }, - }, - { - 'name': 'release', - 'image': 'plugins/github-release:1', - 'pull': 'always', - 'settings': { - 'api_key': { - 'from_secret': 'github_token', - }, - 'files': [ - 'dist/release/*', - ], - 'title': ctx.build.ref.replace("refs/tags/v", ""), - 'note': 'dist/CHANGELOG.md', - 'overwrite': True, - 'prerelease': len(ctx.build.ref.split("-")) > 1, - }, - 'when': { - 'ref': [ - 'refs/tags/**', - ], - }, - }, - ], - 'volumes': [ - { - 'name': 'gopath', - 'temp': {}, - }, - ], - 'depends_on': [ - 'testing', - ], - 'trigger': { - 'ref': [ - 'refs/heads/master', - 'refs/tags/**', - 'refs/pull/**', - ], - }, - } - -def manifest(ctx): - return { - 'kind': 'pipeline', - 'type': 'docker', - 'name': 'manifest', - 'platform': { - 'os': 'linux', - 'arch': 'amd64', - }, - 'steps': [ - { - 'name': 'execute', - 'image': 'plugins/manifest:1', - 'pull': 'always', - 'settings': { - 'username': { - 'from_secret': 'docker_username', - }, - 'password': { - 'from_secret': 'docker_password', - }, - 'spec': 'docker/manifest.tmpl', - 'auto_tag': True, - 'ignore_missing': True, - }, - }, - ], - 'depends_on': [ - 'amd64', - 'arm64', - 'arm', - 'linux', - 'darwin', - 'windows', - ], - 'trigger': { - 'ref': [ - 'refs/heads/master', - 'refs/tags/**', - ], - }, - } - -def changelog(ctx): - repo_slug = ctx.build.source_repo if ctx.build.source_repo else ctx.repo.slug - return { - 'kind': 'pipeline', - 'type': 'docker', - 'name': 'changelog', - 'platform': { - 'os': 'linux', - 'arch': 'amd64', - }, - 'clone': { - 'disable': True, - }, - 'steps': [ - { - 'name': 'clone', - 'image': 'plugins/git-action:1', - 'pull': 'always', - 'settings': { - 'actions': [ - 'clone', - ], - 'remote': 'https://github.com/%s' % (repo_slug), - 'branch': ctx.build.source if ctx.build.event == 'pull_request' else 'master', - 'path': '/drone/src', - 'netrc_machine': 'github.com', - 'netrc_username': { - 'from_secret': 'github_username', - }, - 'netrc_password': { - 'from_secret': 'github_token', - }, - }, - }, - { - 'name': 'generate', - 'image': 'webhippie/golang:1.13', - 'pull': 'always', - 'commands': [ - 'make changelog', - ], - }, - { - 'name': 'diff', - 'image': 'owncloud/alpine:latest', - 'pull': 'always', - 'commands': [ - 'git diff', - ], - }, - { - 'name': 'output', - 'image': 'owncloud/alpine:latest', - 'pull': 'always', - 'commands': [ - 'cat CHANGELOG.md', - ], - }, - { - 'name': 'publish', - 'image': 'plugins/git-action:1', - 'pull': 'always', - 'settings': { - 'actions': [ - 'commit', - 'push', - ], - 'message': 'Automated changelog update [skip ci]', - 'branch': 'master', - 'author_email': 'devops@owncloud.com', - 'author_name': 'ownClouders', - 'netrc_machine': 'github.com', - 'netrc_username': { - 'from_secret': 'github_username', - }, - 'netrc_password': { - 'from_secret': 'github_token', - }, - }, - 'when': { - 'ref': { - 'exclude': [ - 'refs/pull/**', - ], - }, - }, - }, - ], - 'depends_on': [ - 'manifest', - ], - 'trigger': { - 'ref': [ - 'refs/heads/master', - 'refs/pull/**', - ], - }, - } - -def readme(ctx): - return { - 'kind': 'pipeline', - 'type': 'docker', - 'name': 'readme', - 'platform': { - 'os': 'linux', - 'arch': 'amd64', - }, - 'steps': [ - { - 'name': 'execute', - 'image': 'sheogorath/readme-to-dockerhub:latest', - 'pull': 'always', - 'environment': { - 'DOCKERHUB_USERNAME': { - 'from_secret': 'docker_username', - }, - 'DOCKERHUB_PASSWORD': { - 'from_secret': 'docker_password', - }, - 'DOCKERHUB_REPO_PREFIX': ctx.repo.namespace, - 'DOCKERHUB_REPO_NAME': ctx.repo.name, - 'SHORT_DESCRIPTION': 'Docker images for %s' % (ctx.repo.name), - 'README_PATH': 'README.md', - }, - }, - ], - 'depends_on': [ - 'changelog', - ], - 'trigger': { - 'ref': [ - 'refs/heads/master', - 'refs/tags/**', - ], - }, - } - -def badges(ctx): - return { - 'kind': 'pipeline', - 'type': 'docker', - 'name': 'badges', - 'platform': { - 'os': 'linux', - 'arch': 'amd64', - }, - 'steps': [ - { - 'name': 'execute', - 'image': 'plugins/webhook:1', - 'pull': 'always', - 'settings': { - 'urls': { - 'from_secret': 'microbadger_url', - }, - }, - }, - ], - 'depends_on': [ - 'readme', - ], - 'trigger': { - 'ref': [ - 'refs/heads/master', - 'refs/tags/**', - ], - }, - } - -def website(ctx): - return { - 'kind': 'pipeline', - 'type': 'docker', - 'name': 'website', - 'platform': { - 'os': 'linux', - 'arch': 'amd64', - }, - 'steps': [ - { - 'name': 'prepare', - 'image': 'owncloudci/alpine:latest', - 'commands': [ - 'make docs-copy' - ], - }, - { - 'name': 'test', - 'image': 'webhippie/hugo:latest', - 'commands': [ - 'cd hugo', - 'hugo', - ], - }, - { - 'name': 'list', - 'image': 'owncloudci/alpine:latest', - 'commands': [ - 'tree hugo/public', - ], - }, - { - 'name': 'publish', - 'image': 'plugins/gh-pages:1', - 'pull': 'always', - 'settings': { - 'username': { - 'from_secret': 'github_username', - }, - 'password': { - 'from_secret': 'github_token', - }, - 'pages_directory': 'docs/', - 'target_branch': 'docs', - }, - 'when': { - 'ref': { - 'exclude': [ - 'refs/pull/**', - ], - }, - }, - }, - { - 'name': 'downstream', - 'image': 'plugins/downstream', - 'settings': { - 'server': 'https://cloud.drone.io/', - 'token': { - 'from_secret': 'drone_token', - }, - 'repositories': [ - 'owncloud/owncloud.github.io@source', - ], - }, - 'when': { - 'ref': { - 'exclude': [ - 'refs/pull/**', - ], - }, - }, - }, - ], - 'depends_on': [ - 'badges', - ], - 'trigger': { - 'ref': [ - 'refs/heads/master', - 'refs/pull/**', - ], - }, - } diff --git a/onlyoffice/.editorconfig b/onlyoffice/.editorconfig deleted file mode 100644 index 77129cd39..000000000 --- a/onlyoffice/.editorconfig +++ /dev/null @@ -1,35 +0,0 @@ -# http://editorconfig.org - -root = true - -[*] -charset = utf-8 -insert_final_newline = true -trim_trailing_whitespace = true - -[Makefile] -indent_style = tab -indent_size = 4 - -[*.go] -indent_style = tab -indent_size = 4 - -[*.starlark] -indent_style = space -indent_size = 2 - -[*.{yml,json}] -indent_style = space -indent_size = 2 - -[*.{js,vue}] -indent_style = space -indent_size = 2 - -[*.{css,less}] -indent_style = space -indent_size = 2 - -[*.md] -trim_trailing_whitespace = true diff --git a/onlyoffice/.github/config.yml b/onlyoffice/.github/config.yml deleted file mode 100644 index 0ffd30240..000000000 --- a/onlyoffice/.github/config.yml +++ /dev/null @@ -1,12 +0,0 @@ -# Configuration for update-docs - https://github.com/behaviorbot/update-docs - -# Comment to be posted to on PRs that don't update documentation -updateDocsComment: > - Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a [changelog](https://github.com/owncloud/ocis/onlyoffice/blob/master/changelog/README.md) item based on your changes. -updateDocsWhiteList: - - Tests-only - - tests-only - - Tests-Only - -updateDocsTargetFiles: - - changelog/unreleased/ diff --git a/onlyoffice/.github/settings.yml b/onlyoffice/.github/settings.yml deleted file mode 100644 index 2dedd3212..000000000 --- a/onlyoffice/.github/settings.yml +++ /dev/null @@ -1,98 +0,0 @@ ---- -repository: - name: ocis-onlyoffice - description: ':atom_symbol: Onlyoffice Service for oCIS' - homepage: https://owncloud.github.io/extensions/ocis_onlyoffice/ - topics: reva, ocis - - private: false - has_issues: true - has_projects: false - has_wiki: false - has_downloads: false - - default_branch: master - - allow_squash_merge: true - allow_merge_commit: true - allow_rebase_merge: true - -labels: - - name: bug - color: d73a4a - description: Something isn't working - - name: documentation - color: 0075ca - description: Improvements or additions to documentation - - name: duplicate - color: cfd3d7 - description: This issue or pull request already exists - - name: enhancement - color: a2eeef - description: New feature or request - - name: good first issue - color: 7057ff - description: Good for newcomers - - name: help wanted - color: 008672 - description: Extra attention is needed - - name: invalid - color: e4e669 - description: This doesn't seem right - - name: question - color: d876e3 - description: Further information is requested - - name: wontfix - color: ffffff - description: This will not be worked on - - name: effort/trivial - color: c2e0c6 - description: Required effort to finish task - - name: effort/0.25d - color: c2e0c6 - description: Required effort to finish task - - name: effort/0.5d - color: c2e0c6 - description: Required effort to finish task - - name: effort/1d - color: c2e0c6 - description: Required effort to finish task - - name: effort/2d - color: c2e0c6 - description: Required effort to finish task - - name: effort/4d - color: c2e0c6 - description: Required effort to finish task - - name: effort/5d - color: c2e0c6 - description: Required effort to finish task - - name: effort/10d - color: c2e0c6 - description: Required effort to finish task - -teams: - - name: ci - permission: admin - - name: employees - permission: push - -branches: - - name: master - protection: - required_pull_request_reviews: - required_approving_review_count: 1 - dismiss_stale_reviews: false - require_code_owner_reviews: false - dismissal_restrictions: {} - required_status_checks: - strict: true - contexts: - - continuous-integration/drone/pr - enforce_admins: false - restrictions: - users: [] - teams: - - ci - - employees - -... diff --git a/onlyoffice/.gitignore b/onlyoffice/.gitignore deleted file mode 100644 index 8f80c067b..000000000 --- a/onlyoffice/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -coverage.out - -/bin -/dist -/hugo - -/node_modules -/assets/** diff --git a/onlyoffice/Makefile b/onlyoffice/Makefile index 768bcc1ed..0e160a070 100644 --- a/onlyoffice/Makefile +++ b/onlyoffice/Makefile @@ -154,42 +154,3 @@ docs: docs-copy docs-build .PHONY: watch watch: go run github.com/cespare/reflex -c reflex.conf - -# $(GOPATH)/bin/protoc-gen-go: -# GO111MODULE=off go get -v github.com/golang/protobuf/protoc-gen-go - -# $(GOPATH)/bin/protoc-gen-micro: -# GO111MODULE=off go get -v github.com/micro/protoc-gen-micro - -# $(GOPATH)/bin/protoc-gen-microweb: -# GO111MODULE=off go get -v github.com/webhippie/protoc-gen-microweb - -# $(GOPATH)/bin/protoc-gen-swagger: -# GO111MODULE=off go get -v github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger - -# pkg/proto/v0/example.pb.go: pkg/proto/v0/example.proto -# protoc \ -# -I=third_party/ \ -# -I=pkg/proto/v0/ \ -# --go_out=logtostderr=true:pkg/proto/v0 example.proto - -# pkg/proto/v0/example.pb.micro.go: pkg/proto/v0/example.proto -# protoc \ -# -I=third_party/ \ -# -I=pkg/proto/v0/ \ -# --micro_out=logtostderr=true:pkg/proto/v0 example.proto - -# pkg/proto/v0/example.pb.web.go: pkg/proto/v0/example.proto -# protoc \ -# -I=third_party/ \ -# -I=pkg/proto/v0/ \ -# --microweb_out=logtostderr=true:pkg/proto/v0 example.proto - -# pkg/proto/v0/example.swagger.json: pkg/proto/v0/example.proto -# protoc \ -# -I=third_party/ \ -# -I=pkg/proto/v0/ \ -# --swagger_out=logtostderr=true:pkg/proto/v0 example.proto - -# .PHONY: protobuf -# protobuf: $(GOPATH)/bin/protoc-gen-go $(GOPATH)/bin/protoc-gen-micro $(GOPATH)/bin/protoc-gen-microweb $(GOPATH)/bin/protoc-gen-swagger pkg/proto/v0/example.pb.go pkg/proto/v0/example.pb.micro.go pkg/proto/v0/example.pb.web.go pkg/proto/v0/example.swagger.json diff --git a/onlyoffice/README.md b/onlyoffice/README.md deleted file mode 100644 index b321201cf..000000000 --- a/onlyoffice/README.md +++ /dev/null @@ -1,40 +0,0 @@ -# ownCloud Infinite Scale: ONLYOFFICE - -== Badges need to be provided manually == - -**This project is under heavy development, it's not in a working state yet!** - -## Install - -You can download prebuilt binaries from the GitHub releases or from our [download mirrors](http://download.owncloud.com/ocis/onlyoffice/). For instructions how to install this on your platform you should take a look at our [documentation](https://owncloud.github.io/extensions/ocis_onlyoffice/) - -## Development - -Make sure you have a working Go environment, for further reference or a guide take a look at the [install instructions](http://golang.org/doc/install.html). This project requires Go >= v1.13. - -```console -git clone https://github.com/owncloud/ocis/onlyoffice.git -cd ocis-onlyoffice - -make generate build - -./bin/ocis-onlyoffice -h -``` - -## Security - -If you find a security issue please contact security@owncloud.com first. - -## Contributing - -Fork -> Patch -> Push -> Pull Request - -## License - -Apache-2.0 - -## Copyright - -```console -Copyright (c) 2020 ownCloud GmbH -``` diff --git a/onlyoffice/changelog/CHANGELOG.tmpl b/onlyoffice/changelog/CHANGELOG.tmpl deleted file mode 100644 index 02290e536..000000000 --- a/onlyoffice/changelog/CHANGELOG.tmpl +++ /dev/null @@ -1,53 +0,0 @@ -{{ $allVersions := . }} -{{- range $index, $changes := . }}{{ with $changes -}} -{{ if gt (len $allVersions) 1 -}} -# Changelog for [{{ .Version }}] ({{ .Date }}) - -The following sections list the changes in ocis-onlyoffice {{ .Version }}. - -{{/* creating version compare links */ -}} -{{ $next := add1 $index -}} -{{ if ne (len $allVersions) $next -}} -{{ $previousVersion := (index $allVersions $next).Version -}} -{{ if eq .Version "unreleased" -}} -[{{ .Version }}]: https://github.com/owncloud/ocis/onlyoffice/compare/v{{ $previousVersion }}...master - -{{ else -}} -[{{ .Version }}]: https://github.com/owncloud/ocis/onlyoffice/compare/v{{ $previousVersion }}...v{{ .Version }} - -{{ end -}} -{{ end -}} - -{{- /* last version managed by calens, end of the loop */ -}} -{{ if eq .Version "0.1.0" -}} -[{{ .Version }}]: https://github.com/owncloud/ocis/onlyoffice/compare/94f19e653e30cdf16dcf23dbaf36c6d753d37ae9...v{{ .Version }} - -{{ end -}} -{{ else -}} -# Changes in {{ .Version }} - -{{ end -}} - -## Summary -{{ range $entry := .Entries }}{{ with $entry }} -* {{ .Type }} - {{ .Title }}: [#{{ .PrimaryID }}]({{ .PrimaryURL }}) -{{- end }}{{ end }} - -## Details -{{ range $entry := .Entries }}{{ with $entry }} -* {{ .Type }} - {{ .Title }}: [#{{ .PrimaryID }}]({{ .PrimaryURL }}) -{{ range $par := .Paragraphs }} - {{ wrapIndent $par 80 3 }} -{{ end -}} -{{ range $url := .IssueURLs }} - {{ $url -}} -{{ end -}} -{{ range $url := .PRURLs }} - {{ $url -}} -{{ end -}} -{{ range $url := .OtherURLs }} - {{ $url -}} -{{ end }} - -{{ end }}{{ end -}} -{{ end }}{{ end -}} diff --git a/onlyoffice/changelog/README.md b/onlyoffice/changelog/README.md deleted file mode 100644 index 0ae5d5b3e..000000000 --- a/onlyoffice/changelog/README.md +++ /dev/null @@ -1,6 +0,0 @@ -# Changelog - -We are using [calens](https://github.com/restic/calens) to properly generate a -changelog before we are tagging a new release. To get an idea how this could -look like would be the -best reference. diff --git a/onlyoffice/changelog/TEMPLATE b/onlyoffice/changelog/TEMPLATE deleted file mode 100644 index dcc2b8839..000000000 --- a/onlyoffice/changelog/TEMPLATE +++ /dev/null @@ -1,11 +0,0 @@ -Bugfix: Fix behavior for foobar (in present tense) - -We've fixed the behavior for foobar, a long-standing annoyance for users. The -text should be wrapped at 80 characters length. - -The text in the paragraphs is written in past tense. The last section is a list -of issue URLs, PR URLs and other URLs. The first issue ID (or the first PR ID, -in case there aren't any issue links) is used as the primary ID. - -https://github.com/owncloud/ocis/onlyoffice/issues/1234 -https://github.com/owncloud/ocis/onlyoffice/pull/55555 diff --git a/onlyoffice/cmd/ocis-onlyoffice/main.go b/onlyoffice/cmd/onlyoffice/main.go similarity index 100% rename from onlyoffice/cmd/ocis-onlyoffice/main.go rename to onlyoffice/cmd/onlyoffice/main.go diff --git a/onlyoffice/package.json b/onlyoffice/package.json index 3c875d1ba..35d0217f8 100644 --- a/onlyoffice/package.json +++ b/onlyoffice/package.json @@ -1,6 +1,6 @@ { "private": true, - "name": "ocis-onlyoffice", + "name": "onlyoffice", "version": "0.0.0", "description": "", "homepage": "https://github.com/owncloud/ocis/onlyoffice#readme", diff --git a/onlyoffice/pkg/assets/embed.go b/onlyoffice/pkg/assets/embed.go index 2d4e299ac..6bbff2047 100644 --- a/onlyoffice/pkg/assets/embed.go +++ b/onlyoffice/pkg/assets/embed.go @@ -1,5 +1,5 @@ -// Code generated by fileb0x at "2020-11-24 12:47:35.087873 +0100 CET m=+0.002882004" from config file "embed.yml" DO NOT EDIT. -// modification hash(52d2f5c31484b20b0aa9dc46b4829707.8058aec596c5fb73022d09bb97af796e) +// Code generated by fileb0x at "2020-11-26 10:38:39.005737 +0100 CET m=+0.003329814" from config file "embed.yml" DO NOT EDIT. +// modification hash(dfc2fd54bc5e8bb4538328222c713422.8058aec596c5fb73022d09bb97af796e) package assets diff --git a/onlyoffice/pkg/command/root.go b/onlyoffice/pkg/command/root.go index 54712b388..3ee8984a4 100644 --- a/onlyoffice/pkg/command/root.go +++ b/onlyoffice/pkg/command/root.go @@ -17,9 +17,9 @@ func Execute() error { cfg := config.New() app := &cli.App{ - Name: "ocis-onlyoffice", + Name: "onlyoffice", Version: version.String, - Usage: "Onlyoffice ocis extension", + Usage: "OnlyOffice oCIS extension", Compiled: version.Compiled(), Authors: []*cli.Author{ diff --git a/onlyoffice/pkg/service/v0/instrument.go b/onlyoffice/pkg/service/v0/instrument.go index 3c6e3c6c0..6b1bfaa5c 100644 --- a/onlyoffice/pkg/service/v0/instrument.go +++ b/onlyoffice/pkg/service/v0/instrument.go @@ -23,8 +23,3 @@ type instrument struct { func (i instrument) ServeHTTP(w http.ResponseWriter, r *http.Request) { i.next.ServeHTTP(w, r) } - -// Dummy implements the Service interface. -func (i instrument) Dummy(w http.ResponseWriter, r *http.Request) { - i.next.Dummy(w, r) -} diff --git a/onlyoffice/pkg/service/v0/logging.go b/onlyoffice/pkg/service/v0/logging.go index e0b10f8c2..d6248cfe3 100644 --- a/onlyoffice/pkg/service/v0/logging.go +++ b/onlyoffice/pkg/service/v0/logging.go @@ -23,8 +23,3 @@ type logging struct { func (l logging) ServeHTTP(w http.ResponseWriter, r *http.Request) { l.next.ServeHTTP(w, r) } - -// Dummy implements the Service interface. -func (l logging) Dummy(w http.ResponseWriter, r *http.Request) { - l.next.Dummy(w, r) -} diff --git a/onlyoffice/pkg/service/v0/service.go b/onlyoffice/pkg/service/v0/service.go index 1fdd0ac39..65f9264fe 100644 --- a/onlyoffice/pkg/service/v0/service.go +++ b/onlyoffice/pkg/service/v0/service.go @@ -10,7 +10,6 @@ import ( // Service defines the extension handlers. type Service interface { ServeHTTP(http.ResponseWriter, *http.Request) - Dummy(http.ResponseWriter, *http.Request) } // NewService returns a service implementation for Service. @@ -25,10 +24,6 @@ func NewService(opts ...Option) Service { mux: m, } - m.Route(options.Config.HTTP.Root, func(r chi.Router) { - r.Get("/", svc.Dummy) - }) - return svc } @@ -42,11 +37,3 @@ type Onlyoffice struct { func (g Onlyoffice) ServeHTTP(w http.ResponseWriter, r *http.Request) { g.mux.ServeHTTP(w, r) } - -// Dummy implements the Service interface. -func (g Onlyoffice) Dummy(w http.ResponseWriter, r *http.Request) { - w.Header().Set("Content-Type", "text/plain") - w.WriteHeader(http.StatusOK) - - w.Write([]byte("Hello ocis-onlyoffice!")) -} diff --git a/onlyoffice/pkg/service/v0/tracing.go b/onlyoffice/pkg/service/v0/tracing.go index 48da0b320..79cf9e058 100644 --- a/onlyoffice/pkg/service/v0/tracing.go +++ b/onlyoffice/pkg/service/v0/tracing.go @@ -19,8 +19,3 @@ type tracing struct { func (t tracing) ServeHTTP(w http.ResponseWriter, r *http.Request) { t.next.ServeHTTP(w, r) } - -// Dummy implements the Service interface. -func (t tracing) Dummy(w http.ResponseWriter, r *http.Request) { - t.next.Dummy(w, r) -} diff --git a/onlyoffice/ui/dev/public/index.html b/onlyoffice/ui/dev/public/index.html deleted file mode 100644 index 8536e44a2..000000000 --- a/onlyoffice/ui/dev/public/index.html +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - Extension Demo - - - - -
- - - diff --git a/onlyoffice/ui/dev/src/App.vue b/onlyoffice/ui/dev/src/App.vue deleted file mode 100644 index 0ee896440..000000000 --- a/onlyoffice/ui/dev/src/App.vue +++ /dev/null @@ -1,5 +0,0 @@ - diff --git a/onlyoffice/ui/dev/src/main.js b/onlyoffice/ui/dev/src/main.js deleted file mode 100644 index b712064d2..000000000 --- a/onlyoffice/ui/dev/src/main.js +++ /dev/null @@ -1,81 +0,0 @@ -import Vue from 'vue' -import App from './App.vue' -import router from './router' -import store from './store' -import { sync } from 'vuex-router-sync' - -// Import the Design System -import ODS from 'owncloud-design-system' -import 'owncloud-design-system/dist/system/system.css' - -Vue.config.productionTip = false -Vue.use(ODS) - -const registerStoreModule = app => { - if (app.store.default) { - return store.registerModule(app.appInfo.name, app.store.default) - } - - return store.registerModule(app.appInfo.name, app.store) -} - -const mount = () => { - new Vue({ - router, - store, - render: h => h(App) - }).$mount('#app') -} - -const loadExtension = extension => { - // Redirect to default path - const routes = [ - extension.navItems && { - path: '/', - redirect: () => extension.navItems[0].route - } - ] - - if (!extension.appInfo) { - console.error('Tried to load an extension with missing appInfo') - } - - if (extension.routes) { - // rewrite relative app routes by adding their corresponding appId as prefix - extension.routes.forEach( - r => (r.path = `/${encodeURI(extension.appInfo.id)}${r.path}`) - ) - - // adjust routes in nav items - if (extension.navItems) { - extension.navItems.forEach(nav => { - const r = extension.routes.find(function (element) { - return element.name === nav.route.name - }) - - if (r) { - r.meta = r.meta || {} - r.meta.pageTitle = nav.name - nav.route.path = nav.route.path || r.path - } else { - console.error(`Unknown route name ${nav.route.name}`) - } - }) - } - - routes.push(extension.routes) - } - - if (extension.store) { - registerStoreModule(extension) - } - - router.addRoutes(routes.flat()) - sync(store, router) - mount() -}; - -(() => { - // eslint-disable-next-line no-undef - requirejs([window.location.origin + '/ocis-onlyoffice.js'], loadExtension) -})() diff --git a/onlyoffice/ui/dev/src/router/index.js b/onlyoffice/ui/dev/src/router/index.js deleted file mode 100644 index 27809d797..000000000 --- a/onlyoffice/ui/dev/src/router/index.js +++ /dev/null @@ -1,12 +0,0 @@ -import Vue from "vue"; -import VueRouter from "vue-router"; - -Vue.use(VueRouter); - -const routes = []; - -const router = new VueRouter({ - routes -}); - -export default router; diff --git a/onlyoffice/ui/dev/src/store/index.js b/onlyoffice/ui/dev/src/store/index.js deleted file mode 100644 index 59ba245a9..000000000 --- a/onlyoffice/ui/dev/src/store/index.js +++ /dev/null @@ -1,22 +0,0 @@ -import Vue from 'vue' -import Vuex from 'vuex' - -Vue.use(Vuex) - -export default new Vuex.Store({ - state: { - configuration: { - server: 'http://localhost:9105' - }, - user: { - token: 'test' - } - }, - getters: { - configuration: state => state.configuration, - user: state => state.user - }, - mutations: {}, - actions: {}, - modules: {} -})