[incubator-trafficcontrol] branch master updated: better grouping for TP menu
This is an automated email from the ASF dual-hosted git repository. mtorluemke pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-trafficcontrol.git The following commit(s) were added to refs/heads/master by this push: new 7c06e6e better grouping for TP menu 7c06e6e is described below commit 7c06e6e9fe3f3f1f80f040475d63bd71d823b2af Author: Jeremy MitchellAuthorDate: Thu Apr 12 15:51:07 2018 -0600 better grouping for TP menu --- .../form.deliveryService.DNS.tpl.html | 2 +- .../form.deliveryService.HTTP.tpl.html | 2 +- .../form.deliveryService.Steering.tpl.html | 2 +- .../form.deliveryService.anyMap.tpl.html | 2 +- .../form.deliveryServiceJob.tpl.html | 4 +-- .../new/FormNewDeliveryServiceJobController.js | 2 +- .../src/common/modules/form/job/form.job.tpl.html | 4 +-- .../modules/form/job/new/FormNewJobController.js | 2 +- .../common/modules/navigation/navigation.tpl.html | 38 +- .../table.deliveryServiceJobs.tpl.html | 4 +-- .../common/modules/table/jobs/table.jobs.tpl.html | 4 +-- 11 files changed, 37 insertions(+), 29 deletions(-) diff --git a/traffic_portal/app/src/common/modules/form/deliveryService/form.deliveryService.DNS.tpl.html b/traffic_portal/app/src/common/modules/form/deliveryService/form.deliveryService.DNS.tpl.html index 38e8acf..cca6e39 100644 --- a/traffic_portal/app/src/common/modules/form/deliveryService/form.deliveryService.DNS.tpl.html +++ b/traffic_portal/app/src/common/modules/form/deliveryService/form.deliveryService.DNS.tpl.html @@ -54,7 +54,7 @@ under the License. View Servers View Regexes -View Invalidate Content Jobs +View Invalidation Requests diff --git a/traffic_portal/app/src/common/modules/form/deliveryService/form.deliveryService.HTTP.tpl.html b/traffic_portal/app/src/common/modules/form/deliveryService/form.deliveryService.HTTP.tpl.html index 9f6a10e..741a7d6 100644 --- a/traffic_portal/app/src/common/modules/form/deliveryService/form.deliveryService.HTTP.tpl.html +++ b/traffic_portal/app/src/common/modules/form/deliveryService/form.deliveryService.HTTP.tpl.html @@ -54,7 +54,7 @@ under the License. View Servers View Regexes -View Invalidate Content Jobs +View Invalidation Requests diff --git a/traffic_portal/app/src/common/modules/form/deliveryService/form.deliveryService.Steering.tpl.html b/traffic_portal/app/src/common/modules/form/deliveryService/form.deliveryService.Steering.tpl.html index c800e06..4d67051 100644 --- a/traffic_portal/app/src/common/modules/form/deliveryService/form.deliveryService.Steering.tpl.html +++ b/traffic_portal/app/src/common/modules/form/deliveryService/form.deliveryService.Steering.tpl.html @@ -52,7 +52,7 @@ under the License. View Targets View Regexes -View Invalidate Content Jobs +View Invalidation Requests diff --git a/traffic_portal/app/src/common/modules/form/deliveryService/form.deliveryService.anyMap.tpl.html b/traffic_portal/app/src/common/modules/form/deliveryService/form.deliveryService.anyMap.tpl.html index 0573dee..da8cf67 100644 --- a/traffic_portal/app/src/common/modules/form/deliveryService/form.deliveryService.anyMap.tpl.html +++ b/traffic_portal/app/src/common/modules/form/deliveryService/form.deliveryService.anyMap.tpl.html @@ -50,7 +50,7 @@ under the License. View Servers View Regexes -View Invalidate Content Jobs +View Invalidation Requests diff --git a/traffic_portal/app/src/common/modules/form/deliveryServiceJob/form.deliveryServiceJob.tpl.html b/traffic_portal/app/src/common/modules/form/deliveryServiceJob/form.deliveryServiceJob.tpl.html index 48d73f1..92a4139 100644 --- a/traffic_portal/app/src/common/modules/form/deliveryServiceJob/form.deliveryServiceJob.tpl.html +++ b/traffic_portal/app/src/common/modules/form/deliveryServiceJob/form.deliveryServiceJob.tpl.html @@ -22,7 +22,7 @@ under the License. Delivery Services {{deliveryService.xmlId}} -Invalidate Content Jobs +Invalidation Requests {{jobName}} @@ -43,7 +43,7 @@ under the License. TTL (hours) * - + Required Whole Number Too
[incubator-trafficcontrol] branch master updated: add missing entry in capability table
This is an automated email from the ASF dual-hosted git repository. mitchell852 pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-trafficcontrol.git The following commit(s) were added to refs/heads/master by this push: new 2cd0974 add missing entry in capability table 2cd0974 is described below commit 2cd0974f6c6546105e5898067cfc769fcf37bd7f Author: Dan KirkwoodAuthorDate: Wed Apr 18 17:37:56 2018 + add missing entry in capability table --- traffic_ops/app/db/seeds.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/traffic_ops/app/db/seeds.sql b/traffic_ops/app/db/seeds.sql index 9611331..6c11adb 100644 --- a/traffic_ops/app/db/seeds.sql +++ b/traffic_ops/app/db/seeds.sql @@ -107,7 +107,7 @@ insert into capability (name, description) values ('change-log-write', 'Create c insert into capability (name, description) values ('division-read', 'View division configuration') ON CONFLICT (name) DO NOTHING; insert into capability (name, description) values ('division-write', 'Create, edit or delete division configuration') ON CONFLICT (name) DO NOTHING; insert into capability (name, description) values ('ds-cache-read', 'View delivery-service cache assignment') ON CONFLICT (name) DO NOTHING; -insert into capability (name, description) values ('ds-cache-read', 'Create, edit or delete delivery-service cache assignment') ON CONFLICT (name) DO NOTHING; +insert into capability (name, description) values ('ds-cache-write', 'Create, edit or delete delivery-service cache assignment') ON CONFLICT (name) DO NOTHING; insert into capability (name, description) values ('ds-health-read', 'View delivery-service health') ON CONFLICT (name) DO NOTHING; insert into capability (name, description) values ('ds-read', 'View delivery-service configuration') ON CONFLICT (name) DO NOTHING; insert into capability (name, description) values ('ds-write', 'Create, edit or delete delivery-service configuration') ON CONFLICT (name) DO NOTHING; -- To stop receiving notification emails like this one, please contact mitchell...@apache.org.
[2/2] incubator-trafficcontrol-website git commit: Update docs from commit 9acaac39d09ec7667e2fac5446aa664ea421a929
Update docs from commit 9acaac39d09ec7667e2fac5446aa664ea421a929 Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol-website/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol-website/commit/384dcfdd Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol-website/tree/384dcfdd Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol-website/diff/384dcfdd Branch: refs/heads/asf-site Commit: 384dcfdd7086a280fdb3516c8041d24726873362 Parents: 10551f9 Author: jenkinsAuthored: Wed Apr 18 21:28:05 2018 + Committer: jenkins Committed: Wed Apr 18 21:28:05 2018 + -- .../traffic_ops_api/v12/configfiles_ats.rst.txt | 13 +- docs/master/development/traffic_ops.html| 5 +- .../traffic_ops_api/v12/configfiles_ats.html| 132 --- docs/master/objects.inv | Bin 4962 -> 4975 bytes docs/master/searchindex.js | 2 +- 5 files changed, 90 insertions(+), 62 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol-website/blob/384dcfdd/docs/master/_sources/development/traffic_ops_api/v12/configfiles_ats.rst.txt -- diff --git a/docs/master/_sources/development/traffic_ops_api/v12/configfiles_ats.rst.txt b/docs/master/_sources/development/traffic_ops_api/v12/configfiles_ats.rst.txt index 3bbaa4e..f2b051a 100644 --- a/docs/master/_sources/development/traffic_ops_api/v12/configfiles_ats.rst.txt +++ b/docs/master/_sources/development/traffic_ops_api/v12/configfiles_ats.rst.txt @@ -17,7 +17,7 @@ .. _to-api-v12-configfiles_ats: Config Files and Config File Metadata -=== += .. _to-api-v12-configfiles_ats-route: @@ -25,8 +25,6 @@ Config Files and Config File Metadata ++ **GET /api/1.2/servers/:hostname/configfiles/ats** -**GET /api/1.2/servers/:host_id/configfiles/ats** - Authentication Required: Yes @@ -36,8 +34,8 @@ Config Files and Config File Metadata **Response Properties** - +==+ - |Info Section | + +---++-+ + | || Info Section | +---++-+ |Parameter | Type | Description | +===++=+ @@ -60,11 +58,7 @@ Config Files and Config File Metadata | ``cdnName`` | string | The name of the cache's assigned CDN. | +---++-+ | ``serverTcpPort`` | int | The configured port of the server's used by ATS.| - +==+ - |configFiles Section | +---++-+ - |Parameter | Type | Description | - +===++=+ | ``fnameOnDisk`` | string | The filename of the configuration file as stored on the cache. | +---++-+ | ``location`` | string | The directory location of the configuration file as stored on the cache.| @@ -73,7 +67,6 @@ Config Files and Config File Metadata +---++-+ | ``scope`` | string | The scope of the configuration file. | +---++-+ - **Response Example** :: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol-website/blob/384dcfdd/docs/master/development/traffic_ops.html -- diff --git
[1/2] incubator-trafficcontrol-website git commit: Update docs from commit 9acaac39d09ec7667e2fac5446aa664ea421a929
Repository: incubator-trafficcontrol-website Updated Branches: refs/heads/asf-site 10551f98c -> 384dcfdd7 http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol-website/blob/384dcfdd/docs/master/searchindex.js -- diff --git a/docs/master/searchindex.js b/docs/master/searchindex.js index 445ae1e..505638e 100644 --- a/docs/master/searchindex.js +++ b/docs/master/searchindex.js @@ -1 +1 @@ -Search.setIndex({docnames:["admin/index","admin/quick_howto/dnssec","admin/quick_howto/ds_requests","admin/quick_howto/federations","admin/quick_howto/index","admin/quick_howto/multi_site","admin/quick_howto/regionalgeo","admin/quick_howto/steering","admin/traffic_monitor","admin/traffic_monitor_golang","admin/traffic_ops/configuration","admin/traffic_ops/default_profiles","admin/traffic_ops/extensions","admin/traffic_ops/installation","admin/traffic_ops/migration_from_10_to_20","admin/traffic_ops/migration_from_20_to_22","admin/traffic_ops/using","admin/traffic_portal/installation","admin/traffic_portal/usingtrafficportal","admin/traffic_router","admin/traffic_server","admin/traffic_stats","admin/traffic_vault","basics/cache_revalidation","basics/caching_proxies","basics/content_delivery_networks","basics/http_11","basics/index","development/building","development/index","development/traffic_monitor","development/traffic_monitor/traffic_monitor_api","development/traffic_monitor_gol ang","development/traffic_ops","development/traffic_ops_api/routes","development/traffic_ops_api/v11/asn","development/traffic_ops_api/v11/cachegroup","development/traffic_ops_api/v11/cdn","development/traffic_ops_api/v11/changelog","development/traffic_ops_api/v11/deliveryservice","development/traffic_ops_api/v11/hwinfo","development/traffic_ops_api/v11/parameter","development/traffic_ops_api/v11/phys_location","development/traffic_ops_api/v11/profile","development/traffic_ops_api/v11/region","development/traffic_ops_api/v11/role","development/traffic_ops_api/v11/server","development/traffic_ops_api/v11/static_dns","development/traffic_ops_api/v11/status","development/traffic_ops_api/v11/system","development/traffic_ops_api/v11/to_extension","development/traffic_ops_api/v11/type","development/traffic_ops_api/v11/user","development/traffic_ops_api/v12/api_capability","development/traffic_ops_api/v12/asn","development/traffic_ops_api/v12/cache","development/traffic_ops_api/v12/cache_ stats","development/traffic_ops_api/v12/cachegroup","development/traffic_ops_api/v12/cachegroup_parameter","development/traffic_ops_api/v12/capability","development/traffic_ops_api/v12/cdn","development/traffic_ops_api/v12/changelog","development/traffic_ops_api/v12/configfiles_ats","development/traffic_ops_api/v12/deliveryservice","development/traffic_ops_api/v12/deliveryservice_regex","development/traffic_ops_api/v12/deliveryservice_stats","development/traffic_ops_api/v12/division","development/traffic_ops_api/v12/federation","development/traffic_ops_api/v12/federation_deliveryservice","development/traffic_ops_api/v12/federation_federationresolver","development/traffic_ops_api/v12/federation_resolver","development/traffic_ops_api/v12/federation_user","development/traffic_ops_api/v12/hwinfo","development/traffic_ops_api/v12/influxdb","development/traffic_ops_api/v12/iso","development/traffic_ops_api/v12/job","development/traffic_ops_api/v12/parameter","development/traffic_ops_api/v 12/phys_location","development/traffic_ops_api/v12/profile","development/traffic_ops_api/v12/profile_parameter","development/traffic_ops_api/v12/region","development/traffic_ops_api/v12/role","development/traffic_ops_api/v12/server","development/traffic_ops_api/v12/static_dns","development/traffic_ops_api/v12/status","development/traffic_ops_api/v12/steering_target","development/traffic_ops_api/v12/system","development/traffic_ops_api/v12/tenant","development/traffic_ops_api/v12/to_extension","development/traffic_ops_api/v12/topology","development/traffic_ops_api/v12/type","development/traffic_ops_api/v12/user","development/traffic_portal","development/traffic_router","development/traffic_router/traffic_router_api","development/traffic_server","development/traffic_stats","faq/administration","faq/development","faq/general","faq/index","glossary","index","overview/index","overview/introduction","overview/traffic_monitor","overview/traffic_ops","overview/traffic_portal","overview/traf
[incubator-trafficcontrol] branch master updated: fixed the config files table
This is an automated email from the ASF dual-hosted git repository. mitchell852 pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-trafficcontrol.git The following commit(s) were added to refs/heads/master by this push: new 9acaac3 fixed the config files table 9acaac3 is described below commit 9acaac39d09ec7667e2fac5446aa664ea421a929 Author: Dewayne RichardsonAuthorDate: Wed Apr 18 15:21:50 2018 -0600 fixed the config files table --- .../development/traffic_ops_api/v12/configfiles_ats.rst | 13 +++-- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/docs/source/development/traffic_ops_api/v12/configfiles_ats.rst b/docs/source/development/traffic_ops_api/v12/configfiles_ats.rst index 3bbaa4e..f2b051a 100644 --- a/docs/source/development/traffic_ops_api/v12/configfiles_ats.rst +++ b/docs/source/development/traffic_ops_api/v12/configfiles_ats.rst @@ -17,7 +17,7 @@ .. _to-api-v12-configfiles_ats: Config Files and Config File Metadata -=== += .. _to-api-v12-configfiles_ats-route: @@ -25,8 +25,6 @@ Config Files and Config File Metadata ++ **GET /api/1.2/servers/:hostname/configfiles/ats** -**GET /api/1.2/servers/:host_id/configfiles/ats** - Authentication Required: Yes @@ -36,8 +34,8 @@ Config Files and Config File Metadata **Response Properties** - +==+ - |Info Section | + +---++-+ + | || Info Section | +---++-+ |Parameter | Type | Description | +===++=+ @@ -60,11 +58,7 @@ Config Files and Config File Metadata | ``cdnName`` | string | The name of the cache's assigned CDN. | +---++-+ | ``serverTcpPort`` | int | The configured port of the server's used by ATS.| - +==+ - |configFiles Section | +---++-+ - |Parameter | Type | Description | - +===++=+ | ``fnameOnDisk`` | string | The filename of the configuration file as stored on the cache. | +---++-+ | ``location`` | string | The directory location of the configuration file as stored on the cache.| @@ -73,7 +67,6 @@ Config Files and Config File Metadata +---++-+ | ``scope`` | string | The scope of the configuration file. | +---++-+ - **Response Example** :: -- To stop receiving notification emails like this one, please contact mitchell...@apache.org.
[incubator-trafficcontrol] 04/05: removed the dockgen.sh
This is an automated email from the ASF dual-hosted git repository. mitchell852 pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-trafficcontrol.git commit a5c7a4097a30871c40c18f50a7915fa983688190 Author: Dewayne RichardsonAuthorDate: Tue Apr 17 13:58:48 2018 -0600 removed the dockgen.sh --- traffic_ops/traffic_ops_golang/swaggerdocs/v13/dockgen.sh | 5 - 1 file changed, 5 deletions(-) diff --git a/traffic_ops/traffic_ops_golang/swaggerdocs/v13/dockgen.sh b/traffic_ops/traffic_ops_golang/swaggerdocs/v13/dockgen.sh deleted file mode 100755 index c2bed7f..000 --- a/traffic_ops/traffic_ops_golang/swaggerdocs/v13/dockgen.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env bash - -rm ./swagger.json -docker build -t tc-swaggerdocs -f Dockerfile-swagger-gen . -docker run --rm -it -v `(pwd)`:/output tc-swaggerdocs -- To stop receiving notification emails like this one, please contact mitchell...@apache.org.
[incubator-trafficcontrol] 03/05: updated the README
This is an automated email from the ASF dual-hosted git repository. mitchell852 pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-trafficcontrol.git commit bff608578d14b07aa70da43545cfba488c46ef5b Author: Dewayne RichardsonAuthorDate: Tue Apr 17 12:13:55 2018 -0600 updated the README --- traffic_ops/traffic_ops_golang/swaggerdocs/v13/README.md | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/traffic_ops/traffic_ops_golang/swaggerdocs/v13/README.md b/traffic_ops/traffic_ops_golang/swaggerdocs/v13/README.md index f92bbbd..392e4e2 100644 --- a/traffic_ops/traffic_ops_golang/swaggerdocs/v13/README.md +++ b/traffic_ops/traffic_ops_golang/swaggerdocs/v13/README.md @@ -29,9 +29,9 @@ This directory contains the Go structs that glue together the Swagger 2.0 metada * Install Docker Compose for your platform: [https://docs.docker.com/compose/install](https://docs.docker.com/compose/install) -### Running +### Running the web services -The docker-compose.yml will start 2 services a custom http service for hosting the `swaggerspec/swagger.json` and the Swagger UI. +The `docker-compose.yml` will start 2 services a custom http service for hosting the `swaggerspec/swagger.json` and the Swagger UI. To start the Swagger UI services just run: @@ -43,8 +43,4 @@ Once started navigate your browser to [http://localhost:8080](http://localhost:8 The **gen_swaggerspec.sh** script will scan all the Go files in the swaggerdocs directory and extract out all of the swagger meta tags that are embedded as comments. The output of the **gen_swaggerspec.sh** script will be the **swaggerspec/swagger.json** spec file. -While the Docker services are running, just re-run **gen_swaggerspec.sh** and hit refresh on the page to see the Swagger doc updates in real time. - -### Verifying your Documentation - -Once the **swagger.json** spec file has been generated it needs to to be served over http so that you can validate it using the Swagger Editor. +While the Docker services are running, just re-run **gen_swaggerspec.sh** and hit refresh on the page to see the Swagger doc updates in real time. \ No newline at end of file -- To stop receiving notification emails like this one, please contact mitchell...@apache.org.
[incubator-trafficcontrol] 01/05: Traffic Ops golang API servers test cleanup
This is an automated email from the ASF dual-hosted git repository. mitchell852 pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-trafficcontrol.git commit d7a81fb583ace3ed5c995440b1c995c9fadcc8ec Author: Jesse RivasAuthorDate: Mon Apr 16 09:37:45 2018 -0600 Traffic Ops golang API servers test cleanup --- .../swaggerdocs/v13/cors-http-server.py| 33 .../swaggerdocs/v13/docker-compose.yml | 15 .../swaggerdocs/v13/docker/Dockerfile | 44 ++ .../traffic_ops_golang/swaggerdocs/v13/dockgen.sh | 5 +++ .../traffic_ops_golang/swaggerdocs/v13/gen_docs.sh | 4 +- .../swaggerdocs/v13/swagger-server/Dockerfile | 29 ++ .../v13/swagger-server/swagger-server.go | 24 7 files changed, 119 insertions(+), 35 deletions(-) diff --git a/traffic_ops/traffic_ops_golang/swaggerdocs/v13/cors-http-server.py b/traffic_ops/traffic_ops_golang/swaggerdocs/v13/cors-http-server.py deleted file mode 100755 index 3c1687f..000 --- a/traffic_ops/traffic_ops_golang/swaggerdocs/v13/cors-http-server.py +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/env python - - - # Licensed to the Apache Software Foundation (ASF) under one - # or more contributor license agreements. See the NOTICE file - # distributed with this work for additional information - # regarding copyright ownership. The ASF licenses this file - # to you under the Apache License, Version 2.0 (the - # "License"); you may not use this file except in compliance - # with the License. You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, - # software distributed under the License is distributed on an - # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - # KIND, either express or implied. See the License for the - # specific language governing permissions and limitations - # under the License. - -from SimpleHTTPServer import SimpleHTTPRequestHandler -import BaseHTTPServer - -# -# Simple HTTP server that serves up port 8000 with the CORS header enabled -# -class CORSRequestHandler (SimpleHTTPRequestHandler): -def end_headers (self): -self.send_header('Access-Control-Allow-Origin', '*') -SimpleHTTPRequestHandler.end_headers(self) - -if __name__ == '__main__': -BaseHTTPServer.test(CORSRequestHandler, BaseHTTPServer.HTTPServer) diff --git a/traffic_ops/traffic_ops_golang/swaggerdocs/v13/docker-compose.yml b/traffic_ops/traffic_ops_golang/swaggerdocs/v13/docker-compose.yml new file mode 100644 index 000..ad92633 --- /dev/null +++ b/traffic_ops/traffic_ops_golang/swaggerdocs/v13/docker-compose.yml @@ -0,0 +1,15 @@ +version: '3.6' + +services: + swagger-generator: + build: + context: . + dockerfile: ./docker/Dockerfile + ports: + - 8000:8000 + volumes: + - output:/output + +volumes: +output: + diff --git a/traffic_ops/traffic_ops_golang/swaggerdocs/v13/docker/Dockerfile b/traffic_ops/traffic_ops_golang/swaggerdocs/v13/docker/Dockerfile new file mode 100644 index 000..e89ae50 --- /dev/null +++ b/traffic_ops/traffic_ops_golang/swaggerdocs/v13/docker/Dockerfile @@ -0,0 +1,44 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at + +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +FROM golang:1.10.1 AS swagger-gen + +RUN mkdir /go/src/v13 +WORKDIR /go/src/v13 +ADD . . + +RUN mkdir /output + +RUN go get -d -v ./... +RUN go install -v ./... +RUN go get -u github.com/go-swagger/go-swagger/cmd/swagger + +CMD ["./gen_docs.sh"] + +FROM golang:1.10.1 AS swagger-server + +#RUN mkdir /usr/src/swagger-server + +ADD ./swagger-server /usr/src/swagger-server +WORKDIR /usr/src/swagger-server + + +COPY --from=swagger-gen /output /output + +RUN go build +CMD ["./swagger-server"] diff --git a/traffic_ops/traffic_ops_golang/swaggerdocs/v13/dockgen.sh b/traffic_ops/traffic_ops_golang/swaggerdocs/v13/dockgen.sh new file mode 100755 index 000..c2bed7f --- /dev/null +++ b/traffic_ops/traffic_ops_golang/swaggerdocs/v13/dockgen.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +rm ./swagger.json +docker build -t tc-swaggerdocs -f
[incubator-trafficcontrol] 05/05: updated to support swagger to rst conversion using Docker
This is an automated email from the ASF dual-hosted git repository. mitchell852 pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-trafficcontrol.git commit 1245305051680727de02a30326d936092c84b428 Author: Dewayne RichardsonAuthorDate: Wed Apr 18 09:00:38 2018 -0600 updated to support swagger to rst conversion using Docker updated to point out the debug flag updated docs for docker-compose info updated the base url moved Dockerfile to top dir added swagger2rst.sh updated gitignore added files for swaggerspec to rst --- .../traffic_ops_golang/swaggerdocs/v13/.gitignore | 3 +- .../swaggerdocs/v13/{docker => }/Dockerfile| 1 + .../traffic_ops_golang/swaggerdocs/v13/README.md | 42 ++ .../swaggerdocs/v13/docker-compose.yml | 20 ++- .../traffic_ops_golang/swaggerdocs/v13/docs.go | 2 +- .../swaggerdocs/v13/gen_swaggerspec.sh | 3 +- .../v13/{docker => swaggerspec}/Dockerfile | 18 +- .../Dockerfile => swaggerspec/docker-compose.yml} | 20 ++- .../swaggerdocs/v13/swaggerspec/requirements.txt | 1 + .../Dockerfile => swaggerspec/swagger2rst.sh} | 17 - 10 files changed, 90 insertions(+), 37 deletions(-) diff --git a/traffic_ops/traffic_ops_golang/swaggerdocs/v13/.gitignore b/traffic_ops/traffic_ops_golang/swaggerdocs/v13/.gitignore index 168aa94..3ccf628 100644 --- a/traffic_ops/traffic_ops_golang/swaggerdocs/v13/.gitignore +++ b/traffic_ops/traffic_ops_golang/swaggerdocs/v13/.gitignore @@ -1 +1,2 @@ -swagger.json +swaggerspec/swagger.json +swaggerspec/v13_api_docs.rst diff --git a/traffic_ops/traffic_ops_golang/swaggerdocs/v13/docker/Dockerfile b/traffic_ops/traffic_ops_golang/swaggerdocs/v13/Dockerfile similarity index 99% copy from traffic_ops/traffic_ops_golang/swaggerdocs/v13/docker/Dockerfile copy to traffic_ops/traffic_ops_golang/swaggerdocs/v13/Dockerfile index fb3095f..4f6fd1f 100644 --- a/traffic_ops/traffic_ops_golang/swaggerdocs/v13/docker/Dockerfile +++ b/traffic_ops/traffic_ops_golang/swaggerdocs/v13/Dockerfile @@ -15,6 +15,7 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. + FROM golang:1.10.1 AS go-swagger # Swagger Spec Server diff --git a/traffic_ops/traffic_ops_golang/swaggerdocs/v13/README.md b/traffic_ops/traffic_ops_golang/swaggerdocs/v13/README.md index 392e4e2..2153783 100644 --- a/traffic_ops/traffic_ops_golang/swaggerdocs/v13/README.md +++ b/traffic_ops/traffic_ops_golang/swaggerdocs/v13/README.md @@ -17,9 +17,9 @@ under the License. --> - `./swaggerdocs` -This directory contains the Go structs that glue together the Swagger 2.0 metadata that will generate the Traffic Ops API documentation using [go-swagger](https://github.com/go-swagger/go-swagger) meta tags. The Traffic Ops API documentation is maintained by modifying the Go files in this directory that point to the **incubator-trafficcontrol/lib/go-tc/*.go** structs that render the Traffic Ops Go Proxy API's. + `./swaggerdocs` overview +This directory contains the Go structs that glue together the Swagger 2.0 metadata that will generate the Traffic Ops API documentation using the [go-swagger](https://github.com/go-swagger/go-swagger) meta tags. The Traffic Ops API documentation is maintained by modifying the Go files in this directory and the Go structs that they reference from here **incubator-trafficcontrol/lib/go-tc/*.go**. These combination of these two areas of .go files will produce Swagger documentation for the [...] ### Setup @@ -29,18 +29,46 @@ This directory contains the Go structs that glue together the Swagger 2.0 metada * Install Docker Compose for your platform: [https://docs.docker.com/compose/install](https://docs.docker.com/compose/install) +### Generating your Swagger Spec File + +The **gen_swaggerspec.sh** script will scan all the Go files in the swaggerdocs directory and extract out all of the swagger meta tags that are embedded as comments. The output of the **gen_swaggerspec.sh** script will be the **swaggerspec/swagger.json** spec file. + +While the Docker services are running, just re-run **gen_swaggerspec.sh** and hit refresh on the page to see the Swagger doc updates in real time. + ### Running the web services -The `docker-compose.yml` will start 2 services a custom http service for hosting the `swaggerspec/swagger.json` and the Swagger UI. +Once your `swaggerspec/swagger.json` file has been generated you will want to render it to verify it's contents with the HTTP web rendering services. + +The `docker-compose.yml` will start two rendering services, a custom http service for hosting the `swaggerspec/swagger.json` and the Swagger UI. -To start the Swagger UI services just run: +To start the Swagger
[incubator-trafficcontrol] branch master updated (d13f91e -> 1245305)
This is an automated email from the ASF dual-hosted git repository. mitchell852 pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/incubator-trafficcontrol.git. from d13f91e Add some authentication API integration tests new d7a81fb Traffic Ops golang API servers test cleanup new ac22015 converted the swaggerdocs generation into a Docker infrastructure new bff6085 updated the README new a5c7a40 removed the dockgen.sh new 1245305 updated to support swagger to rst conversion using Docker The 5 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .../traffic_ops_golang/swaggerdocs/v13/.gitignore | 3 +- .../traffic_ops_golang/swaggerdocs/v13/Dockerfile | 25 - .../traffic_ops_golang/swaggerdocs/v13/README.md | 62 ++ .../swaggerdocs/v13/cors-http-server.py| 33 .../swaggerdocs/v13/docker-compose.yml | 34 .../traffic_ops_golang/swaggerdocs/v13/docs.go | 2 +- .../v13/{gen_docs.sh => gen_swaggerspec.sh}| 10 ++-- .../v13/swaggerspec-server/swaggerspec-server.go | 26 + .../swaggerdocs/v13/swaggerspec/Dockerfile | 24 + .../swaggerdocs/v13/swaggerspec/docker-compose.yml | 30 ++- .../swaggerdocs/v13/swaggerspec/requirements.txt | 1 + .../swaggerdocs/v13/swaggerspec/swagger2rst.sh | 23 12 files changed, 155 insertions(+), 118 deletions(-) copy traffic_portal/docker/reset.sh => traffic_ops/traffic_ops_golang/swaggerdocs/v13/Dockerfile (70%) mode change 100755 => 100644 delete mode 100755 traffic_ops/traffic_ops_golang/swaggerdocs/v13/cors-http-server.py copy traffic_portal/docker/reset.sh => traffic_ops/traffic_ops_golang/swaggerdocs/v13/docker-compose.yml (63%) mode change 100755 => 100644 rename traffic_ops/traffic_ops_golang/swaggerdocs/v13/{gen_docs.sh => gen_swaggerspec.sh} (74%) create mode 100644 traffic_ops/traffic_ops_golang/swaggerdocs/v13/swaggerspec-server/swaggerspec-server.go copy traffic_portal/docker/reset.sh => traffic_ops/traffic_ops_golang/swaggerdocs/v13/swaggerspec/Dockerfile (75%) mode change 100755 => 100644 copy traffic_portal/build/etc/logrotate.d/traffic_portal-access => traffic_ops/traffic_ops_golang/swaggerdocs/v13/swaggerspec/docker-compose.yml (77%) create mode 100644 traffic_ops/traffic_ops_golang/swaggerdocs/v13/swaggerspec/requirements.txt copy traffic_portal/docker/reset.sh => traffic_ops/traffic_ops_golang/swaggerdocs/v13/swaggerspec/swagger2rst.sh (77%) -- To stop receiving notification emails like this one, please contact mitchell...@apache.org.
[incubator-trafficcontrol] 02/05: converted the swaggerdocs generation into a Docker infrastructure
This is an automated email from the ASF dual-hosted git repository. mitchell852 pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-trafficcontrol.git commit ac22015279564a6c231fa531fb254e12fc47b251 Author: Dewayne RichardsonAuthorDate: Tue Apr 17 10:29:30 2018 -0600 converted the swaggerdocs generation into a Docker infrastructure --- .../traffic_ops_golang/swaggerdocs/v13/README.md | 34 ++ .../swaggerdocs/v13/docker-compose.yml | 15 +++--- .../swaggerdocs/v13/docker/Dockerfile | 28 -- .../v13/{gen_docs.sh => gen_swaggerspec.sh}| 7 +++-- .../swaggerdocs/v13/swagger-server/Dockerfile | 29 -- .../swaggerspec-server.go} | 8 +++-- 6 files changed, 42 insertions(+), 79 deletions(-) diff --git a/traffic_ops/traffic_ops_golang/swaggerdocs/v13/README.md b/traffic_ops/traffic_ops_golang/swaggerdocs/v13/README.md index 19fff3d..f92bbbd 100644 --- a/traffic_ops/traffic_ops_golang/swaggerdocs/v13/README.md +++ b/traffic_ops/traffic_ops_golang/swaggerdocs/v13/README.md @@ -23,32 +23,28 @@ This directory contains the Go structs that glue together the Swagger 2.0 metada ### Setup -See the install documentation for [https://github.com/go-swagger/go-swagger](go-swagger) +* Install Docker for your platform: +[https://docs.docker.com/install](https://docs.docker.com/install) +* Install Docker Compose for your platform: +[https://docs.docker.com/compose/install](https://docs.docker.com/compose/install) -### Generate your Documentation +### Running -The **gen_docs.sh** script will scan all the Go files in the swaggerdocs directory and extract out all of the swagger meta tags that are embedded as comments. The output of the **gen_docs.sh** script will be the **swagger.json** spec file. +The docker-compose.yml will start 2 services a custom http service for hosting the `swaggerspec/swagger.json` and the Swagger UI. -### Verifying your Documentation +To start the Swagger UI services just run: -Once the **swagger.json** spec file has been generated it needs to to be served over http so that you can validate it using the Swagger Editor. +```$ docker-compose up``` -See the following steps: +Once started navigate your browser to [http://localhost:8080](http://localhost:8080) -*Execute the **cors-http-server.py** (this will start a server on **http://localhost:8000** - so that you can point to it using the [https://editor.swagger.io](Swagger Editor). - - `$ ./cors-http-server.py` +### Generating your Swagger Spec File -*Navigate to [https://editor.swagger.io](Swagger Editor) - -*Use File->Import URL then plugin **http://localhost:8000** - * At this point the Swagger Editor will convert the **swagger.json** to yaml format and show the resulting documentation rendered as html. +The **gen_swaggerspec.sh** script will scan all the Go files in the swaggerdocs directory and extract out all of the swagger meta tags that are embedded as comments. The output of the **gen_swaggerspec.sh** script will be the **swaggerspec/swagger.json** spec file. - OR - -* Install the [https://swagger.io/swagger-ui/](Swagger UI) yourself and run locally. - - +While the Docker services are running, just re-run **gen_swaggerspec.sh** and hit refresh on the page to see the Swagger doc updates in real time. +### Verifying your Documentation + +Once the **swagger.json** spec file has been generated it needs to to be served over http so that you can validate it using the Swagger Editor. diff --git a/traffic_ops/traffic_ops_golang/swaggerdocs/v13/docker-compose.yml b/traffic_ops/traffic_ops_golang/swaggerdocs/v13/docker-compose.yml index ad92633..696438c 100644 --- a/traffic_ops/traffic_ops_golang/swaggerdocs/v13/docker-compose.yml +++ b/traffic_ops/traffic_ops_golang/swaggerdocs/v13/docker-compose.yml @@ -1,15 +1,22 @@ version: '3.6' - + services: - swagger-generator: + swagger-spec-server: build: context: . dockerfile: ./docker/Dockerfile ports: - 8000:8000 volumes: - - output:/output + - ./swaggerspec:/swaggerspec + + swagger-ui: + image: swaggerapi/swagger-ui + ports: + - 8080:8080 + environment: + - API_URL=http://localhost:8000/swaggerspec/swagger.json volumes: -output: +swaggerspec: diff --git a/traffic_ops/traffic_ops_golang/swaggerdocs/v13/docker/Dockerfile b/traffic_ops/traffic_ops_golang/swaggerdocs/v13/docker/Dockerfile index e89ae50..fb3095f 100644 --- a/traffic_ops/traffic_ops_golang/swaggerdocs/v13/docker/Dockerfile +++ b/traffic_ops/traffic_ops_golang/swaggerdocs/v13/docker/Dockerfile @@ -15,30 +15,14 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License.
[incubator-trafficcontrol] branch master updated: Add some authentication API integration tests
This is an automated email from the ASF dual-hosted git repository. dewrich pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-trafficcontrol.git The following commit(s) were added to refs/heads/master by this push: new d13f91e Add some authentication API integration tests d13f91e is described below commit d13f91e9099a34f818cf4d14ec503a0efab35d42 Author: Rawlin PetersAuthorDate: Tue Apr 17 17:19:45 2018 -0600 Add some authentication API integration tests Added tests for the /ping endpoint to make sure it does not require authentication. Added tests for some other endpoints as well to show examples of how to test authentication. --- traffic_ops/client/v13/session.go | 11 +++ traffic_ops/testing/api/utils/utils.go | 5 +++ traffic_ops/testing/api/v13/about_test.go | 5 +++ traffic_ops/testing/api/v13/cachegroups_test.go | 41 + traffic_ops/testing/api/v13/ping_test.go| 10 +- traffic_ops/testing/api/v13/session.go | 4 ++- traffic_ops/traffic_ops_golang/routes.go| 2 +- 7 files changed, 75 insertions(+), 3 deletions(-) diff --git a/traffic_ops/client/v13/session.go b/traffic_ops/client/v13/session.go index 79b0368..aea65d6 100644 --- a/traffic_ops/client/v13/session.go +++ b/traffic_ops/client/v13/session.go @@ -233,6 +233,17 @@ func LogoutWithAgent(toURL string, toUser string, toPasswd string, insecure bool return to, remoteAddr, nil } +// NewNoAuthSession returns a new Session without logging in +// this can be used for querying unauthenticated endpoints without requiring a login +func NewNoAuthSession(toURL string, insecure bool, userAgent string, useCache bool, requestTimeout time.Duration) *Session { + return NewSession("", "", toURL, userAgent, { + Timeout: requestTimeout, + Transport: { + TLSClientConfig: {InsecureSkipVerify: insecure}, + }, + }, useCache) +} + // ErrUnlessOk returns nil and an error if the given Response's status code is anything but 200 OK. This includes reading the Response.Body and Closing it. Otherwise, the given response and error are returned unchanged. func (to *Session) ErrUnlessOK(resp *http.Response, remoteAddr net.Addr, err error, path string) (*http.Response, net.Addr, error) { if err != nil { diff --git a/traffic_ops/testing/api/utils/utils.go b/traffic_ops/testing/api/utils/utils.go index f99e850..8de3279 100644 --- a/traffic_ops/testing/api/utils/utils.go +++ b/traffic_ops/testing/api/utils/utils.go @@ -21,6 +21,11 @@ import ( "testing" ) +type ErrorAndMessage struct { + Error error + Message string +} + func FindNeedle(needle string, haystack []string) bool { found := false for _, s := range haystack { diff --git a/traffic_ops/testing/api/v13/about_test.go b/traffic_ops/testing/api/v13/about_test.go index 8e64c0c..b36f9f9 100644 --- a/traffic_ops/testing/api/v13/about_test.go +++ b/traffic_ops/testing/api/v13/about_test.go @@ -25,4 +25,9 @@ func TestAbout(t *testing.T) { t.Errorf("error from GetAbout(): %v", err) } t.Logf("about: %v", m) + + m, _, err = NoAuthTOSession.GetAbout() + if err == nil { + t.Error("expected error from GetAbout() when unauthenticated") + } } diff --git a/traffic_ops/testing/api/v13/cachegroups_test.go b/traffic_ops/testing/api/v13/cachegroups_test.go index e43b24a..1d64361 100644 --- a/traffic_ops/testing/api/v13/cachegroups_test.go +++ b/traffic_ops/testing/api/v13/cachegroups_test.go @@ -16,11 +16,13 @@ package v13 */ import ( + "fmt" "testing" "github.com/apache/incubator-trafficcontrol/lib/go-log" tc "github.com/apache/incubator-trafficcontrol/lib/go-tc" "github.com/apache/incubator-trafficcontrol/lib/go-tc/v13" + "github.com/apache/incubator-trafficcontrol/traffic_ops/testing/api/utils" ) func TestCacheGroups(t *testing.T) { @@ -30,6 +32,7 @@ func TestCacheGroups(t *testing.T) { UpdateTestCacheGroups(t) DeleteTestCacheGroups(t) DeleteTestTypes(t) + TestCacheGroupsAuthentication(t) } func CreateTestCacheGroups(t *testing.T) { @@ -181,3 +184,41 @@ func DeleteTestCacheGroups(t *testing.T) { log.Debugln("DeleteTestCacheGroups() PASSED: ") } } + +func TestCacheGroupsAuthentication(t *testing.T) { + failed := false + errFormat := "expected error from %s when unauthenticated" + + cg := testData.CacheGroups[0] + + errors := make([]utils.ErrorAndMessage, 0) + + _, _, err := NoAuthTOSession.CreateCacheGroup(cg) + errors = append(errors, utils.ErrorAndMessage{err, fmt.Sprintf(errFormat, "CreateCacheGroup")}) + + _, _, err = NoAuthTOSession.GetCacheGroups() + errors = append(errors,
[incubator-trafficcontrol] branch master updated: adds chart link to each ds table
This is an automated email from the ASF dual-hosted git repository. dewrich pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-trafficcontrol.git The following commit(s) were added to refs/heads/master by this push: new 5bcd8a5 adds chart link to each ds table 5bcd8a5 is described below commit 5bcd8a54a75b6a1ee101b1ca3af8197f74d2b6e4 Author: Jeremy MitchellAuthorDate: Tue Apr 17 08:59:19 2018 -0600 adds chart link to each ds table --- .../form/deliveryService/FormDeliveryServiceController.js | 13 - .../TableCDNDeliveryServicesController.js | 11 +-- .../cdnDeliveryServices/table.cdnDeliveryServices.tpl.html | 4 .../deliveryServices/TableDeliveryServicesController.js| 11 +-- .../table/deliveryServices/table.deliveryServices.tpl.html | 4 .../TableProfileDeliveryServicesController.js | 11 +-- .../table.profileDeliveryServices.tpl.html | 5 - .../TableServerDeliveryServicesController.js | 12 +--- .../table.serverDeliveryServices.tpl.html | 7 +-- .../TableTenantDeliveryServicesController.js | 11 +-- .../table.tenantDeliveryServices.tpl.html | 4 .../TableTypeDeliveryServicesController.js | 11 +-- .../table.typeDeliveryServices.tpl.html| 4 .../TableUserDeliveryServicesController.js | 12 +--- .../table.userDeliveryServices.tpl.html| 7 +-- .../app/src/common/service/utils/DeliveryServiceUtils.js | 14 -- traffic_portal/app/src/common/service/utils/ServerUtils.js | 4 +++- 17 files changed, 112 insertions(+), 33 deletions(-) diff --git a/traffic_portal/app/src/common/modules/form/deliveryService/FormDeliveryServiceController.js b/traffic_portal/app/src/common/modules/form/deliveryService/FormDeliveryServiceController.js index 834949b..377c934 100644 --- a/traffic_portal/app/src/common/modules/form/deliveryService/FormDeliveryServiceController.js +++ b/traffic_portal/app/src/common/modules/form/deliveryService/FormDeliveryServiceController.js @@ -17,7 +17,7 @@ * under the License. */ -var FormDeliveryServiceController = function(deliveryService, dsCurrent, type, types, $scope, $location, $uibModal, $window, formUtils, locationUtils, tenantUtils, cdnService, profileService, tenantService, propertiesModel) { +var FormDeliveryServiceController = function(deliveryService, dsCurrent, type, types, $scope, $location, $uibModal, $window, formUtils, locationUtils, tenantUtils, deliveryServiceUtils, cdnService, profileService, tenantService, propertiesModel) { var getCDNs = function() { cdnService.getCDNs() @@ -49,6 +49,8 @@ var FormDeliveryServiceController = function(deliveryService, dsCurrent, type, t $scope.showChartsButton = propertiesModel.properties.deliveryServices.charts.show; +$scope.openCharts = deliveryServiceUtils.openCharts; + $scope.dsRequestsEnabled = propertiesModel.properties.dsRequests.enabled; $scope.edgeFQDNs = function(ds) { @@ -200,13 +202,6 @@ var FormDeliveryServiceController = function(deliveryService, dsCurrent, type, t return '-'.repeat(tenant.level) + ' ' + tenant.name; }; -$scope.openCharts = function(ds) { -$window.open( -propertiesModel.properties.deliveryServices.charts.baseUrl + ds.xmlId, -'_blank' -); -}; - $scope.clone = function(ds) { var params = { title: 'Clone Delivery Service: ' + ds.xmlId, @@ -286,5 +281,5 @@ var FormDeliveryServiceController = function(deliveryService, dsCurrent, type, t }; -FormDeliveryServiceController.$inject = ['deliveryService', 'dsCurrent', 'type', 'types', '$scope', '$location', '$uibModal', '$window', 'formUtils', 'locationUtils', 'tenantUtils', 'cdnService', 'profileService', 'tenantService', 'propertiesModel']; +FormDeliveryServiceController.$inject = ['deliveryService', 'dsCurrent', 'type', 'types', '$scope', '$location', '$uibModal', '$window', 'formUtils', 'locationUtils', 'tenantUtils', 'deliveryServiceUtils', 'cdnService', 'profileService', 'tenantService', 'propertiesModel']; module.exports = FormDeliveryServiceController; diff --git a/traffic_portal/app/src/common/modules/table/cdnDeliveryServices/TableCDNDeliveryServicesController.js b/traffic_portal/app/src/common/modules/table/cdnDeliveryServices/TableCDNDeliveryServicesController.js index 74d477b..1e29df4 100644 --- a/traffic_portal/app/src/common/modules/table/cdnDeliveryServices/TableCDNDeliveryServicesController.js +++ b/traffic_portal/app/src/common/modules/table/cdnDeliveryServices/TableCDNDeliveryServicesController.js @@ -17,7 +17,7 @@ * under the License. */ -var TableCDNDeliveryServicesController = function(cdn,