This repository has been archived by the owner on Apr 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
Initial PR (complete layout tool) #14
Merged
Merged
Changes from all commits
Commits
Show all changes
189 commits
Select commit
Hold shift + click to select a range
a6057fe
In-toto layout wizard clean slate + flask scaffold
lukpueh 87377e5
Adds basic view and template for every wizard page
lukpueh 5fc57ba
Adds basic "option group" to versioning template
lukpueh 37b02e4
Adds SASS/SCSS support
lukpueh de866f8
Adds Boostrap frontend framework (v4 alpha)
lukpueh ec0298b
Adds dummy boostrap progress bar (WIP)
lukpueh d8ebd83
Rewrites basic option groups using Bootstrap/SCSS
lukpueh bcb456b
Override bootstrap's blue with wizard blue
lukpueh febd8b5
Adds dummy rows + recessed form in versioning page
lukpueh 1d02fc6
Minor base.html changes
lukpueh 65e2065
Finishes basic versioning page UI
lukpueh f3669c4
Adds vcs clone consent modal
lukpueh 1aaecca
Moves out options grid to a partial
lukpueh d66839d
Changes code structure for option grid
lukpueh 72b6235
Replace html grid/form partials with macros
lukpueh 08a18c4
Minor base.html changes
lukpueh 50937ca
Replaces Bootstrap collapse with Jquery slide
lukpueh 7013cc9
Adds finished building page template
lukpueh 29a141b
Removes `libsass` from requirements and wizard.py
lukpueh 45e7820
Adds gulpfile.js for vendor js copying
lukpueh bb2ab0f
Adds basic drag-n-drop sorting to building page
lukpueh 64a2c02
Minor replacement of lipsum text with lipsum func
lukpueh bd4c193
Adds finished quality management page template
lukpueh 46bbcb0
Adds finished packaging page template
lukpueh e45f6da
Adds minor container/bg styling
lukpueh c9d3e71
Removes minified jquery.js from static
lukpueh 25cae24
Adds minor container/bg styling II
lukpueh 1c333a2
Adds D3.js, plus basic supply chain page template
lukpueh 917e967
Adds svg element and styles for repsoniveness
lukpueh 70f15f0
Adds not working D3 force-directed graph
lukpueh bef27ff
Adds dagre-d3 for DAG layouts plus basic example
lukpueh 2bfc697
Adds server-side layout to graph data transform
lukpueh 803ac9b
Updates JS/CSS to draw compound layout graph
lukpueh c0f4b48
Adds SVG graph scaling and centering
lukpueh d688b4d
Adds SVG viewBox JS init + basic styling
lukpueh 03feedc
Moves graph drawing to client-side JS in ssc html
lukpueh 266c289
Generalizes add/remove of html documents
lukpueh 865a65c
Generalizes class names for html5 sorting
lukpueh ef615ed
Adds dynamic/sortable form to ssc page
lukpueh 742c727
Adds dropzone.js for drag and drop file upload
lukpueh 6e3166f
Adds basic authorization page with key dropzone
lukpueh b23fbfa
Adds "next" button to landing page
lukpueh a9a304e
Updates in-toto branch in requirements.txt
lukpueh c6ad00c
Adds select2 for pubkey multiselect on auth page
lukpueh 48971b9
Updates dropzone preview style to match select2
lukpueh b7ed0d2
Adds basic Security Assessment page
lukpueh 8dc69e6
Adds basic code snippet with custom select trick
lukpueh 78d8b0a
Finishes basic wrap-up page
lukpueh 45a0a52
Changes code textarea width to 100%
lukpueh d347318
Changes download btn on wrap-up page to full width
lukpueh d598ebe
Finishes basic guarantees page with "check" list
lukpueh be13453
Minor: Centers button on start page
lukpueh 86873f5
Adds header text and adds content class
lukpueh 88028c1
Removes h1 inheritance block form base
lukpueh c4242fd
Adds progress bar macro and custom progress values
lukpueh 7f7a0d4
Removes compound nodes and changes arrow direction
lukpueh 17685f2
Adds class to enable select items in input groups
lukpueh 52be68d
Adds build step selection to QA page, plus styles
lukpueh 3b5c1a0
Fixes z-index bug in option grid
lukpueh 52f1f7d
Fixes 'in-toto' case in page and head title
lukpueh a68d0a1
Add basic tooldb, a dictionary of ssc tools
lukpueh 2aa2c48
Make minor tweaks to tooldb
lukpueh 4059e7d
Add vcs collection as template var to vcs view
lukpueh c62b9f4
Show VCS tools in versioning template
lukpueh 215f79e
Minor change in option grid scss
lukpueh 6696426
Minor change to start template (btn text)
lukpueh 0e79420
Clean vcs tools in tooldb
lukpueh e3db4bf
Add user feedback facility to frontend
lukpueh e4e454c
Remove opt checkbox + case handling in form toggle
lukpueh ecda9b7
Change parameter passing in option_grid macro (WIP)
lukpueh d0137d1
Rename and update `option_custom` macro (WIP)
lukpueh 325e530
Implement versioning backend
lukpueh b391579
Add comment textarea to form container macro
lukpueh a9ec1a2
Update versioning frontend with UI/macro changes
lukpueh 792a87c
Add copy option form to form container click listener
lukpueh 5fec449
Remove obsolete todo command from macros
lukpueh fa78346
Fix indentation in versioning template
lukpueh 732f114
Shorten building tool name in tooldb
lukpueh a7cefb1
Implement building backend
lukpueh 2a06c9d
Update versioning building with UI/macro changes
lukpueh 6767bbc
Shorten qa tool name in tooldb (temp)
lukpueh a3b583a
Implement qa view + update qa template
lukpueh ed06bdf
Implement packaging view + update template
lukpueh bfa78a8
Update ssc graph generation + frontend changes
lukpueh d12b1e8
Add FIXME comment for qa step order to ssc view
lukpueh 373173b
Add `inspection based on step` input
lukpueh de40e6a
Update misc in ssc template
lukpueh a669dc3
Update ssc template and implement backend
lukpueh fc25cdd
Add functionary page + frontend/backend
lukpueh 6ef6791
Update authorizing template and implement backend
lukpueh 1ec9a14
Update chaining template and implement backend
lukpueh e865c8f
Update wrap_up template and implement backend
lukpueh 9025d91
Adds build layout based on uploaded links script
lukpueh c5d3a04
Libifies reverse layout
lukpueh 819073e
Remove "<qa step> run before|after <build step>"
lukpueh 5470ace
Fix in_toto.model import issue in backend
lukpueh c99b715
Store link filename instead of path to session
lukpueh 96c42fb
Fix wrong order bug in chaining and wrap up
lukpueh 8c2c709
Update cherry picked reverse_layout
lukpueh 09ad936
Move demo usage code in reverse layout to main
lukpueh 4699209
Add basic (generate and) download (reverse) layout
lukpueh 86f04e2
Fix keyerror on empty session in wrap_up page
lukpueh 05e5e81
Update download_layout to serve layout
lukpueh 224571e
Add step authorization to layout creation
lukpueh 9992e91
Fix wrong order bug on authorization page
lukpueh 45fa2e3
Add basic inspection creation in download_layout
lukpueh f04df37
Add FIXME comment about file upload race condition
lukpueh 6c1507c
Update keypair snippet to use in-toto-keygen
lukpueh 11eebb6
Update inspection form and cmd assessment
lukpueh 2f9eb47
Move "Add custom cmd" btn to top of option grid
lukpueh 2b9b2bb
Change bg color for opt forms that are posted
lukpueh 08bb201
Change opt-form to optionally add and sumit
lukpueh 7cadd29
Remove opt-form template in form_container macro
lukpueh c3fdd36
Move form-container h2 to macro, toggle display
lukpueh 95c68c6
Fix public key file load path bug
lukpueh f4c5329
Add `with_session_id` view decorator
lukpueh a5ca4c6
Introduce PyMongo for session data persistence
lukpueh 381d8c9
Add mongo insert/update and query helper functions
lukpueh 4fdabfd
Update views to store/get data in db
lukpueh efaf8df
Remove timestamp in some subdocuments
lukpueh c2a3769
Fix bug in persist subdocument with timestamp
lukpueh 145c15d
Refactor software supply chain data structure
lukpueh b0b912f
Enable graph update on ssc form update
lukpueh 3d4ef3f
Minor css class fixes in ssc template
lukpueh 8a8f946
Add modifying/reporting step handling to ssc graph
lukpueh 47e0563
Add step_modifies in backend
lukpueh 8ce3a1e
Add include inspection checkboxes to QA page
lukpueh 82dcf84
Big pubkey upload/persist refactoring
lukpueh d4ef8ef
Big link upload/persist refactoring
lukpueh b78d1b8
Change global JS function expressions to statements
lukpueh aa51870
Change functionary datastructure and DB operations
lukpueh f80c7a7
Change authorizing datastructure
lukpueh b5dd182
Change layout download to serve memory file
lukpueh c6714b4
Move "comment" form group to its own macro
lukpueh b24374c
Add comment form section to remaining pages
lukpueh ffbe92b
Remove some obsolete comments, fix typos
lukpueh dc41ea2
Remove unused layout_to_graph helper function
lukpueh 5e0ac7f
Fix bug in dropzone link file remove callback
lukpueh 1c91076
Enable link upload using tar(.gz) archive
lukpueh bcdabcb
Add simple refresh ssc on change option
lukpueh cb612f3
Add info log for new sessions
lukpueh 84de860
Add ajax/json response hook to inject messages
lukpueh abde3bc
Minor: Remove debugging log statement
lukpueh 1cc956d
Minor message container style changes
lukpueh cc919d1
Add CSRF tokens to forms and ajax requests
lukpueh 4e66cc6
Change website title
lukpueh 771bfac
Write text for landing page
lukpueh 62df4eb
Update option grid logo and text style
lukpueh 1f1baf8
Remove colored background from alert messages
lukpueh 6f6a23d
Minor text + style changes in macros
lukpueh 05a95df
Write text for versioning page
lukpueh 762e16b
Write text for building page
lukpueh 04b2147
Write text for QA page
lukpueh 7a10de2
Write text for packaging page
lukpueh 8f6c3c2
Write text for ssc page
lukpueh 75c27f7
Write text for functionary page
lukpueh 0927546
Write text for authorizing page
lukpueh 3883da0
Write text for chaining page
lukpueh 27d5321
Fix header level in ssc template
lukpueh 9e050b4
Write text for wrap-up page
lukpueh 05dd627
Remove obsolete files directory
lukpueh 6a9ea9a
Fix typo and update README.md
lukpueh e3ed3c3
Add auto reload on template change setting
lukpueh d2867c4
Add beta tag and link to github io page to header
lukpueh 5e24927
Update comments in reverse_layout module
lukpueh 2f437a9
Add docstring and fix paths in sample wsgi file
lukpueh a265bb8
Update LICENSE title and copyright ownership
lukpueh a56bfdb
Add header docstring to gulpfile.js
lukpueh fa6a967
Add header docstring to main.js
lukpueh 6a60ff9
Update comments and docstrings in main.js
lukpueh 5ab4f28
Add header docstring to main.scss
lukpueh 75f2b59
Update various fields in package.json and README
lukpueh 88c0bd6
Add header docstring to tooldb.py
lukpueh a27f46f
Update docstrings/comments in wizard.py
lukpueh 8ea6621
Add whitespace control template comments
lukpueh 711faec
Add header docstring to templates/*.html
lukpueh 4f7a895
Fix selected values not cloned bug
lukpueh f2104a3
Fix typo on building page
lukpueh 1bbbc53
Fix wrong year in LICENSE file
lukpueh 6f8e13d
Remove non-required fields from package.json
lukpueh ebf524d
Address various PR #14 comments
lukpueh 7e82633
Replace md5/random value with uuid4 for session id
lukpueh 415b866
Fix in-toto-sign snippet on wrap up page
lukpueh 2091bd3
Update "you revisited a previous page" text
lukpueh 1310274
Make data transformation function more defensive
lukpueh bc31725
Gitignore flask instance folder
lukpueh 855e5cc
Update various sections in README
lukpueh 9f311ff
Fix wrong use of "therefor" and "according"
lukpueh 4d25719
Refactor "versioning" to "vcs"
lukpueh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
|
||
in-toto | ||
node_modules | ||
instance/ | ||
|
||
# Exclude vendor JS file, copy them freshly using: | ||
# `gulp` | ||
static/vendor/* | ||
!static/vendor/.keep | ||
|
||
files/* | ||
!files/.keep | ||
|
||
# Exclude *.css files, compile them freshly using: | ||
# `sass static/scss/main.scss:static/css/main.scss.css` | ||
.sass-cache | ||
static/css/* | ||
!static/css/.keep |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2017 New York University | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 |
||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
# in-toto Layout Creation Wizard | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Consider saying somewhere in the README that an instance of the layout tool is available and/or link to it. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done |
||
|
||
A Flask-based web app to guide project owners through creating an | ||
*in-toto layout*. | ||
|
||
More information about *in-toto* and *in-toto layouts* can be found at the | ||
project website | ||
[in-toto.io](https://in-toto.io). A beta version of this web app is | ||
deployed at [in-toto.engineering.nyu.edu](https://in-toto.engineering.nyu.edu/) and mockups can be found at | ||
[`editor-and-wizard-wip/mockups`](https://github.com/in-toto/layout-web-tool/blob/editor-and-wizard-wip/mockups/layout-wizard.pdf). | ||
|
||
|
||
### Installation | ||
|
||
**Requirements** | ||
- [Python 2.7 (with development headers)](https://www.python.org) -- | ||
backend | ||
- [npm](https://www.npmjs.com/) -- frontend dependencies | ||
- [Ruby](https://www.ruby-lang.org/en/documentation/installation/) and [SASS](http://sass-lang.com/install) -- CSS preprocessor | ||
- [MongoDB](https://docs.mongodb.com/manual/installation/) -- to persist | ||
user session data (for usage analysis) | ||
|
||
|
||
```shell | ||
# Start `mongod` (if not already running) | ||
# Note: `service` won't be available in the future | ||
sudo service mongod start | ||
|
||
# Install backend (c.f. requirements.txt) | ||
pip install -r requirements.txt | ||
|
||
# Install and vendorize frontend dependencies and compile scss | ||
# c.f. dependencies and scripts in package.json | ||
npm install | ||
``` | ||
|
||
### Deployment | ||
- Add an [instance folder](http://flask.pocoo.org/docs/0.12/config/#instance-folders) with your | ||
deployment configuration, e.g.: | ||
```python | ||
# Example configuration in FLASK_APP_ROOT/instance/config.py | ||
DEBUG = False | ||
SECRET_KEY = '?\xbf,\xb4\x8d\xa3"<\x9c\xb0@\x0f5\xab,w\xee\x8d$0\x13\x8b83' #CHANGE THIS!!!!! | ||
|
||
``` | ||
|
||
- Take a look at `wizard.wsgi` and [these`mod_wsgi` instructions](http://flask.pocoo.org/docs/0.12/deploying/mod_wsgi/) | ||
for further guidance. | ||
|
||
### Development Tips | ||
- Run the development server like this: | ||
```shell | ||
python wizard.py | ||
``` | ||
- Run a `sass` watcher during development to automatically compile css on file change: | ||
```shell | ||
sass --watch static/scss/main.scss:static/css/main.scss.css | ||
``` | ||
- Make extensive use of (e.g. chrome's) browser developer tools, e.g. [map | ||
DevTool files to your local workspace](https://developers.google.com/web/tools/setup/setup-workflow) to live edit `*.scss` and `*.js` files. | ||
|
||
## Acknowledgements | ||
This project is managed by Prof. Justin Cappos and other members of the | ||
[Secure Systems Lab](https://ssl.engineering.nyu.edu/) at NYU and the | ||
[NJIT Cybersecurity Research Center](https://centers.njit.edu/cybersecurity). |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,154 @@ | ||
# -*- coding: utf-8 -*- | ||
#!/usr/bin/env python | ||
|
||
""" | ||
<Program Name> | ||
create_layout.py | ||
|
||
<Author> | ||
Lukas Puehringer <lukas.puehringer@nyu.edu> | ||
|
||
<Started> | ||
March 23, 2017 | ||
|
||
<Copyright> | ||
See LICENSE for licensing information. | ||
|
||
<Purpose> | ||
Creates a basic in-toto layout by reading an ordered list of step link files. | ||
|
||
** Infer layout fields: ** | ||
expires: | ||
default value | ||
keys: | ||
FIXME: Keys are currently ignored in this module | ||
steps: | ||
add steps in the order of passed link files | ||
name: | ||
link.name | ||
expected_command: | ||
link.command | ||
threshold: | ||
default value | ||
material_matchrules/product_matchrules: | ||
currently uses simple approach (see below) | ||
FIXME: Should use more complex approach (see ideas below) | ||
inspections: | ||
FIXME Inspections are currently ignored in this module | ||
signatures: | ||
empty (use `in-toto-sign` command line utility) | ||
|
||
|
||
** Infer step artifact rules (simple approach) ** | ||
** material_matchrules ** | ||
|
||
IF no materials were recorded | ||
material_matchrules: [["DISALLOW", "*"]] | ||
|
||
ELSE IF materials were recorded and it is the first step | ||
material_matchrules: [["ALLOW", "*"]] | ||
|
||
ELSE | ||
material_matchrules: [["MATCH", "*", "WITH", "PRODUCTS", "FROM", <PREVIOUS STEP>] | ||
|
||
|
||
** product_matchrules ** | ||
|
||
IF no products were recorded | ||
product_matchrules: [["DISALLOW", "*"]] | ||
|
||
ELSE products were recorded: | ||
product_matchrules: [["ALLOW", "*"]] | ||
|
||
|
||
** Ideas for more complexity: ** | ||
- explicitly, ALLOW or MATCH files by name instead of "*", e.g.: | ||
material_matchrules = \ | ||
[["ALLOW", material] for material in links[index].materials.keys()] | ||
|
||
- for MATCH rules | ||
match only those that already were in the previous step | ||
allow the rest by name | ||
|
||
|
||
<Usage> | ||
|
||
``` | ||
# Create a layout given an ordered list of link file paths | ||
|
||
links = [] | ||
for LINK_PATH in LINK_PATHS: | ||
link = in_toto.models.link.Link.read_from_file(LINK_PATH) | ||
links.append(link) | ||
|
||
layout = create_layout_from_ordered_links(links) | ||
layout.dump() | ||
|
||
``` | ||
|
||
""" | ||
import os | ||
import in_toto.models.link | ||
import in_toto.models.layout | ||
|
||
def create_material_matchrules(links, index): | ||
"""Create generic material rules (3 variants) | ||
|
||
* No materials recorded -> disallow any artifact | ||
* Materials recorded (first step) -> allow artifacts that existed beforehand | ||
* Materials recorded (latter step) -> match from previous products | ||
|
||
Returns a list of material rules | ||
NOTE: Read header docstring for ideas for more complexity. """ | ||
|
||
material_matchrules = [] | ||
|
||
if not links[index].materials: | ||
material_matchrules = [["DISALLOW", "*"]] | ||
|
||
elif index == 0 and links[index].materials: | ||
material_matchrules = [["ALLOW", "*"]] | ||
|
||
else: | ||
material_matchrules = [ | ||
["MATCH", "*", "WITH", "PRODUCTS", "FROM", links[index - 1].name]] | ||
|
||
return material_matchrules | ||
|
||
|
||
def create_product_matchrules(links, index): | ||
"""Create generic material rules (2 variants) | ||
|
||
* No products recorded -> disallow any artifact | ||
* Products recorded -> allow all artifacts | ||
|
||
Returns a list of product rules | ||
NOTE: Read header docstring for ideas for more complexity. """ | ||
|
||
if not links[index].products: | ||
product_matchrules = [["DISALLOW", "*"]] | ||
|
||
else: | ||
product_matchrules = [["ALLOW", "*"]] | ||
|
||
return product_matchrules | ||
|
||
|
||
def create_layout_from_ordered_links(links): | ||
"""Creates basic in-toto layout from an ordered list of in-toto link objects, | ||
inferring material and product rules from the materials and products of the | ||
passed links. """ | ||
# Create an empty layout | ||
layout = in_toto.models.layout.Layout() | ||
layout.keys = {} | ||
|
||
for index, link in enumerate(links): | ||
step_name = link.name | ||
step = in_toto.models.layout.Step(name=step_name, | ||
material_matchrules=create_material_matchrules(links, index), | ||
product_matchrules=create_product_matchrules(links, index), | ||
expected_command=link.command) | ||
|
||
layout.steps.append(step) | ||
|
||
return layout |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/***************************************************************** | ||
<File Name> | ||
gulpfile.js | ||
|
||
<Author> | ||
Lukas Puehringer <lukas.puehringer@nyu.edu> | ||
|
||
<Started> | ||
May 05, 2017 | ||
|
||
<Copyright> | ||
See LICENSE for licensing information. | ||
|
||
<Purpose> | ||
Front-end build tool used to copy third-party JS scripts to | ||
static/vendor from where the app serves them. | ||
|
||
TODO: | ||
Add gulp task for scss (styles) compilation (on change) | ||
Currently this is done with a separate command, i.e. | ||
``` | ||
sass --watch static/scss/main.scss:static/css/main.scss.css | ||
``` | ||
but it would be nice to have all in one place. | ||
|
||
<Usage> | ||
``` | ||
# Install front-end dependencies (in same directory) | ||
npm install | ||
# Run default gulp task | ||
gulp | ||
``` | ||
|
||
*****************************************************************/ | ||
var gulp = require("gulp"); | ||
|
||
gulp.task("default", function() { | ||
var js = [ | ||
"node_modules/jquery/dist/jquery.js", | ||
"node_modules/bootstrap/dist/js/bootstrap.js", | ||
"node_modules/tether/dist/js/tether.js", | ||
"node_modules/html5sortable/dist/html.sortable.js", | ||
"node_modules/d3/d3.js", | ||
"node_modules/dagre-d3/dist/dagre-d3.js", | ||
"node_modules/dropzone/dist/dropzone.js", | ||
"node_modules/select2/dist/js/select2.js" | ||
]; | ||
js.forEach(function() { | ||
gulp.src(js).pipe(gulp.dest("./static/vendor/")); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"name": "in-toto-layout-tool", | ||
"version": "1.0.0-beta.0", | ||
"scripts": { | ||
"postinstall": "gulp && sass static/scss/main.scss:static/css/main.scss.css" | ||
}, | ||
"dependencies": { | ||
"bootstrap": "4.0.0-alpha.6", | ||
"d3": "^3.5.17", | ||
"dagre-d3": "^0.4.17", | ||
"dropzone": "^4.3.0", | ||
"gulp": "^3.9.1", | ||
"html5sortable": "^0.5.1", | ||
"select2": "^4.0.3" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Flask | ||
Flask-PyMongo | ||
Flask-WTF | ||
-e git://github.com/in-toto/in-toto.git@c39b04cec329bead34232a39742ebda5947633fd#egg=in-toto |
Empty file.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this is a Flask app, what about ignoring Flask-specific files?
Example:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added
instance/
.Adding
.webassets-cache
won't be necessary as we don't usewebassets
/Flask-Assets