diff --git a/Dockerfile b/Dockerfile index cf580f3..96dec45 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,10 +11,12 @@ COPY ./package.json ./package-lock.json ./ RUN npm config set fetch-retries 5 \ && npm config set fetch-retry-mintimeout 20000 \ && npm config set fetch-retry-maxtimeout 120000 \ - && npm install --production --silent --no-audit --prefer-offline + && npm install --silent --no-audit --prefer-offline COPY . . + RUN npm run build + RUN npm prune --production ############################################################# @@ -29,6 +31,7 @@ COPY --from=builder /app/dist ./dist COPY --from=builder /app/img ./dist/img COPY --from=builder /app/index.html ./ COPY --from=builder /app/index.js ./ +COPY --from=builder /app/redoc-swagger-integration.html ./ COPY --from=builder /app/node_modules ./node_modules COPY --from=builder /app/package-lock.json ./package-lock.json COPY --from=builder /app/package.json ./package.json diff --git a/index.html b/index.html index 5006002..7d72d3d 100644 --- a/index.html +++ b/index.html @@ -227,6 +227,7 @@ Show all Clouds Hide/Show MCI Clear Map + API Dashboard Toggle Map/API @@ -234,6 +235,7 @@
+
diff --git a/package.json b/package.json index c618134..7cf1aeb 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ }, "scripts": { "start": "parcel -p 1324 --host 0.0.0.0 index.html", - "build": "echo 'Removing temporal cache files' && rm -rf dist/* .parcel-cache/* && mkdir -p dist/img/ && cp -r img/ dist/ && parcel build --public-url . index.html" + "build": "echo 'Removing temporal cache files' && rm -rf dist/* .parcel-cache/* && mkdir -p dist/img/ && cp -r img/ dist/ && cp redoc-swagger-integration.html dist/ && parcel build --public-url . index.html" }, "description": "MapUI Client for CB-Tumblebug (display multi-cloud infra service)", "repository": { diff --git a/redoc-swagger-integration.html b/redoc-swagger-integration.html new file mode 100644 index 0000000..619e0af --- /dev/null +++ b/redoc-swagger-integration.html @@ -0,0 +1,220 @@ + + + + + CB-Tumblebug API Dashboard + + + + + + +
CB-Tumblebug API Dashboard
+ +
+
+
+
Try out API with Swagger UI
+
+
+ +
+ + + + + + + + + + + +