diff --git a/.gitignore b/.gitignore index ba86eba2..b596f276 100644 --- a/.gitignore +++ b/.gitignore @@ -1,10 +1,12 @@ gin-bin build/ -public/js/bundle.js -public/css/semaphore.css +web/public/js/bundle.js +web/public/css/*.* +web/public/html/**/*.* +web/public/fonts/*.* config.json .DS_Store -node_modules +node_modules/ .idea/ caddyfile @@ -15,3 +17,4 @@ util/version.go /vendor/ /coverage.out /public/package-lock.json +!.gitkeep diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index a663aff4..00000000 --- a/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "public/vendor"] - path = public/vendor - url = git://github.com/ansible-semaphore/semaphore-vendor.git diff --git a/Taskfile.yml b/Taskfile.yml index bbe3a2f2..88aad85b 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -9,10 +9,10 @@ tasks: all: desc: Install, Compile, Test and Build Semaphore for local architecture cmds: - - deps - - compile - - test - - build:local + - task: deps + - task: compile + - task: test + - task: build:local deps: desc: Install all dependencies @@ -28,25 +28,23 @@ tasks: deps:fe: desc: Installs npm requirements for front end from package.json - dir: public + dir: web cmds: - - git submodule update --init --recursive - npm i -g less pug-cli - - npm i async + - npm install deps:tools: desc: Installs tools needed - dir: public + dir: web cmds: - npm install -g nodemon - go get -u github.com/golang/dep/cmd/dep - - go get github.com/cespare/reflex + - go get github.com/cespare/reflex || true - go get -u github.com/gobuffalo/packr/... - go get -u github.com/haya14busa/goverage # needs go 1.10+ - go get github.com/goreleaser/goreleaser/... - compile: desc: Generates compiled frontend and backend resources (must be in this order) cmds: @@ -55,25 +53,26 @@ tasks: compile:fe: desc: Runs less, pug and node - dir: public + dir: web sources: - - css/semaphore.less - - html/*.pug - - html/**/*.pug + - resources/css/semaphore.less + - resources/html/*.pug + - resources/html/**/*.pug generates: - - css/semaphore.css - - html/*.html - - html/**/*.html - - js/bundle.json + - public/css/semaphore.css + - public/html/*.html + - public/html/**/*.html + - bundle.json cmds: - - lessc css/semaphore.less > css/semaphore.css - - pug $(find ./html/ -name "*.pug") - - node ./bundler.js + - lessc resources/less/semaphore.less > public/css/semaphore.css + - pug resources/pug --out public/html + - cp node_modules/font-awesome/fonts/* public/fonts + - node bundler.js compile:be: desc: Runs Packr for static assets sources: - - public/* + - web/public/* - db/migrations/* generates: - db/db-packr.go @@ -95,21 +94,21 @@ tasks: watch: desc: Watch fe and be file changes and rebuild - dir: public + dir: web/resources cmds: - task: watch:fe - task: watch:be watch:be: cmds: - - reflex -r '\.go$' -R '^public/vendor/' -R '^node_modules/' -s -d none -- sh -c 'go build -i -o /tmp/semaphore_bin cli/main.go && /tmp/semaphore_bin -config $(pwd)/config.json' + - reflex -r '\.go$' -R '^node_modules/' -s -d none -- sh -c 'go build -i -o /tmp/semaphore_bin cli/main.go && /tmp/semaphore_bin -config $(pwd)/config.json' watch:fe: - dir: public + dir: web cmds: - nodemon -w js -i bundle.js -e js bundler.js & - - nodemon -w css -e less --exec "lessc css/semaphore.less > css/semaphore.css" & - - pug -w -P --doctype html $(find ./html/ -name "*.pug") & + - nodemon -w css -e less --exec "lessc resources/less/semaphore.less > public/css/semaphore.css" & + - pug -w -P --doctype html resources/pug --out public/html & build: desc: Build a full set of release binaries and packages diff --git a/api/router.go b/api/router.go index 3d2e64fa..ef6c8c4e 100644 --- a/api/router.go +++ b/api/router.go @@ -14,7 +14,7 @@ import ( "github.com/russross/blackfriday" ) -var publicAssets = packr.NewBox("../public") +var publicAssets = packr.NewBox("../web/public") // Declare all routes func Route() mulekick.Router { diff --git a/api/tasks/runner_test.go b/api/tasks/runner_test.go index b89b3469..0f842d7f 100644 --- a/api/tasks/runner_test.go +++ b/api/tasks/runner_test.go @@ -9,7 +9,6 @@ import ( func TestCheckTmpDir(t *testing.T) { - //It should be able to create a random dir in /tmp dirName := os.TempDir()+ "/" + randString(rand.Intn(10 - 4) + 4) err := checkTmpDir(dirName) @@ -27,6 +26,14 @@ func TestCheckTmpDir(t *testing.T) { if err != nil { t.Fatal(err) } + + if stat, err:= os.Stat(dirName); err != nil { + t.Fatal(err) + } else if stat.Mode() != os.FileMode(int(0550)) { + // File System is not support 0550 mode, skip this test + return + } + err = checkTmpDir(dirName+"/noway") if err == nil { t.Fatal("You should not be able to write in this folder, causing an error") @@ -35,7 +42,6 @@ func TestCheckTmpDir(t *testing.T) { if err != nil { t.Log(err) } - } diff --git a/public/bundle.json b/public/bundle.json deleted file mode 100644 index e9dfba35..00000000 --- a/public/bundle.json +++ /dev/null @@ -1,25 +0,0 @@ -[ - "/vendor/angular.min", - "/vendor/angular-couch-potato", - "/vendor/angular-ui-router.min", - "/vendor/angular-ui.min", - "/vendor/angular-loading-bar/loading-bar", - "/vendor/moment/moment.min", - "/vendor/sweetalert/sweetalert.min", - "/vendor/ace/ui-ace.min", - "/vendor/ace/ace.min", - "/vendor/ace/mode-json", - "/vendor/ace/mode-yaml", - "/vendor/ace/mode-ini", - "/vendor/scrollglue", - - "app", - "routes/router", - "routes/auth", - "routes/project", - - "factories/project", - - "/vendor/require.min", - "../require_config" -] diff --git a/public/bundler.js b/public/bundler.js deleted file mode 100644 index be512852..00000000 --- a/public/bundler.js +++ /dev/null @@ -1,35 +0,0 @@ -var fs = require('fs'), - async = require('async'), - bundle = require('./bundle.json'), - out = fs.createWriteStream('./js/bundle.js'), - path = require('path'), - child_process = require('child_process'), - uglify = null; - -bundle.forEach(file => { - var o = {} - if (typeof file == 'object') { - o = file; - file = o.src; - } - - if (file.substr(0, 1) != '/') { - file = '/js/' + file; - } - - file = file + '.js'; - - console.log(file); - var contents = fs.readFileSync('.' + file); - - out.write('\n/* BUNDLED FILE: ' + file + ' */\n') - if (o.pre) { - out.write(o.pre + '\n'); - } - - out.write(contents + '\n'); - - if (o.post) { - out.write(o.post + '\n'); - } -}); \ No newline at end of file diff --git a/public/css/.gitignore b/public/css/.gitignore deleted file mode 100644 index f9007651..00000000 --- a/public/css/.gitignore +++ /dev/null @@ -1 +0,0 @@ -semaphore.css \ No newline at end of file diff --git a/public/html/.gitignore b/public/html/.gitignore deleted file mode 100644 index 0b84df0f..00000000 --- a/public/html/.gitignore +++ /dev/null @@ -1 +0,0 @@ -*.html \ No newline at end of file diff --git a/public/require_config.js b/public/require_config.js deleted file mode 100644 index b209f1dc..00000000 --- a/public/require_config.js +++ /dev/null @@ -1,7 +0,0 @@ -require.config({ - baseUrl: document.baseURI + 'public/js', - waitSeconds: 10, - paths: { - async: document.baseURI + 'public/vendor/async' - } -}); \ No newline at end of file diff --git a/public/vendor b/public/vendor deleted file mode 160000 index 31cbac89..00000000 --- a/public/vendor +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 31cbac89f1465de60797d2879addc8c71de93d1b diff --git a/web/bundle.json b/web/bundle.json new file mode 100644 index 00000000..cc6f1e05 --- /dev/null +++ b/web/bundle.json @@ -0,0 +1,24 @@ +[ + "node_modules/angular/angular.min", + "node_modules/angular-couch-potato/dist/angular-couch-potato", + "node_modules/@uirouter/angularjs/release/angular-ui-router", + "node_modules/angular-ui-bootstrap/dist/ui-bootstrap-tpls", + "node_modules/angular-loading-bar/build/loading-bar", + "node_modules/moment/min/moment.min", + "node_modules/sweetalert/dist/sweetalert.min", + "node_modules/angular-ui-ace/src/ui-ace", + "node_modules/ace-builds/src-min-noconflict/ace", + "node_modules/ace-builds/src-min-noconflict/mode-json", + "node_modules/ace-builds/src-min-noconflict/mode-yaml", + "node_modules/ace-builds/src-min-noconflict/mode-ini", + "node_modules/angularjs-scroll-glue/src/scrollglue", + "public/js/app", + "public/js/routes/router", + "public/js/routes/auth", + "public/js/routes/project", + + "public/js/factories/project", + + "node_modules/requirejs/require", + "require_config" +] diff --git a/web/bundler.js b/web/bundler.js new file mode 100644 index 00000000..f6bb5efb --- /dev/null +++ b/web/bundler.js @@ -0,0 +1,27 @@ +var fs = require('fs'), + bundle = require('./bundle.json'), + out = fs.createWriteStream('./public/js/bundle.js'); + +bundle.forEach(function(file) { + var o = {}; + if (typeof file === 'object') { + o = file; + file = o.src; + } + + file = file + '.js'; + + var contents = fs.readFileSync(file); + + out.write('\n/* BUNDLED FILE: ' + file + ' */\n'); + + if (o.pre) { + out.write(o.pre + '\n'); + } + + out.write(contents + '\n'); + + if (o.post) { + out.write(o.post + '\n'); + } +}); \ No newline at end of file diff --git a/web/package-lock.json b/web/package-lock.json new file mode 100644 index 00000000..b3a9ef88 --- /dev/null +++ b/web/package-lock.json @@ -0,0 +1,97 @@ +{ + "name": "semaphore", + "version": "2.5.0", + "lockfileVersion": 1, + "dependencies": { + "@uirouter/angularjs": { + "version": "1.0.15", + "resolved": "https://registry.npmjs.org/@uirouter/angularjs/-/angularjs-1.0.15.tgz", + "integrity": "sha512-qV+fz+OV5WRNNCXfeVO7nEcSSNESXOxLC0lXM9sv+IwTW6gyiynZ2wHP7fP2ETbr20sPxtbFC+kMVLzyiw/yIg==", + "dependencies": { + "@uirouter/core": { + "version": "5.0.17", + "resolved": "https://registry.npmjs.org/@uirouter/core/-/core-5.0.17.tgz", + "integrity": "sha512-aJOSpaRbctGw24Mh74sonLwCyskl7KzFz7M0jRDqrd+eHZK6s/xxi4ZSNuGHRy6kF4x7195buQSJEo7u82t+rA==" + } + } + }, + "ace-builds": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/ace-builds/-/ace-builds-1.3.1.tgz", + "integrity": "sha512-MJtPAqeGaiIpfgUCXi3/oowqcIw4wSkKTDGvtfUoQHrfZGfjNnH3frPdHzd1VfKF62JFeNJOl4q0TRDiHwoBFg==" + }, + "angular": { + "version": "1.6.9", + "resolved": "https://registry.npmjs.org/angular/-/angular-1.6.9.tgz", + "integrity": "sha512-6igWH2GIsxV+J38wNWCh8oyjaZsrIPIDO35twloIUyjlF2Yit6UyLAWujHP05ma/LFxTsx4NtYibRoMNBXPR1A==" + }, + "angular-couch-potato": { + "version": "git+https://github.com/laurelnaiad/angular-couch-potato.git#fea40f7547890d2914c673e18dd1e752b4b110b3" + }, + "angular-loading-bar": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/angular-loading-bar/-/angular-loading-bar-0.9.0.tgz", + "integrity": "sha1-N+9Swl8QLCFuezzf0vxaXflijkU=" + }, + "angular-ui-ace": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/angular-ui-ace/-/angular-ui-ace-0.2.3.tgz", + "integrity": "sha1-PLkDQoEAYho2f8f2QUQOl6QqJtA=" + }, + "angular-ui-bootstrap": { + "version": "2.5.6", + "resolved": "https://registry.npmjs.org/angular-ui-bootstrap/-/angular-ui-bootstrap-2.5.6.tgz", + "integrity": "sha512-yzcHpPMLQl0232nDzm5P4iAFTFQ9dMw0QgFLuKYbDj9M0xJ62z0oudYD/Lvh1pWfRsukiytP4Xj6BHOSrSXP8A==" + }, + "angularjs-scroll-glue": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/angularjs-scroll-glue/-/angularjs-scroll-glue-2.1.0.tgz", + "integrity": "sha1-2aXo5QG7XkDL6yXzr2awxhM1wiY=" + }, + "async": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.0.tgz", + "integrity": "sha512-xAfGg1/NTLBBKlHFmnd7PlmUW9KhVQIUuSrYem9xzFUZy13ScvtyGGejaae9iAVRiRq9+Cx7DPFaAAhCpyxyPw==" + }, + "bootstrap": { + "version": "3.3.5", + "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-3.3.5.tgz", + "integrity": "sha1-F3ereSmbEo2H3OfL2G/cRqxpwLE=" + }, + "es6-object-assign": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/es6-object-assign/-/es6-object-assign-1.1.0.tgz", + "integrity": "sha1-wsNYJlYkfDnqEHyx5mUrb58kUjw=" + }, + "font-awesome": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/font-awesome/-/font-awesome-4.5.0.tgz", + "integrity": "sha1-Hp18z31jvb5XAA4Y1RiMslV+cPg=" + }, + "lodash": { + "version": "4.17.4", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", + "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=" + }, + "moment": { + "version": "2.11.1", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.11.1.tgz", + "integrity": "sha1-v0AmQTZA0bgCRnzzU2B/hGTWr0c=" + }, + "promise-polyfill": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/promise-polyfill/-/promise-polyfill-6.1.0.tgz", + "integrity": "sha1-36lpQ+qcEh/KTem1hoyznTRy4Fc=" + }, + "requirejs": { + "version": "2.3.5", + "resolved": "https://registry.npmjs.org/requirejs/-/requirejs-2.3.5.tgz", + "integrity": "sha512-svnO+aNcR/an9Dpi44C7KSAy5fFGLtmPbaaCeQaklUz8BQhS64tWWIIlvEA5jrWICzlO/X9KSzSeXFnZdBu8nw==" + }, + "sweetalert": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/sweetalert/-/sweetalert-2.1.0.tgz", + "integrity": "sha512-9YKj0SvjKyBfRWco50UOsIbXVeifYbxzT9Qda7EsqC01eafHGCSG0IR7g942ufjzt7lnwO8ZZBwr6emXv2fQrg==" + } + } +} diff --git a/web/package.json b/web/package.json new file mode 100644 index 00000000..f21a7f56 --- /dev/null +++ b/web/package.json @@ -0,0 +1,36 @@ +{ + "name": "semaphore", + "version": "2.5.0", + "description": "Open Source alternative to Ansible Tower", + "main": "index.js", + "dependencies": { + "@uirouter/angularjs": "^1.0.15", + "ace-builds": "^1.3.1", + "angular": "^1.6.9", + "angular-couch-potato": "git+https://github.com/laurelnaiad/angular-couch-potato.git", + "angular-loading-bar": "^0.9.0", + "angular-ui-ace": "^0.2.3", + "angular-ui-bootstrap": "^2.5.6", + "angularjs-scroll-glue": "^2.1.0", + "async": "^2.6.0", + "bootstrap": "^3.3.5", + "font-awesome": "^4.5.0", + "moment": "^2.11.1", + "requirejs": "^2.3.5", + "sweetalert": "^2.1.0" + }, + "devDependencies": {}, + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/ansible-semaphore/semaphore.git" + }, + "author": "", + "license": "MIT", + "bugs": { + "url": "https://github.com/ansible-semaphore/semaphore/issues" + }, + "homepage": "https://github.com/ansible-semaphore/semaphore#readme" +} diff --git a/web/public/css/.gitkeep b/web/public/css/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/web/public/fonts/.gitkeep b/web/public/fonts/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/web/public/html/.gitkeep b/web/public/html/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/public/img/icon.png b/web/public/img/icon.png similarity index 100% rename from public/img/icon.png rename to web/public/img/icon.png diff --git a/public/img/logo.png b/web/public/img/logo.png similarity index 100% rename from public/img/logo.png rename to web/public/img/logo.png diff --git a/public/img/screenshot.png b/web/public/img/screenshot.png similarity index 100% rename from public/img/screenshot.png rename to web/public/img/screenshot.png diff --git a/public/js/ace/worker-json.js b/web/public/js/ace/worker-json.js similarity index 100% rename from public/js/ace/worker-json.js rename to web/public/js/ace/worker-json.js diff --git a/public/js/app.js b/web/public/js/app.js similarity index 100% rename from public/js/app.js rename to web/public/js/app.js diff --git a/public/js/controllers/admin.js b/web/public/js/controllers/admin.js similarity index 100% rename from public/js/controllers/admin.js rename to web/public/js/controllers/admin.js diff --git a/public/js/controllers/dashboard.js b/web/public/js/controllers/dashboard.js similarity index 100% rename from public/js/controllers/dashboard.js rename to web/public/js/controllers/dashboard.js diff --git a/public/js/controllers/login.js b/web/public/js/controllers/login.js similarity index 100% rename from public/js/controllers/login.js rename to web/public/js/controllers/login.js diff --git a/public/js/controllers/projects/dashboard.js b/web/public/js/controllers/projects/dashboard.js similarity index 100% rename from public/js/controllers/projects/dashboard.js rename to web/public/js/controllers/projects/dashboard.js diff --git a/public/js/controllers/projects/edit.js b/web/public/js/controllers/projects/edit.js similarity index 100% rename from public/js/controllers/projects/edit.js rename to web/public/js/controllers/projects/edit.js diff --git a/public/js/controllers/projects/environment.js b/web/public/js/controllers/projects/environment.js similarity index 100% rename from public/js/controllers/projects/environment.js rename to web/public/js/controllers/projects/environment.js diff --git a/public/js/controllers/projects/inventory.js b/web/public/js/controllers/projects/inventory.js similarity index 100% rename from public/js/controllers/projects/inventory.js rename to web/public/js/controllers/projects/inventory.js diff --git a/public/js/controllers/projects/keys.js b/web/public/js/controllers/projects/keys.js similarity index 100% rename from public/js/controllers/projects/keys.js rename to web/public/js/controllers/projects/keys.js diff --git a/public/js/controllers/projects/repositories.js b/web/public/js/controllers/projects/repositories.js similarity index 100% rename from public/js/controllers/projects/repositories.js rename to web/public/js/controllers/projects/repositories.js diff --git a/public/js/controllers/projects/schedule.js b/web/public/js/controllers/projects/schedule.js similarity index 100% rename from public/js/controllers/projects/schedule.js rename to web/public/js/controllers/projects/schedule.js diff --git a/public/js/controllers/projects/taskRunner.js b/web/public/js/controllers/projects/taskRunner.js similarity index 100% rename from public/js/controllers/projects/taskRunner.js rename to web/public/js/controllers/projects/taskRunner.js diff --git a/public/js/controllers/projects/templates.js b/web/public/js/controllers/projects/templates.js similarity index 100% rename from public/js/controllers/projects/templates.js rename to web/public/js/controllers/projects/templates.js diff --git a/public/js/controllers/projects/users.js b/web/public/js/controllers/projects/users.js similarity index 100% rename from public/js/controllers/projects/users.js rename to web/public/js/controllers/projects/users.js diff --git a/public/js/controllers/tasks.js b/web/public/js/controllers/tasks.js similarity index 100% rename from public/js/controllers/tasks.js rename to web/public/js/controllers/tasks.js diff --git a/public/js/controllers/user.js b/web/public/js/controllers/user.js similarity index 100% rename from public/js/controllers/user.js rename to web/public/js/controllers/user.js diff --git a/public/js/controllers/users.js b/web/public/js/controllers/users.js similarity index 100% rename from public/js/controllers/users.js rename to web/public/js/controllers/users.js diff --git a/public/js/factories/host.js b/web/public/js/factories/host.js similarity index 100% rename from public/js/factories/host.js rename to web/public/js/factories/host.js diff --git a/public/js/factories/hostgroup.js b/web/public/js/factories/hostgroup.js similarity index 100% rename from public/js/factories/hostgroup.js rename to web/public/js/factories/hostgroup.js diff --git a/public/js/factories/identity.js b/web/public/js/factories/identity.js similarity index 100% rename from public/js/factories/identity.js rename to web/public/js/factories/identity.js diff --git a/public/js/factories/job.js b/web/public/js/factories/job.js similarity index 100% rename from public/js/factories/job.js rename to web/public/js/factories/job.js diff --git a/public/js/factories/playbook.js b/web/public/js/factories/playbook.js similarity index 100% rename from public/js/factories/playbook.js rename to web/public/js/factories/playbook.js diff --git a/public/js/factories/project.js b/web/public/js/factories/project.js similarity index 100% rename from public/js/factories/project.js rename to web/public/js/factories/project.js diff --git a/public/js/factories/task.js b/web/public/js/factories/task.js similarity index 100% rename from public/js/factories/task.js rename to web/public/js/factories/task.js diff --git a/public/js/factories/user.js b/web/public/js/factories/user.js similarity index 100% rename from public/js/factories/user.js rename to web/public/js/factories/user.js diff --git a/public/js/routes/auth.js b/web/public/js/routes/auth.js similarity index 100% rename from public/js/routes/auth.js rename to web/public/js/routes/auth.js diff --git a/public/js/routes/project.js b/web/public/js/routes/project.js similarity index 100% rename from public/js/routes/project.js rename to web/public/js/routes/project.js diff --git a/public/js/routes/router.js b/web/public/js/routes/router.js similarity index 100% rename from public/js/routes/router.js rename to web/public/js/routes/router.js diff --git a/public/js/services/hostgroups.js b/web/public/js/services/hostgroups.js similarity index 100% rename from public/js/services/hostgroups.js rename to web/public/js/services/hostgroups.js diff --git a/public/js/services/identities.js b/web/public/js/services/identities.js similarity index 100% rename from public/js/services/identities.js rename to web/public/js/services/identities.js diff --git a/public/js/services/jobs.js b/web/public/js/services/jobs.js similarity index 100% rename from public/js/services/jobs.js rename to web/public/js/services/jobs.js diff --git a/public/js/services/playbooks.js b/web/public/js/services/playbooks.js similarity index 100% rename from public/js/services/playbooks.js rename to web/public/js/services/playbooks.js diff --git a/public/js/services/tasks.js b/web/public/js/services/tasks.js similarity index 100% rename from public/js/services/tasks.js rename to web/public/js/services/tasks.js diff --git a/public/js/services/user.js b/web/public/js/services/user.js similarity index 100% rename from public/js/services/user.js rename to web/public/js/services/user.js diff --git a/public/js/services/users.js b/web/public/js/services/users.js similarity index 100% rename from public/js/services/users.js rename to web/public/js/services/users.js diff --git a/web/require_config.js b/web/require_config.js new file mode 100644 index 00000000..94b73610 --- /dev/null +++ b/web/require_config.js @@ -0,0 +1,4 @@ +require.config({ + baseUrl: document.baseURI + 'public/js', + waitSeconds: 10 +}); \ No newline at end of file diff --git a/public/css/login.less b/web/resources/less/login.less similarity index 100% rename from public/css/login.less rename to web/resources/less/login.less diff --git a/public/css/octocat.less b/web/resources/less/octocat.less similarity index 100% rename from public/css/octocat.less rename to web/resources/less/octocat.less diff --git a/public/css/semaphore.less b/web/resources/less/semaphore.less similarity index 89% rename from public/css/semaphore.less rename to web/resources/less/semaphore.less index d039ddc3..262efeb7 100644 --- a/public/css/semaphore.less +++ b/web/resources/less/semaphore.less @@ -1,8 +1,8 @@ -@import '../vendor/bootstrap/less/variables.less'; -@import '../vendor/fontawesome/less/variables.less'; +@import '../../node_modules/bootstrap/less/variables.less'; +@import '../../node_modules/font-awesome/less/variables.less'; @import '//fonts.googleapis.com/css?family=Roboto:300,400,400italic,700,500,700italic'; -@fa-font-path: "../vendor/fontawesome/fonts"; +@fa-font-path: "../fonts"; @font-family-sans-serif: Roboto, Arial, sans-serif; @font-family-monospace: Hack, Menlo, Monaco, Consolas, "Courier New", monospace; @@ -39,10 +39,10 @@ @pre-bg: #fefefe; @pre-color: #000; -@import '../vendor/bootstrap/less/bootstrap.less'; -@import '../vendor/fontawesome/less/font-awesome.less'; -@import (less) '../vendor/angular-loading-bar/loading-bar.css'; -@import (less) '../vendor/sweetalert/sweetalert.css'; +@import '../../node_modules/bootstrap/less/bootstrap.less'; +@import '../../node_modules/font-awesome/less/font-awesome.less'; +@import (less) '../../node_modules/angular-loading-bar/build/loading-bar.css'; +//@import (less) '../../../node_modules/sweetalert/dist/sweetalert.css'; @import 'login.less'; @import 'octocat.less'; diff --git a/public/html/abstract.pug b/web/resources/pug/abstract.pug similarity index 100% rename from public/html/abstract.pug rename to web/resources/pug/abstract.pug diff --git a/public/html/admin.pug b/web/resources/pug/admin.pug similarity index 100% rename from public/html/admin.pug rename to web/resources/pug/admin.pug diff --git a/public/html/auth/login.pug b/web/resources/pug/auth/login.pug similarity index 100% rename from public/html/auth/login.pug rename to web/resources/pug/auth/login.pug diff --git a/public/html/auth/logout.pug b/web/resources/pug/auth/logout.pug similarity index 100% rename from public/html/auth/logout.pug rename to web/resources/pug/auth/logout.pug diff --git a/public/html/dashboard.pug b/web/resources/pug/dashboard.pug similarity index 100% rename from public/html/dashboard.pug rename to web/resources/pug/dashboard.pug diff --git a/public/html/index.pug b/web/resources/pug/index.pug similarity index 100% rename from public/html/index.pug rename to web/resources/pug/index.pug diff --git a/public/html/projects/add.pug b/web/resources/pug/projects/add.pug similarity index 100% rename from public/html/projects/add.pug rename to web/resources/pug/projects/add.pug diff --git a/public/html/projects/container.pug b/web/resources/pug/projects/container.pug similarity index 100% rename from public/html/projects/container.pug rename to web/resources/pug/projects/container.pug diff --git a/public/html/projects/createTaskModal.pug b/web/resources/pug/projects/createTaskModal.pug similarity index 100% rename from public/html/projects/createTaskModal.pug rename to web/resources/pug/projects/createTaskModal.pug diff --git a/public/html/projects/dashboard.pug b/web/resources/pug/projects/dashboard.pug similarity index 100% rename from public/html/projects/dashboard.pug rename to web/resources/pug/projects/dashboard.pug diff --git a/public/html/projects/edit.pug b/web/resources/pug/projects/edit.pug similarity index 100% rename from public/html/projects/edit.pug rename to web/resources/pug/projects/edit.pug diff --git a/public/html/projects/environment/add.pug b/web/resources/pug/projects/environment/add.pug similarity index 100% rename from public/html/projects/environment/add.pug rename to web/resources/pug/projects/environment/add.pug diff --git a/public/html/projects/environment/list.pug b/web/resources/pug/projects/environment/list.pug similarity index 100% rename from public/html/projects/environment/list.pug rename to web/resources/pug/projects/environment/list.pug diff --git a/public/html/projects/inventory/add.pug b/web/resources/pug/projects/inventory/add.pug similarity index 100% rename from public/html/projects/inventory/add.pug rename to web/resources/pug/projects/inventory/add.pug diff --git a/public/html/projects/inventory/edit.pug b/web/resources/pug/projects/inventory/edit.pug similarity index 100% rename from public/html/projects/inventory/edit.pug rename to web/resources/pug/projects/inventory/edit.pug diff --git a/public/html/projects/inventory/list.pug b/web/resources/pug/projects/inventory/list.pug similarity index 100% rename from public/html/projects/inventory/list.pug rename to web/resources/pug/projects/inventory/list.pug diff --git a/public/html/projects/keys/add.pug b/web/resources/pug/projects/keys/add.pug similarity index 100% rename from public/html/projects/keys/add.pug rename to web/resources/pug/projects/keys/add.pug diff --git a/public/html/projects/keys/list.pug b/web/resources/pug/projects/keys/list.pug similarity index 100% rename from public/html/projects/keys/list.pug rename to web/resources/pug/projects/keys/list.pug diff --git a/public/html/projects/repositories/add.pug b/web/resources/pug/projects/repositories/add.pug similarity index 100% rename from public/html/projects/repositories/add.pug rename to web/resources/pug/projects/repositories/add.pug diff --git a/public/html/projects/repositories/list.pug b/web/resources/pug/projects/repositories/list.pug similarity index 100% rename from public/html/projects/repositories/list.pug rename to web/resources/pug/projects/repositories/list.pug diff --git a/public/html/projects/schedule.pug b/web/resources/pug/projects/schedule.pug similarity index 100% rename from public/html/projects/schedule.pug rename to web/resources/pug/projects/schedule.pug diff --git a/public/html/projects/taskModal.pug b/web/resources/pug/projects/taskModal.pug similarity index 100% rename from public/html/projects/taskModal.pug rename to web/resources/pug/projects/taskModal.pug diff --git a/public/html/projects/templates/add.pug b/web/resources/pug/projects/templates/add.pug similarity index 100% rename from public/html/projects/templates/add.pug rename to web/resources/pug/projects/templates/add.pug diff --git a/public/html/projects/templates/list.pug b/web/resources/pug/projects/templates/list.pug similarity index 100% rename from public/html/projects/templates/list.pug rename to web/resources/pug/projects/templates/list.pug diff --git a/public/html/projects/users/add.pug b/web/resources/pug/projects/users/add.pug similarity index 100% rename from public/html/projects/users/add.pug rename to web/resources/pug/projects/users/add.pug diff --git a/public/html/projects/users/list.pug b/web/resources/pug/projects/users/list.pug similarity index 100% rename from public/html/projects/users/list.pug rename to web/resources/pug/projects/users/list.pug diff --git a/public/html/tasks.pug b/web/resources/pug/tasks.pug similarity index 100% rename from public/html/tasks.pug rename to web/resources/pug/tasks.pug diff --git a/public/html/users/add.pug b/web/resources/pug/users/add.pug similarity index 100% rename from public/html/users/add.pug rename to web/resources/pug/users/add.pug diff --git a/public/html/users/list.pug b/web/resources/pug/users/list.pug similarity index 100% rename from public/html/users/list.pug rename to web/resources/pug/users/list.pug diff --git a/public/html/users/user.pug b/web/resources/pug/users/user.pug similarity index 100% rename from public/html/users/user.pug rename to web/resources/pug/users/user.pug