├── .github └── workflows │ └── main.yml ├── .gitignore ├── CHANGELOG.md ├── Dockerfile ├── LICENSE ├── Makefile ├── README.md ├── check-changelog.sh ├── docker-compose.yml ├── hack ├── Dockerfile-dev ├── antidoted-config.yaml ├── dev-livelessons.json └── websshconfig.json ├── launch.sh ├── src ├── antidote-config.js ├── icons │ ├── android-icon-144x144.png │ ├── android-icon-192x192.png │ ├── android-icon-36x36.png │ ├── android-icon-48x48.png │ ├── android-icon-72x72.png │ ├── android-icon-96x96.png │ ├── apple-icon-114x114.png │ ├── apple-icon-120x120.png │ ├── apple-icon-144x144.png │ ├── apple-icon-152x152.png │ ├── apple-icon-180x180.png │ ├── apple-icon-57x57.png │ ├── apple-icon-60x60.png │ ├── apple-icon-72x72.png │ ├── apple-icon-76x76.png │ ├── apple-icon-precomposed.png │ ├── apple-icon.png │ ├── browserconfig.xml │ ├── favicon-16x16.png │ ├── favicon-32x32.png │ ├── favicon-96x96.png │ ├── favicon.ico │ ├── manifest.json │ ├── ms-icon-144x144.png │ ├── ms-icon-150x150.png │ ├── ms-icon-310x310.png │ └── ms-icon-70x70.png ├── images │ ├── 1.svg │ ├── 2.svg │ ├── 3.svg │ ├── 4.svg │ ├── 5.svg │ ├── 6.svg │ ├── 7.svg │ ├── 8.svg │ ├── 9.svg │ ├── Flask-8.2s-200px.svg │ ├── beginner-icon.svg │ ├── configure_deselected.png │ ├── configure_selected.png │ ├── error.png │ ├── expert-icon.svg │ ├── flask.gif │ ├── intermediate-icon.svg │ ├── intro_selected.png │ ├── jupyter.png │ ├── jupyter_edit.png │ ├── jupyter_output.png │ ├── jupyter_selected.png │ ├── navicons.xcf │ ├── nre-logo-long.png │ ├── nrelabs.png │ ├── nrelabs_long.png │ ├── nrelabs_new.png │ ├── tshoot_deselected.png │ ├── tshoot_selected.png │ ├── verify_deselected.png │ └── verify_selected.png ├── js │ ├── antidote.js │ └── no-module.js ├── package.json └── rollup.config.js └── templates ├── advisor ├── courseplan.html └── index.html ├── base.html ├── build-requirements.txt ├── catalog └── index.html ├── collections ├── index.html └── view.html ├── generate_webapp.py ├── index.html ├── labs └── index.html ├── partials ├── footer.html ├── head.html ├── header.html └── main-menu-items.html └── stats └── index.html /.github/workflows/main.yml: -------------------------------------------------------------------------------- 1 | name: CI 2 | on: 3 | push: 4 | branches: [ master ] 5 | pull_request: 6 | branches: [ master ] 7 | 8 | jobs: 9 | build: 10 | runs-on: ubuntu-latest 11 | 12 | steps: 13 | - uses: actions/checkout@v2 14 | 15 | - name: Check changelog 16 | run: ./check-changelog.sh 17 | if: ${{ success() }} 18 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .terraform/ 2 | .vagrant/ 3 | *.log 4 | *tfstate* 5 | *.qcow2* 6 | *account.json* 7 | *.retry 8 | hosts 9 | venv/ 10 | 11 | 12 | target/ 13 | 14 | # These are the main pages for antidote-web, and are generated at build time, 15 | # so we don't want these committed to the repo. See the templates/ directory instead. 16 | src/index.html 17 | src/advisor/ 18 | src/catalog/ 19 | src/labs/ 20 | src/stats/ 21 | src/collections/ 22 | 23 | # Web app node resources 24 | src/node_modules/ 25 | src/js/bundles/ 26 | src/package-lock.json -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # CHANGELOG 2 | 3 | ## In development 4 | 5 | - Enhancements to the developer workflow [#102](https://github.com/nre-learning/antidote-web/pull/102/) 6 | 7 | 8 | ## v0.7.0 - December 14, 2020 9 | 10 | 11 | ## v0.6.2 - May 03, 2020 12 | 13 | 14 | ## v0.6.1 - May 03, 2020 15 | 16 | 17 | ## v0.6.0 - April 18, 2020 18 | 19 | - Re-vamp antidote-web developer experience [#100](https://github.com/nre-learning/antidote-web/pull/100) 20 | 21 | ## v0.5.1 - February 17, 2020 22 | 23 | 24 | ## v0.5.0 - February 01, 2020 25 | 26 | - Remove Guacamole and other minor fixes [#90](https://github.com/nre-learning/antidote-web/pull/90) 27 | - Webapp Redesign [#85](https://github.com/nre-learning/antidote-web/pull/85) 28 | - Re-vamp developer experience with compose file and mock data [#81](https://github.com/nre-learning/antidote-web/pull/81) 29 | - Update ToU link [#86](https://github.com/nre-learning/antidote-web/pull/86) 30 | - Update link to collections docs [#96](https://github.com/nre-learning/antidote-web/pull/96) 31 | - Update ToU link yet again [#97](https://github.com/nre-learning/antidote-web/pull/97) 32 | 33 | ## v0.4.0 - August 07, 2019 34 | 35 | - Added option to pass number or 'this' object as the argument to runSnippetInTab() function in lesson guide [#45](https://github.com/nre-learning/antidote-web/pull/45) 36 | - Update client-side to handle lessondef endpoint rename [#61](https://github.com/nre-learning/antidote-web/pull/61) 37 | - Added collections feature [#62](https://github.com/nre-learning/antidote-web/pull/62) 38 | - Adjust Jupyter path based on syringe changes [#67](https://github.com/nre-learning/antidote-web/pull/67) 39 | - Updates to handle new presentations abstraction [#68](https://github.com/nre-learning/antidote-web/pull/68) 40 | - Add dialog explaining jupyter notebooks and link to docs [#77](https://github.com/nre-learning/antidote-web/pull/77) 41 | - Minor updates to collections verbiage and nav layout [#78](https://github.com/nre-learning/antidote-web/pull/78) 42 | 43 | ## v0.3.2 - April 19, 2019 44 | 45 | - Generate webapp files from template [#54](https://github.com/nre-learning/antidote-web/pull/54) 46 | - Update PTR banner to reflect repo changes [#57](https://github.com/nre-learning/antidote-web/pull/57) 47 | 48 | ## v0.3.1 - March 27, 2019 49 | 50 | - Introduce better-looking icons for navigation [#41](https://github.com/nre-learning/antidote-web/pull/41) 51 | 52 | ## v0.3.0 - February 11, 2019 53 | 54 | - Finally implement clipboard functionality; formally establish toolbar [31](https://github.com/nre-learning/antidote-web/pull/31) 55 | - Implement Advisor functionality [#30](https://github.com/nre-learning/antidote-web/pull/30) 56 | - Added ability to use jupyter notebook as lab guide [#33](https://github.com/nre-learning/antidote-web/pull/33) 57 | - Add verify functionality to front-end [#34](https://github.com/nre-learning/antidote-web/pull/34) 58 | - Change "next lab" button text to be more intuitive on the last lab [#37](https://github.com/nre-learning/antidote-web/pull/37) 59 | 60 | ## 0.2.0 - January 24, 2019 61 | 62 | - Simplified authentication by using consistent credentials, statically [#23](https://github.com/nre-learning/antidote-web/pull/23) 63 | - Render lab guide directly from Syringe API [#24](https://github.com/nre-learning/antidote-web/pull/24) 64 | - Add notice that mobile isn't yet supported [#25](https://github.com/nre-learning/antidote-web/pull/25) 65 | - Add more detail to the progress modal based on Syringe API changes [#27](https://github.com/nre-learning/antidote-web/pull/27) 66 | - Fixed a few navigational bugs and broken link to Github issues on the error modal [#28](https://github.com/nre-learning/antidote-web/pull/28) 67 | 68 | ## 0.1.4 - January 08, 2019 69 | 70 | - Minor fix to the iframe path based on recent syringe changes [#20](https://github.com/nre-learning/antidote-web/pull/20) 71 | - Adding lesson video modal; sorting tabs [#21](https://github.com/nre-learning/antidote-web/pull/21) 72 | 73 | ## 0.1.3 - November 15, 2018 74 | 75 | * Fix mouse issues in terminal pane [#17](https://github.com/nre-learning/antidote-web/pull/17) 76 | * Added randomization to courses buttons, improved client-side handling of lessondefs [#18](https://github.com/nre-learning/antidote-web/pull/18) 77 | * Moved mouse handler to previous loop that checks endpoint type (bugfix) [#19](https://github.com/nre-learning/antidote-web/pull/19) 78 | 79 | ## 0.1.2 - October 29, 2018 80 | 81 | ### Curriculum 82 | 83 | ### Other 84 | 85 | 86 | ## 0.1.1 - October 28, 2018 87 | 88 | * Provide a helpful footer with commit IDs when PTR is detected - [#16](https://github.com/nre-learning/antidote-web/pull/16) 89 | 90 | ## v0.1.0 91 | 92 | - Initial release, announced and made public at NXTWORK 2018 in Las Vegas 93 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | # This Dockerfile is meant to be used for production deployments of antidote-web. 2 | # It first performs the npm install/build step in a node container, 3 | # and then moves thes files into a minimalist nginx container image. 4 | # See the provided Makefile ("make hack") for development infrastructure. 5 | 6 | FROM node AS NPM_BUILD 7 | 8 | RUN mkdir /build 9 | COPY src/ /build 10 | 11 | # https://docs.npmjs.com/cli/install 12 | RUN cd /build && npm install && npm run build 13 | 14 | # ------------------------------------------ 15 | 16 | FROM nginx 17 | COPY --from=NPM_BUILD /build /usr/share/nginx/html 18 | COPY launch.sh / 19 | CMD ["/launch.sh"] 20 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2018 Juniper Networks Inc. 2 | 3 | Apache License 4 | Version 2.0, January 2004 5 | http://www.apache.org/licenses/ 6 | 7 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 8 | 9 | 1. Definitions. 10 | 11 | "License" shall mean the terms and conditions for use, reproduction, 12 | and distribution as defined by Sections 1 through 9 of this document. 13 | 14 | "Licensor" shall mean the copyright owner or entity authorized by 15 | the copyright owner that is granting the License. 16 | 17 | "Legal Entity" shall mean the union of the acting entity and all 18 | other entities that control, are controlled by, or are under common 19 | control with that entity. For the purposes of this definition, 20 | "control" means (i) the power, direct or indirect, to cause the 21 | direction or management of such entity, whether by contract or 22 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 23 | outstanding shares, or (iii) beneficial ownership of such entity. 24 | 25 | "You" (or "Your") shall mean an individual or Legal Entity 26 | exercising permissions granted by this License. 27 | 28 | "Source" form shall mean the preferred form for making modifications, 29 | including but not limited to software source code, documentation 30 | source, and configuration files. 31 | 32 | "Object" form shall mean any form resulting from mechanical 33 | transformation or translation of a Source form, including but 34 | not limited to compiled object code, generated documentation, 35 | and conversions to other media types. 36 | 37 | "Work" shall mean the work of authorship, whether in Source or 38 | Object form, made available under the License, as indicated by a 39 | copyright notice that is included in or attached to the work 40 | (an example is provided in the Appendix below). 41 | 42 | "Derivative Works" shall mean any work, whether in Source or Object 43 | form, that is based on (or derived from) the Work and for which the 44 | editorial revisions, annotations, elaborations, or other modifications 45 | represent, as a whole, an original work of authorship. For the purposes 46 | of this License, Derivative Works shall not include works that remain 47 | separable from, or merely link (or bind by name) to the interfaces of, 48 | the Work and Derivative Works thereof. 49 | 50 | "Contribution" shall mean any work of authorship, including 51 | the original version of the Work and any modifications or additions 52 | to that Work or Derivative Works thereof, that is intentionally 53 | submitted to Licensor for inclusion in the Work by the copyright owner 54 | or by an individual or Legal Entity authorized to submit on behalf of 55 | the copyright owner. For the purposes of this definition, "submitted" 56 | means any form of electronic, verbal, or written communication sent 57 | to the Licensor or its representatives, including but not limited to 58 | communication on electronic mailing lists, source code control systems, 59 | and issue tracking systems that are managed by, or on behalf of, the 60 | Licensor for the purpose of discussing and improving the Work, but 61 | excluding communication that is conspicuously marked or otherwise 62 | designated in writing by the copyright owner as "Not a Contribution." 63 | 64 | "Contributor" shall mean Licensor and any individual or Legal Entity 65 | on behalf of whom a Contribution has been received by Licensor and 66 | subsequently incorporated within the Work. 67 | 68 | 2. Grant of Copyright License. Subject to the terms and conditions of 69 | this License, each Contributor hereby grants to You a perpetual, 70 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 71 | copyright license to reproduce, prepare Derivative Works of, 72 | publicly display, publicly perform, sublicense, and distribute the 73 | Work and such Derivative Works in Source or Object form. 74 | 75 | 3. Grant of Patent License. Subject to the terms and conditions of 76 | this License, each Contributor hereby grants to You a perpetual, 77 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 78 | (except as stated in this section) patent license to make, have made, 79 | use, offer to sell, sell, import, and otherwise transfer the Work, 80 | where such license applies only to those patent claims licensable 81 | by such Contributor that are necessarily infringed by their 82 | Contribution(s) alone or by combination of their Contribution(s) 83 | with the Work to which such Contribution(s) was submitted. If You 84 | institute patent litigation against any entity (including a 85 | cross-claim or counterclaim in a lawsuit) alleging that the Work 86 | or a Contribution incorporated within the Work constitutes direct 87 | or contributory patent infringement, then any patent licenses 88 | granted to You under this License for that Work shall terminate 89 | as of the date such litigation is filed. 90 | 91 | 4. Redistribution. You may reproduce and distribute copies of the 92 | Work or Derivative Works thereof in any medium, with or without 93 | modifications, and in Source or Object form, provided that You 94 | meet the following conditions: 95 | 96 | (a) You must give any other recipients of the Work or 97 | Derivative Works a copy of this License; and 98 | 99 | (b) You must cause any modified files to carry prominent notices 100 | stating that You changed the files; and 101 | 102 | (c) You must retain, in the Source form of any Derivative Works 103 | that You distribute, all copyright, patent, trademark, and 104 | attribution notices from the Source form of the Work, 105 | excluding those notices that do not pertain to any part of 106 | the Derivative Works; and 107 | 108 | (d) If the Work includes a "NOTICE" text file as part of its 109 | distribution, then any Derivative Works that You distribute must 110 | include a readable copy of the attribution notices contained 111 | within such NOTICE file, excluding those notices that do not 112 | pertain to any part of the Derivative Works, in at least one 113 | of the following places: within a NOTICE text file distributed 114 | as part of the Derivative Works; within the Source form or 115 | documentation, if provided along with the Derivative Works; or, 116 | within a display generated by the Derivative Works, if and 117 | wherever such third-party notices normally appear. The contents 118 | of the NOTICE file are for informational purposes only and 119 | do not modify the License. You may add Your own attribution 120 | notices within Derivative Works that You distribute, alongside 121 | or as an addendum to the NOTICE text from the Work, provided 122 | that such additional attribution notices cannot be construed 123 | as modifying the License. 124 | 125 | You may add Your own copyright statement to Your modifications and 126 | may provide additional or different license terms and conditions 127 | for use, reproduction, or distribution of Your modifications, or 128 | for any such Derivative Works as a whole, provided Your use, 129 | reproduction, and distribution of the Work otherwise complies with 130 | the conditions stated in this License. 131 | 132 | 5. Submission of Contributions. Unless You explicitly state otherwise, 133 | any Contribution intentionally submitted for inclusion in the Work 134 | by You to the Licensor shall be under the terms and conditions of 135 | this License, without any additional terms or conditions. 136 | Notwithstanding the above, nothing herein shall supersede or modify 137 | the terms of any separate license agreement you may have executed 138 | with Licensor regarding such Contributions. 139 | 140 | 6. Trademarks. This License does not grant permission to use the trade 141 | names, trademarks, service marks, or product names of the Licensor, 142 | except as required for reasonable and customary use in describing the 143 | origin of the Work and reproducing the content of the NOTICE file. 144 | 145 | 7. Disclaimer of Warranty. Unless required by applicable law or 146 | agreed to in writing, Licensor provides the Work (and each 147 | Contributor provides its Contributions) on an "AS IS" BASIS, 148 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 149 | implied, including, without limitation, any warranties or conditions 150 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 151 | PARTICULAR PURPOSE. You are solely responsible for determining the 152 | appropriateness of using or redistributing the Work and assume any 153 | risks associated with Your exercise of permissions under this License. 154 | 155 | 8. Limitation of Liability. In no event and under no legal theory, 156 | whether in tort (including negligence), contract, or otherwise, 157 | unless required by applicable law (such as deliberate and grossly 158 | negligent acts) or agreed to in writing, shall any Contributor be 159 | liable to You for damages, including any direct, indirect, special, 160 | incidental, or consequential damages of any character arising as a 161 | result of this License or out of the use or inability to use the 162 | Work (including but not limited to damages for loss of goodwill, 163 | work stoppage, computer failure or malfunction, or any and all 164 | other commercial damages or losses), even if such Contributor 165 | has been advised of the possibility of such damages. 166 | 167 | 9. Accepting Warranty or Additional Liability. While redistributing 168 | the Work or Derivative Works thereof, You may choose to offer, 169 | and charge a fee for, acceptance of support, warranty, indemnity, 170 | or other liability obligations and/or rights consistent with this 171 | License. However, in accepting such obligations, You may act only 172 | on Your own behalf and on Your sole responsibility, not on behalf 173 | of any other Contributor, and only if You agree to indemnify, 174 | defend, and hold each Contributor harmless for any liability 175 | incurred by, or claims asserted against, such Contributor by reason 176 | of your accepting any such warranty or additional liability. 177 | 178 | END OF TERMS AND CONDITIONS 179 | 180 | APPENDIX: How to apply the Apache License to your work. 181 | 182 | To apply the Apache License to your work, attach the following 183 | boilerplate notice, with the fields enclosed by brackets "[]" 184 | replaced with your own identifying information. (Don't include 185 | the brackets!) The text should be enclosed in the appropriate 186 | comment syntax for the file format. We also recommend that a 187 | file or class name and description of purpose be included on the 188 | same "printed page" as the copyright notice for easier 189 | identification within third-party archives. 190 | 191 | Copyright [yyyy] [name of copyright owner] 192 | 193 | Licensed under the Apache License, Version 2.0 (the "License"); 194 | you may not use this file except in compliance with the License. 195 | You may obtain a copy of the License at 196 | 197 | http://www.apache.org/licenses/LICENSE-2.0 198 | 199 | Unless required by applicable law or agreed to in writing, software 200 | distributed under the License is distributed on an "AS IS" BASIS, 201 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 202 | See the License for the specific language governing permissions and 203 | limitations under the License. 204 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | TARGET_VERSION ?= latest 2 | 3 | .PHONY: templates 4 | 5 | all: docker 6 | 7 | templates: 8 | 9 | @echo "Building static files to 'src/' from templates in 'templates/'..." 10 | @cd src/ && rm -rf advisor/ labs/ stats/ collections/ catalog/ && mkdir -p advisor/ labs/ stats/ collections/ catalog/ 11 | @cd templates/ && virtualenv venv/ && venv/bin/pip install -r build-requirements.txt && venv/bin/python generate_webapp.py 12 | 13 | docker: templates 14 | 15 | # Get rid of node_modules in src/ so we don't copy into the container (it will generate its own) 16 | rm -rf src/node_modules/ 17 | 18 | # No cache is important because of external deps 19 | docker build --no-cache -t antidotelabs/antidote-web:$(TARGET_VERSION) -f Dockerfile . 20 | docker push antidotelabs/antidote-web:$(TARGET_VERSION) 21 | 22 | hack: export ANTIDOTE_WEB_ENV = mock 23 | hack: templates 24 | 25 | # Just to make sure we pick up the latest for this at dev time 26 | rm -rf src/node_modules/nre-styles/ 27 | 28 | cd src/ && npm install && npm run build 29 | 30 | docker-compose build --no-cache 31 | docker-compose pull 32 | docker-compose up 33 | 34 | release: templates 35 | @rm -f src/package.json.new && cat src/package.json \ 36 | | jq '.dependencies["antidote-localizations"] = "nre-learning/antidote-localizations#v$(TARGET_VERSION)"' \ 37 | | jq '.dependencies["antidote-ui-components"] = "nre-learning/antidote-ui-components#v$(TARGET_VERSION)"' \ 38 | | jq '.dependencies["nre-styles"] = "nre-learning/nre-styles#v$(TARGET_VERSION)"' \ 39 | > src/package.json.new && \ 40 | rm -f src/package.json && mv src/package.json.new src/package.json 41 | 42 | cd src/ && npm version --no-git-tag-version $(TARGET_VERSION) && npm install 43 | 44 | # TODO(mierdin): This was commented out - is this not needed? 45 | # && npm run build 46 | 47 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | | :exclamation: NOTE - this project has been archived. Please see [this blog post](https://nrelabs.io/2021/12/goodbye-for-now/) for more details. :exclamation: | 2 | |-----------------------------------------| 3 | 4 | # antidote-web 5 | 6 | [![Build Status](https://travis-ci.org/nre-learning/antidote-web.svg?branch=master)](https://travis-ci.org/nre-learning/antidote-web) 7 | 8 | This repository is where the web-front end for the Antidote platform is maintained. This is what makes the [NRE Labs](https://nrelabs.io) experience possible, by blending back-end smarts with a sleek, front-end interface. 9 | 10 | If you're looking for the back-end services for Antidote, that code is maintained in a separate repository: [`antidote-core`](https://github.com/nre-learning/antidote-core). 11 | 12 | The [Antidote documentation](https://docs.nrelabs.io/antidote/antidote-architecture) contains additional architectural details 13 | 14 | ## Development 15 | 16 | > This repository is the convergence of all projects related to the Antidote front-end. What's housed here is the top-level templates for defining the Antidote front-end, build scripts, packaging, etc. However, other repositories serve specific purposes in creating this front-end experience and are listed as dependencies for this project. See `src/package.json` for a list of these dependencies. If you are working on one of those dependencies, you'll likely want to change this configuration to point to a local directory where you've cloned the relevant project, and use this repository's build tools to put the whole thing together. 17 | 18 | For rapid iteration on developing antidote-web, you can run a lightweight version of the antidote stack using the following steps. This approach removes the need for running a fully functioning stack (i.e. kubernetes) by running the back-end (`antidote-core`) with the scheduler service entirely disabled, and only running the antidote API. This allows you to manually set the exact back-end state that you want, so that front-end features can be easily developed and tested. 19 | 20 | **IMPORTANT** - The first thing you'll need, beyond cloning this repository (`antidote-web`) is to also clone an Antidote curriculum. Any compatible curriculum will do, but the simplest one built for development is the [`antidote-test-curriculum`](https://github.com/nre-learning/antidote-test-curriculum). The development workflow in this repository is pre-configured to expect that this curriculum repository exists as a sibling to this one, so please ensure both repositories are cloned to the same location. If you don't do this first, the rest of the workflow will not work. 21 | 22 | Next, the following command will spin up the lightweight antidote stack: 23 | 24 | ``` 25 | make hack 26 | ``` 27 | 28 | This will start serving `antidote-web` at [http://127.0.0.1:8080/](http://127.0.0.1:8080/). However, as mentioned previously, this is not a fully functional Antidote instance, as the entire scheduling service is explicitly disabled. So, to facilitate front-end development, you need to install the necessary state information into `antidote-core`. 29 | 30 | Within the `hack/` directory, which is mapped to `/hack` within the `antidote-core` container, there are two JSON files you can install by running `antictl`. 31 | 32 | ``` 33 | docker exec antidote-web_antidote-core_1 antictl livelesson create /hack/dev-livelessons.json 34 | ``` 35 | 36 | These are the JSON representations for the [protobuf definitions found here](https://github.com/nre-learning/antidote-core/blob/master/api/exp/definitions/). They are also just examples, and you are responsible for editing and deleting/recreating the state as needed to suit your purposes. Once your state is installed, you can refresh the page and the front-end will query the back-end for the state you've installed. 37 | 38 | > **Important note** - "state" is just about anything that's not derived from the curriculum repository, which most things are. Anything with the prefix "live", as in `livelesson` or `livesession` is able to be set manually in this way. However, things like lessons and images are derived from the curriculum you're working with. If you're using the `antidote-test-curriculum` which is the default in this repository, then you'll want to make changes there if you want to change these elements. 39 | -------------------------------------------------------------------------------- /check-changelog.sh: -------------------------------------------------------------------------------- 1 | git fetch origin master 2 | 3 | # Exit if the master branch is detected. This isn't a pull request 4 | # and we don't need a CHANGELOG update 5 | if [[ $(git branch | grep master) ]]; then 6 | exit 0 7 | fi 8 | 9 | if echo $(git diff --name-only $(git rev-parse FETCH_HEAD)) | grep -w CHANGELOG.md > /dev/null; then 10 | echo "Thanks for making a CHANGELOG update!" 11 | exit 0 12 | else 13 | echo "No CHANGELOG update found. Please provide update to CHANGELOG for this change." 14 | exit 1 15 | fi -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | # This compose file is meant to be used for developing on antidote-web or one of the related projects 2 | # such as antidote-ui-components. By default, it starts a single container for the web front end and 3 | # assumes the rest is running elsewhere. However, if you wish, you can un-comment the additional sections 4 | # below to get additional development-time tools. 5 | 6 | version: "3.7" 7 | services: 8 | 9 | # This section will build the antidote-web container from source, which also pulls in all dependencies listed in package.json 10 | # See README for more details. 11 | antidote-web: 12 | build: 13 | context: . 14 | dockerfile: ./hack/Dockerfile-dev 15 | environment: 16 | WEBSSH2_LOCATION: 'http://127.0.0.1:8081' 17 | ports: 18 | - "8080:80" 19 | # WebSSH2 is also required for terminal functionality - provides a websocket-to-ssh proxy for the front-end 20 | webssh2: 21 | image: "antidotelabs/webssh2:ping-timeout" 22 | ports: 23 | - "8081:8080" 24 | volumes: 25 | - ./hack/websshconfig.json:/usr/src/config.json 26 | 27 | # This section runs an instance of antidoted here with only the API service enabled. You can then use 28 | # "antictl" to create mock instances of livelessons with arbitrary data for testing antidote-web 29 | # functionality on top of the Antidote API 30 | antidote-core: 31 | image: "antidotelabs/antidote-core:latest" 32 | depends_on: 33 | - nats-server 34 | ports: 35 | - "8086:8086" # REST 36 | - "50099:50099" # gRPC 37 | volumes: 38 | - ./hack:/hack 39 | 40 | # NOTE - must first clone https://github.com/nre-learning/antidote-test-curriculum as a sibling directory to antidote-web. 41 | # 42 | # You are welcome to use another antidote curriculum, such as NRE Labs, but you'll have to change the mapping here. 43 | - ../antidote-test-curriculum:/antidote-test-curriculum 44 | command: antidoted --config /hack/antidoted-config.yaml 45 | nats-server: # Pub/sub server required by antidoted 46 | image: "nats" 47 | ports: 48 | - "4222:4222" 49 | - "6222:6222" 50 | - "8222:8222" 51 | 52 | # Some example endpoints are provided here for convenience. Note that the IP address provided in the mock livelesson in the `hack/` directory is the docker bridge, 53 | # which will allow connectivity here over the mapped port. 54 | linux1: 55 | image: "antidotelabs/utility" 56 | ports: 57 | - "2222:22" 58 | # webserver1: 59 | # image: "antidotelabs/webserver" 60 | # ports: 61 | # - "8090:8080" 62 | -------------------------------------------------------------------------------- /hack/Dockerfile-dev: -------------------------------------------------------------------------------- 1 | # This is a DEVELOPMENT dockerfile, and therefore includes no npm build 2 | # steps. It is assumed this has already been run, and therefore needs only 3 | # a webserver. It is also not meant to be built directly, but rather through 4 | # the provided Makefile ("make hack") 5 | 6 | FROM nginx 7 | COPY src/ /usr/share/nginx/html 8 | COPY launch.sh / 9 | CMD ["/launch.sh"] 10 | -------------------------------------------------------------------------------- /hack/antidoted-config.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | curriculumDir: "/antidote-test-curriculum" 3 | instanceId: antidote-web-dev 4 | enabledServices: 5 | - api 6 | natsUrl: "nats://nats-server:4222" 7 | devMode: true -------------------------------------------------------------------------------- /hack/dev-livelessons.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "ID": "abcdef", 4 | "SessionID": "antidotedevmode", 5 | "LessonSlug": "test-lesson", 6 | "LiveEndpoints": { 7 | "linux1": { 8 | "Name": "linux1", 9 | "Image": "utility", 10 | "Ports": [ 11 | 2222 12 | ], 13 | "LivePresentations": [ 14 | { 15 | "Name": "cli", 16 | "Port": 2222, 17 | "Type": "ssh" 18 | } 19 | ], 20 | "Host": "172.17.0.1", 21 | "SSHUser": "antidote", 22 | "SSHPassword": "antidotepassword" 23 | } 24 | }, 25 | "LessonStage": 1, 26 | "Status": "READY", 27 | "Diagram": "a lovely diagram", 28 | "Video": "baby shark", 29 | "Error": false, 30 | "HealthyTests": 4, 31 | "TotalTests": 4 32 | } 33 | ] -------------------------------------------------------------------------------- /hack/websshconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "listen": { 3 | "ip": "0.0.0.0", 4 | "port": 8080 5 | }, 6 | "user": { 7 | "name": "antidote", 8 | "password": "antidotepassword", 9 | "privatekey": null 10 | }, 11 | "ssh": { 12 | "host": null, 13 | "port": 22, 14 | "localAddress": null, 15 | "localPort": null, 16 | "term": "xterm-color", 17 | "readyTimeout": 20000, 18 | "keepaliveInterval": 120000, 19 | "keepaliveCountMax": 10, 20 | "allowedSubnets": [ 21 | "10.0.0.0/8", 22 | "172.16.0.0/12", 23 | "192.168.0.0/24", 24 | "127.0.0.0/8" 25 | ] 26 | }, 27 | "terminal": { 28 | "cursorBlink": true, 29 | "scrollback": 10000, 30 | "tabStopWidth": 8, 31 | "bellStyle": "sound" 32 | }, 33 | "header": { 34 | "text": null, 35 | "background": "green" 36 | }, 37 | "session": { 38 | "name": "WebSSH2", 39 | "secret": "mysecret" 40 | }, 41 | "options": { 42 | "challengeButton": true, 43 | "allowreauth": true 44 | }, 45 | "algorithms": { 46 | "kex": [ 47 | "ecdh-sha2-nistp256", 48 | "ecdh-sha2-nistp384", 49 | "ecdh-sha2-nistp521", 50 | "diffie-hellman-group-exchange-sha256", 51 | "diffie-hellman-group14-sha1" 52 | ], 53 | "cipher": [ 54 | "aes128-ctr", 55 | "aes192-ctr", 56 | "aes256-ctr", 57 | "aes128-gcm", 58 | "aes128-gcm@openssh.com", 59 | "aes256-gcm", 60 | "aes256-gcm@openssh.com", 61 | "aes256-cbc" 62 | ], 63 | "hmac": [ 64 | "hmac-sha2-256", 65 | "hmac-sha2-512", 66 | "hmac-sha1" 67 | ], 68 | "compress": [ 69 | "none", 70 | "zlib@openssh.com", 71 | "zlib" 72 | ] 73 | }, 74 | "serverlog": { 75 | "client": true, 76 | "server": true 77 | }, 78 | "accesslog": true, 79 | "verify": false 80 | } 81 | -------------------------------------------------------------------------------- /launch.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Overwrite WEBSSH2_LOCATION variable if env is present 4 | if [ -z "$WEBSSH2_LOCATION" ]; then 5 | echo "WEBSSH2_LOCATION not set - antidote-web will use default webssh2 location" 6 | else 7 | # Be sure not to use "/" as a sed delimiter since we're going to be 8 | # putting things like http:// in the env var 9 | find /usr/share/nginx/html -name '*.html' -exec sed -i -e \ 10 | "s@.*window.WEBSSH2_LOCATION.*@ window.WEBSSH2_LOCATION = \"$WEBSSH2_LOCATION\";@" {} + 11 | fi 12 | 13 | # Launch nginx in foreground 14 | nginx -g "daemon off;" -------------------------------------------------------------------------------- /src/antidote-config.js: -------------------------------------------------------------------------------- 1 | export default { 2 | // To specify the text to be used by this deployment of Antidote, define either: 3 | // locale - a country code with a associated localization in the `antidote-localizations` modules 4 | // e.g: "locale": "en" 5 | // localization-module - a NPM module name that exports a localization object 6 | // e.g: "localization-module": "nre-antidote-localization", 7 | 8 | "locale": "en" 9 | } 10 | -------------------------------------------------------------------------------- /src/icons/android-icon-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nre-learning/antidote-web/97bd453042c636a93b465791805bcdff91772270/src/icons/android-icon-144x144.png -------------------------------------------------------------------------------- /src/icons/android-icon-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nre-learning/antidote-web/97bd453042c636a93b465791805bcdff91772270/src/icons/android-icon-192x192.png -------------------------------------------------------------------------------- /src/icons/android-icon-36x36.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nre-learning/antidote-web/97bd453042c636a93b465791805bcdff91772270/src/icons/android-icon-36x36.png -------------------------------------------------------------------------------- /src/icons/android-icon-48x48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nre-learning/antidote-web/97bd453042c636a93b465791805bcdff91772270/src/icons/android-icon-48x48.png -------------------------------------------------------------------------------- /src/icons/android-icon-72x72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nre-learning/antidote-web/97bd453042c636a93b465791805bcdff91772270/src/icons/android-icon-72x72.png -------------------------------------------------------------------------------- /src/icons/android-icon-96x96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nre-learning/antidote-web/97bd453042c636a93b465791805bcdff91772270/src/icons/android-icon-96x96.png -------------------------------------------------------------------------------- /src/icons/apple-icon-114x114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nre-learning/antidote-web/97bd453042c636a93b465791805bcdff91772270/src/icons/apple-icon-114x114.png -------------------------------------------------------------------------------- /src/icons/apple-icon-120x120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nre-learning/antidote-web/97bd453042c636a93b465791805bcdff91772270/src/icons/apple-icon-120x120.png -------------------------------------------------------------------------------- /src/icons/apple-icon-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nre-learning/antidote-web/97bd453042c636a93b465791805bcdff91772270/src/icons/apple-icon-144x144.png -------------------------------------------------------------------------------- /src/icons/apple-icon-152x152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nre-learning/antidote-web/97bd453042c636a93b465791805bcdff91772270/src/icons/apple-icon-152x152.png -------------------------------------------------------------------------------- /src/icons/apple-icon-180x180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nre-learning/antidote-web/97bd453042c636a93b465791805bcdff91772270/src/icons/apple-icon-180x180.png -------------------------------------------------------------------------------- /src/icons/apple-icon-57x57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nre-learning/antidote-web/97bd453042c636a93b465791805bcdff91772270/src/icons/apple-icon-57x57.png -------------------------------------------------------------------------------- /src/icons/apple-icon-60x60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nre-learning/antidote-web/97bd453042c636a93b465791805bcdff91772270/src/icons/apple-icon-60x60.png -------------------------------------------------------------------------------- /src/icons/apple-icon-72x72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nre-learning/antidote-web/97bd453042c636a93b465791805bcdff91772270/src/icons/apple-icon-72x72.png -------------------------------------------------------------------------------- /src/icons/apple-icon-76x76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nre-learning/antidote-web/97bd453042c636a93b465791805bcdff91772270/src/icons/apple-icon-76x76.png -------------------------------------------------------------------------------- /src/icons/apple-icon-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nre-learning/antidote-web/97bd453042c636a93b465791805bcdff91772270/src/icons/apple-icon-precomposed.png -------------------------------------------------------------------------------- /src/icons/apple-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nre-learning/antidote-web/97bd453042c636a93b465791805bcdff91772270/src/icons/apple-icon.png -------------------------------------------------------------------------------- /src/icons/browserconfig.xml: -------------------------------------------------------------------------------- 1 | 2 | #ffffff -------------------------------------------------------------------------------- /src/icons/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nre-learning/antidote-web/97bd453042c636a93b465791805bcdff91772270/src/icons/favicon-16x16.png -------------------------------------------------------------------------------- /src/icons/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nre-learning/antidote-web/97bd453042c636a93b465791805bcdff91772270/src/icons/favicon-32x32.png -------------------------------------------------------------------------------- /src/icons/favicon-96x96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nre-learning/antidote-web/97bd453042c636a93b465791805bcdff91772270/src/icons/favicon-96x96.png -------------------------------------------------------------------------------- /src/icons/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nre-learning/antidote-web/97bd453042c636a93b465791805bcdff91772270/src/icons/favicon.ico -------------------------------------------------------------------------------- /src/icons/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "App", 3 | "icons": [ 4 | { 5 | "src": "\/android-icon-36x36.png", 6 | "sizes": "36x36", 7 | "type": "image\/png", 8 | "density": "0.75" 9 | }, 10 | { 11 | "src": "\/android-icon-48x48.png", 12 | "sizes": "48x48", 13 | "type": "image\/png", 14 | "density": "1.0" 15 | }, 16 | { 17 | "src": "\/android-icon-72x72.png", 18 | "sizes": "72x72", 19 | "type": "image\/png", 20 | "density": "1.5" 21 | }, 22 | { 23 | "src": "\/android-icon-96x96.png", 24 | "sizes": "96x96", 25 | "type": "image\/png", 26 | "density": "2.0" 27 | }, 28 | { 29 | "src": "\/android-icon-144x144.png", 30 | "sizes": "144x144", 31 | "type": "image\/png", 32 | "density": "3.0" 33 | }, 34 | { 35 | "src": "\/android-icon-192x192.png", 36 | "sizes": "192x192", 37 | "type": "image\/png", 38 | "density": "4.0" 39 | } 40 | ] 41 | } -------------------------------------------------------------------------------- /src/icons/ms-icon-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nre-learning/antidote-web/97bd453042c636a93b465791805bcdff91772270/src/icons/ms-icon-144x144.png -------------------------------------------------------------------------------- /src/icons/ms-icon-150x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nre-learning/antidote-web/97bd453042c636a93b465791805bcdff91772270/src/icons/ms-icon-150x150.png -------------------------------------------------------------------------------- /src/icons/ms-icon-310x310.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nre-learning/antidote-web/97bd453042c636a93b465791805bcdff91772270/src/icons/ms-icon-310x310.png -------------------------------------------------------------------------------- /src/icons/ms-icon-70x70.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nre-learning/antidote-web/97bd453042c636a93b465791805bcdff91772270/src/icons/ms-icon-70x70.png -------------------------------------------------------------------------------- /src/images/1.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/images/2.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/images/3.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/images/4.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/images/5.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/images/6.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/images/7.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/images/8.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/images/9.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/images/Flask-8.2s-200px.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | -------------------------------------------------------------------------------- /src/images/beginner-icon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /src/images/configure_deselected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nre-learning/antidote-web/97bd453042c636a93b465791805bcdff91772270/src/images/configure_deselected.png -------------------------------------------------------------------------------- /src/images/configure_selected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nre-learning/antidote-web/97bd453042c636a93b465791805bcdff91772270/src/images/configure_selected.png -------------------------------------------------------------------------------- /src/images/error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nre-learning/antidote-web/97bd453042c636a93b465791805bcdff91772270/src/images/error.png -------------------------------------------------------------------------------- /src/images/expert-icon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/images/flask.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nre-learning/antidote-web/97bd453042c636a93b465791805bcdff91772270/src/images/flask.gif -------------------------------------------------------------------------------- /src/images/intermediate-icon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/images/intro_selected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nre-learning/antidote-web/97bd453042c636a93b465791805bcdff91772270/src/images/intro_selected.png -------------------------------------------------------------------------------- /src/images/jupyter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nre-learning/antidote-web/97bd453042c636a93b465791805bcdff91772270/src/images/jupyter.png -------------------------------------------------------------------------------- /src/images/jupyter_edit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nre-learning/antidote-web/97bd453042c636a93b465791805bcdff91772270/src/images/jupyter_edit.png -------------------------------------------------------------------------------- /src/images/jupyter_output.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nre-learning/antidote-web/97bd453042c636a93b465791805bcdff91772270/src/images/jupyter_output.png -------------------------------------------------------------------------------- /src/images/jupyter_selected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nre-learning/antidote-web/97bd453042c636a93b465791805bcdff91772270/src/images/jupyter_selected.png -------------------------------------------------------------------------------- /src/images/navicons.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nre-learning/antidote-web/97bd453042c636a93b465791805bcdff91772270/src/images/navicons.xcf -------------------------------------------------------------------------------- /src/images/nre-logo-long.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nre-learning/antidote-web/97bd453042c636a93b465791805bcdff91772270/src/images/nre-logo-long.png -------------------------------------------------------------------------------- /src/images/nrelabs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nre-learning/antidote-web/97bd453042c636a93b465791805bcdff91772270/src/images/nrelabs.png -------------------------------------------------------------------------------- /src/images/nrelabs_long.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nre-learning/antidote-web/97bd453042c636a93b465791805bcdff91772270/src/images/nrelabs_long.png -------------------------------------------------------------------------------- /src/images/nrelabs_new.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nre-learning/antidote-web/97bd453042c636a93b465791805bcdff91772270/src/images/nrelabs_new.png -------------------------------------------------------------------------------- /src/images/tshoot_deselected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nre-learning/antidote-web/97bd453042c636a93b465791805bcdff91772270/src/images/tshoot_deselected.png -------------------------------------------------------------------------------- /src/images/tshoot_selected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nre-learning/antidote-web/97bd453042c636a93b465791805bcdff91772270/src/images/tshoot_selected.png -------------------------------------------------------------------------------- /src/images/verify_deselected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nre-learning/antidote-web/97bd453042c636a93b465791805bcdff91772270/src/images/verify_deselected.png -------------------------------------------------------------------------------- /src/images/verify_selected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nre-learning/antidote-web/97bd453042c636a93b465791805bcdff91772270/src/images/verify_selected.png -------------------------------------------------------------------------------- /src/js/antidote.js: -------------------------------------------------------------------------------- 1 | // Notes on Bundling: 2 | // This module imports all the dependencies used by the Antidote web application. After running the 3 | // bundler this results in a monolithic file containing the JS dependencies needed for all pages of 4 | // the app. 5 | // 6 | // Keeping this monolithic was done for simplicities sake. 7 | // Individual bundles could be made for each page, but that is a unnecessary optimization given the 8 | // rather small size of the monolithic bundle. 9 | 10 | // import antidote resources bundles (text & styles) and set them in their global locations rather 11 | // than configuring per-component or using component defaults 12 | import l8n from 'antidote-localization' // this module is aliased to the desired localization in rollup.config.js 13 | window.antidoteLocalization = l8n; 14 | window.antidoteStyleSheet = '/node_modules/nre-styles/dist/styles.css'; 15 | 16 | // required for correct lab page height on iOS 17 | import 'antidote-ui-components/helpers/visual-viewport-height'; 18 | 19 | // import all components exported by antidote-ui-components 20 | import 'antidote-ui-components'; 21 | -------------------------------------------------------------------------------- /src/js/no-module.js: -------------------------------------------------------------------------------- 1 | // trigger modal indicating to a user that they should upgrade if their browser doesn't support modules 2 | const modalWrapper = document.createElement('div'); 3 | modalWrapper.classList.add('modal-wrapper'); 4 | 5 | const modal = document.createElement('div'); 6 | modal.classList.add('modal-container'); 7 | modalWrapper.appendChild(modal); 8 | 9 | const header = document.createElement('h1'); 10 | header.innerText = 'NRE Labs Uses JS Modules'; 11 | modal.appendChild(header); 12 | 13 | const body = document.createElement('p'); 14 | body.innerHTML = 'To use NRE Labs your browser must support the ' 15 | + 'JS module standard. ' 16 | + 'Supported browsers include the current versions of all the major browsers: ' 17 | + 'Chrome, Edge, Firefox, Safari & Opera.
' 18 | + 'If you believe you\'re on a supported version of one of the ' 19 | + 'listed browsers and you\'re still seeing this message, contact ' 20 | + 'us at: nrelabs.info@gmail.com'; 21 | modal.appendChild(body); 22 | 23 | window.addEventListener('DOMContentLoaded', function() { 24 | document.body.appendChild(modalWrapper); 25 | }); -------------------------------------------------------------------------------- /src/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "antidote-web", 3 | "version": "1.0.0", 4 | "description": "scripts and components for use in any app integrating with an Antidote project backend", 5 | "main": "js/antidote.js", 6 | "dependencies": { 7 | "antidote-localizations": "nre-learning/antidote-localizations", 8 | "antidote-ui-components": "nre-learning/antidote-ui-components", 9 | "nre-styles": "nre-learning/nre-styles" 10 | }, 11 | "devDependencies": { 12 | "@rollup/plugin-alias": "^2.2.0", 13 | "@rollup/plugin-node-resolve": "^6.0.0", 14 | "rollup": "^1.27.12", 15 | "rollup-plugin-commonjs": "^10.1.0", 16 | "rollup-plugin-terser": "^5.1.3" 17 | }, 18 | "scripts": { 19 | "build": "npx rollup -c", 20 | "watch": "npx rollup -cw", 21 | "test": "echo \"Error: no test specified\" && exit 1" 22 | }, 23 | "repository": { 24 | "type": "git", 25 | "url": "git+https://github.com/nre-learning/antidote-web.git" 26 | }, 27 | "keywords": [ 28 | "antidote", 29 | "syringe" 30 | ], 31 | "author": "Nils Lundquist", 32 | "license": "Apache-2.0", 33 | "bugs": { 34 | "url": "https://github.com/nre-learning/antidote-web/issues" 35 | }, 36 | "homepage": "https://github.com/nre-learning/antidote-web#readme" 37 | } 38 | -------------------------------------------------------------------------------- /src/rollup.config.js: -------------------------------------------------------------------------------- 1 | import path from 'path'; 2 | import resolve from '@rollup/plugin-node-resolve'; 3 | import alias from '@rollup/plugin-alias'; 4 | import commonjs from 'rollup-plugin-commonjs'; 5 | import { terser } from 'rollup-plugin-terser'; 6 | import antidoteConfig from './antidote-config'; 7 | 8 | // if this is not a "watched" build, assume it's a prod build 9 | const production = !process.env.ROLLUP_WATCH; 10 | 11 | function getLocalizationModulePath() { 12 | let l8nPath; 13 | 14 | if (antidoteConfig['localization-module']) { 15 | l8nPath = `${antidoteConfig['localization-module']}/index.js`; 16 | } else if (antidoteConfig['locale']) { 17 | l8nPath = `antidote-localizations/bundles/${antidoteConfig['locale']}.js`; 18 | } else { 19 | throw new Error('No "locale" or "localization-module" provided in antidote-config.js'); 20 | } 21 | 22 | return path.resolve(__dirname, `node_modules/${l8nPath}`); 23 | } 24 | 25 | export default { 26 | input: 'js/antidote.js', 27 | output: { 28 | file: 'js/bundles/antidote.js', 29 | format: 'esm', 30 | sourcemap: true 31 | }, 32 | plugins: [ 33 | 34 | alias({ 35 | entries: [ 36 | // provide configured localization module to antidote.js 37 | { find: 'antidote-localization', replacement: getLocalizationModulePath() }, 38 | // use to sub-in un-minified resources during debugging (when those modules are shipped minified by default) 39 | // { find: 'xterm-addon-fit', replacement: path.resolve(__dirname, 'node_modules/xterm-addon-fit/out/FitAddon.js') }, 40 | ] 41 | }), 42 | resolve(), 43 | commonjs({ 44 | namedExports: { 45 | // needed for xterm compatibility w/ rollup 46 | 'xterm': [ 'Terminal' ] 47 | 48 | // If you're using a local path for the antidote-ui-components path, you will need to use this 49 | // instead of the above. 50 | // '../../antidote-ui-components/node_modules/xterm/lib/xterm.js': [ 'Terminal' ] 51 | }, 52 | }), 53 | production && terser() // minify, but only in production 54 | ] 55 | }; 56 | -------------------------------------------------------------------------------- /templates/advisor/courseplan.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | 4 | {% block main_classes %}page course-plan{% endblock %} 5 | {% block main %} 6 | 7 | 8 |
9 |
10 |

Your Custom Learning Plan

11 |

12 | Based on the suggested prerequisites and your existing strengths, we can 13 | curate a custom learning path for you to get where you need to be. 14 |

15 | 16 | 17 |
18 | 19 |
20 |
21 |

Print my plan

22 |

23 | Enter your name below and hit the button to print this page 24 | as a reference of the lessons that can get you where you need to be. 25 |

26 | 27 | 28 |
29 | 30 |
31 |

Didn't find your path?

32 |

33 | Use our self-evaluation tool to design your personalized educational 34 | journey. 35 |

36 | 37 | Find my path 38 | 39 |
40 |
41 |
42 |
43 | {% endblock %} -------------------------------------------------------------------------------- /templates/advisor/index.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block main %} 4 |

Labs Advisor

5 |

Your Custom Learning Plan.

6 |

7 | Based on the suggested prerequisites and your existing strengths, we can 8 | curate a custom learning path for you to get where you need to be. 9 |

10 | 11 | 12 | 13 | 14 | 15 | {% endblock %} 16 | -------------------------------------------------------------------------------- /templates/base.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {% include 'partials/head.html' %} 5 | 6 | 7 | 8 | {% block body %} 9 | {% include 'partials/header.html' %} 10 | 11 |
12 | {% block main %}{% endblock %} 13 |
14 | 15 | {% include 'partials/footer.html' %} 16 | {% endblock %} 17 | 18 | -------------------------------------------------------------------------------- /templates/build-requirements.txt: -------------------------------------------------------------------------------- 1 | jinja2 -------------------------------------------------------------------------------- /templates/catalog/index.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | {% set header_cta_classes = "disabled" %} 3 | 4 | {% block main_classes %}page catalog{% endblock %} 5 | {% block main %} 6 | 7 |
8 |
9 |

Lesson Catalog

10 |

11 | Already know what lesson you're looking for? That's awesome - all lessons 12 | are linked below.
13 | If you're looking for collections, check out 14 | our list of vendors, consultants and community contributors. 15 |

16 | 17 | 18 |
19 | 20 |
21 |
22 |

Unsure where to start?

23 |

24 | Use our self-evaluation tool to design your personalized educational 25 | journey. 26 |

27 | 28 | Find my path 29 | 30 |
31 |
32 |
33 | 34 | 35 | 36 |
37 | {% endblock %} -------------------------------------------------------------------------------- /templates/collections/index.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block main_classes %}page catalog{% endblock %} 4 | {% block main %} 5 | 6 |
7 |
8 |

Collections

9 |

10 | Collections are a new categorization mechanism in NRE Labs to group 11 | content in non-traditional ways, such as by contributing organization. 12 | They can also be used to provide links to additional resources where 13 | you can continue your journey to Network Reliability Engineering! 14 | Please see 15 | the documentation on Collections for more information, or start 16 | searching for collections using the tool below. 17 |

18 |
19 | 20 |
21 |
22 |

Unsure where to start?

23 |

24 | Use our self-evaluation tool to design your personalized educational 25 | journey. 26 |

27 | 28 | Find my path 29 | 30 |
31 |
32 |
33 | 34 | 35 | 36 |
37 | {% endblock %} -------------------------------------------------------------------------------- /templates/collections/view.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block main_classes %}post page{% endblock %} 4 | 5 | {% block main %} 6 | 7 | 8 | {% endblock %} -------------------------------------------------------------------------------- /templates/generate_webapp.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | import jinja2 3 | import sys 4 | import os 5 | import subprocess 6 | 7 | commitHash = subprocess.check_output(['git','rev-parse', 'HEAD']).decode('utf-8')[:-1] 8 | templateLoader = jinja2.FileSystemLoader(searchpath="./") 9 | templateEnv = jinja2.Environment(loader=templateLoader) 10 | 11 | templates = [ 12 | "advisor/index.html", 13 | "advisor/courseplan.html", 14 | "catalog/index.html", 15 | "labs/index.html", 16 | "collections/index.html", 17 | "collections/view.html", 18 | 'index.html' 19 | ] 20 | 21 | for template_file in templates: 22 | template = templateEnv.get_template(template_file) 23 | outputText = template.render(antidote_version=commitHash, env=os.environ) 24 | path = "../src/%s" % template_file 25 | 26 | # Needs to be written to be python3 compatible, or we need to ensure this is always called with python2 27 | try: 28 | os.makedirs(os.path.dirname(path)) 29 | except OSError: 30 | pass 31 | 32 | with open(path, "w+") as f: 33 | f.write(outputText) -------------------------------------------------------------------------------- /templates/index.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block main %} 4 |

Interactive Lessons. Unshackled.

5 |

Learn by doing. Right now, right here, in your browser.

6 |

7 | Antidote is an open source initiative to bring interactive learning to 8 | everyone. Through short, simple exercises, all right here in the browser, 9 | users can learn tools, skills, and processes that will put them on the 10 | path to success. 11 |

12 | 13 |
14 | 15 | Find Lesson Content 16 | 17 |
18 | 19 | 20 | 21 | 22 | {% endblock %} 23 | -------------------------------------------------------------------------------- /templates/labs/index.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block body %} 4 | 5 |
6 |
7 | 8 | 9 |
10 | 11 |
12 | 13 |
14 | 15 |
16 | 17 | 18 | 19 |
20 |
21 | 22 | 23 |
24 | {% endblock %} 25 | -------------------------------------------------------------------------------- /templates/partials/footer.html: -------------------------------------------------------------------------------- 1 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /templates/partials/head.html: -------------------------------------------------------------------------------- 1 | NRE Labs 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 22 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /templates/partials/header.html: -------------------------------------------------------------------------------- 1 | {% set header_cta_classes = header_cta_classes | default('') %} 2 |
3 | 4 | 5 | 8 | 9 | 10 | Find Lesson Content 11 | 12 | 13 | 14 | {% include 'partials/main-menu-items.html' %} 15 | 16 |
17 | -------------------------------------------------------------------------------- /templates/partials/main-menu-items.html: -------------------------------------------------------------------------------- 1 |
  • Home
  • 2 |
  • About
  • 3 |
  • Community
  • 4 |
  • Resources
  • 5 |
  • Blog
  • 6 | -------------------------------------------------------------------------------- /templates/stats/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {% include 'partials/header.html' %} 6 | 7 | 8 | 9 | {% include 'partials/navbar.html' %} 10 | 11 | 12 |
    13 | 14 | 16 |
    17 | 18 |
    19 |
    20 |
    21 | 23 |
    24 |
    25 |
    26 | 27 |
    28 |
    29 |
    30 | 32 |
    33 |
    34 |
    35 |
    36 | 37 | 38 | 55 | 56 | 57 |
    58 | 59 | 62 | 63 | --------------------------------------------------------------------------------