diff --git a/server/build.gradle b/server/build.gradle index 7568877088..607838e055 100644 --- a/server/build.gradle +++ b/server/build.gradle @@ -1,14 +1,3 @@ -plugins { - alias libs.plugins.node.gradle -} - -node { - version = '22.3.0' - npmVersion = '10.8.1' - download = true - npmInstallCommand = "ci" -} - dependencies { implementation project(':common-legacy') @@ -73,52 +62,4 @@ if (!rootProject.hasProperty('noWeb')) { } } -def clientRelocations = [ - 'ace-builds/src-min-noconflict/', - 'angular/angular.min.js', - 'angular-cache-buster/angular-cache-buster.js', - 'angular-cookies/angular-cookies.min.js', - 'angular-dynamic-locale/dist/tmhDynamicLocale.min.js', - 'angular-ui-ace/src/ui-ace.js', - 'angular-i18n', - 'angular-local-storage/dist/angular-local-storage.min.js', - 'angular-resource/angular-resource.min.js', - 'angular-sanitize/angular-sanitize.min.js', - 'angular-translate/dist/angular-translate.min.js', - 'angular-translate-loader-partial/angular-translate-loader-partial.min.js', - 'angular-translate-storage-cookie/angular-translate-storage-cookie.min.js', - 'angular-ui-ace/src/ui-ace.js', - 'angular-ui-bootstrap/dist/', - 'angular-ui-notification/dist/', - 'angular-ui-router/release/angular-ui-router.min.js', - 'bootstrap/dist/', - 'bootswatch/cerulean/bootstrap.min.css', - 'diff/dist/diff.min.js', - 'fast-json-patch/dist/json-patch-duplex.min.js', - 'jquery/dist/jquery.min.js', - 'json3/lib/json3.min.js', - 'moment/min/moment.min.js' -] - -task copyClientDependencies { - dependsOn tasks.npmInstall - - doLast { - clientRelocations.each { location -> - def paths = location.split('/') - def folder = paths[0] - copy { - from "${project.projectDir}/node_modules/$location" - into "${project.projectDir}/src/main/resources/webapp/vendor/$folder" - } - } - } -} - -task cleanClientDependencies(type: Delete) { - delete "${project.projectDir}/src/main/resources/webapp/vendor" -} - tasks.sourcesJar.dependsOn(tasks.versionProperties) -tasks.clean.dependsOn(tasks.cleanClientDependencies) -tasks.processResources.dependsOn(tasks.copyClientDependencies) diff --git a/server/package-lock.json b/server/package-lock.json deleted file mode 100644 index 990a8f3739..0000000000 --- a/server/package-lock.json +++ /dev/null @@ -1,319 +0,0 @@ -{ - "name": "@centraldogma/webapp", - "lockfileVersion": 2, - "requires": true, - "packages": { - "": { - "name": "@centraldogma/webapp", - "license": "Apache-2.0", - "dependencies": { - "ace-builds": "1.32.2", - "angular": "1.5.8", - "angular-cache-buster": "0.4.3", - "angular-cookies": "1.5.8", - "angular-dynamic-locale": "0.1.32", - "angular-i18n": "1.5.8", - "angular-local-storage": "0.5.0", - "angular-resource": "1.5.8", - "angular-sanitize": "1.5.8", - "angular-translate": "2.13.0", - "angular-translate-loader-partial": "2.13.0", - "angular-translate-storage-cookie": "2.13.0", - "angular-ui-ace": "0.2.3", - "angular-ui-bootstrap": "2.2.0", - "angular-ui-notification": "0.2.0", - "angular-ui-router": "0.3.2", - "bootstrap": "3.3.7", - "bootswatch": "3.3.7", - "diff": "3.0.1", - "fast-json-patch": "1.1.1", - "jquery": "2.2.4", - "json3": "3.3.2", - "moment": "2.16.0" - } - }, - "node_modules/ace-builds": { - "version": "1.32.2", - "resolved": "https://registry.npmjs.org/ace-builds/-/ace-builds-1.32.2.tgz", - "integrity": "sha512-mnJAc803p+7eeDt07r6XI7ufV7VdkpPq4gJZT8Jb3QsowkaBTVy4tdBgPrVT0WbXLm0toyEQXURKSVNj/7dfJQ==" - }, - "node_modules/angular": { - "version": "1.5.8", - "resolved": "https://registry.npmjs.org/angular/-/angular-1.5.8.tgz", - "integrity": "sha512-NvzSfusQ5J70ZFVui9Y+sv453kkaqGuke3ZjLSzuKNnXJx5WytGSsJEDpoDmKUDKn3goiToVtu3ptW3nEBRs3Q==", - "deprecated": "For the actively supported Angular, see https://www.npmjs.com/package/@angular/core. AngularJS support has officially ended. For extended AngularJS support options, see https://goo.gle/angularjs-path-forward." - }, - "node_modules/angular-cache-buster": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/angular-cache-buster/-/angular-cache-buster-0.4.3.tgz", - "integrity": "sha512-VQgq+RR6ZMxbOLTOLgQB7EsCbMsqraxvwV23M4GRg604usL53bz0N+oYLLCfEAEJ+cvd6QH9kcMCBoyKTjx3aw==" - }, - "node_modules/angular-cookies": { - "version": "1.5.8", - "resolved": "https://registry.npmjs.org/angular-cookies/-/angular-cookies-1.5.8.tgz", - "integrity": "sha512-yT7xzQ7qD2VDF8pukyQ/ly3/pPtdtiUesl0Bg6CNNINttS7GujriU8gnQIEGeZfetmrft80aTYcD3J9nyi3/pA==", - "deprecated": "For the actively supported Angular, see https://www.npmjs.com/package/@angular/core. AngularJS support has officially ended. For extended AngularJS support options, see https://goo.gle/angularjs-path-forward." - }, - "node_modules/angular-dynamic-locale": { - "version": "0.1.32", - "resolved": "https://registry.npmjs.org/angular-dynamic-locale/-/angular-dynamic-locale-0.1.32.tgz", - "integrity": "sha512-Q+8Vbb9hlM+mXD09JO/BJanmk9wvcDbovTOIDYc6efFWgS6QqBXpiAD86YZaHbyJ45hM6MEWqbkJv+pnJKQgpQ==" - }, - "node_modules/angular-i18n": { - "version": "1.5.8", - "resolved": "https://registry.npmjs.org/angular-i18n/-/angular-i18n-1.5.8.tgz", - "integrity": "sha512-Tg/z1PDGR1Va7QHANmtMI1k3WxlL59PiWNNHRVa0lcz+CiuuuqCki/tteGDi3taUM2t8HYIOLvNlnRbxy3C/Zw==", - "deprecated": "For the actively supported Angular, see https://www.npmjs.com/package/@angular/core. AngularJS support has officially ended. For extended AngularJS support options, see https://goo.gle/angularjs-path-forward." - }, - "node_modules/angular-local-storage": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/angular-local-storage/-/angular-local-storage-0.5.0.tgz", - "integrity": "sha512-GksrqEpE9af70hqFN/xcVvTaUDcyhTDCedG560lgfTzfVsEeYza1kikK240OfKkJa9NVjbmfMlOP7CdTRNjiow==" - }, - "node_modules/angular-resource": { - "version": "1.5.8", - "resolved": "https://registry.npmjs.org/angular-resource/-/angular-resource-1.5.8.tgz", - "integrity": "sha512-Ckp4gsMbQOE8HvUECZOnx+FWGv/yL7K4q5SOihY2ifav6FkaItRFM4exBLUnwYDXUKebtbfkHaDDQMoILx0jfw==", - "deprecated": "For the actively supported Angular, see https://www.npmjs.com/package/@angular/core. AngularJS support has officially ended. For extended AngularJS support options, see https://goo.gle/angularjs-path-forward." - }, - "node_modules/angular-sanitize": { - "version": "1.5.8", - "resolved": "https://registry.npmjs.org/angular-sanitize/-/angular-sanitize-1.5.8.tgz", - "integrity": "sha512-SCr0ekZLacVt5RzgufvfYQRYr34pJSL+lVcbBBtvXyMXNC2g9RcTxA+Uwgaq4AoxnxGiZb2WYrXMtL9nYGAo+Q==", - "deprecated": "For the actively supported Angular, see https://www.npmjs.com/package/@angular/core. AngularJS support has officially ended. For extended AngularJS support options, see https://goo.gle/angularjs-path-forward." - }, - "node_modules/angular-translate": { - "version": "2.13.0", - "resolved": "https://registry.npmjs.org/angular-translate/-/angular-translate-2.13.0.tgz", - "integrity": "sha512-x5u+IK3Zw0CPJEKs12qGyAlCcqIT6SKXPAol6UfCzPkXl0pIkKzMOqQhRjsfXafRIm4/uAE5o9bM7fM3RdxQxw==", - "dependencies": { - "angular": ">=1.2.26 <=1.6" - }, - "engines": { - "node": ">=6.9" - } - }, - "node_modules/angular-translate-loader-partial": { - "version": "2.13.0", - "resolved": "https://registry.npmjs.org/angular-translate-loader-partial/-/angular-translate-loader-partial-2.13.0.tgz", - "integrity": "sha512-SCVtUDddPynRdG1KHuqfJ1eJu0hzndD/BbjdbkQSyeKjpYhCAxR7NjgCsffVmsA8KU46Kcj1nvedUfR2hrwAcQ==", - "dependencies": { - "angular-translate": "~2.13.0" - } - }, - "node_modules/angular-translate-storage-cookie": { - "version": "2.13.0", - "resolved": "https://registry.npmjs.org/angular-translate-storage-cookie/-/angular-translate-storage-cookie-2.13.0.tgz", - "integrity": "sha512-dgaw36cSXXo+HwHJZ1JjfgjMUnO29G0AJ8tQkibp5o+jUkRv6OKIzteJM9qNgxA6+qNVeTQdFmxq7YRHvIpDNA==", - "dependencies": { - "angular-cookies": ">=1.2.26 <1.6", - "angular-translate": "~2.13.0" - } - }, - "node_modules/angular-ui-ace": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/angular-ui-ace/-/angular-ui-ace-0.2.3.tgz", - "integrity": "sha512-uh3840Jvs6+uUW3u3T5D17AbKeAirPS+chpIMokJECNBpPOoK0ZoS61UKlHb6hsx6o0LCM9KlnAi84BDtmIkUA==" - }, - "node_modules/angular-ui-bootstrap": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/angular-ui-bootstrap/-/angular-ui-bootstrap-2.2.0.tgz", - "integrity": "sha512-+OVf6od0euS6HmbpYZhb6Xx/pqNyByFIc/t20us+Q6KAU79muPvQ0Uzc39eCbnc9Uz1+pNk/yKOlJTezdEBiyg==" - }, - "node_modules/angular-ui-notification": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/angular-ui-notification/-/angular-ui-notification-0.2.0.tgz", - "integrity": "sha512-hiUGiCs5mb7oBbqp83BWKEwUHBTY+1JPrMp6KgXGFk9srizz3OwzRkd3rOT3SIQdkJPMWp/SkpZsRErFXy3/XA==" - }, - "node_modules/angular-ui-router": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/angular-ui-router/-/angular-ui-router-0.3.2.tgz", - "integrity": "sha512-FXtC3D7z7SNtSIdMDXCVO+v4Q6jPABneDvRu6NyOeeZlo09mQFqVCjhKqJWnf94ZlNSmyOXoFSqKD5tL2JTFEg==", - "deprecated": "This npm package 'angular-ui-router' has been renamed to '@uirouter/angularjs'. Please update your package.json. See https://ui-router.github.io/blog/uirouter-scoped-packages/", - "dependencies": { - "angular": "^1.0.8" - } - }, - "node_modules/bootstrap": { - "version": "3.3.7", - "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-3.3.7.tgz", - "integrity": "sha512-qcFaisBrcBhTFkz1IUnGDYnX6ZWfFzH8zOixUDtHW9Ip+r+7MfMFav2rzy7cIHc7rgIg7xjhWBoo1mS/U26j4g==", - "engines": { - "node": ">=0.10.1" - } - }, - "node_modules/bootswatch": { - "version": "3.3.7", - "resolved": "https://registry.npmjs.org/bootswatch/-/bootswatch-3.3.7.tgz", - "integrity": "sha512-8tHnBRrEHX+CtFyth9XPyR7Tl97VaU/w14eRRm+/mZrEs9JSe8Ren9UEkdFjDMlxIeDREKichmrb90EzXgtKSQ==", - "engines": { - "node": ">= 0.10.0" - } - }, - "node_modules/diff": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.0.1.tgz", - "integrity": "sha512-womO+WMwc3Pikbop4DWrncrN2M0GSDwG8pwxAEhzS7g0qYrtrUmIQkD8ewWedlLYp0Kp3HR8nwRE5cMzwIBrtQ==", - "engines": { - "node": ">=0.3.1" - } - }, - "node_modules/fast-json-patch": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/fast-json-patch/-/fast-json-patch-1.1.1.tgz", - "integrity": "sha512-6E4IY1bdWejJPHLdP0qjeQehvTgqifd5KjBz2RgPw+XaZGRGOY7PbQP8aoQVVefJNSR26G3dLQYGJIo6890IzA==", - "engines": { - "node": ">= 0.4.0" - } - }, - "node_modules/jquery": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/jquery/-/jquery-2.2.4.tgz", - "integrity": "sha512-lBHj60ezci2u1v2FqnZIraShGgEXq35qCzMv4lITyHGppTnA13rwR0MgwyNJh9TnDs3aXUvd1xjAotfraMHX/Q==" - }, - "node_modules/json3": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/json3/-/json3-3.3.2.tgz", - "integrity": "sha512-I5YLeauH3rIaE99EE++UeH2M2gSYo8/2TqDac7oZEH6D/DSQ4Woa628Qrfj1X9/OY5Mk5VvIDQaKCDchXaKrmA==", - "deprecated": "Please use the native JSON object instead of JSON 3" - }, - "node_modules/moment": { - "version": "2.16.0", - "resolved": "https://registry.npmjs.org/moment/-/moment-2.16.0.tgz", - "integrity": "sha512-Jmy+b0/BMklLlYBzrClLstnS9Wn/WzYnmM2ub8wjdIJhp8UnbTTIHLLZpEsgmPTPgjFnXbTe32XYKYkadf9qJQ==", - "engines": { - "node": "*" - } - } - }, - "dependencies": { - "ace-builds": { - "version": "1.32.2", - "resolved": "https://registry.npmjs.org/ace-builds/-/ace-builds-1.32.2.tgz", - "integrity": "sha512-mnJAc803p+7eeDt07r6XI7ufV7VdkpPq4gJZT8Jb3QsowkaBTVy4tdBgPrVT0WbXLm0toyEQXURKSVNj/7dfJQ==" - }, - "angular": { - "version": "1.5.8", - "resolved": "https://registry.npmjs.org/angular/-/angular-1.5.8.tgz", - "integrity": "sha512-NvzSfusQ5J70ZFVui9Y+sv453kkaqGuke3ZjLSzuKNnXJx5WytGSsJEDpoDmKUDKn3goiToVtu3ptW3nEBRs3Q==" - }, - "angular-cache-buster": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/angular-cache-buster/-/angular-cache-buster-0.4.3.tgz", - "integrity": "sha512-VQgq+RR6ZMxbOLTOLgQB7EsCbMsqraxvwV23M4GRg604usL53bz0N+oYLLCfEAEJ+cvd6QH9kcMCBoyKTjx3aw==" - }, - "angular-cookies": { - "version": "1.5.8", - "resolved": "https://registry.npmjs.org/angular-cookies/-/angular-cookies-1.5.8.tgz", - "integrity": "sha512-yT7xzQ7qD2VDF8pukyQ/ly3/pPtdtiUesl0Bg6CNNINttS7GujriU8gnQIEGeZfetmrft80aTYcD3J9nyi3/pA==" - }, - "angular-dynamic-locale": { - "version": "0.1.32", - "resolved": "https://registry.npmjs.org/angular-dynamic-locale/-/angular-dynamic-locale-0.1.32.tgz", - "integrity": "sha512-Q+8Vbb9hlM+mXD09JO/BJanmk9wvcDbovTOIDYc6efFWgS6QqBXpiAD86YZaHbyJ45hM6MEWqbkJv+pnJKQgpQ==" - }, - "angular-i18n": { - "version": "1.5.8", - "resolved": "https://registry.npmjs.org/angular-i18n/-/angular-i18n-1.5.8.tgz", - "integrity": "sha512-Tg/z1PDGR1Va7QHANmtMI1k3WxlL59PiWNNHRVa0lcz+CiuuuqCki/tteGDi3taUM2t8HYIOLvNlnRbxy3C/Zw==" - }, - "angular-local-storage": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/angular-local-storage/-/angular-local-storage-0.5.0.tgz", - "integrity": "sha512-GksrqEpE9af70hqFN/xcVvTaUDcyhTDCedG560lgfTzfVsEeYza1kikK240OfKkJa9NVjbmfMlOP7CdTRNjiow==" - }, - "angular-resource": { - "version": "1.5.8", - "resolved": "https://registry.npmjs.org/angular-resource/-/angular-resource-1.5.8.tgz", - "integrity": "sha512-Ckp4gsMbQOE8HvUECZOnx+FWGv/yL7K4q5SOihY2ifav6FkaItRFM4exBLUnwYDXUKebtbfkHaDDQMoILx0jfw==" - }, - "angular-sanitize": { - "version": "1.5.8", - "resolved": "https://registry.npmjs.org/angular-sanitize/-/angular-sanitize-1.5.8.tgz", - "integrity": "sha512-SCr0ekZLacVt5RzgufvfYQRYr34pJSL+lVcbBBtvXyMXNC2g9RcTxA+Uwgaq4AoxnxGiZb2WYrXMtL9nYGAo+Q==" - }, - "angular-translate": { - "version": "2.13.0", - "resolved": "https://registry.npmjs.org/angular-translate/-/angular-translate-2.13.0.tgz", - "integrity": "sha512-x5u+IK3Zw0CPJEKs12qGyAlCcqIT6SKXPAol6UfCzPkXl0pIkKzMOqQhRjsfXafRIm4/uAE5o9bM7fM3RdxQxw==", - "requires": { - "angular": ">=1.2.26 <=1.6" - } - }, - "angular-translate-loader-partial": { - "version": "2.13.0", - "resolved": "https://registry.npmjs.org/angular-translate-loader-partial/-/angular-translate-loader-partial-2.13.0.tgz", - "integrity": "sha512-SCVtUDddPynRdG1KHuqfJ1eJu0hzndD/BbjdbkQSyeKjpYhCAxR7NjgCsffVmsA8KU46Kcj1nvedUfR2hrwAcQ==", - "requires": { - "angular-translate": "~2.13.0" - } - }, - "angular-translate-storage-cookie": { - "version": "2.13.0", - "resolved": "https://registry.npmjs.org/angular-translate-storage-cookie/-/angular-translate-storage-cookie-2.13.0.tgz", - "integrity": "sha512-dgaw36cSXXo+HwHJZ1JjfgjMUnO29G0AJ8tQkibp5o+jUkRv6OKIzteJM9qNgxA6+qNVeTQdFmxq7YRHvIpDNA==", - "requires": { - "angular-cookies": ">=1.2.26 <1.6", - "angular-translate": "~2.13.0" - } - }, - "angular-ui-ace": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/angular-ui-ace/-/angular-ui-ace-0.2.3.tgz", - "integrity": "sha512-uh3840Jvs6+uUW3u3T5D17AbKeAirPS+chpIMokJECNBpPOoK0ZoS61UKlHb6hsx6o0LCM9KlnAi84BDtmIkUA==" - }, - "angular-ui-bootstrap": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/angular-ui-bootstrap/-/angular-ui-bootstrap-2.2.0.tgz", - "integrity": "sha512-+OVf6od0euS6HmbpYZhb6Xx/pqNyByFIc/t20us+Q6KAU79muPvQ0Uzc39eCbnc9Uz1+pNk/yKOlJTezdEBiyg==" - }, - "angular-ui-notification": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/angular-ui-notification/-/angular-ui-notification-0.2.0.tgz", - "integrity": "sha512-hiUGiCs5mb7oBbqp83BWKEwUHBTY+1JPrMp6KgXGFk9srizz3OwzRkd3rOT3SIQdkJPMWp/SkpZsRErFXy3/XA==" - }, - "angular-ui-router": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/angular-ui-router/-/angular-ui-router-0.3.2.tgz", - "integrity": "sha512-FXtC3D7z7SNtSIdMDXCVO+v4Q6jPABneDvRu6NyOeeZlo09mQFqVCjhKqJWnf94ZlNSmyOXoFSqKD5tL2JTFEg==", - "requires": { - "angular": "^1.0.8" - } - }, - "bootstrap": { - "version": "3.3.7", - "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-3.3.7.tgz", - "integrity": "sha512-qcFaisBrcBhTFkz1IUnGDYnX6ZWfFzH8zOixUDtHW9Ip+r+7MfMFav2rzy7cIHc7rgIg7xjhWBoo1mS/U26j4g==" - }, - "bootswatch": { - "version": "3.3.7", - "resolved": "https://registry.npmjs.org/bootswatch/-/bootswatch-3.3.7.tgz", - "integrity": "sha512-8tHnBRrEHX+CtFyth9XPyR7Tl97VaU/w14eRRm+/mZrEs9JSe8Ren9UEkdFjDMlxIeDREKichmrb90EzXgtKSQ==" - }, - "diff": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.0.1.tgz", - "integrity": "sha512-womO+WMwc3Pikbop4DWrncrN2M0GSDwG8pwxAEhzS7g0qYrtrUmIQkD8ewWedlLYp0Kp3HR8nwRE5cMzwIBrtQ==" - }, - "fast-json-patch": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/fast-json-patch/-/fast-json-patch-1.1.1.tgz", - "integrity": "sha512-6E4IY1bdWejJPHLdP0qjeQehvTgqifd5KjBz2RgPw+XaZGRGOY7PbQP8aoQVVefJNSR26G3dLQYGJIo6890IzA==" - }, - "jquery": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/jquery/-/jquery-2.2.4.tgz", - "integrity": "sha512-lBHj60ezci2u1v2FqnZIraShGgEXq35qCzMv4lITyHGppTnA13rwR0MgwyNJh9TnDs3aXUvd1xjAotfraMHX/Q==" - }, - "json3": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/json3/-/json3-3.3.2.tgz", - "integrity": "sha512-I5YLeauH3rIaE99EE++UeH2M2gSYo8/2TqDac7oZEH6D/DSQ4Woa628Qrfj1X9/OY5Mk5VvIDQaKCDchXaKrmA==" - }, - "moment": { - "version": "2.16.0", - "resolved": "https://registry.npmjs.org/moment/-/moment-2.16.0.tgz", - "integrity": "sha512-Jmy+b0/BMklLlYBzrClLstnS9Wn/WzYnmM2ub8wjdIJhp8UnbTTIHLLZpEsgmPTPgjFnXbTe32XYKYkadf9qJQ==" - } - } -} diff --git a/server/package.json b/server/package.json deleted file mode 100644 index f9d3ab300d..0000000000 --- a/server/package.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "name": "@centraldogma/webapp", - "description": "The admin page for the Central Dogma", - "license": "Apache-2.0", - "dependencies": { - "ace-builds": "1.32.2", - "angular": "1.5.8", - "angular-cache-buster": "0.4.3", - "angular-cookies": "1.5.8", - "angular-dynamic-locale": "0.1.32", - "angular-i18n": "1.5.8", - "angular-local-storage": "0.5.0", - "angular-resource": "1.5.8", - "angular-sanitize": "1.5.8", - "angular-translate": "2.13.0", - "angular-translate-loader-partial": "2.13.0", - "angular-translate-storage-cookie": "2.13.0", - "angular-ui-ace": "0.2.3", - "angular-ui-bootstrap": "2.2.0", - "angular-ui-notification": "0.2.0", - "angular-ui-router": "0.3.2", - "bootstrap": "3.3.7", - "bootswatch": "3.3.7", - "diff": "3.0.1", - "fast-json-patch": "1.1.1", - "jquery": "2.2.4", - "json3": "3.3.2", - "moment": "2.16.0" - } -} diff --git a/server/src/main/java/com/linecorp/centraldogma/server/CentralDogma.java b/server/src/main/java/com/linecorp/centraldogma/server/CentralDogma.java index 99cbd72aaa..f6fd3c6d1c 100644 --- a/server/src/main/java/com/linecorp/centraldogma/server/CentralDogma.java +++ b/server/src/main/java/com/linecorp/centraldogma/server/CentralDogma.java @@ -900,13 +900,6 @@ protected HttpResponse doGet(ServiceRequestContext ctx, HttpRequest req) { .serveCompressedFiles(true) .fallbackFileExtensions("html") .build()); - - sb.serviceUnder("/legacy-web", - FileService.builder(CentralDogma.class.getClassLoader(), "webapp") - .cacheControl(ServerCacheControl.REVALIDATED) - .autoDecompress(true) - .serveCompressedFiles(true) - .build()); } sb.errorHandler(new HttpApiExceptionHandler()); diff --git a/server/src/main/resources/com/linecorp/centraldogma/server/internal/mirror/short_wordlist.txt b/server/src/main/resources/com/linecorp/centraldogma/server/internal/mirror/short_wordlist.txt deleted file mode 100644 index 9ac732fe36..0000000000 --- a/server/src/main/resources/com/linecorp/centraldogma/server/internal/mirror/short_wordlist.txt +++ /dev/null @@ -1,1296 +0,0 @@ -aardvark -abandoned -abbreviate -abdomen -abhorrence -abiding -abnormal -abrasion -absorbing -abundant -abyss -academy -accountant -acetone -achiness -acid -acoustics -acquire -acrobat -actress -acuteness -aerosol -aesthetic -affidavit -afloat -afraid -aftershave -again -agency -aggressor -aghast -agitate -agnostic -agonizing -agreeing -aidless -aimlessly -ajar -alarmclock -albatross -alchemy -alfalfa -algae -aliens -alkaline -almanac -alongside -alphabet -already -also -altitude -aluminum -always -amazingly -ambulance -amendment -amiable -ammunition -amnesty -amoeba -amplifier -amuser -anagram -anchor -android -anesthesia -angelfish -animal -anklet -announcer -anonymous -answer -antelope -anxiety -anyplace -aorta -apartment -apnea -apostrophe -apple -apricot -aquamarine -arachnid -arbitrate -ardently -arena -argument -aristocrat -armchair -aromatic -arrowhead -arsonist -artichoke -asbestos -ascend -aseptic -ashamed -asinine -asleep -asocial -asparagus -astronaut -asymmetric -atlas -atmosphere -atom -atrocious -attic -atypical -auctioneer -auditorium -augmented -auspicious -automobile -auxiliary -avalanche -avenue -aviator -avocado -awareness -awhile -awkward -awning -awoke -axially -azalea -babbling -backpack -badass -bagpipe -bakery -balancing -bamboo -banana -barracuda -basket -bathrobe -bazooka -blade -blender -blimp -blouse -blurred -boatyard -bobcat -body -bogusness -bohemian -boiler -bonnet -boots -borough -bossiness -bottle -bouquet -boxlike -breath -briefcase -broom -brushes -bubblegum -buckle -buddhist -buffalo -bullfrog -bunny -busboy -buzzard -cabin -cactus -cadillac -cafeteria -cage -cahoots -cajoling -cakewalk -calculator -camera -canister -capsule -carrot -cashew -cathedral -caucasian -caviar -ceasefire -cedar -celery -cement -census -ceramics -cesspool -chalkboard -cheesecake -chimney -chlorine -chopsticks -chrome -chute -cilantro -cinnamon -circle -cityscape -civilian -clay -clergyman -clipboard -clock -clubhouse -coathanger -cobweb -coconut -codeword -coexistent -coffeecake -cognitive -cohabitate -collarbone -computer -confetti -copier -cornea -cosmetics -cotton -couch -coverless -coyote -coziness -crawfish -crewmember -crib -croissant -crumble -crystal -cubical -cucumber -cuddly -cufflink -cuisine -culprit -cup -curry -cushion -cuticle -cybernetic -cyclist -cylinder -cymbal -cynicism -cypress -cytoplasm -dachshund -daffodil -dagger -dairy -dalmatian -dandelion -dartboard -dastardly -datebook -daughter -dawn -daytime -dazzler -dealer -debris -decal -dedicate -deepness -defrost -degree -dehydrator -deliverer -democrat -dentist -deodorant -depot -deranged -desktop -detergent -device -dexterity -diamond -dibs -dictionary -diffuser -digit -dilated -dimple -dinnerware -dioxide -diploma -directory -dishcloth -ditto -dividers -dizziness -doctor -dodge -doll -dominoes -donut -doorstep -dorsal -double -downstairs -dozed -drainpipe -dresser -driftwood -droppings -drum -dryer -dubiously -duckling -duffel -dugout -dumpster -duplex -durable -dustpan -dutiful -duvet -dwarfism -dwelling -dwindling -dynamite -dyslexia -eagerness -earlobe -easel -eavesdrop -ebook -eccentric -echoless -eclipse -ecosystem -ecstasy -edged -editor -educator -eelworm -eerie -effects -eggnog -egomaniac -ejection -elastic -elbow -elderly -elephant -elfishly -eliminator -elk -elliptical -elongated -elsewhere -elusive -elves -emancipate -embroidery -emcee -emerald -emission -emoticon -emperor -emulate -enactment -enchilada -endorphin -energy -enforcer -engine -enhance -enigmatic -enjoyably -enlarged -enormous -enquirer -enrollment -ensemble -entryway -enunciate -envoy -enzyme -epidemic -equipment -erasable -ergonomic -erratic -eruption -escalator -eskimo -esophagus -espresso -essay -estrogen -etching -eternal -ethics -etiquette -eucalyptus -eulogy -euphemism -euthanize -evacuation -evergreen -evidence -evolution -exam -excerpt -exerciser -exfoliate -exhale -exist -exorcist -explode -exquisite -exterior -exuberant -fabric -factory -faded -failsafe -falcon -family -fanfare -fasten -faucet -favorite -feasibly -february -federal -feedback -feigned -feline -femur -fence -ferret -festival -fettuccine -feudalist -feverish -fiberglass -fictitious -fiddle -figurine -fillet -finalist -fiscally -fixture -flashlight -fleshiness -flight -florist -flypaper -foamless -focus -foggy -folksong -fondue -footpath -fossil -fountain -fox -fragment -freeway -fridge -frosting -fruit -fryingpan -gadget -gainfully -gallstone -gamekeeper -gangway -garlic -gaslight -gathering -gauntlet -gearbox -gecko -gem -generator -geographer -gerbil -gesture -getaway -geyser -ghoulishly -gibberish -giddiness -giftshop -gigabyte -gimmick -giraffe -giveaway -gizmo -glasses -gleeful -glisten -glove -glucose -glycerin -gnarly -gnomish -goatskin -goggles -goldfish -gong -gooey -gorgeous -gosling -gothic -gourmet -governor -grape -greyhound -grill -groundhog -grumbling -guacamole -guerrilla -guitar -gullible -gumdrop -gurgling -gusto -gutless -gymnast -gynecology -gyration -habitat -hacking -haggard -haiku -halogen -hamburger -handgun -happiness -hardhat -hastily -hatchling -haughty -hazelnut -headband -hedgehog -hefty -heinously -helmet -hemoglobin -henceforth -herbs -hesitation -hexagon -hubcap -huddling -huff -hugeness -hullabaloo -human -hunter -hurricane -hushing -hyacinth -hybrid -hydrant -hygienist -hypnotist -ibuprofen -icepack -icing -iconic -identical -idiocy -idly -igloo -ignition -iguana -illuminate -imaging -imbecile -imitator -immigrant -imprint -iodine -ionosphere -ipad -iphone -iridescent -irksome -iron -irrigation -island -isotope -issueless -italicize -itemizer -itinerary -itunes -ivory -jabbering -jackrabbit -jaguar -jailhouse -jalapeno -jamboree -janitor -jarring -jasmine -jaundice -jawbreaker -jaywalker -jazz -jealous -jeep -jelly -jeopardize -jersey -jetski -jezebel -jiffy -jigsaw -jingling -jobholder -jockstrap -jogging -john -joinable -jokingly -journal -jovial -joystick -jubilant -judiciary -juggle -juice -jujitsu -jukebox -jumpiness -junkyard -juror -justifying -juvenile -kabob -kamikaze -kangaroo -karate -kayak -keepsake -kennel -kerosene -ketchup -khaki -kickstand -kilogram -kimono -kingdom -kiosk -kissing -kite -kleenex -knapsack -kneecap -knickers -koala -krypton -laboratory -ladder -lakefront -lantern -laptop -laryngitis -lasagna -latch -laundry -lavender -laxative -lazybones -lecturer -leftover -leggings -leisure -lemon -length -leopard -leprechaun -lettuce -leukemia -levers -lewdness -liability -library -licorice -lifeboat -lightbulb -likewise -lilac -limousine -lint -lioness -lipstick -liquid -listless -litter -liverwurst -lizard -llama -luau -lubricant -lucidity -ludicrous -luggage -lukewarm -lullaby -lumberjack -lunchbox -luridness -luscious -luxurious -lyrics -macaroni -maestro -magazine -mahogany -maimed -majority -makeover -malformed -mammal -mango -mapmaker -marbles -massager -matchstick -maverick -maximum -mayonnaise -moaning -mobilize -moccasin -modify -moisture -molecule -momentum -monastery -moonshine -mortuary -mosquito -motorcycle -mousetrap -movie -mower -mozzarella -muckiness -mudflow -mugshot -mule -mummy -mundane -muppet -mural -mustard -mutation -myriad -myspace -myth -nail -namesake -nanosecond -napkin -narrator -nastiness -natives -nautically -navigate -nearest -nebula -nectar -nefarious -negotiator -neither -nemesis -neoliberal -nephew -nervously -nest -netting -neuron -nevermore -nextdoor -nicotine -niece -nimbleness -nintendo -nirvana -nuclear -nugget -nuisance -nullify -numbing -nuptials -nursery -nutcracker -nylon -oasis -oat -obediently -obituary -object -obliterate -obnoxious -observer -obtain -obvious -occupation -oceanic -octopus -ocular -office -oftentimes -oiliness -ointment -older -olympics -omissible -omnivorous -oncoming -onion -onlooker -onstage -onward -onyx -oomph -opaquely -opera -opium -opossum -opponent -optical -opulently -oscillator -osmosis -ostrich -otherwise -ought -outhouse -ovation -oven -owlish -oxford -oxidize -oxygen -oyster -ozone -pacemaker -padlock -pageant -pajamas -palm -pamphlet -pantyhose -paprika -parakeet -passport -patio -pauper -pavement -payphone -pebble -peculiarly -pedometer -pegboard -pelican -penguin -peony -pepperoni -peroxide -pesticide -petroleum -pewter -pharmacy -pheasant -phonebook -phrasing -physician -plank -pledge -plotted -plug -plywood -pneumonia -podiatrist -poetic -pogo -poison -poking -policeman -poncho -popcorn -porcupine -postcard -poultry -powerboat -prairie -pretzel -princess -propeller -prune -pry -pseudo -psychopath -publisher -pucker -pueblo -pulley -pumpkin -punchbowl -puppy -purse -pushup -putt -puzzle -pyramid -python -quarters -quesadilla -quilt -quote -racoon -radish -ragweed -railroad -rampantly -rancidity -rarity -raspberry -ravishing -rearrange -rebuilt -receipt -reentry -refinery -register -rehydrate -reimburse -rejoicing -rekindle -relic -remote -renovator -reopen -reporter -request -rerun -reservoir -retriever -reunion -revolver -rewrite -rhapsody -rhetoric -rhino -rhubarb -rhyme -ribbon -riches -ridden -rigidness -rimmed -riptide -riskily -ritzy -riverboat -roamer -robe -rocket -romancer -ropelike -rotisserie -roundtable -royal -rubber -rudderless -rugby -ruined -rulebook -rummage -running -rupture -rustproof -sabotage -sacrifice -saddlebag -saffron -sainthood -saltshaker -samurai -sandworm -sapphire -sardine -sassy -satchel -sauna -savage -saxophone -scarf -scenario -schoolbook -scientist -scooter -scrapbook -sculpture -scythe -secretary -sedative -segregator -seismology -selected -semicolon -senator -septum -sequence -serpent -sesame -settler -severely -shack -shelf -shirt -shovel -shrimp -shuttle -shyness -siamese -sibling -siesta -silicon -simmering -singles -sisterhood -sitcom -sixfold -sizable -skateboard -skeleton -skies -skulk -skylight -slapping -sled -slingshot -sloth -slumbering -smartphone -smelliness -smitten -smokestack -smudge -snapshot -sneezing -sniff -snowsuit -snugness -speakers -sphinx -spider -splashing -sponge -sprout -spur -spyglass -squirrel -statue -steamboat -stingray -stopwatch -strawberry -student -stylus -suave -subway -suction -suds -suffocate -sugar -suitcase -sulphur -superstore -surfer -sushi -swan -sweatshirt -swimwear -sword -sycamore -syllable -symphony -synagogue -syringes -systemize -tablespoon -taco -tadpole -taekwondo -tagalong -takeout -tallness -tamale -tanned -tapestry -tarantula -tastebud -tattoo -tavern -thaw -theater -thimble -thorn -throat -thumb -thwarting -tiara -tidbit -tiebreaker -tiger -timid -tinsel -tiptoeing -tirade -tissue -tractor -tree -tripod -trousers -trucks -tryout -tubeless -tuesday -tugboat -tulip -tumbleweed -tupperware -turtle -tusk -tutorial -tuxedo -tweezers -twins -tyrannical -ultrasound -umbrella -umpire -unarmored -unbuttoned -uncle -underwear -unevenness -unflavored -ungloved -unhinge -unicycle -unjustly -unknown -unlocking -unmarked -unnoticed -unopened -unpaved -unquenched -unroll -unscrewing -untied -unusual -unveiled -unwrinkled -unyielding -unzip -upbeat -upcountry -update -upfront -upgrade -upholstery -upkeep -upload -uppercut -upright -upstairs -uptown -upwind -uranium -urban -urchin -urethane -urgent -urologist -username -usher -utensil -utility -utmost -utopia -utterance -vacuum -vagrancy -valuables -vanquished -vaporizer -varied -vaseline -vegetable -vehicle -velcro -vendor -vertebrae -vestibule -veteran -vexingly -vicinity -videogame -viewfinder -vigilante -village -vinegar -violin -viperfish -virus -visor -vitamins -vivacious -vixen -vocalist -vogue -voicemail -volleyball -voucher -voyage -vulnerable -waffle -wagon -wakeup -walrus -wanderer -wasp -water -waving -wheat -whisper -wholesaler -wick -widow -wielder -wifeless -wikipedia -wildcat -windmill -wipeout -wired -wishbone -wizardry -wobbliness -wolverine -womb -woolworker -workbasket -wound -wrangle -wreckage -wristwatch -wrongdoing -xerox -xylophone -yacht -yahoo -yard -yearbook -yesterday -yiddish -yield -yo-yo -yodel -yogurt -yuppie -zealot -zebra -zeppelin -zestfully -zigzagged -zillion -zipping -zirconium -zodiac -zombie -zookeeper -zucchini diff --git a/server/src/main/resources/webapp/fonts/glyphicons-halflings-regular.eot b/server/src/main/resources/webapp/fonts/glyphicons-halflings-regular.eot deleted file mode 100644 index b93a4953ff..0000000000 Binary files a/server/src/main/resources/webapp/fonts/glyphicons-halflings-regular.eot and /dev/null differ diff --git a/server/src/main/resources/webapp/fonts/glyphicons-halflings-regular.svg b/server/src/main/resources/webapp/fonts/glyphicons-halflings-regular.svg deleted file mode 100644 index 94fb5490a2..0000000000 --- a/server/src/main/resources/webapp/fonts/glyphicons-halflings-regular.svg +++ /dev/null @@ -1,288 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/server/src/main/resources/webapp/fonts/glyphicons-halflings-regular.ttf b/server/src/main/resources/webapp/fonts/glyphicons-halflings-regular.ttf deleted file mode 100644 index 1f85312454..0000000000 Binary files a/server/src/main/resources/webapp/fonts/glyphicons-halflings-regular.ttf and /dev/null differ diff --git a/server/src/main/resources/webapp/fonts/glyphicons-halflings-regular.woff b/server/src/main/resources/webapp/fonts/glyphicons-halflings-regular.woff deleted file mode 100644 index 9e612858f8..0000000000 Binary files a/server/src/main/resources/webapp/fonts/glyphicons-halflings-regular.woff and /dev/null differ diff --git a/server/src/main/resources/webapp/fonts/glyphicons-halflings-regular.woff2 b/server/src/main/resources/webapp/fonts/glyphicons-halflings-regular.woff2 deleted file mode 100644 index 64539b54c3..0000000000 Binary files a/server/src/main/resources/webapp/fonts/glyphicons-halflings-regular.woff2 and /dev/null differ diff --git a/server/src/main/resources/webapp/i18n/en.main.json b/server/src/main/resources/webapp/i18n/en.main.json deleted file mode 100644 index a1491cbcfe..0000000000 --- a/server/src/main/resources/webapp/i18n/en.main.json +++ /dev/null @@ -1,151 +0,0 @@ -{ - "window": { - "title": "Central Dogma" - }, - - "navbar": { - "home": "Home", - "language": "Language", - "login": "Log in", - "logout": "Log out", - "user": "User", - "tokens": "Application Tokens" - }, - - "login": { - "button_login": "Log in", - "button_cancel": "Cancel", - "logged_in": "Welcome to Central Dogma, {{username}}.", - "logged_out": "Logged out successfully", - "password": "Password", - "password.placeholder": "Your password", - "rememberme": "Remember me", - "title": "Log in", - "username": "Username", - "username.placeholder": "Your username" - }, - - "entities": { - "auto_merge_failed": "Failed to auto-merge due to conflicting changes", - "button_add_member": "Add a member", - "button_add_token": "Add a token", - "button_add_token_permission": "Add a token permission", - "button_add_user_permission": "Add a user permission", - "button_cancel": "Cancel", - "button_change": "Change", - "button_commit": "Commit", - "button_create": "Create", - "button_create_project": "Create a project", - "button_create_repository": "Create a repository", - "button_delete": "Delete", - "button_edit": "Edit", - "button_fetch_again": "Fetch again", - "button_go_to_metadata": "Go to metadata", - "button_history": "History", - "button_query": "Query", - "button_restore": "Restore", - "button_save": "Save", - "button_show_permission": "Permission", - "button_token_management": "Application Tokens", - "button_update_role_permission": "Update role permission", - "commit_author": "Author", - "commit_detail": "Detail", - "commit_message": "Message", - "commit_summary": "Summary", - "commit_timestamp": "Timestamp", - "conflict_occurred": "Someone else pushed a commit while you edit. Fetch and edit again.", - "created_project": "Project '{{name}}' has been created.", - "created_repository": "Repository '{{projectName}}/{{repositoryName}}' has been created.", - "dark_themes": "Dark themes", - "default_theme": "Default", - "deleted_file": "File '{{path}}' has been deleted.", - "empty_directory": "Directory contains no file.", - "entries_not_found": "Entries not found", - "go_to_head_revision": "Go to HEAD", - "invalid_file_path": "Enter a valid file name.", - "invalid_json": "Enter a valid JSON value.", - "invalid_repository_name": "Enter a valid repository name.", - "light_themes": "Light themes", - "new_file_name_placeholder": "Type 1) a file name 2) a directory name and '/' key or 3) 'backspace' key to go one directory up.", - "path": "Path", - "project_name": "Project name", - "recent_commits": "Recent commits", - "redundant_changes": "You did not change anything.", - "repository": "Repository", - "repository_name": "Repository name", - "resolved_conflicts": "Latest content is fetched and merged with your previous changes. Please check the content again.", - "revision": "Revision", - "revision_placeholder": "e.g. HEAD, 42, -3", - "saved_file": "File '{{path}}' has been saved.", - "title_added_at": "Added At", - "title_added_by": "Added By", - "title_app_id": "App ID", - "title_create_repository": "Create a repository", - "title_created_at": "Created At", - "title_created_by": "Created By", - "title_delete_target": "Delete '{{target}}'?", - "title_guest": "Guest", - "title_anonymous": "Anonymous", - "title_login_id": "Login ID", - "title_member": "Member", - "title_name": "Name", - "title_owner": "Owner", - "title_project_removed": "Project '{{target}}' has been removed.", - "title_project_restored": "Project '{{target}}' has been restored.", - "title_remove_member": "Remove a member '{{target}}'?", - "title_remove_project": "Remove a project '{{target}}'?", - "title_remove_repository": "Remove a repository '{{target}}'?", - "title_remove_token": "Remove a token '{{target}}'?", - "title_restore_project": "Restore a project '{{target}}'?", - "title_restore_repository": "Restore a repository '{{target}}'?", - "title_read": "Read", - "title_role": "Role", - "title_select_role": "Select a role", - "title_save_member": "Save a member '{{target}}'?", - "title_save_token": "Save a token '{{target}}'?", - "title_select_token": "Select a token", - "title_status": "Status", - "title_target_already_exists": "'{{target}}' already exists.", - "title_update_member": "Update a member '{{target}}'?", - "title_update_role_permission": "Update permission of the roles for the repository '{{target}}'?", - "title_update_token": "Update a token '{{target}}'?", - "title_write": "Write", - "unsupported_file_type": "Unsupported file type: {{type}}" - }, - - "settings": { - "button_activate_token": "Activate", - "button_cancel": "Cancel", - "button_close": "Close", - "button_create_token": "Create a token", - "button_deactivate_token": "Deactivate", - "button_delete": "Delete", - "button_delete_token": "Delete", - "button_generate": "Generate", - "button_invalidate_token": "Invalidate", - "deleted_token": "Application token '{{path}}' has been deleted.", - "title_activate_token": "Activate application token '{{token}}'?", - "title_deactivate_token": "Deactivate application token '{{token}}'?", - "title_delete_token": "Delete the application token '{{token}}'?", - "title_generate_token": "Generate a new application token", - "title_token_generated": "Application token generated", - "token_admin_level": "Administrator-Level Token", - "token_application_id": "Application ID", - "token_application_id.exist": "Application ID '{{appId}}' exists. Please try a different ID again.", - "token_application_id.placeholder": "Your application name", - "token_creation_time": "Created At", - "token_creator": "Created By", - "token_deactivation_time": "Deactivated At", - "token_deactivator": "Deactivated By", - "token_forbidden": "No permission for {{action}}", - "token_level": "Level", - "token_role": "Role", - "token_secret": "Secret", - "token_status": "Status" - }, - - "components": { - "button_no": "No", - "button_yes": "Yes" - } -} diff --git a/server/src/main/resources/webapp/index.html b/server/src/main/resources/webapp/index.html deleted file mode 100644 index d518e4b073..0000000000 --- a/server/src/main/resources/webapp/index.html +++ /dev/null @@ -1,110 +0,0 @@ - - - - - - - - - - centraldogma-admin - - - - - - - - - -
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/server/src/main/resources/webapp/robots.txt b/server/src/main/resources/webapp/robots.txt deleted file mode 100644 index ee2cc216a6..0000000000 --- a/server/src/main/resources/webapp/robots.txt +++ /dev/null @@ -1,3 +0,0 @@ -# robotstxt.org/ - -User-agent: * diff --git a/server/src/main/resources/webapp/scripts/app/app.js b/server/src/main/resources/webapp/scripts/app/app.js deleted file mode 100644 index 055eb26a41..0000000000 --- a/server/src/main/resources/webapp/scripts/app/app.js +++ /dev/null @@ -1,165 +0,0 @@ -'use strict'; - -angular.module( - 'CentralDogmaAdmin', - ['LocalStorageModule', - 'ngCacheBuster', - 'ngCookies', - 'ngResource', - 'pascalprecht.translate', - 'tmh.dynamicLocale', - 'ui.ace', - 'ui.bootstrap', - 'ui-notification', - 'ui.router']) - .constant('CentralDogmaConstant', { - HEAD: 'head', - LEVEL_USER: 'LEVEL_USER', - LEVEL_ADMIN: 'LEVEL_ADMIN', - ENTITY_NAME_PATTERN: /^[0-9A-Za-z](?:[-+_0-9A-Za-z\.]*[0-9A-Za-z])?$/, - API_PREFIX: '/api/v0/', - API_V1_PREFIX: '/api/v1/', - PROJECT_ROLE_OWNER: "OWNER", - PROJECT_ROLE_MEMBER: "MEMBER", - PROJECT_ROLE_GUEST: "GUEST", - REFRESH_DELAY_MSEC: 500 - }) - .run(function ($rootScope, $location, $window, $http, $state, $translate, $uibModal, $q, - Principal, Language, NotificationUtil, Security) { - $rootScope.$on('$stateChangeStart', function (event, toState, toStateParams) { - $rootScope.toState = toState; - $rootScope.toStateParams = toStateParams; - - Security.resolve().then(function () { - Principal.refresh().then(function () { - if (!Principal.isAuthenticated()) { - $window.location.href= "/link/auth/login?ref=" + $location.path(); - } - }); - }); - - // Update the language - Language.getCurrent().then(function (language) { - $translate.use(language); - }); - }); - - $rootScope.$on('$stateChangeSuccess', function (event, toState, toParams, fromState, fromParams) { - var titleKey = 'window.title'; - - $rootScope.previousStateName = fromState.name; - $rootScope.previousStateParams = fromParams; - - // Set the page title key to the one configured in state or use default one - if (toState.data.pageTitle) { - titleKey = toState.data.pageTitle; - } - $translate(titleKey).then(function (title) { - // Change window title with translated one - $window.document.title = title; - }); - }); - - $rootScope.back = function () { - // If previous state do not exist go to 'home' - if ($state.get($rootScope.previousStateName) === null) { - $state.go('home'); - } else { - $state.go($rootScope.previousStateName, $rootScope.previousStateParams); - } - }; - }) - .config(function ($stateProvider, $urlRouterProvider, $urlMatcherFactoryProvider, - $httpProvider, $locationProvider, $translateProvider, - tmhDynamicLocaleProvider, httpRequestInterceptorCacheBusterProvider, - NotificationProvider) { - - //Cache everything except rest api requests - httpRequestInterceptorCacheBusterProvider.setMatchlist([/.*api.*/, /.*protected.*/], true); - - $urlMatcherFactoryProvider.type('repositoryPath', { - encode: function (val) { - var temp = val !== null ? val.toString() : val; - temp = temp.replace(/\/\/+/, '/'); - if (temp === '/') { - return ''; - } - - if (temp.indexOf('/') === 0) { - temp = temp.substring(1); - } - if (/\/$/.test(temp)) { - temp = temp.slice(0, -1); - } - - var split = temp.split('/'); - for (var index in split) { - split[index] = encodeURIComponent(split[index]); - } - return split.join('/'); - }, - decode: function (val) { - return val !== null ? decodeURIComponent(val.toString()) : val; - }, - is: function () { - return true; - } - }); - - $urlRouterProvider.otherwise('/projects'); - $stateProvider - .state('site', { - 'abstract': true, - views: { - 'navbar@': { - templateUrl: 'scripts/components/navbar/navbar.html', - controller: 'NavbarController' - } - }, - resolve: { - translatePartialLoader: [ - '$translate', '$translatePartialLoader', - function ($translate, $translatePartialLoader) { - $translatePartialLoader.addPart('main'); - return $translate.refresh(); - }] - } - }) - .state('home', { - parent: 'site', - url: '/', - data: { - roles: [] - }, - views: { - 'content@': { - templateUrl: 'scripts/app/entities/projects/projects.html', - controller: 'ProjectsController' - } - } - }); - - // Initialize angular-translate - $translateProvider.useLoader('$translatePartialLoader', { - urlTemplate: 'i18n/{lang}.{part}.json' - }); - - $translateProvider.preferredLanguage('en'); - $translateProvider.useCookieStorage(); - $translateProvider.useSanitizeValueStrategy('escapeParameters'); - - tmhDynamicLocaleProvider - .localeLocationPattern('node_modules/angular-i18n/angular-locale_{{locale}}.js'); - tmhDynamicLocaleProvider.useCookieStorage('NG_TRANSLATE_LANG_KEY'); - - // Configure angular-ui-notification - NotificationProvider.setOptions({ - delay: 5000, - startTop: 70, - startRight: 0, - verticalSpacing: 20, - horizontalSpacing: 20, - positionX: 'center', - positionY: 'top' - }); - }); diff --git a/server/src/main/resources/webapp/scripts/app/entities/entity.js b/server/src/main/resources/webapp/scripts/app/entities/entity.js deleted file mode 100644 index f5efd57e05..0000000000 --- a/server/src/main/resources/webapp/scripts/app/entities/entity.js +++ /dev/null @@ -1,10 +0,0 @@ -'use strict'; - -angular.module('CentralDogmaAdmin') - .config(function ($stateProvider) { - $stateProvider - .state('entity', { - abstract: true, - parent: 'site' - }); - }); diff --git a/server/src/main/resources/webapp/scripts/app/entities/metadata/metadata.js b/server/src/main/resources/webapp/scripts/app/entities/metadata/metadata.js deleted file mode 100644 index f240ad336d..0000000000 --- a/server/src/main/resources/webapp/scripts/app/entities/metadata/metadata.js +++ /dev/null @@ -1,27 +0,0 @@ -'use strict'; - -angular.module('CentralDogmaAdmin') - .config(function ($stateProvider, CentralDogmaConstant) { - $stateProvider - .state('projectMetadata', { - parent: 'entity', - url: '/metadata/:projectName', - data: {}, - views: { - 'content@': { - templateUrl: 'scripts/app/entities/metadata/metadata.project.html', - controller: 'MetadataProjectController' - } - } - }).state('repositoryMetadata', { - parent: 'entity', - url: '/metadata/:projectName/:repoName', - data: {}, - views: { - 'content@': { - templateUrl: 'scripts/app/entities/metadata/metadata.repository.html', - controller: 'MetadataRepositoryController' - } - } - }); - }); diff --git a/server/src/main/resources/webapp/scripts/app/entities/metadata/metadata.project.controller.js b/server/src/main/resources/webapp/scripts/app/entities/metadata/metadata.project.controller.js deleted file mode 100644 index 42af583d5f..0000000000 --- a/server/src/main/resources/webapp/scripts/app/entities/metadata/metadata.project.controller.js +++ /dev/null @@ -1,223 +0,0 @@ -'use strict'; - -angular.module('CentralDogmaAdmin') - .controller('MetadataProjectController', - function ($scope, $state, $stateParams, ApiService, ApiV1Service, $location, $window, $uibModal, - SettingsService, ConfirmationDialog, IdentifierWithRole, EntitiesUtil, - ProjectService, RepositoryService, Principal, CentralDogmaConstant, - NotificationUtil, StringUtil, Security, $timeout) { - $scope.project = { - name: $stateParams.projectName, - roles: [ - 'OWNER', 'MEMBER' - ] - }; - $scope.toDateTimeStr = EntitiesUtil.toDateTimeStr; - $scope.sanitizeEmail = EntitiesUtil.sanitizeEmail; - - $scope.removeProject = function () { - ConfirmationDialog.openModal('entities.title_remove_project', { - target: $scope.project.name - }).then(function () { - ProjectService.removeProject($scope.project.name).then(function () { - NotificationUtil.success('entities.title_project_removed', { - target: $scope.project.name - }); - $location.url('/projects'); - }); - }); - }; - - $scope.removeRepository = function (repo) { - ConfirmationDialog.openModal('entities.title_remove_repository', { - target: repo.name - }).then(function () { - RepositoryService.removeRepository($scope.project.name, repo.name).then(function () { - $scope.refresh(); - }); - }); - }; - $scope.restoreRepository = function (repo) { - ConfirmationDialog.openModal('entities.title_restore_repository', { - target: repo.name - }).then(function () { - RepositoryService.restoreRepository($scope.project.name, repo.name).then(function () { - $scope.refresh(); - }); - }); - }; - - // Member List. - $scope.updateMemberRole = function (member) { - ConfirmationDialog.openModal('entities.title_update_member', { - target: EntitiesUtil.sanitizeEmail(member.login) - }).then(function () { - ApiV1Service.jsonPatch(StringUtil.encodeUri(['metadata', $scope.project.name, - 'members', member.login]), - EntitiesUtil.toReplaceJsonPatch('/role', member.role)).then(function () { - $scope.refresh(); - }, function (error) { - NotificationUtil.error(error); - }); - }); - }; - $scope.removeMember = function (member) { - ConfirmationDialog.openModal('entities.title_remove_member', { - target: EntitiesUtil.sanitizeEmail(member.login) - }).then(function () { - ApiV1Service.delete(StringUtil.encodeUri(['metadata', $scope.project.name, - 'members', member.login])).then(function () { - $scope.refresh(); - }); - }); - }; - - // New member list. - $scope.newMemberList = new IdentifierWithRole(); - $scope.saveNewMember = function (newMember) { - const duplicated = $scope.memberList.filter(function (value) { - return angular.equals(value.login, newMember.id); - }); - if (duplicated.length > 0) { - NotificationUtil.error('entities.title_target_already_exists', { - target: newMember.id - }); - return; - } - ConfirmationDialog.openModal('entities.title_save_member', { - target: newMember.id - }).then(function () { - ApiV1Service.post(StringUtil.encodeUri(['metadata', $scope.project.name, - 'members']), newMember).then(function () { - $scope.newMemberList.remove(newMember); - $scope.refresh(); - }, function (error) { - NotificationUtil.error(error); - }); - }); - }; - - // Token list. - $scope.updateTokenRole = function (token) { - ConfirmationDialog.openModal('entities.title_update_token', { - target: token.appId - }).then(function () { - ApiV1Service.jsonPatch(StringUtil.encodeUri(['metadata', $scope.project.name, - 'tokens', token.appId]), - EntitiesUtil.toReplaceJsonPatch('/role', token.role)).then(function () { - $scope.refresh(); - }, function (error) { - NotificationUtil.error(error); - }); - }); - }; - $scope.removeToken = function (token) { - ConfirmationDialog.openModal('entities.title_remove_token', { - target: token.appId - }).then(function () { - ApiV1Service.delete(StringUtil.encodeUri(['metadata', $scope.project.name, - 'tokens', token.appId])).then(function () { - $scope.refresh(); - }, function (error) { - NotificationUtil.error(error); - }); - }); - }; - - // New token list. - $scope.newTokenList = new IdentifierWithRole(); - $scope.saveNewToken = function (newToken) { - ConfirmationDialog.openModal('entities.title_save_token', { - target: newToken.id - }).then(function () { - ApiV1Service.post(StringUtil.encodeUri(['metadata', $scope.project.name, - 'tokens']), newToken).then(function () { - $scope.newTokenList.remove(newToken); - $scope.refresh(); - }, function (error) { - NotificationUtil.error(error); - }); - }); - }; - - $scope.refreshNow = function() { - function refresh0(tokens) { - ApiV1Service.get(StringUtil.encodeUri(['projects', $scope.project.name])).then(function (metadata) { - var addedAppIds, allAppIds; - - // Mark whether each repository is active or not. - Object.entries(metadata.repos).forEach(function (entry) { - entry[1].isActive = angular.isUndefined(entry[1].removal) || - entry[1].removal === null; - }); - - $scope.metadata = metadata; - $scope.tokens = tokens; - $scope.role = Principal.projectRole(metadata); - $scope.isOwner = function () { - return angular.equals($scope.role, CentralDogmaConstant.PROJECT_ROLE_OWNER); - }; - $scope.isNotOwner = function () { - return !$scope.isOwner(); - }; - $scope.isNotOwnerOr = function (cond) { - return !$scope.isOwner() || cond; - }; - - // Prepare member and token list. - function convertList(list) { - var outputList = []; - if (angular.isUndefined(list) || list === null) { - return outputList; - } - Object.entries(list).forEach(function (entry) { - entry[1].isEditing = false; - entry[1].originalRole = entry[1].role; - outputList.push(entry[1]); - }); - return outputList.sort(function (a, b) { - if (a.originalRole === b.originalRole) { - return a - b; - } - if (a.originalRole === CentralDogmaConstant.PROJECT_ROLE_OWNER) { - return -1; - } else { - return 1; - } - }); - } - $scope.memberList = convertList(metadata.members); - $scope.tokenList = convertList(metadata.tokens); - - addedAppIds = EntitiesUtil.toKeySet(metadata.tokens); - allAppIds = tokens.filter(function (t) { - return t.isActive; - }).map(function (t) { - return t.appId; - }); - $scope.appIdList = EntitiesUtil.toUniqueSet(allAppIds, addedAppIds); - }, function (error) { - NotificationUtil.error(error); - $location.url('/projects'); - }); - } - - Security.resolve().then(function (isEnabled) { - if (isEnabled) { - SettingsService.listTokens().then(function (tokens) { - refresh0(tokens); - }); - } else { - refresh0([]); - } - }); - }; - - $scope.refresh = function() { - $timeout(function () { - $scope.refreshNow(); - }, CentralDogmaConstant.REFRESH_DELAY_MSEC); - }; - - $scope.refreshNow(); - }); diff --git a/server/src/main/resources/webapp/scripts/app/entities/metadata/metadata.project.html b/server/src/main/resources/webapp/scripts/app/entities/metadata/metadata.project.html deleted file mode 100644 index 68edda63e8..0000000000 --- a/server/src/main/resources/webapp/scripts/app/entities/metadata/metadata.project.html +++ /dev/null @@ -1,279 +0,0 @@ -
-

- Projects / {{project.name}} -
- - - -
-

-
- -

Repositories

- - - - - - - - - - - - - - - - - - - - - - -
{{ 'entities.title_name' | translate }}{{ 'entities.title_created_by' | translate }}{{ 'entities.title_created_at' | translate }}{{ 'entities.title_status' | translate }}
- - {{repo.name}} - - {{repo.name}}{{sanitizeEmail(repo.creation.user)}}{{toDateTimeStr(repo.creation.timestamp)}}ActiveDeleted -
- - - -
-
-
- - - -
-
-
-
- -
- -
-

Repository Permissions

- - - - - - - - - - - - - - - - - - - -
{{ 'entities.title_name' | translate }}{{ 'entities.title_owner' | translate }}{{ 'entities.title_member' | translate }}{{ 'entities.title_guest' | translate }}{{ 'entities.title_anonymous' | translate }}
- - {{repo.name}} - - - - - - - - - -
- -

Members

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
{{ 'entities.title_login_id' | translate }}{{ 'entities.title_role' | translate }}{{ 'entities.title_added_by' | translate }}{{ 'entities.title_added_at' | translate }}
{{sanitizeEmail(member.login)}} - - - {{member.role}} - - - - {{sanitizeEmail(member.creation.user)}}{{toDateTimeStr(member.creation.timestamp)}} -
- - -
-
-
- - - -
-
- - - - -
- - -
-
-
-
-
- -
-
- -

-
- Tokens - - - -
-

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
{{ 'entities.title_app_id' | translate }}{{ 'entities.title_role' | translate }}{{ 'entities.title_added_by' | translate }}{{ 'entities.title_added_at' | translate }}
{{token.appId}} - - - {{token.role}} - - - - {{sanitizeEmail(token.creation.user)}}{{toDateTimeStr(token.creation.timestamp)}} -
- - -
-
-
- - - -
-
- - - - -
- - -
-
-
-
-
- -
-
-
-
diff --git a/server/src/main/resources/webapp/scripts/app/entities/metadata/metadata.repository.controller.js b/server/src/main/resources/webapp/scripts/app/entities/metadata/metadata.repository.controller.js deleted file mode 100644 index 84074aea02..0000000000 --- a/server/src/main/resources/webapp/scripts/app/entities/metadata/metadata.repository.controller.js +++ /dev/null @@ -1,178 +0,0 @@ -'use strict'; - -angular.module('CentralDogmaAdmin') - .controller('MetadataRepositoryController', - function ($scope, $state, $stateParams, ApiV1Service, $uibModal, Permission, ConfirmationDialog, - Principal, CentralDogmaConstant, StringUtil, NotificationUtil, EntitiesUtil, $timeout) { - $scope.project = { - name: $stateParams.projectName - }; - $scope.repository = { - name: $stateParams.repoName - }; - $scope.sanitizeEmail = EntitiesUtil.sanitizeEmail; - - // Common functions. - $scope.onCheckboxClicked = function(perm) { - if (perm.write === true) { - perm.read = true; - } - }; - - function updatePerUserOrPerTokenPermissions(category, id, perm, translateId) { - ConfirmationDialog.openModal(translateId, { - target: EntitiesUtil.sanitizeEmail(id) - }).then(function () { - ApiV1Service.jsonPatch( - StringUtil.encodeUri(['metadata', $scope.project.name, - 'repos', $scope.repository.name, - 'perm', category, id]), - EntitiesUtil.toReplaceJsonPatch('/permissions', Permission.toSet(perm)) - ).then(function () { - $scope.refresh(); - }, function (error) { - NotificationUtil.error(error); - }); - }); - } - - function removePermTable(category, target, translateId) { - ConfirmationDialog.openModal(translateId, { - target: EntitiesUtil.sanitizeEmail(target) - }).then(function () { - ApiV1Service.delete( - StringUtil.encodeUri(['metadata', $scope.project.name, - 'repos', $scope.repository.name, - 'perm', category, target]) - ).then(function () { - $scope.refresh(); - }, function (error) { - NotificationUtil.error(error); - }); - }); - } - - function savePermission(category, target, list, translateId) { - ConfirmationDialog.openModal(translateId, { - target: EntitiesUtil.sanitizeEmail(target.name) - }).then(function () { - ApiV1Service.post( - StringUtil.encodeUri(['metadata', $scope.project.name, - 'repos', $scope.repository.name, - 'perm', category]), - Permission.toRequest(target.name, target) - ).then(function () { - list.remove(target); - $scope.refresh(); - }, function (error) { - NotificationUtil.error(error); - }); - }); - } - - // Role permission - $scope.onPerRolePermissionsTableCheckboxClicked = function(perm) { - $scope.onCheckboxClicked(perm); - $scope.rolePermTableChanged = !angular.equals($scope.rolePermTable, $scope.originalRolePermTable); - }; - $scope.updatePerRolePermissions = function () { - ConfirmationDialog.openModal('entities.title_update_role_permission', { - target: $scope.repository.name - }).then(function () { - var request = {}; - Object.entries($scope.rolePermTable).forEach(function (entry) { - request[entry[0]] = Permission.toSet(entry[1]); - }); - ApiV1Service.post( - StringUtil.encodeUri(['metadata', $scope.project.name, - 'repos', $scope.repository.name, - 'perm', 'role']), request - ).then(function () { - $scope.refresh(); - }, function (error) { - NotificationUtil.error(error); - }); - }); - }; - - // User permission - $scope.newUserPermission = new Permission(); - $scope.saveNewPerUserPermissions = function (userWithPermission) { - savePermission('users', userWithPermission, $scope.newUserPermission, 'entities.title_save_member'); - }; - $scope.isPerUserPermissionsChanged = function (user, perm) { - return !angular.equals(perm, $scope.originalUserPermTable[user]); - }; - $scope.updatePerUserPermissions = function (user, perm) { - updatePerUserOrPerTokenPermissions('users', user, perm, 'entities.title_update_member'); - }; - $scope.removePerUserPermissions = function (user) { - removePermTable('users', user, 'entities.title_remove_member'); - }; - - // Token permission - $scope.newTokenPermission = new Permission(); - $scope.saveNewPerTokenPermissions = function (tokenWithPermission) { - savePermission('tokens', tokenWithPermission, $scope.newTokenPermission, 'entities.title_save_token'); - }; - $scope.isPerTokenPermissionsChanged = function (appId, perm) { - return !angular.equals(perm, $scope.originalTokenPermTable[appId]); - }; - $scope.updatePerTokenPermissions = function (appId, perm) { - updatePerUserOrPerTokenPermissions('tokens', appId, perm, 'entities.title_update_token'); - }; - $scope.removePerTokenPermissions = function (appId) { - removePermTable('tokens', appId, 'entities.title_remove_token'); - }; - - $scope.refreshNow = function() { - ApiV1Service.get("projects/" + $scope.project.name).then(function (metadata) { - var registeredAppIdList, registeredMemberList; - - $scope.metadata = metadata; - $scope.currentRepo = metadata.repos[$scope.repository.name]; - $scope.role = Principal.projectRole(metadata); - $scope.isOwner = function () { - return angular.equals($scope.role, CentralDogmaConstant.PROJECT_ROLE_OWNER); - }; - $scope.isNotOwner = function () { - return !$scope.isOwner(); - }; - $scope.isNotOwnerOr = function (cond) { - return !$scope.isOwner() || (cond); - }; - - // Available member list on select box. - registeredMemberList = Object.keys($scope.currentRepo.perUserPermissions); - $scope.memberList = Object.keys(metadata.members).filter(function (value) { - return registeredMemberList.indexOf(value) === -1; // not exist - }); - - // Available token list on select box. - registeredAppIdList = Object.keys($scope.currentRepo.perTokenPermissions); - $scope.appIdList = Object.keys(metadata.tokens).filter(function (value) { - return registeredAppIdList.indexOf(value) === -1; // not exist - }); - - // Make permission tables. - $scope.rolePermTable = Permission.makePermissionTable($scope.currentRepo.perRolePermissions); - $scope.userPermTable = Permission.makePermissionTable($scope.currentRepo.perUserPermissions); - $scope.tokenPermTable = Permission.makePermissionTable($scope.currentRepo.perTokenPermissions); - - // Make a copy of the permission table in order to check whether it is changed. - $scope.originalRolePermTable = angular.copy($scope.rolePermTable); - $scope.originalUserPermTable = angular.copy($scope.userPermTable); - $scope.originalTokenPermTable = angular.copy($scope.tokenPermTable); - $scope.rolePermTableChanged = false; - }); - }; - - $scope.refresh = function() { - $timeout(function () { - $scope.refreshNow(); - }, CentralDogmaConstant.REFRESH_DELAY_MSEC); - }; - - $scope.refreshNow(); - }); - diff --git a/server/src/main/resources/webapp/scripts/app/entities/metadata/metadata.repository.html b/server/src/main/resources/webapp/scripts/app/entities/metadata/metadata.repository.html deleted file mode 100644 index 0c2e09291e..0000000000 --- a/server/src/main/resources/webapp/scripts/app/entities/metadata/metadata.repository.html +++ /dev/null @@ -1,156 +0,0 @@ -
-

Projects / {{project.name}} / - {{repository.name}}

-
- -
-

Role Permission

- - - - - - - - - - - - - - - -
{{ 'entities.title_role' | translate }}{{ 'entities.title_read' | translate }}{{ 'entities.title_write' | translate }}
{{role}}
-
-
-
- -
-
- - - -

User Permission

- - - - - - - - - - - - - - - - - - - - - - - -
{{ 'entities.title_login_id' | translate }}{{ 'entities.title_read' | translate }}{{ 'entities.title_write' | translate }}
{{sanitizeEmail(user)}} -
- - -
-
- - -
- - -
-
-
-
-
- -
-
- -

Token Permission

- - - - - - - - - - - - - - - - - - - - - - - -
{{ 'entities.title_app_id' | translate }}{{ 'entities.title_read' | translate }}{{ 'entities.title_write' | translate }}
{{token}} -
- - -
-
- - -
- - -
-
-
-
-
- -
-
-
-
diff --git a/server/src/main/resources/webapp/scripts/app/entities/projects/project.controller.js b/server/src/main/resources/webapp/scripts/app/entities/projects/project.controller.js deleted file mode 100644 index a2dd9491e4..0000000000 --- a/server/src/main/resources/webapp/scripts/app/entities/projects/project.controller.js +++ /dev/null @@ -1,15 +0,0 @@ -'use strict'; - -angular.module('CentralDogmaAdmin') - .controller('ProjectController', - function ($scope, $stateParams, RepositoryService) { - $scope.project = { - name: $stateParams.projectName - }; - - RepositoryService.listRepositories($scope.project.name).then( - function (repositories) { - $scope.repositories = repositories; - } - ); - }); diff --git a/server/src/main/resources/webapp/scripts/app/entities/projects/project.html b/server/src/main/resources/webapp/scripts/app/entities/projects/project.html deleted file mode 100644 index 605f1ec8dd..0000000000 --- a/server/src/main/resources/webapp/scripts/app/entities/projects/project.html +++ /dev/null @@ -1,29 +0,0 @@ -
-

Project {{project.name}}

- -
- - - - - - - -
{{repository.name}}
- -
- -
- - - -
-
diff --git a/server/src/main/resources/webapp/scripts/app/entities/projects/project.new.controller.js b/server/src/main/resources/webapp/scripts/app/entities/projects/project.new.controller.js deleted file mode 100644 index de0fe7e2d5..0000000000 --- a/server/src/main/resources/webapp/scripts/app/entities/projects/project.new.controller.js +++ /dev/null @@ -1,21 +0,0 @@ -'use strict'; - -angular.module('CentralDogmaAdmin') - .controller('ProjectNewController', - function ($scope, $state, CentralDogmaConstant, - ProjectService, NotificationUtil) { - - $scope.entityNamePattern = CentralDogmaConstant.ENTITY_NAME_PATTERN; - - $scope.createProject = function () { - ProjectService.createProject($scope.project.name).then( - function () { - NotificationUtil.success('entities.created_project', { name: $scope.project.name }); - - $state.go('project', { - projectName: $scope.project.name - }); - } - ); - }; - }); diff --git a/server/src/main/resources/webapp/scripts/app/entities/projects/project.new.html b/server/src/main/resources/webapp/scripts/app/entities/projects/project.new.html deleted file mode 100644 index 2f878c6267..0000000000 --- a/server/src/main/resources/webapp/scripts/app/entities/projects/project.new.html +++ /dev/null @@ -1,24 +0,0 @@ -
-

New project

- -
- -
-
- - - -

- Enter a valid project name. -

-
- -
- -
-
-
diff --git a/server/src/main/resources/webapp/scripts/app/entities/projects/projects.controller.js b/server/src/main/resources/webapp/scripts/app/entities/projects/projects.controller.js deleted file mode 100644 index ca32eed1b7..0000000000 --- a/server/src/main/resources/webapp/scripts/app/entities/projects/projects.controller.js +++ /dev/null @@ -1,41 +0,0 @@ -'use strict'; - -angular.module('CentralDogmaAdmin') - .controller('ProjectsController', - function ($scope, ProjectService, $location, NotificationUtil, ConfirmationDialog) { - $scope.movePageIfAccessible = function (projectName) { - ProjectService.checkPermission(projectName).then(function () { - $location.url('/metadata/' + projectName); - }, function (error) { - NotificationUtil.error(error); - }) - }; - - $scope.restoreProject = function (projectName) { - ConfirmationDialog.openModal('entities.title_restore_project', { - target: projectName - }).then(function () { - ProjectService.restoreProject(projectName).then(function () { - NotificationUtil.success('entities.title_project_restored', { - target: projectName - }); - $scope.refresh(); - }); - }); - }; - - $scope.refresh = function () { - ProjectService.listProjects().then( - function (projects) { - $scope.projects = projects; - } - ); - ProjectService.listRemovedProjects().then( - function (removedProjects) { - $scope.removedProjects = removedProjects; - } - ) - }; - - $scope.refresh(); - }); diff --git a/server/src/main/resources/webapp/scripts/app/entities/projects/projects.html b/server/src/main/resources/webapp/scripts/app/entities/projects/projects.html deleted file mode 100644 index f193a6f071..0000000000 --- a/server/src/main/resources/webapp/scripts/app/entities/projects/projects.html +++ /dev/null @@ -1,50 +0,0 @@ -
-

Projects

- -
- - - - - -
-
- - - -
{{project.name}} - - - -
- -
- -
- -
- -
- -
-

Removed Projects

- - - - - - - - -
{{project.name}} - - - -
-
- -
diff --git a/server/src/main/resources/webapp/scripts/app/entities/projects/projects.js b/server/src/main/resources/webapp/scripts/app/entities/projects/projects.js deleted file mode 100644 index 02afd49dd7..0000000000 --- a/server/src/main/resources/webapp/scripts/app/entities/projects/projects.js +++ /dev/null @@ -1,41 +0,0 @@ -'use strict'; - -angular.module('CentralDogmaAdmin') - .config(function ($stateProvider, CentralDogmaConstant) { - $stateProvider - .state('projects', { - parent: 'entity', - url: '/projects', - data: {}, - views: { - 'content@': { - templateUrl: 'scripts/app/entities/projects/projects.html', - controller: 'ProjectsController' - } - } - }) - .state('projectNew', { - parent: 'entity', - url: '/new_project', - data: { - roles: [CentralDogmaConstant.LEVEL_USER] - }, - views: { - 'content@': { - templateUrl: 'scripts/app/entities/projects/project.new.html', - controller: 'ProjectNewController' - } - } - }) - .state('project', { - parent: 'entity', - url: '/projects/:projectName', - data: {}, - views: { - 'content@': { - templateUrl: 'scripts/app/entities/projects/project.html', - controller: 'ProjectController' - } - } - }); - }); diff --git a/server/src/main/resources/webapp/scripts/app/entities/repositories/repositories.js b/server/src/main/resources/webapp/scripts/app/entities/repositories/repositories.js deleted file mode 100644 index 61bdec9917..0000000000 --- a/server/src/main/resources/webapp/scripts/app/entities/repositories/repositories.js +++ /dev/null @@ -1,111 +0,0 @@ -'use strict'; - -angular.module('CentralDogmaAdmin') - .config(function ($stateProvider, CentralDogmaConstant) { - $stateProvider - .state('repositoryNew', { - parent: 'entity', - url: '/projects/:projectName/new_repo', - data: {}, - views: { - 'content@': { - templateUrl: 'scripts/app/entities/repositories/repository.new.html', - controller: 'RepositoryNewController' - } - } - }) - .state('repository', { - parent: 'entity', - url: '/projects/:projectName/repos/:repositoryName', - data: {}, - views: { - 'content@': { - templateUrl: 'scripts/app/entities/repositories/repository.tree.html', - controller: 'RepositoryTreeController' - } - } - }) - .state('repositoryTree', { - parent: 'entity', - url: '/projects/:projectName/repos/:repositoryName/list/:revision/{path:repositoryPath}', - data: {}, - views: { - 'content@': { - templateUrl: 'scripts/app/entities/repositories/repository.tree.html', - controller: 'RepositoryTreeController' - } - } - }) - .state('repositoryFile', { - parent: 'entity', - url: '/projects/:projectName/repos/:repositoryName/files/:revision/{path:repositoryPath}', - data: {}, - views: { - 'content@': { - templateUrl: 'scripts/app/entities/repositories/repository.file.html', - controller: 'RepositoryFileController' - } - } - }) - .state('repositoryFileNew', { - parent: 'entity', - url: '/projects/:projectName/repos/:repositoryName/new_file/:revision/{path:repositoryPath}', - data: { - roles: [CentralDogmaConstant.LEVEL_USER] - }, - views: { - 'content@': { - templateUrl: 'scripts/app/entities/repositories/repository.file.new.html', - controller: 'RepositoryFileNewController' - } - } - - }) - .state('repositoryFileEdit', { - parent: 'entity', - url: '/projects/:projectName/repos/:repositoryName/edit/:revision/{path:repositoryPath}', - data: { - roles: [CentralDogmaConstant.LEVEL_USER] - }, - views: { - 'content@': { - templateUrl: 'scripts/app/entities/repositories/repository.file.edit.html', - controller: 'RepositoryFileEditController' - } - } - - }) - .state('repositoryHistory', { - parent: 'entity', - url: '/projects/:projectName/repos/:repositoryName/history/:revision/{path:repositoryPath}', - data: {}, - views: { - 'content@': { - templateUrl: 'scripts/app/entities/repositories/repository.history.html', - controller: 'RepositoryHistoryController' - } - } - }) - .state('repositorySearch', { - parent: 'entity', - url: '/projects/:projectName/repos/:repositoryName/search/:revision?term', - data: {}, - views: { - 'content@': { - templateUrl: 'scripts/app/entities/repositories/repository.search.html', - controller: 'RepositorySearchController' - } - } - }) - .state('repositoryQuery', { - parent: 'entity', - url: '/projects/:projectName/repos/:repositoryName/query/:revision/{path:repositoryPath}?expression', - data: {}, - views: { - 'content@': { - templateUrl: 'scripts/app/entities/repositories/repository.query.html', - controller: 'RepositoryQueryController' - } - } - }); - }); diff --git a/server/src/main/resources/webapp/scripts/app/entities/repositories/repository.file.controller.js b/server/src/main/resources/webapp/scripts/app/entities/repositories/repository.file.controller.js deleted file mode 100644 index 1f3e7a32de..0000000000 --- a/server/src/main/resources/webapp/scripts/app/entities/repositories/repository.file.controller.js +++ /dev/null @@ -1,66 +0,0 @@ -'use strict'; - -angular.module('CentralDogmaAdmin') - .controller('RepositoryFileController', - function ($scope, $state, $stateParams, $timeout, $location, $uibModal, - CentralDogmaConstant, RepositoryService, - NotificationUtil, StringUtil) { - - $scope.project = { - name: $stateParams.projectName - }; - $scope.repository = { - name: $stateParams.repositoryName - }; - $scope.revision = StringUtil.isEmpty($stateParams.revision) ? - CentralDogmaConstant.HEAD : $stateParams.revision; - - $scope.path = StringUtil.normalizePath($stateParams.path); - $scope.parsedPaths = RepositoryService.parsePath($scope.path); - - $scope.aceLoaded = function (editor) { - $timeout(function() { editor.focus(); }); - }; - - $scope.setRevision = function (revision) { - $location.path('/projects/' + $scope.project.name + '/repos/' + $scope.repository.name + - '/files/' + revision + $scope.path); - }; - - $scope.deleteFile = function () { - var modalInstance = $uibModal.open({ - templateUrl: 'scripts/app/entities/repositories/repository.file.delete.html', - controller: 'RepositoryFileDeleteController', - resolve: { - project: function () { - return $scope.project; - }, - repository: function () { - return $scope.repository; - }, - revision: function () { - return $scope.revision; - }, - file: function () { - return $scope.file; - } - } - }); - - modalInstance.result.then( - function (message) { - NotificationUtil.success(message); - $scope.back(); - }); - }; - - RepositoryService.getFile($scope.project.name, $scope.repository.name, $scope.revision, - {path: $scope.path}).then( - function (file) { - if (file.type === 'JSON') { - file.content = JSON.stringify(JSON.parse(file.content), null, 2) + '\n'; - } - $scope.file = file; - } - ); - }); diff --git a/server/src/main/resources/webapp/scripts/app/entities/repositories/repository.file.delete.controller.js b/server/src/main/resources/webapp/scripts/app/entities/repositories/repository.file.delete.controller.js deleted file mode 100644 index ade0793d45..0000000000 --- a/server/src/main/resources/webapp/scripts/app/entities/repositories/repository.file.delete.controller.js +++ /dev/null @@ -1,42 +0,0 @@ -'use strict'; - -angular.module('CentralDogmaAdmin') - .controller('RepositoryFileDeleteController', - function ($scope, $uibModalInstance, project, repository, revision, file, - RepositoryService, StringUtil, NotificationUtil) { - - $scope.project = project; - $scope.repository = repository; - $scope.revision = revision; - $scope.file = file; - - $scope.message = { - summary: '', - detail: { - content: '', - markup: 'PLAINTEXT' - } - }; - - $scope.deleteFile = function () { - if (StringUtil.isEmpty($scope.message.summary)) { - $scope.message.summary = 'Delete ' + $scope.file.path; - } - - RepositoryService.deleteFile($scope.project.name, $scope.repository.name, $scope.revision, - $scope.message, $scope.file.path).then( - function () { - $uibModalInstance.close({ - translationId: 'entities.deleted_file', - interpolateParams: {path: $scope.file.path} - }); - }, function (error) { - NotificationUtil.error(error); - $uibModalInstance.dismiss(error.message); - }); - }; - - $scope.cancel = function () { - $uibModalInstance.dismiss(''); - }; - }); diff --git a/server/src/main/resources/webapp/scripts/app/entities/repositories/repository.file.delete.html b/server/src/main/resources/webapp/scripts/app/entities/repositories/repository.file.delete.html deleted file mode 100644 index 87fd22c6e5..0000000000 --- a/server/src/main/resources/webapp/scripts/app/entities/repositories/repository.file.delete.html +++ /dev/null @@ -1,21 +0,0 @@ -
- - - -
diff --git a/server/src/main/resources/webapp/scripts/app/entities/repositories/repository.file.edit.controller.js b/server/src/main/resources/webapp/scripts/app/entities/repositories/repository.file.edit.controller.js deleted file mode 100644 index 36a97dd138..0000000000 --- a/server/src/main/resources/webapp/scripts/app/entities/repositories/repository.file.edit.controller.js +++ /dev/null @@ -1,153 +0,0 @@ -'use strict'; - -angular.module('CentralDogmaAdmin') - .controller('RepositoryFileEditController', - function ($scope, $state, $stateParams, $timeout, - CentralDogmaConstant, RepositoryService, NotificationUtil, StringUtil) { - - $scope.project = { - name: $stateParams.projectName - }; - $scope.repository = { - name: $stateParams.repositoryName - }; - $scope.revision = StringUtil.isEmpty($stateParams.revision) ? - CentralDogmaConstant.HEAD : $stateParams.revision; - - $scope.path = StringUtil.normalizePath($stateParams.path); - $scope.parsedPaths = RepositoryService.parsePath($scope.path); - - $scope.file = null; - $scope.absRevision = null; - - $scope.message = { - summary: '', - detail: { - content: '', - markup: 'PLAINTEXT' - } - }; - - $scope.aceLoaded = function (editor) { - $timeout(function() { editor.focus(); }); - $scope.fetchAndMerge(); - }; - - var getDiffs = function (type, origContent, curContent) { - switch (type) { - case 'JSON': - return jsonpatch.compare(JSON.parse(origContent), JSON.parse(curContent)); - case 'TEXT': - return JsDiff.structuredPatch(null, null, origContent, curContent, null, null); - default: - throw new Error(JSON.stringify({ - translationId: 'entities.unsupported_file_type', - interpolateParams: { 'type': $scope.file.type } - })); - } - }; - - var applyJsonPatch = function (content, diffs) { - if (diffs.length == 0) { - return false; - } - - var contentJson = JSON.parse(content); - if (jsonpatch.apply(contentJson, diffs, true) === false) { - throw new Error('entities.auto_merge_failed'); - } - - return JSON.stringify(contentJson, null, 2) + '\n'; - }; - - var applyTextPatch = function (content, diffs) { - if (diffs.hunks.length == 0) { - return false; - } - - var textPatchApplied = JsDiff.applyPatch(content, diffs); - if (textPatchApplied === false) { - throw new Error('entities.auto_merge_failed'); - } - - return textPatchApplied; - }; - - var applyDiffs = function (type, content, diffs) { - if (diffs == null) { - return false; - } - - switch (type) { - case 'JSON': - return applyJsonPatch(content, diffs); - case 'TEXT': - return applyTextPatch(content, diffs); - default: - throw new Error(JSON.stringify({ - translationId: 'entities.unsupported_file_type', - interpolateParams: { 'type': type } - })); - } - }; - - $scope.editFile = function () { - $scope.message.summary = StringUtil.defaultString($scope.message.summary, - 'Edit ' + $scope.file.path); - - RepositoryService.editFile($scope.project.name, $scope.repository.name, $scope.absRevision, - $scope.message, $scope.file).then( - function () { - NotificationUtil.success('entities.saved_file', { path: $scope.path }); - - $scope.back(); - }, function (error) { - switch (error.status) { - case 409: - if (error.exception === 'com.linecorp.centraldogma.common.RedundantChangeException') { - NotificationUtil.error('entities.redundant_changes'); - } else { - NotificationUtil.error('entities.conflict_occurred'); - } - break; - default: - NotificationUtil.error(error); - } - }); - }; - - $scope.fetchAndMerge = function () { - try { - var diffs = null; - if ($scope.file != null) { - diffs = getDiffs($scope.file.type, $scope.origFileContent, $scope.file.content); - } - - RepositoryService.getFile($scope.project.name, $scope.repository.name, $scope.revision, - {path: $scope.path}).then( - function (file) { - $scope.absRevision = file.revision; - $scope.file = file; - if ($scope.file.type === 'JSON') { - $scope.file.content = - JSON.stringify(JSON.parse($scope.file.content), null, 2) + '\n'; - } - $scope.origFileContent = $scope.file.content; - - var diffsApplied = applyDiffs($scope.file.type, $scope.file.content, diffs); - if (diffsApplied === false) { - $scope.isDiffsApplied = false; - } else { - $scope.isDiffsApplied = true; - $scope.file.content = diffsApplied; - } - }); - } catch (error) { - var message = error.message; - try { - message = JSON.parse(message); - } catch (ignored) {} - NotificationUtil.error(message); - } - }; - }); diff --git a/server/src/main/resources/webapp/scripts/app/entities/repositories/repository.file.edit.html b/server/src/main/resources/webapp/scripts/app/entities/repositories/repository.file.edit.html deleted file mode 100644 index 15a404cd72..0000000000 --- a/server/src/main/resources/webapp/scripts/app/entities/repositories/repository.file.edit.html +++ /dev/null @@ -1,83 +0,0 @@ -
-

- -

- -
- -
-
- - -

- - {{project.name}} / - - - - {{repository.name}} - - - - @ {{revision}} - -

-
- -
- - - -
- -
- -
- -
- - - -
- -
- entities.commit_message - -
- - -
- -
- - -
-
- -
- -
-
-
diff --git a/server/src/main/resources/webapp/scripts/app/entities/repositories/repository.file.html b/server/src/main/resources/webapp/scripts/app/entities/repositories/repository.file.html deleted file mode 100644 index d3e9f63d12..0000000000 --- a/server/src/main/resources/webapp/scripts/app/entities/repositories/repository.file.html +++ /dev/null @@ -1,70 +0,0 @@ -
-

- -

- -
- -
- -
-

- -

-
-
- -
- -

- - - {{repository.name}} - - - - / - - {{parsedPath.name}} - - - / {{file.name}} -

- - - -
- -
- - -
-
- - {{ 'entities.button_edit' | translate }} - - -
-
-
-
diff --git a/server/src/main/resources/webapp/scripts/app/entities/repositories/repository.file.new.controller.js b/server/src/main/resources/webapp/scripts/app/entities/repositories/repository.file.new.controller.js deleted file mode 100644 index 11981001bb..0000000000 --- a/server/src/main/resources/webapp/scripts/app/entities/repositories/repository.file.new.controller.js +++ /dev/null @@ -1,149 +0,0 @@ -'use strict'; - -angular.module('CentralDogmaAdmin') - .controller('RepositoryFileNewController', - function ($scope, $state, $stateParams, $timeout, - CentralDogmaConstant, RepositoryService, NotificationUtil, StringUtil) { - $scope.project = { - name: $stateParams.projectName - }; - $scope.repository = { - name: $stateParams.repositoryName - }; - $scope.revision = StringUtil.isEmpty($stateParams.revision) ? - CentralDogmaConstant.HEAD : $stateParams.revision; - - $scope.path = StringUtil.normalizePath($stateParams.path); - $scope.parsedPaths = RepositoryService.parsePath($scope.path); - - $scope.file = { - name: '', - type: 'JSON', - content: '' - }; - - $scope.message = { - summary: '', - detail: { - content: '', - markup: 'PLAINTEXT' - } - }; - - var generateNewPath = function (normalizedPath, newDirectories) { - var temp = normalizedPath; - if (temp === '/') { - temp = ''; - } - - return [temp].concat(newDirectories).join('/'); - }; - - $scope.newDirectories = []; - $scope.newPath = generateNewPath($scope.path, $scope.newDirectories); - - $scope.jsonEditorOptions = { - mode: 'code', - modes: ['tree', 'code'] - }; - - $scope.aceLoaded = function (editor) { - $scope.editor = editor; - }; - - // Auto-focus the file name field. - var focusFilenameField = function () { - $timeout(function () { - angular.element('#fileName').focus(); - }); - }; - - focusFilenameField(); - - var filenamePattern = /^[0-9A-Za-z](?:[-+_0-9A-Za-z\.]*[0-9A-Za-z])?$/; - - $scope.popOnBackspace = false; - $scope.keyUp = function (event) { - var filename = $scope.file.name; - if (StringUtil.isEmpty(filename)) { - if (event.keyCode === 8 && // backspace - $scope.newDirectories.length > 0) { - if ($scope.popOnBackspace) { - filename = $scope.newDirectories.pop(); - $scope.popOnBackspace = false; - } else { - $scope.popOnBackspace = true; - } - } else { - return; - } - } else if (filename.indexOf('/') >= 0) { // '/' - var filenameArray = filename.split('/'); - if (filenameArray.length === 0) { - $scope.file.name = filename = ''; - } else { - for (var i = 0; i < filenameArray.length - 1; i++) { - if (filenameArray[i].match(filenamePattern)) { - $scope.newDirectories.push(filenameArray[i]); - } - } - - filename = filenameArray[filenameArray.length - 1]; - $scope.popOnBackspace = StringUtil.isEmpty(filename); - } - } else { - $scope.popOnBackspace = false; - } - - $scope.file.name = filename; - - if (StringUtil.isEmpty(filename)) { - $scope.fileForm.fileName.$pristine = true; - } else if (!filename.match(filenamePattern)) { - $scope.fileForm.fileName.$invalid = true; - return; - } else { - $scope.fileForm.fileName.$invalid = false; - } - - $scope.newPath = generateNewPath($scope.path, $scope.newDirectories); - $scope.file.path = $scope.newPath + '/' + filename; - }; - - $scope.createFile = function () { - if (!$scope.file.name.match(filenamePattern)) { - $scope.fileForm.fileName.$invalid = true; - $scope.fileForm.fileName.$pristine = false; - NotificationUtil.error('entities.invalid_file_path'); - focusFilenameField(); - return; - } - - if (StringUtil.isEmpty($scope.message.summary)) { - $scope.message.summary = 'Add ' + $scope.file.path; - } - - if (StringUtil.endsWith($scope.file.name.toLowerCase(), '.json')) { - $scope.file.type = 'JSON'; - try { - JSON.parse($scope.file.content); - } catch (error) { - NotificationUtil.error('entities.invalid_json'); - $timeout(function() { - $scope.editor.focus(); - }); - return; - } - } else { - $scope.file.type = 'TEXT'; - } - - RepositoryService.addFile($scope.project.name, $scope.repository.name, $scope.revision, - $scope.message, $scope.file).then( - function () { - NotificationUtil.success('entities.saved_file', { path: $scope.file.path }); - - $scope.back(); - }); - }; - }); diff --git a/server/src/main/resources/webapp/scripts/app/entities/repositories/repository.file.new.html b/server/src/main/resources/webapp/scripts/app/entities/repositories/repository.file.new.html deleted file mode 100644 index 9225f4c1ff..0000000000 --- a/server/src/main/resources/webapp/scripts/app/entities/repositories/repository.file.new.html +++ /dev/null @@ -1,66 +0,0 @@ -
-

- -

- -
- -
-
- - -

- - {{project.name}} / - - - - {{repository.name}} - - - - @ {{revision}} - -

-
- -
- - -
- {{newPath}}/ - -
-

- entities.invalid_file_path -

-
- -
- -
- -
- entities.commit_message -
- - -
-
- - -
-
- -
- -
-
-
diff --git a/server/src/main/resources/webapp/scripts/app/entities/repositories/repository.history.controller.js b/server/src/main/resources/webapp/scripts/app/entities/repositories/repository.history.controller.js deleted file mode 100644 index 81971b45b1..0000000000 --- a/server/src/main/resources/webapp/scripts/app/entities/repositories/repository.history.controller.js +++ /dev/null @@ -1,40 +0,0 @@ -'use strict'; - -angular.module('CentralDogmaAdmin') - .controller('RepositoryHistoryController', - function ($scope, $stateParams, $location, - CentralDogmaConstant, RepositoryService, StringUtil) { - - $scope.project = { - name: $stateParams.projectName - }; - $scope.repository = { - name: $stateParams.repositoryName - }; - $scope.revision = StringUtil.isEmpty($stateParams.revision) ? - CentralDogmaConstant.HEAD : $stateParams.revision; - - $scope.path = StringUtil.normalizePath($stateParams.path); - $scope.parsedPaths = RepositoryService.parsePath($scope.path); - - $scope.commits = []; - - $scope.setRevision = function (revision) { - $location.path('/projects/' + $scope.project.name + '/repos/' + $scope.repository.name + - '/history/' + revision + $scope.path); - }; - - // TODO(trustin): Pagination - RepositoryService.getHistory($scope.project.name, $scope.repository.name, $scope.path, - $scope.revision, 1).then( - function (commits) { - angular.forEach(commits, function (commit) { - if (commit.revision.minor === 0) { - commit.revision.revisionNumber = commit.revision.major.toString(); - } - commit.timestampStr = moment(commit.timestamp).fromNow(); - this.push(commit); - }, $scope.commits); - } - ); - }); diff --git a/server/src/main/resources/webapp/scripts/app/entities/repositories/repository.history.html b/server/src/main/resources/webapp/scripts/app/entities/repositories/repository.history.html deleted file mode 100644 index 6ffecddd97..0000000000 --- a/server/src/main/resources/webapp/scripts/app/entities/repositories/repository.history.html +++ /dev/null @@ -1,69 +0,0 @@ -
-

- -

- -
- -
- -
-
- -
-
-
- -
- -

- - - {{repository.name}} - - - - / - - {{parsedPath.name}} - - - {{parsedPath.name}} - - - {{parsedPath.name}} - - -

- - - - - - - - - - - - - - - - - - -
entities.revisionentities.commit_summaryentities.commit_authorentities.commit_timestamp
- - {{commit.revision.revisionNumber}} - - {{commit.summary}}{{commit.author.name}}{{commit.timestampStr}}
-
diff --git a/server/src/main/resources/webapp/scripts/app/entities/repositories/repository.new.controller.js b/server/src/main/resources/webapp/scripts/app/entities/repositories/repository.new.controller.js deleted file mode 100644 index a603ed007f..0000000000 --- a/server/src/main/resources/webapp/scripts/app/entities/repositories/repository.new.controller.js +++ /dev/null @@ -1,22 +0,0 @@ -'use strict'; - -angular.module('CentralDogmaAdmin') - .controller('RepositoryNewController', - function ($scope, $state, $stateParams, RepositoryService, NotificationUtil) { - $scope.project = { - name: $stateParams.projectName - }; - - $scope.createRepository = function () { - RepositoryService.createRepository($scope.project.name, $scope.repository.name).then( - function () { - NotificationUtil.success('entities.created_repository', - { - projectName: $scope.project.name, - repositoryName: $scope.repository.name - }); - $scope.back(); - } - ); - }; - }); diff --git a/server/src/main/resources/webapp/scripts/app/entities/repositories/repository.new.html b/server/src/main/resources/webapp/scripts/app/entities/repositories/repository.new.html deleted file mode 100644 index 25e0c0f65b..0000000000 --- a/server/src/main/resources/webapp/scripts/app/entities/repositories/repository.new.html +++ /dev/null @@ -1,34 +0,0 @@ -
-

entities.title_create_repository

- -
- -
-
- - -

- {{project.name}} -

-
- -
- - - -

- entities.invalid_repository_name -

-
- -
- -
-
-
diff --git a/server/src/main/resources/webapp/scripts/app/entities/repositories/repository.query.controller.js b/server/src/main/resources/webapp/scripts/app/entities/repositories/repository.query.controller.js deleted file mode 100644 index ec466aac51..0000000000 --- a/server/src/main/resources/webapp/scripts/app/entities/repositories/repository.query.controller.js +++ /dev/null @@ -1,109 +0,0 @@ -'use strict'; - -angular.module('CentralDogmaAdmin') - .controller('RepositoryQueryController', - function ($scope, $state, $stateParams, $location, $window, - CentralDogmaConstant, RepositoryService, StringUtil) { - - $scope.project = { - name: $stateParams.projectName - }; - $scope.repository = { - name: $stateParams.repositoryName - }; - $scope.revision = StringUtil.isEmpty($stateParams.revision) ? - CentralDogmaConstant.HEAD : $stateParams.revision; - - $scope.path = StringUtil.normalizePath($stateParams.path); - $scope.parsedPaths = RepositoryService.parsePath($scope.path); - - $scope.file = null; - $scope.queryResult = ''; - - var filterInvalidExpressions = function (expressions) { - var ret = []; - for (var index in expressions) { - if (StringUtil.isEmpty(expressions[index].value)) { - continue; - } - ret.push(expressions[index]); - } - return ret; - }; - - var convertExpressionsIntoArray = function (expressions) { - var filtered = filterInvalidExpressions(expressions); - - var ret = []; - for (var index in filtered) { - ret.push(filtered[index].value); - } - return ret; - }; - - $scope.queryType = 'JSON_PATH'; - - if (angular.isString($stateParams.expression)) { - $scope.expressions = [{value: $stateParams.expression}]; - } else if (angular.isArray($stateParams.expression)) { - var expressions = []; - - for (var index in $stateParams.expression) { - expressions.push({value: $stateParams.expression[index]}); - } - - $scope.expressions = filterInvalidExpressions(expressions); - } else { - $scope.expressions = []; - } - - $scope.addNewExpression = function () { - $scope.expressions.push({value: ''}); - }; - - $scope.removeExpression = function (index) { - $scope.expressions.splice(index, 1); - }; - - if ($scope.expressions.length == 0) { - $scope.addNewExpression(); - } - - $scope.setRevision = function (revision) { - $location.path('/projects/' + $scope.project.name + '/repos/' + $scope.repository.name + - '/query/' + revision + $scope.path); - }; - - $scope.query = function () { - $state.go('repositoryQuery', { - projectName: $scope.project.name, - repositoryName: $scope.repository.name, - revision: $scope.revision, - expression: convertExpressionsIntoArray($scope.expressions) - }); - }; - - var converted = convertExpressionsIntoArray($scope.expressions); - if (converted.length == 0) { - RepositoryService.getFile($scope.project.name, $scope.repository.name, $scope.revision, - { - path: $scope.path, - type: 'IDENTITY' - }).then( - function (file) { - $scope.file = file; - $scope.queryResult = JSON.stringify(JSON.parse(file.content), null, 2) + '\n'; - }); - } else { - RepositoryService.getFile($scope.project.name, $scope.repository.name, $scope.revision, - { - path: $scope.path, - type: $scope.queryType, - expressions: converted - }).then( - function (file) { - $scope.file = file; - $scope.queryResult = JSON.stringify(JSON.parse(file.content), null, 2) + '\n'; - }); - } - }); diff --git a/server/src/main/resources/webapp/scripts/app/entities/repositories/repository.query.html b/server/src/main/resources/webapp/scripts/app/entities/repositories/repository.query.html deleted file mode 100644 index 5789c94c20..0000000000 --- a/server/src/main/resources/webapp/scripts/app/entities/repositories/repository.query.html +++ /dev/null @@ -1,68 +0,0 @@ -
-

- -

- -
- -
- -
-

- -

-
-
- -
- -

- - - {{repository.name}} - - - - / - - {{parsedPath.name}} - - - / {{file.name}} -

- -
- -
-
-
-
- {{queryType}}[{{$index}}] - - - - - -
-
-
- -
-
-
- - -
diff --git a/server/src/main/resources/webapp/scripts/app/entities/repositories/repository.search.controller.js b/server/src/main/resources/webapp/scripts/app/entities/repositories/repository.search.controller.js deleted file mode 100644 index ea05882345..0000000000 --- a/server/src/main/resources/webapp/scripts/app/entities/repositories/repository.search.controller.js +++ /dev/null @@ -1,46 +0,0 @@ -'use strict'; - -angular.module('CentralDogmaAdmin') - .controller('RepositorySearchController', - function ($scope, $state, $stateParams, $location, $window, - CentralDogmaConstant, RepositoryService, StringUtil) { - $scope.project = { - name: $stateParams.projectName - }; - $scope.repository = { - name: $stateParams.repositoryName - }; - $scope.revision = StringUtil.isEmpty($stateParams.revision) ? - CentralDogmaConstant.HEAD : $stateParams.revision; - - $scope.term = !angular.isString($stateParams.term) ? '' : $stateParams.term; - if ($scope.term === 'true') { - $scope.term = ''; - } - - $scope.files = []; - - $scope.setRevision = function (revision) { - console.log($scope.term); - $location.path('/projects/' + $scope.project.name + '/repos/' + $scope.repository.name + - '/search/' + revision); - }; - - $scope.search = function () { - $state.go('repositorySearch', { - projectName: $scope.project.name, - repositoryName: $scope.repository.name, - revision: $scope.revision, - term: $scope.term - }); - }; - - if (StringUtil.isNotEmpty($scope.term)) { - RepositoryService.search($scope.project.name, $scope.repository.name, $scope.revision, - $scope.term).then( - function (files) { - $scope.files = files; - } - ); - } - }); diff --git a/server/src/main/resources/webapp/scripts/app/entities/repositories/repository.search.html b/server/src/main/resources/webapp/scripts/app/entities/repositories/repository.search.html deleted file mode 100644 index ab8d89a8ea..0000000000 --- a/server/src/main/resources/webapp/scripts/app/entities/repositories/repository.search.html +++ /dev/null @@ -1,49 +0,0 @@ -
-

- -

- -
- -
- -
-

- -

-
-
- -
- - - - - - - - - - - - -
entities.entries_not_found
- - - - - {{file.path}} - - - {{file.path}} - -
-
diff --git a/server/src/main/resources/webapp/scripts/app/entities/repositories/repository.tree.controller.js b/server/src/main/resources/webapp/scripts/app/entities/repositories/repository.tree.controller.js deleted file mode 100644 index 7424925c33..0000000000 --- a/server/src/main/resources/webapp/scripts/app/entities/repositories/repository.tree.controller.js +++ /dev/null @@ -1,74 +0,0 @@ -'use strict'; - -angular.module('CentralDogmaAdmin') - .controller('RepositoryTreeController', - function ($scope, $stateParams, $location, $uibModal, Principal, CentralDogmaConstant, RepositoryService, - NotificationUtil, StringUtil) { - $scope.project = { - name: $stateParams.projectName - }; - $scope.repository = { - name: $stateParams.repositoryName - }; - $scope.revision = StringUtil.isEmpty($stateParams.revision) ? - CentralDogmaConstant.HEAD : $stateParams.revision; - - $scope.path = StringUtil.normalizePath($stateParams.path); - $scope.parsedPaths = RepositoryService.parsePath($scope.path); - $scope.files = []; - $scope.selectedFile = null; - - $scope.setRevision = function (revision) { - $location.path('/projects/' + $scope.project.name + '/repos/' + $scope.repository.name + - '/list/' + revision + $scope.path); - }; - - $scope.selectFile = function (file) { - $scope.selectedFile = file === $scope.selectedFile ? null : file; - }; - - $scope.deleteFile = function () { - var modalInstance = $uibModal.open({ - templateUrl: 'scripts/app/entities/repositories/repository.file.delete.html', - controller: 'RepositoryFileDeleteController', - resolve: { - project: function () { - return $scope.project; - }, - repository: function () { - return $scope.repository; - }, - revision: function () { - return $scope.revision; - }, - file: function () { - return $scope.selectedFile; - } - } - }); - - modalInstance.result.then( - function (message) { - $scope.selectedFile = null; - NotificationUtil.success(message); - getTree(); - }); - }; - - var getTree = function () { - RepositoryService.getTree( - $scope.project.name, $scope.repository.name, $scope.revision, $scope.path).then( - function (files) { - if (angular.isArray(files)) { - $scope.files = files; - $scope.files.forEach(function (file) { - const components = file.path.split('/'); - file.name = components[components.length - 1]; - }); - } else { - $scope.files = []; - } - }); - }; - getTree(); - }); diff --git a/server/src/main/resources/webapp/scripts/app/entities/repositories/repository.tree.html b/server/src/main/resources/webapp/scripts/app/entities/repositories/repository.tree.html deleted file mode 100644 index c3ac83f95b..0000000000 --- a/server/src/main/resources/webapp/scripts/app/entities/repositories/repository.tree.html +++ /dev/null @@ -1,89 +0,0 @@ -
-

- -

- -
- -
- -
-

- -

-
-
- -
- -

- - - {{repository.name}} - - - - / - - {{parsedPath.name}} - - -

- - - - - - - - - - - - - - - - -
- .. -
entities.empty_directory
- - - - {{file.name}} - {{file.name}} -
- -
- -
- - -
-
- - {{ 'entities.button_create' | translate }} - - -
-
-
-
diff --git a/server/src/main/resources/webapp/scripts/app/settings/setting.js b/server/src/main/resources/webapp/scripts/app/settings/setting.js deleted file mode 100644 index e8f53470b0..0000000000 --- a/server/src/main/resources/webapp/scripts/app/settings/setting.js +++ /dev/null @@ -1,9 +0,0 @@ -'use strict'; - -angular.module('CentralDogmaAdmin').config(function ($stateProvider) { - $stateProvider.state('setting', { - abstract: true, - parent: 'site', - url: "/settings" - }); -}); diff --git a/server/src/main/resources/webapp/scripts/app/settings/tokens/token.generated.controller.js b/server/src/main/resources/webapp/scripts/app/settings/tokens/token.generated.controller.js deleted file mode 100644 index a1c9fd6647..0000000000 --- a/server/src/main/resources/webapp/scripts/app/settings/tokens/token.generated.controller.js +++ /dev/null @@ -1,9 +0,0 @@ -'use strict'; - -angular.module('CentralDogmaAdmin').controller('TokenGeneratedController', - function ($scope, $timeout, $uibModalInstance, newToken) { - $scope.newToken = newToken; - $scope.close = function () { - $uibModalInstance.close(); - }; - }); diff --git a/server/src/main/resources/webapp/scripts/app/settings/tokens/token.generated.html b/server/src/main/resources/webapp/scripts/app/settings/tokens/token.generated.html deleted file mode 100644 index a49b02bb49..0000000000 --- a/server/src/main/resources/webapp/scripts/app/settings/tokens/token.generated.html +++ /dev/null @@ -1,41 +0,0 @@ - diff --git a/server/src/main/resources/webapp/scripts/app/settings/tokens/token.new.controller.js b/server/src/main/resources/webapp/scripts/app/settings/tokens/token.new.controller.js deleted file mode 100644 index 7f6cf968c2..0000000000 --- a/server/src/main/resources/webapp/scripts/app/settings/tokens/token.new.controller.js +++ /dev/null @@ -1,27 +0,0 @@ -'use strict'; - -angular.module('CentralDogmaAdmin').controller('TokenNewController', - function ($scope, $timeout, $uibModal, $uibModalInstance, $filter, SettingsService, NotificationUtil) { - - $scope.isAdmin = false; - - $scope.generateToken = function (isAdmin) { - var data = 'appId=' + encodeURIComponent($scope.appId) + '&isAdmin=' + isAdmin; - - SettingsService.createToken(data).then(function (token) { - $scope.newToken = token; - $scope.newToken.creation.timestamp = moment(token.creationTime).fromNow(); - $uibModalInstance.close($scope.newToken); - }, function (error) { - if (typeof error.status !== 'undefined' && error.status === 409) { - NotificationUtil.error('settings.token_application_id.exist', {appId: $scope.appId}); - } else { - NotificationUtil.error(error); - } - }); - }; - - $scope.close = function () { - $uibModalInstance.close(); - }; - }); diff --git a/server/src/main/resources/webapp/scripts/app/settings/tokens/token.new.html b/server/src/main/resources/webapp/scripts/app/settings/tokens/token.new.html deleted file mode 100644 index 09ad25490f..0000000000 --- a/server/src/main/resources/webapp/scripts/app/settings/tokens/token.new.html +++ /dev/null @@ -1,23 +0,0 @@ -
- - - -
diff --git a/server/src/main/resources/webapp/scripts/app/settings/tokens/tokens.controller.js b/server/src/main/resources/webapp/scripts/app/settings/tokens/tokens.controller.js deleted file mode 100644 index 36f57b1e1a..0000000000 --- a/server/src/main/resources/webapp/scripts/app/settings/tokens/tokens.controller.js +++ /dev/null @@ -1,101 +0,0 @@ -'use strict'; - -angular.module('CentralDogmaAdmin').controller('TokensController', - function ($scope, $uibModal, SettingsService, ConfirmationDialog, NotificationUtil, EntitiesUtil, - $timeout, CentralDogmaConstant) { - $scope.sanitizeEmail = EntitiesUtil.sanitizeEmail; - - var refreshNow = function () { - $scope.selectedToken = null; - SettingsService.listTokens().then( - function (tokens) { - $scope.tokens = tokens; - } - ); - }; - - var refresh = function () { - $timeout(function () { - refreshNow(); - }, CentralDogmaConstant.REFRESH_DELAY_MSEC); - }; - - $scope.selectToken = function (token) { - if (token === $scope.selectedToken) { - $scope.selectedToken = null; - } else { - $scope.selectedToken = token; - } - }; - - $scope.showGenerateTokenDialog = function () { - var modalInstance = $uibModal.open({ - templateUrl: 'scripts/app/settings/tokens/token.new.html', - controller: 'TokenNewController', - backdrop: 'static' - }); - modalInstance.result.then( - function (newToken) { - if (angular.isDefined(newToken)) { - $scope.newToken = newToken; - $scope.showTokenGeneratedDialog(); - } - }); - }; - $scope.showTokenGeneratedDialog = function () { - var modalInstance = $uibModal.open({ - templateUrl: 'scripts/app/settings/tokens/token.generated.html', - controller: 'TokenGeneratedController', - backdrop: 'static', - resolve: { - newToken: function () { - return $scope.newToken; - } - } - }); - modalInstance.result.then( - function () { - $scope.selectedToken = null; - refresh(); - } - ) - }; - - $scope.activateToken = function () { - ConfirmationDialog.openModal('settings.title_activate_token', { - token: $scope.selectedToken.appId - }).then(function () { - SettingsService.activateToken($scope.selectedToken.appId).then(function () { - refresh(); - }, function (error) { - NotificationUtil.error(error); - }); - }); - }; - - $scope.deactivateToken = function () { - ConfirmationDialog.openModal('settings.title_deactivate_token', { - token: $scope.selectedToken.appId - }).then(function () { - SettingsService.deactivateToken($scope.selectedToken.appId).then(function () { - refresh(); - }, function (error) { - NotificationUtil.error(error); - }); - }); - }; - - $scope.deleteToken = function () { - ConfirmationDialog.openModal('settings.title_delete_token', { - token: $scope.selectedToken.appId - }).then(function () { - SettingsService.deleteToken($scope.selectedToken.appId).then(function () { - refresh(); - }, function (error) { - NotificationUtil.error(error); - }); - }); - }; - - refreshNow(); - }); diff --git a/server/src/main/resources/webapp/scripts/app/settings/tokens/tokens.html b/server/src/main/resources/webapp/scripts/app/settings/tokens/tokens.html deleted file mode 100644 index 59314664b5..0000000000 --- a/server/src/main/resources/webapp/scripts/app/settings/tokens/tokens.html +++ /dev/null @@ -1,70 +0,0 @@ -
-

Application Tokens

- - - - - - - - - - - - - - - - - - - - -
settings.token_application_idsettings.token_levelsettings.token_creatorsettings.token_creation_timesettings.token_status
- {{token.appId}} - - -

{{token.secret}}

-
-
-
Admin
-
User
-
-
{{sanitizeEmail(token.creation.user)}}{{token.creationTimeStr}} -
-
-
-
Scheduled for deletion
-
Inactive
-
-
-
Active
-
-
- -
- -
-
- - - - -
-
- -
diff --git a/server/src/main/resources/webapp/scripts/app/settings/tokens/tokens.js b/server/src/main/resources/webapp/scripts/app/settings/tokens/tokens.js deleted file mode 100644 index ab18e8386f..0000000000 --- a/server/src/main/resources/webapp/scripts/app/settings/tokens/tokens.js +++ /dev/null @@ -1,15 +0,0 @@ -'use strict'; - -angular.module('CentralDogmaAdmin').config(function ($stateProvider) { - $stateProvider.state('tokens', { - parent: 'setting', - url: '/tokens', - data: {}, - views: { - 'content@': { - templateUrl: 'scripts/app/settings/tokens/tokens.html', - controller: 'TokensController' - } - } - }); -}); diff --git a/server/src/main/resources/webapp/scripts/app/user/user.js b/server/src/main/resources/webapp/scripts/app/user/user.js deleted file mode 100644 index b48929d290..0000000000 --- a/server/src/main/resources/webapp/scripts/app/user/user.js +++ /dev/null @@ -1,10 +0,0 @@ -'use strict'; - -angular.module('CentralDogmaAdmin') - .config(function ($stateProvider) { - $stateProvider - .state('user', { - abstract: true, - parent: 'site' - }); - }); diff --git a/server/src/main/resources/webapp/scripts/components/auth/authority.directive.js b/server/src/main/resources/webapp/scripts/components/auth/authority.directive.js deleted file mode 100644 index 49fcdf8cc6..0000000000 --- a/server/src/main/resources/webapp/scripts/components/auth/authority.directive.js +++ /dev/null @@ -1,81 +0,0 @@ -'use strict'; - -angular.module('CentralDogmaAdmin') - .directive('hasAnyRole', ['Principal', function (Principal) { - return { - restrict: 'A', - link: function (scope, element, attrs) { - var setVisible = function () { - element.removeClass('hidden'); - }, - setHidden = function () { - element.addClass('hidden'); - }, - defineVisibility = function (reset) { - var result; - if (reset) { - setVisible(); - } - - result = Principal.isInAnyRole(roles); - if (result) { - setVisible(); - } else { - setHidden(); - } - }, - roles = attrs.hasAnyRole.replace(/\s+/g, '').split(','); - - if (roles.length > 0) { - defineVisibility(true); - } - - scope.$on('user:logged_in', function (event, data) { - defineVisibility(true); - }); - - scope.$on('user:logged_out', function (event, data) { - defineVisibility(true); - }); - } - }; - }]) - .directive('hasRole', ['Principal', function (Principal) { - return { - restrict: 'A', - link: function (scope, element, attrs) { - var setVisible = function () { - element.removeClass('hidden'); - }, - setHidden = function () { - element.addClass('hidden'); - }, - defineVisibility = function (reset) { - var result; - if (reset) { - setVisible(); - } - - result = Principal.isInRole(role); - if (result) { - setVisible(); - } else { - setHidden(); - } - }, - role = attrs.hasRole.replace(/\s+/g, ''); - - if (role.length > 0) { - defineVisibility(true); - } - - scope.$on('user:logged_in', function (event, data) { - defineVisibility(false); - }); - - scope.$on('user:logged_out', function (event, data) { - defineVisibility(false); - }); - } - }; - }]); diff --git a/server/src/main/resources/webapp/scripts/components/auth/principal.service.js b/server/src/main/resources/webapp/scripts/components/auth/principal.service.js deleted file mode 100644 index 90262a2ef8..0000000000 --- a/server/src/main/resources/webapp/scripts/components/auth/principal.service.js +++ /dev/null @@ -1,104 +0,0 @@ -'use strict'; - -angular.module('CentralDogmaAdmin') - .factory('Principal', - function Principal($rootScope, $q, $window, User, CentralDogmaConstant) { - var _identity, _authenticated = false; - - return { - isAuthenticated: function () { - return _authenticated; - }, - - projectRole: function (metadata) { - var me = null; - if (!_authenticated || - angular.isUndefined(metadata) || - angular.isUndefined(metadata.members) || - metadata.members === null) { - return CentralDogmaConstant.PROJECT_ROLE_GUEST; - } - // We deal 'admin' as an owner of the project. - if (_identity.roles.indexOf(CentralDogmaConstant.LEVEL_ADMIN) !== -1) { - return CentralDogmaConstant.PROJECT_ROLE_OWNER; - } - Object.keys(metadata.members).forEach(function (value) { - if (angular.equals(value, _identity.email)) { - me = metadata.members[value]; - } - }); - if (me === null) { - return CentralDogmaConstant.PROJECT_ROLE_GUEST; - } - return me.role; - }, - - isInRole: function (role) { - if (!_authenticated || !_identity || !_identity.roles) { - return false; - } - - return _identity.roles.indexOf(role) !== -1; - }, - - isUser: function () { - return this.isInRole(CentralDogmaConstant.LEVEL_USER); - }, - - isInAnyRole: function (roles) { - if (!_authenticated || !_identity.roles) { - return false; - } - - for (var i = 0; i < roles.length; i++) { - if (this.isInRole(roles[i])) { - return true; - } - } - - return false; - }, - - set: function (identity) { - if (typeof identity !== 'object') { - return; - } - - $rootScope.user = _identity = identity; - if (identity !== null) { - _authenticated = true; - $rootScope.$broadcast('user:logged_in', identity); - } - }, - - clear: function () { - if (!_authenticated || !_identity) { - return false; - } - - var oldIdentity = _identity; - _authenticated = false; - $rootScope.user = _identity = null; - $rootScope.$broadcast('user:logged_out', oldIdentity); - return true; - }, - - refresh: function () { - var deferred = $q.defer(); - - // retrieve the identity data from the server, update the identity object, and then resolve. - var $this = this; - User.get() - .then(function (account) { - $this.set(account); - deferred.resolve(_identity); - }, function () { - $this.clear(); - deferred.resolve(null); - $window.localStorage.clear(); - }); - - return deferred.promise; - } - }; - }); diff --git a/server/src/main/resources/webapp/scripts/components/auth/security.service.js b/server/src/main/resources/webapp/scripts/components/auth/security.service.js deleted file mode 100644 index 82a2900918..0000000000 --- a/server/src/main/resources/webapp/scripts/components/auth/security.service.js +++ /dev/null @@ -1,31 +0,0 @@ -'use strict'; - -angular.module('CentralDogmaAdmin') - .factory('Security', - function ($rootScope, $http, $q, NotificationUtil) { - return { - resolve: function () { - var defer = $q.defer(); - if (this.isResolved()) { - defer.resolve($rootScope.isSecurityEnabled); - } else { - $http.get('/security_enabled').then(function () { - $rootScope.isSecurityEnabled = true; - defer.resolve(true); - }, function (error) { - if (error.status === 404) { - defer.resolve(false); - } else { - NotificationUtil.error(error); - defer.reject(error); - } - }); - } - return defer.promise; - }, - - isResolved: function () { - return angular.isDefined($rootScope.isSecurityEnabled); - } - }; - }); diff --git a/server/src/main/resources/webapp/scripts/components/entities/entities.util.js b/server/src/main/resources/webapp/scripts/components/entities/entities.util.js deleted file mode 100644 index d90355e773..0000000000 --- a/server/src/main/resources/webapp/scripts/components/entities/entities.util.js +++ /dev/null @@ -1,45 +0,0 @@ -'use strict'; - -angular.module('CentralDogmaAdmin') - .factory('EntitiesUtil', - function (StringUtil) { - return { - toKeySet: function (map) { - if (angular.isUndefined(map) || map === null) { - return []; - } - return Object.keys(map); - }, - - toUniqueSet: function (sourceSet, filterSet) { - if (angular.isUndefined(sourceSet) || sourceSet === null) { - return []; - } - if (angular.isUndefined(filterSet) || filterSet === null || filterSet.length === 0) { - return sourceSet; - } - return sourceSet.filter(function (value) { - return filterSet.indexOf(value) === -1; // not exist - }); - }, - - toDateTimeStr: function (timestamp) { - return moment(timestamp).fromNow(); - }, - - toReplaceJsonPatch: function (path, value) { - return [{ - op: 'replace', - path: path, - value: value - }] - }, - - sanitizeEmail: function (email) { - if (StringUtil.endsWith(email, '@localhost.localdomain')) { - return email.split('@')[0]; - } - return email; - } - }; - }); diff --git a/server/src/main/resources/webapp/scripts/components/entities/identifier.with.role.js b/server/src/main/resources/webapp/scripts/components/entities/identifier.with.role.js deleted file mode 100644 index 75a4453b23..0000000000 --- a/server/src/main/resources/webapp/scripts/components/entities/identifier.with.role.js +++ /dev/null @@ -1,24 +0,0 @@ -'use strict'; - -angular.module('CentralDogmaAdmin') - .factory('IdentifierWithRole', function () { - function IdentifierWithRole() { - this.elements = []; - } - - IdentifierWithRole.prototype = { - pushNew: function () { - this.elements.push({ - id: null, - role: null - }); - }, - remove: function (elm) { - this.elements = this.elements.filter(function (value) { - return value !== elm; - }); - } - }; - - return (IdentifierWithRole); -}); diff --git a/server/src/main/resources/webapp/scripts/components/entities/permission.js b/server/src/main/resources/webapp/scripts/components/entities/permission.js deleted file mode 100644 index 645b5b53a7..0000000000 --- a/server/src/main/resources/webapp/scripts/components/entities/permission.js +++ /dev/null @@ -1,61 +0,0 @@ -'use strict'; - -angular.module('CentralDogmaAdmin') - .factory('Permission', function () { - function Permission() { - this.elements = []; - } - - Permission.prototype = { - pushNew: function () { - this.elements.push({ - name: null, - read: false, - write: false - }); - }, - remove: function (perm) { - this.elements = this.elements.filter(function (value) { - return value !== perm; - }); - }, - validate: function (perm) { - // If 'write' is permitted, 'read' should also be permitted. - if (perm.write === true) { - perm.read = true; - } - } - }; - - Permission.toSet = function (perm) { - var set = []; - if (perm.read === true) { - set.push('READ'); - } - if (perm.write === true) { - set.push('WRITE'); - } - return set; - }; - - Permission.toRequest = function (name, perm) { - return { - id: name, - permissions: Permission.toSet(perm) - }; - }; - - Permission.makePermissionTable = function (permissionMap) { - var permTable = {}; - Object.entries(permissionMap).forEach(function (entry) { - const permSet = new Set(entry[1]); - permTable[entry[0]] = { - read: permSet.has('READ'), - write: permSet.has('WRITE') - }; - }); - return permTable; - }; - - return (Permission); -}); diff --git a/server/src/main/resources/webapp/scripts/components/entities/project.service.js b/server/src/main/resources/webapp/scripts/components/entities/project.service.js deleted file mode 100644 index 20895226ee..0000000000 --- a/server/src/main/resources/webapp/scripts/components/entities/project.service.js +++ /dev/null @@ -1,36 +0,0 @@ -'use strict'; - -angular.module('CentralDogmaAdmin') - .factory('ProjectService', - function (ApiV1Service, StringUtil, EntitiesUtil) { - return { - createProject: function (projectName) { - name = StringUtil.requireNotEmpty(projectName, 'projectName'); - return ApiV1Service.post('projects', {'name': name}); - }, - - listProjects: function () { - return ApiV1Service.get('projects'); - }, - - listRemovedProjects: function () { - return ApiV1Service.get('projects?status=removed'); - }, - - checkPermission: function (projectName) { - return ApiV1Service.get(StringUtil.encodeUri(['projects', projectName]) + - '?checkPermissionOnly=true'); - }, - - removeProject: function (projectName) { - name = StringUtil.requireNotEmpty(projectName, 'projectName'); - return ApiV1Service.delete(StringUtil.encodeUri(['projects', name])); - }, - - restoreProject: function (projectName) { - name = StringUtil.requireNotEmpty(projectName, 'projectName'); - return ApiV1Service.jsonPatch(StringUtil.encodeUri(['projects', name]), - EntitiesUtil.toReplaceJsonPatch('/status', 'active')); - } - }; - }); diff --git a/server/src/main/resources/webapp/scripts/components/entities/repository.service.js b/server/src/main/resources/webapp/scripts/components/entities/repository.service.js deleted file mode 100644 index f3438bfebd..0000000000 --- a/server/src/main/resources/webapp/scripts/components/entities/repository.service.js +++ /dev/null @@ -1,248 +0,0 @@ -'use strict'; - -angular.module('CentralDogmaAdmin') - .factory('RepositoryService', - function (ApiService, ApiV1Service, StringUtil, EntitiesUtil) { - return { - createRepository: function (projectName, repositoryName) { - projectName = StringUtil.requireNotEmpty(projectName, 'projectName'); - repositoryName = StringUtil.requireNotEmpty(repositoryName, 'repositoryName'); - - // NOTE: API v1 uses 'repos' instead of 'repositories'. - return ApiV1Service.post(StringUtil.encodeUri(['projects', projectName, 'repos']), - {name: repositoryName} - ); - }, - - removeRepository: function (projectName, repositoryName) { - projectName = StringUtil.requireNotEmpty(projectName, 'projectName'); - repositoryName = StringUtil.requireNotEmpty(repositoryName, 'repositoryName'); - - // NOTE: API v1 uses 'repos' instead of 'repositories'. - return ApiV1Service.delete(StringUtil.encodeUri(['projects', projectName, - 'repos', repositoryName])); - }, - - restoreRepository: function (projectName, repositoryName) { - projectName = StringUtil.requireNotEmpty(projectName, 'projectName'); - repositoryName = StringUtil.requireNotEmpty(repositoryName, 'repositoryName'); - - // NOTE: API v1 uses 'repos' instead of 'repositories'. - return ApiV1Service.jsonPatch(StringUtil.encodeUri(['projects', projectName, - 'repos', repositoryName]), - EntitiesUtil.toReplaceJsonPatch('/status', 'active')); - }, - - listRepositories: function (projectName) { - projectName = StringUtil.requireNotEmpty(projectName, 'projectName'); - - // NOTE: API v1 uses 'repos' instead of 'repositories'. - return ApiV1Service.get(StringUtil.encodeUri(['projects', projectName, 'repos'])); - }, - - normalizeRevision: function (projectName, repositoryName, revision) { - projectName = StringUtil.requireNotEmpty(projectName, 'projectName'); - repositoryName = StringUtil.requireNotEmpty(repositoryName, 'repositoryName'); - if (!angular.isNumber(revision)) { - revision = StringUtil.requireNotEmpty(revision, 'revision'); - } - - var sb = []; - sb.push('projects/'); - sb.push(StringUtil.encodeParam(projectName)); - sb.push('/repositories/'); - sb.push(StringUtil.encodeParam(repositoryName)); - sb.push('/revision/'); - sb.push(revision); - - return ApiService.get(sb.join('')); - }, - - getTree: function (projectName, repositoryName, revision, path) { - projectName = StringUtil.requireNotEmpty(projectName, 'projectName'); - repositoryName = StringUtil.requireNotEmpty(repositoryName, 'repositoryName'); - revision = StringUtil.requireNotEmpty(revision, 'revision'); - path = StringUtil.requireNotEmpty(path, 'path'); - - return ApiV1Service.get(StringUtil.encodeUri(['projects', projectName, - 'repos', repositoryName, - 'list', path]) + - "?revision=" + revision); - }, - - getFile: function (projectName, repositoryName, revision, query) { - projectName = StringUtil.requireNotEmpty(projectName, 'projectName'); - repositoryName = StringUtil.requireNotEmpty(repositoryName, 'repositoryName'); - revision = StringUtil.requireNotEmpty(revision, 'revision'); - - var path = StringUtil.requireNotEmpty(query.path, 'path'); - var queryType = StringUtil.defaultString(query.type, 'IDENTITY'); - var queryExpressions = angular.isArray(query.expressions) ? query.expressions : []; - - var sb = []; - sb.push('projects/'); - sb.push(StringUtil.encodeParam(projectName)); - sb.push('/repositories/'); - sb.push(StringUtil.encodeParam(repositoryName)); - sb.push('/files/revisions/'); - sb.push(revision); - sb.push(StringUtil.encodePath(path)); // path starts with '/' - - var params = ['queryType=' + queryType]; - if (angular.isArray(queryExpressions)) { - for (var idx in queryExpressions) { - params.push('&expression='); - params.push(StringUtil.encodeParam(queryExpressions[idx])); - } - } - - if (params.length > 0) { - sb.push('?'); - sb.push(params.join('')); - } - - return ApiService.get(sb.join('')); - }, - - addFile: function (projectName, repositoryName, revision, commitMessage, file) { - return this.saveFile(projectName, repositoryName, revision, commitMessage, file, 'ADD'); - }, - - editFile: function (projectName, repositoryName, revision, commitMessage, file) { - return this.saveFile(projectName, repositoryName, revision, commitMessage, file, 'EDIT'); - }, - - saveFile: function (projectName, repositoryName, revision, commitMessage, file, saveMode) { - projectName = StringUtil.requireNotEmpty(projectName, 'projectName'); - repositoryName = StringUtil.requireNotEmpty(repositoryName, 'repositoryName'); - revision = StringUtil.requireNotEmpty(revision, 'revision'); - - if (angular.isUndefined(file)) { - throw new Error('undefined file'); - } - if (angular.isUndefined(commitMessage)) { - throw new Error('undefined commitMessage'); - } - - var sb = []; - sb.push('projects/'); - sb.push(StringUtil.encodeParam(projectName)); - sb.push('/repositories/'); - sb.push(StringUtil.encodeParam(repositoryName)); - sb.push('/files/revisions/'); - sb.push(revision); - - switch (saveMode) { - case 'ADD': - return ApiService.post(sb.join(''), { - file: file, - commitMessage: commitMessage - }); - break; - case 'EDIT': - return ApiService.put(sb.join(''), { - file: file, - commitMessage: commitMessage - }); - break; - default: - throw new Error('unsupported saveMode' + saveMode); - } - }, - - deleteFile: function (projectName, repositoryName, revision, commitMessage, path) { - projectName = StringUtil.requireNotEmpty(projectName, 'projectName'); - repositoryName = StringUtil.requireNotEmpty(repositoryName, 'repositoryName'); - revision = StringUtil.requireNotEmpty(revision, 'revision'); - path = StringUtil.requireNotEmpty(path, 'path'); - - if (angular.isUndefined(commitMessage)) { - throw new Error('undefined commitMessage'); - } - - var sb = []; - sb.push('projects/'); - sb.push(StringUtil.encodeParam(projectName)); - sb.push('/repositories/'); - sb.push(StringUtil.encodeParam(repositoryName)); - sb.push('/delete/revisions/'); - sb.push(revision); - sb.push(StringUtil.encodePath(path)); // path starts with '/' - - return ApiService.post(sb.join(''), { - commitMessage: commitMessage - }); - }, - - getHistory: function (projectName, repositoryName, path, fromRevision, toRevision) { - projectName = StringUtil.requireNotEmpty(projectName, 'projectName'); - repositoryName = StringUtil.requireNotEmpty(repositoryName, 'repositoryName'); - path = StringUtil.requireNotEmpty(path, 'path'); - - if (!angular.isNumber(fromRevision)) { - fromRevision = StringUtil.requireNotEmpty(fromRevision, 'fromRevision'); - } - if (!angular.isNumber(toRevision)) { - toRevision = StringUtil.requireNotEmpty(toRevision, 'toRevision'); - } - - var sb = []; - sb.push('projects/'); - sb.push(StringUtil.encodeParam(projectName)); - sb.push('/repositories/'); - sb.push(StringUtil.encodeParam(repositoryName)); - sb.push('/history'); - sb.push(StringUtil.encodePath(path)); // path starts with '/' - sb.push("?from="); - sb.push(fromRevision); - sb.push("&to="); - sb.push(toRevision); - - return ApiService.get(sb.join('')); - }, - - search: function (projectName, repositoryName, revision, term) { - projectName = StringUtil.requireNotEmpty(projectName, 'projectName'); - repositoryName = StringUtil.requireNotEmpty(repositoryName, 'repositoryName'); - revision = StringUtil.requireNotEmpty(revision, 'revision'); - term = StringUtil.requireNotEmpty(term, 'term'); - - var sb = []; - sb.push('projects/'); - sb.push(StringUtil.encodeParam(projectName)); - sb.push('/repositories/'); - sb.push(StringUtil.encodeParam(repositoryName)); - sb.push('/search/revisions/'); - sb.push(revision); - sb.push('?term='); - sb.push(StringUtil.encodeParam(term)); - - return ApiService.get(sb.join('')); - }, - - parsePath: function (path) { - path = StringUtil.requireNotEmpty(path, 'path'); - - var ret = [{name: 'root', path: '/'}]; - - var split = path.split('/'); - for (var i = 0; i < split.length; i++) { - if (split[i] === '') { - continue; - } - - var temp = []; - for (var j = 0; j <= i; j++) { - temp.push(split[j]); - } - - ret.push({ - 'name': split[i], - 'path': temp.join('/') - }); - } - - return ret; - } - }; - }); diff --git a/server/src/main/resources/webapp/scripts/components/entities/settings.service.js b/server/src/main/resources/webapp/scripts/components/entities/settings.service.js deleted file mode 100644 index e940f1d9c5..0000000000 --- a/server/src/main/resources/webapp/scripts/components/entities/settings.service.js +++ /dev/null @@ -1,49 +0,0 @@ -'use strict'; - -angular.module('CentralDogmaAdmin') - .factory('SettingsService', - function (ApiV1Service, EntitiesUtil, $q) { - return { - listTokens: function () { - var defer = $q.defer(); - ApiV1Service.get("tokens").then(function (tokens) { - var i; - if (angular.isArray(tokens)) { - for (i in tokens) { - tokens[i].creationTimeStr = moment(tokens[i].creation.timestamp).fromNow(); - tokens[i].isActive = !angular.isDefined(tokens[i].deactivation); - tokens[i].isDeleted = angular.isDefined(tokens[i].deletion); - } - defer.resolve(tokens); - } else { - defer.resolve([]); - } - }, function (error) { - defer.reject(error); - }); - return defer.promise; - }, - - createToken: function (data) { - return ApiV1Service.post('tokens', data, { - headers: { - 'Content-Type': 'application/x-www-form-urlencoded' - } - }); - }, - - activateToken: function (id) { - return ApiV1Service.jsonPatch('tokens/' + id, - EntitiesUtil.toReplaceJsonPatch('/status', 'active')); - }, - - deactivateToken: function (id) { - return ApiV1Service.jsonPatch('tokens/' + id, - EntitiesUtil.toReplaceJsonPatch('/status', 'inactive')); - }, - - deleteToken: function (id) { - return ApiV1Service.delete('tokens/' + id); - } - }; - }); diff --git a/server/src/main/resources/webapp/scripts/components/language/language.controller.js b/server/src/main/resources/webapp/scripts/components/language/language.controller.js deleted file mode 100644 index e80ad1d98a..0000000000 --- a/server/src/main/resources/webapp/scripts/components/language/language.controller.js +++ /dev/null @@ -1,13 +0,0 @@ -'use strict'; - -angular.module('CentralDogmaAdmin') - .controller('LanguageController', - function ($scope, $translate, Language) { - $scope.changeLanguage = function (languageKey) { - $translate.use(languageKey); - }; - - Language.getAll().then(function (languages) { - $scope.languages = languages; - }); - }); diff --git a/server/src/main/resources/webapp/scripts/components/language/language.service.js b/server/src/main/resources/webapp/scripts/components/language/language.service.js deleted file mode 100644 index 995b7686fe..0000000000 --- a/server/src/main/resources/webapp/scripts/components/language/language.service.js +++ /dev/null @@ -1,32 +0,0 @@ -'use strict'; - -angular.module('CentralDogmaAdmin') - .factory('Language', - function ($q, $http, $translate, LANGUAGES) { - return { - getCurrent: function () { - var deferred = $q.defer(); - var language = $translate.storage().get('NG_TRANSLATE_LANG_KEY'); - - if (angular.isUndefined(language)) { - language = 'en'; - } - - deferred.resolve(language); - return deferred.promise; - }, - getAll: function () { - var deferred = $q.defer(); - deferred.resolve(LANGUAGES); - return deferred.promise; - } - }; - }) - /* - Languages codes are ISO_639-1 codes, see http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes - They are written in English to avoid character encoding issues (not a perfect solution) - */ - .constant('LANGUAGES', [ - 'en' - ] -); diff --git a/server/src/main/resources/webapp/scripts/components/navbar/navbar.controller.js b/server/src/main/resources/webapp/scripts/components/navbar/navbar.controller.js deleted file mode 100644 index b43d2f7b19..0000000000 --- a/server/src/main/resources/webapp/scripts/components/navbar/navbar.controller.js +++ /dev/null @@ -1,14 +0,0 @@ -'use strict'; - -angular.module('CentralDogmaAdmin') - .controller('NavbarController', - function ($scope, $rootScope, $state, $q, $uibModal, $window, - Title, Principal) { - - $scope.isAuthenticated = Principal.isAuthenticated; - - Title.get().then(function (data) { - $scope.title = data.title; - $scope.hostname = data.hostname; - }); - }); diff --git a/server/src/main/resources/webapp/scripts/components/navbar/navbar.directive.js b/server/src/main/resources/webapp/scripts/components/navbar/navbar.directive.js deleted file mode 100644 index 8cd68d9ae5..0000000000 --- a/server/src/main/resources/webapp/scripts/components/navbar/navbar.directive.js +++ /dev/null @@ -1,40 +0,0 @@ -'use strict'; - -angular.module('CentralDogmaAdmin') - .directive('activeMenu', function ($translate, $locale, tmhDynamicLocale) { - return { - restrict: 'A', - link: function (scope, element, attrs) { - var language = attrs.activeMenu; - - scope.$watch(function () { - return $translate.use(); - }, function (selectedLanguage) { - if (language === selectedLanguage) { - tmhDynamicLocale.set(language); - element.addClass('active'); - } else { - element.removeClass('active'); - } - }); - } - }; - }) - .directive('activeLink', function (location) { - return { - restrict: 'A', - link: function (scope, element, attrs) { - var clazz = attrs.activeLink; - var path = attrs.href; - path = path.substring(1); //hack because path does bot return including hashbang - scope.location = location; - scope.$watch('location.path()', function (newPath) { - if (path === newPath) { - element.addClass(clazz); - } else { - element.removeClass(clazz); - } - }); - } - }; - }); diff --git a/server/src/main/resources/webapp/scripts/components/navbar/navbar.html b/server/src/main/resources/webapp/scripts/components/navbar/navbar.html deleted file mode 100644 index 5ffd9b6d54..0000000000 --- a/server/src/main/resources/webapp/scripts/components/navbar/navbar.html +++ /dev/null @@ -1,46 +0,0 @@ - diff --git a/server/src/main/resources/webapp/scripts/components/title/title.service.js b/server/src/main/resources/webapp/scripts/components/title/title.service.js deleted file mode 100644 index d53c2753fe..0000000000 --- a/server/src/main/resources/webapp/scripts/components/title/title.service.js +++ /dev/null @@ -1,17 +0,0 @@ -'use strict'; - -angular.module('CentralDogmaAdmin') - .factory('Title', - function ($http, $q) { - return { - get: function() { - var deferred = $q.defer(); - $http.get('/title').then(function (response) { - deferred.resolve(response.data); - }, function (response) { - deferred.reject(response.status); - }); - return deferred.promise; - } - }; - }); diff --git a/server/src/main/resources/webapp/scripts/components/user/user.service.js b/server/src/main/resources/webapp/scripts/components/user/user.service.js deleted file mode 100644 index 083ab6612d..0000000000 --- a/server/src/main/resources/webapp/scripts/components/user/user.service.js +++ /dev/null @@ -1,11 +0,0 @@ -'use strict'; - -angular.module('CentralDogmaAdmin') - .factory('User', - function (ApiService) { - return { - get: function () { - return ApiService.get('users/me'); - } - }; - }); diff --git a/server/src/main/resources/webapp/scripts/components/util/ace-editor.directive.js b/server/src/main/resources/webapp/scripts/components/util/ace-editor.directive.js deleted file mode 100644 index b3a13ce3f4..0000000000 --- a/server/src/main/resources/webapp/scripts/components/util/ace-editor.directive.js +++ /dev/null @@ -1,211 +0,0 @@ -'use strict'; - -angular.module('CentralDogmaAdmin') - .directive('aceEditor', - function () { - return { - template: '
' + - '
' + - ' ' + - ' ' + - '
', - restrict: 'E', - scope: { - 'editorClass': '@class', - 'path': '=pathNgModel', - 'content': '=contentNgModel', - 'readonly': '=', - 'callback': '&' - }, - controller: function ($scope, $timeout, $translate, localStorageService) { - - // Load the theme list. - $scope.availableThemes = angular.copy(window.ace.require('ace/ext/themelist').themes); - $scope.defaultTheme = 'ace/theme/eclipse'; - - // Localize the theme type caption: - $translate('entities.light_themes').then(function (translated) { - for (var i in $scope.availableThemes) { - var t = $scope.availableThemes[i]; - if (!t.isDark) { - t.type = translated; - } - } - }); - $translate('entities.dark_themes').then(function (translated) { - for (var i in $scope.availableThemes) { - var t = $scope.availableThemes[i]; - if (t.isDark) { - t.type = translated; - } - } - }); - - // Define the keyboard handler list. - $scope.availableKeyboardHandlers = [ - { 'name': 'Ace', - 'value': 'default' }, - { 'name': 'Vim', - 'value': 'ace/keyboard/vim' }, - { 'name': 'Emacs', - 'value': 'ace/keyboard/emacs' } - ]; - $scope.defaultKeyboardHandler = $scope.availableKeyboardHandlers[0].value; - - // Add '(Default)' to the theme and keyboard handler captions. - $translate('entities.default_theme').then(function (translated) { - for (var i in $scope.availableThemes) { - var t = $scope.availableThemes[i]; - if (t.theme === $scope.defaultTheme) { - t.caption = t.caption + " (" + translated + ')'; - } - } - - for (var i in $scope.availableKeyboardHandlers) { - var h = $scope.availableKeyboardHandlers[i]; - if (h.value === $scope.defaultKeyboardHandler) { - h.name = h.name + " (" + translated + ')'; - break; - } - } - }); - - var KEY_ACE_PREFS = 'acePrefs'; - - // Configure the editor with the preferred theme and keyboard handler. - $scope.aceLoaded = function (editor) { - $scope.editor = editor; - - editor.$blockScrolling = Infinity; - editor.setShowInvisibles(true); - editor.setAnimatedScroll(true); - editor.setShowFoldWidgets(true); - editor.setShowPrintMargin(true); - editor.setPrintMarginColumn(112); - - $scope.loadPrefs(editor); - - var options = { - showGutter: true, - showLineNumbers: true - }; - - if ($scope.readonly) { - editor.setReadOnly(true); - } else { - options.enableBasicAutocompletion = true; - options.enableLiveAutocompletion = true; - } - - editor.setOptions(options); - - var session = editor.getSession(); - session.setUseWrapMode(true); - session.setUseSoftTabs(true); - session.setNewLineMode('unix'); - - var callback = $scope.callback; - if (typeof callback === 'function') { - callback = callback(); - if (typeof callback === 'function') { - callback(editor); - } - } - }; - - // Auto-detect the edit mode and tab size from the file path. - $scope.$watch('path', function (value) { - if (typeof $scope.editor === 'undefined' || typeof value !== 'string') { - return; - } - - var session = $scope.editor.getSession(); - var modelist = window.ace.require('ace/ext/modelist'); - var mode = modelist.getModeForPath(value).mode; - session.setMode(mode); - if (mode === 'ace/mode/json') { - session.setTabSize(2); - } else { - session.setTabSize(4); - } - }); - - // Loads the preferred theme and keyboard handler. - $scope.loadPrefs = function (editor) { - var prefs = localStorageService.get(KEY_ACE_PREFS); - - if (typeof prefs !== 'object' || prefs === null || - typeof prefs.theme !== 'string' || - typeof prefs.keyboardHandler !== 'string') { - prefs = { - theme: $scope.defaultTheme, - keyboardHandler: $scope.defaultKeyboardHandler - }; - } - - var themeSet = false; - for (var i in $scope.availableThemes) { - var t = $scope.availableThemes[i]; - if (prefs.theme === t.theme) { - editor.setTheme(prefs.theme); - $scope.theme = prefs.theme; - themeSet = true; - break; - } - } - - if (!themeSet) { - editor.setTheme($scope.defaultTheme); - $scope.theme = $scope.defaultTheme; - } - - var keyboardHandlerSet = false; - if (prefs.keyboardHandler !== 'default') { - for (var i in $scope.availableKeyboardHandlers) { - var h = $scope.availableKeyboardHandlers[i]; - if (prefs.keyboardHandler === h.value) { - editor.setKeyboardHandler(prefs.keyboardHandler); - $scope.keyboardHandler = prefs.keyboardHandler; - keyboardHandlerSet = true; - break; - } - } - } - - if (!keyboardHandlerSet) { - editor.setKeyboardHandler(editor.commands); - $scope.keyboardHandler = $scope.defaultKeyboardHandler; - } - }; - - // Update and save the preferred theme and keyboard handler. - $scope.updatePrefs = function () { - if (typeof $scope.editor === 'undefined') { - return; - } - - var editor = $scope.editor; - var theme = $scope.theme; - editor.setTheme(theme); - - var keyboardHandler = $scope.keyboardHandler; - if (keyboardHandler === $scope.defaultKeyboardHandler) { - editor.setKeyboardHandler(editor.commands); - } else { - editor.setKeyboardHandler(keyboardHandler); - } - - localStorageService.set(KEY_ACE_PREFS, - { theme: theme, keyboardHandler: keyboardHandler }); - }; - } - }; - }); diff --git a/server/src/main/resources/webapp/scripts/components/util/api.service.js b/server/src/main/resources/webapp/scripts/components/util/api.service.js deleted file mode 100644 index 7970bf714e..0000000000 --- a/server/src/main/resources/webapp/scripts/components/util/api.service.js +++ /dev/null @@ -1,102 +0,0 @@ -'use strict'; - -angular.module('CentralDogmaAdmin') - .factory('ApiService', function ($rootScope, $http, $q, $window, StringUtil, NotificationUtil, CentralDogmaConstant, Security) { - function makeRequest0(verb, uri, config, data) { - var sessionId; - var defer = $q.defer(); - - if (angular.isUndefined(config)) { - config = {} - } - - config.method = verb; - config.url = rewriteUri(uri); - - if ($rootScope.isSecurityEnabled) { - sessionId = $window.localStorage.getItem('sessionId'); - } else { - sessionId = "anonymous"; - } - if (sessionId !== null) { - if (angular.isUndefined(config.headers)) { - config.headers = {}; - } - config.headers.authorization = 'bearer ' + sessionId; - } - - if (angular.isDefined(data) && verb.match(/post|put|patch/)) { - config.data = data; - } - - $http(config).then(function (data) { - defer.resolve(data.data); - }, - function (error) { - var rejected = { - status: error.status, - statusText: error.statusText, - message: angular.isDefined(error.data.message) ? error.data.message : '', - exception: angular.isDefined(error.data.exception) ? error.data.exception : '' - }; - - var callback = defer.promise.$$state.pending; - if (callback && callback.length && typeof callback[0][2] !== 'function') { - NotificationUtil.error(rejected); - } - - defer.reject(rejected); - }); - - return defer.promise; - } - - function makeRequest(verb, uri, config, data) { - var defer; - - if (Security.isResolved()) { - return makeRequest0(verb, uri, config, data); - } - - defer = $q.defer(); - Security.resolve().then(function () { - makeRequest0(verb, uri, config, data).then(function (data) { - defer.resolve(data); - }, function (error) { - defer.reject(error); - } - ); - }); - return defer.promise; - } - - function rewriteUri(uri) { - if (uri.startsWith('/')) { - return uri; - } else { - return CentralDogmaConstant.API_PREFIX + uri; - } - } - - return { - get: function (uri, config) { - return makeRequest('get', uri, config); - }, - - post: function (uri, data, config) { - return makeRequest('post', uri, config, data); - }, - - put: function (uri, data, config) { - return makeRequest('put', uri, config, data); - }, - - patch: function (uri, data, config) { - return makeRequest('patch', uri, config, data); - }, - - delete: function (uri, config) { - return makeRequest('delete', uri, config); - } - }; - }); diff --git a/server/src/main/resources/webapp/scripts/components/util/api.v1.service.js b/server/src/main/resources/webapp/scripts/components/util/api.v1.service.js deleted file mode 100644 index 030fb491a0..0000000000 --- a/server/src/main/resources/webapp/scripts/components/util/api.v1.service.js +++ /dev/null @@ -1,91 +0,0 @@ -'use strict'; - -angular.module('CentralDogmaAdmin') - .factory('ApiV1Service', function ($rootScope, $http, $q, $window, StringUtil, NotificationUtil, - CentralDogmaConstant) { - function makeRequest(verb, uri, config, data) { - var sessionId; - var defer = $q.defer(); - - if (angular.isUndefined(config)) { - config = {} - } - - config.method = verb; - config.url = rewriteUri(uri); - - if ($rootScope.isSecurityEnabled) { - sessionId = $window.localStorage.getItem('sessionId'); - } else { - sessionId = "anonymous"; - } - if (sessionId !== null) { - if (angular.isUndefined(config.headers)) { - config.headers = {}; - } - config.headers.authorization = 'bearer ' + sessionId; - } - - if (angular.isDefined(data) && verb.match(/post|put|patch/)) { - config.data = data; - } - - $http(config).then(function (data) { - defer.resolve(data.data); - }, - function (error) { - var rejected = { - status: error.status, - statusText: error.statusText, - message: error.data.message - }; - - var callback = defer.promise.$$state.pending; - if (callback && callback.length && typeof callback[0][2] !== 'function') { - NotificationUtil.error(rejected); - } - - defer.reject(rejected); - }); - - return defer.promise; - } - - function rewriteUri(uri) { - if (uri.startsWith('/')) { - return uri; - } else { - return CentralDogmaConstant.API_V1_PREFIX + uri; - } - } - - return { - get: function (uri, config) { - return makeRequest('get', uri, config); - }, - - post: function (uri, data, config) { - return makeRequest('post', uri, config, data); - }, - - put: function (uri, data, config) { - return makeRequest('put', uri, config, data); - }, - - patch: function (uri, data, config) { - return makeRequest('patch', uri, config, data); - }, - - jsonPatch: function (uri, data) { - return makeRequest('patch', uri, { - headers: { - 'Content-Type': 'application/json-patch+json' - } - }, data); - }, - - delete: function (uri, config) { - return makeRequest('delete', uri, config); - } - }; - }); diff --git a/server/src/main/resources/webapp/scripts/components/util/confirmation-dialog.html b/server/src/main/resources/webapp/scripts/components/util/confirmation-dialog.html deleted file mode 100644 index 57bc0142fe..0000000000 --- a/server/src/main/resources/webapp/scripts/components/util/confirmation-dialog.html +++ /dev/null @@ -1,11 +0,0 @@ - - diff --git a/server/src/main/resources/webapp/scripts/components/util/confirmation-dialog.js b/server/src/main/resources/webapp/scripts/components/util/confirmation-dialog.js deleted file mode 100644 index 58e1bcb93a..0000000000 --- a/server/src/main/resources/webapp/scripts/components/util/confirmation-dialog.js +++ /dev/null @@ -1,68 +0,0 @@ -'use strict'; - -angular.module('CentralDogmaAdmin') - .factory('ConfirmationDialog', function ($uibModal, $translate, $q) { - return { - open: function (customModalDefaults, customModalOptions) { - const modalDefaults = { - backdrop: true, - keyboard: true, - modalFade: true, - templateUrl: 'scripts/components/util/confirmation-dialog.html' - }; - const modalOptions = { - text: 'Perform this action?' - }; - - //Create temp objects to work with since we're in a singleton service - var tempModalDefaults = {}; - var tempModalOptions = {}; - - //Map angular-ui modal custom defaults to modal defaults defined in service - angular.extend(tempModalDefaults, modalDefaults, customModalDefaults); - - //Map modal.html $scope custom properties to defaults defined in service - angular.extend(tempModalOptions, modalOptions, customModalOptions); - - if (!tempModalDefaults.controller) { - tempModalDefaults.controller = function ($scope, $uibModalInstance) { - $scope.modalOptions = tempModalOptions; - $scope.modalOptions.ok = function () { - $uibModalInstance.close(true); - }; - $scope.modalOptions.close = function () { - $uibModalInstance.close(false); - }; - } - } - return $uibModal.open(tempModalDefaults).result; - }, - - openModal: function (translateId, interpolateParams) { - const defer = $q.defer(); - const open = this.open; - $translate(translateId, interpolateParams).then(function (translated) { - return open({ - backdrop: 'static' - }, { - text: translated - }).then(function (result) { - if (result) { - defer.resolve(); - } - }); - }, function () { - return open({ - backdrop: 'static' - }, { - text: translateId - }).then(function (result) { - if (result) { - defer.resolve(); - } - }); - }); - return defer.promise; - } - } -}); diff --git a/server/src/main/resources/webapp/scripts/components/util/notification-util.service.js b/server/src/main/resources/webapp/scripts/components/util/notification-util.service.js deleted file mode 100644 index 6147ed7b4c..0000000000 --- a/server/src/main/resources/webapp/scripts/components/util/notification-util.service.js +++ /dev/null @@ -1,77 +0,0 @@ -'use strict'; - -angular.module('CentralDogmaAdmin') - .factory('NotificationUtil', - function ($translate, StringUtil, Notification) { - return { - success: function () { - if (arguments.length <= 0 || arguments.length > 2) { - return; - } - - var decoded = this.decodeArgs(arguments); - var translationId = decoded[0]; - var interpolateParams = decoded[1]; - - $translate(translationId, interpolateParams).then(function (translated) { - Notification.success(translated); - }, function () { - Notification.success(translationId); - }); - }, - error: function () { - if (arguments.length <= 0 || arguments.length > 2) { - return; - } - - var arg = arguments[0]; - if (typeof arg === 'object' && - typeof arg.status === 'number' && typeof arg.statusText === 'string') { - if (StringUtil.isNotEmpty(arg.message)) { - Notification.error(StringUtil.escapeHtml(arg.message)); - } else { - var message = arg.status + ' ' + arg.statusText; - if (arg.status === 401) { - // Ignore 401 status code. - } else if (arg.status === 403) { - // TODO(hyangtack) Refine the error message. - Notification.error('Permission denied'); - } else { - Notification.error(message); - } - } - return; - } - - var decoded = this.decodeArgs(arguments); - var translationId = decoded[0]; - var interpolateParams = decoded[1]; - - $translate(translationId, interpolateParams).then(function (translated) { - Notification.error(translated); - }, function () { - Notification.error(translationId); - }); - }, - decodeArgs: function (args) { - var translationId; - var interpolateParams; - if (args.length == 1) { - var arg = args[0]; - if (typeof arg === 'object' && - typeof arg.translationId === 'string' && typeof arg.interpolateParams === 'object') { - translationId = arg.translationId; - interpolateParams = arg.interpolateParams; - } else { - translationId = arg; - interpolateParams = {}; - } - } else { - translationId = args[0]; - interpolateParams = args[1]; - } - - return [ translationId, interpolateParams ]; - } - }; - }); diff --git a/server/src/main/resources/webapp/scripts/components/util/revision.directive.js b/server/src/main/resources/webapp/scripts/components/util/revision.directive.js deleted file mode 100644 index b091fbd2ef..0000000000 --- a/server/src/main/resources/webapp/scripts/components/util/revision.directive.js +++ /dev/null @@ -1,148 +0,0 @@ -'use strict'; - -angular.module('CentralDogmaAdmin') - .directive('revision', - function () { - return { - template: '' + - '', - restrict: 'E', - scope: { - project: '<', - repository: '<', - path: '<', - revision: '<', - showInitialCommit: '<', - callback: '&' - }, - controller: function ($scope, $timeout, RepositoryService) { - var maxCommits = 15; // The maximum number of adjacent commits to show. - - $scope.templateUrl = 'revisionPopoverTemplate.html'; - $scope.history = []; - - $scope.keyUp = function (event) { - if (event.keyCode === 13) { // return - $scope.callCallback($('#target-revision').val()); - } - }; - - $scope.callCallback = function (revision) { - if (angular.isNumber(revision)) { - if (revision === -1) { - $scope.callback()('head'); - } else { - $scope.callback()(parseInt(revision).toString()); - } - return; - } - - revision = revision.toString().toLowerCase(); - if (revision === 'head') { - $scope.callback()('head'); - return; - } - - var revisionAsInt = parseInt(revision); - if (Number.isNaN(revisionAsInt)) { - return; - } - - if (revisionAsInt === -1) { - $scope.callback()('head'); - return; - } - - $scope.callback()(revisionAsInt.toString()); - }; - - $scope.hasHistory = function () { - return $scope.history.length > 0; - }; - - var fetchHistory = function (fromRev) { - if (!angular.isDefined($scope.path)) { - return; - } - - var toRev = Math.max(1, fromRev - maxCommits + 1); - RepositoryService.getHistory($scope.project, $scope.repository, $scope.path, fromRev, - toRev).then(function (result) { - - if (!$scope.showInitialCommit && - result.length > 0 && result[result.length - 1].revision.major === 1) { - $scope.history = result.slice(0, result.length - 1); - } else { - $scope.history = result; - } - }); - }; - - // Focus the target-revision input field when it goes visible. - $scope.$watch(function() { - return angular.element('#target-revision').is(':visible'); - }, function () { - $timeout(function() { angular.element('#target-revision').focus(); }); - }); - - // Fetch the adjacent commits. - RepositoryService.normalizeRevision($scope.project, $scope.repository, -1).then(function (head) { - - var headRev = head.major; - var fromRev; - var revisionAsInt = parseInt($scope.revision); - if (Number.isNaN(revisionAsInt)) { - revisionAsInt = -1; - } - - if (revisionAsInt < 0) { - RepositoryService.normalizeRevision($scope.project, $scope.repository, revisionAsInt).then(function (normalized) { - var normalizedRev = normalized.major; - if (revisionAsInt !== -1) { - $scope.specifiedRevision = revisionAsInt; - } else { - $scope.specifiedRevision = 'HEAD'; - } - $scope.normalizedRevision = normalizedRev; - fetchHistory(Math.min(headRev, normalizedRev + (maxCommits >> 1))); - }); - } else { - $scope.specifiedRevision = revisionAsInt; - if (revisionAsInt === headRev) { - $scope.normalizedRevision = 'HEAD'; - } - fromRev = Math.min(headRev, revisionAsInt + (maxCommits >> 1)); - fetchHistory(fromRev); - } - }); - } - }; - }); diff --git a/server/src/main/resources/webapp/scripts/components/util/search.directive.js b/server/src/main/resources/webapp/scripts/components/util/search.directive.js deleted file mode 100644 index 9ab3feb116..0000000000 --- a/server/src/main/resources/webapp/scripts/components/util/search.directive.js +++ /dev/null @@ -1,37 +0,0 @@ -'use strict'; - -angular.module('CentralDogmaAdmin') - .directive('search', - function () { - return { - template: '
' + - '
' + - '
' + - '' + - '
', - restrict: 'E', - scope: { - project: '=', - repository: '=', - revision: '=', - term: '=' - }, - controller: function ($scope, $state) { - $scope.keyUp = function (event) { - if (event.keyCode === 13) { // return - $scope.search(); - } - }; - - $scope.search = function () { - $state.go('repositorySearch', { - projectName: $scope.project, - repositoryName: $scope.repository, - revision: $scope.revision, - term: $scope.term - }); - }; - } - }; - }); diff --git a/server/src/main/resources/webapp/scripts/components/util/string-util.service.js b/server/src/main/resources/webapp/scripts/components/util/string-util.service.js deleted file mode 100644 index be68cac7ed..0000000000 --- a/server/src/main/resources/webapp/scripts/components/util/string-util.service.js +++ /dev/null @@ -1,104 +0,0 @@ -'use strict'; - -angular.module('CentralDogmaAdmin') - .factory('StringUtil', - function () { - return { - isEmpty: function (value) { - if (value == null || value === 'undefined') { - return true; - } - - if (!angular.isString(value)) { - throw new Error('given value is not a string: ' + value); - } - - return value.length == 0; - }, - - isNotEmpty: function (value) { - return !this.isEmpty(value); - }, - - requireNotEmpty: function (value, message) { - if (this.isEmpty(value)) { - throw new Error(message); - } - return value; - }, - - defaultString: function (value, defaultValue) { - return this.isEmpty(value) ? defaultValue : value; - }, - - normalizePath: function (value) { - if (this.isEmpty(value)) { - return '/'; - } - - var temp = value.replace(/\/\/+/, '/'); - if (temp === '/') { - return temp; - } - - if (!this.startsWith(temp, '/')) { - temp = '/' + temp; - } - if (this.endsWith(temp, '/')) { - temp = temp.slice(0, -1); - } - - return temp; - }, - - startsWith: function (str, prefix) { - return str.indexOf(prefix) === 0; - }, - - endsWith: function (str, suffix) { - return str.match(suffix + '$') == suffix; - }, - - encodePath: function (str) { - var split = str.split('/'); - for (var index in split) { - split[index] = this.encodeParam(split[index]); - } - return split.join('/'); - }, - - encodeParam: function (str) { - return encodeURIComponent(str); - }, - - encodeUri: function (uriComponents) { - var uri = []; - uriComponents.forEach(function (uriComponent) { - uriComponent.split('/').filter(function (value) { - // This would replace '//' with '/' in the result URI. - return value.length > 0; - }).forEach(function (value) { - uri.push(encodeURIComponent(value)); - }) - }); - // Allow the first '/' and the last '/' of the string array. - var result = ''; - if (this.startsWith(uriComponents[0], '/')) { - result += '/'; - } - result += uri.join('/'); - if (this.endsWith(uriComponents[uriComponents.length - 1], '/')) { - result += '/'; - } - return result; - }, - escapeHtml: function(unsafe) { - return unsafe - .replace(/&/g, "&") - .replace(//g, ">") - .replace(/"/g, """) - .replace(/'/g, "'"); - } - }; - }); diff --git a/server/src/main/resources/webapp/scripts/components/util/truncate.filter.js b/server/src/main/resources/webapp/scripts/components/util/truncate.filter.js deleted file mode 100644 index 19965501e5..0000000000 --- a/server/src/main/resources/webapp/scripts/components/util/truncate.filter.js +++ /dev/null @@ -1,48 +0,0 @@ -'use strict'; - -angular.module('CentralDogmaAdmin') - .filter('characters', - function () { - return function (input, chars, breakOnWord) { - if (isNaN(chars)) { - return input; - } - if (chars <= 0) { - return ''; - } - if (input && input.length > chars) { - input = input.substring(0, chars); - - if (!breakOnWord) { - var lastspace = input.lastIndexOf(' '); - // Get last space - if (lastspace !== -1) { - input = input.substr(0, lastspace); - } - } else { - while (input.charAt(input.length - 1) === ' ') { - input = input.substr(0, input.length - 1); - } - } - return input + '...'; - } - return input; - }; - }) - .filter('words', function () { - return function (input, words) { - if (isNaN(words)) { - return input; - } - if (words <= 0) { - return ''; - } - if (input) { - var inputWords = input.split(/\s+/); - if (inputWords.length > words) { - input = inputWords.slice(0, words).join(' ') + '...'; - } - } - return input; - }; - }); diff --git a/server/src/main/resources/webapp/styles/main.css b/server/src/main/resources/webapp/styles/main.css deleted file mode 100644 index eacadb73bc..0000000000 --- a/server/src/main/resources/webapp/styles/main.css +++ /dev/null @@ -1,254 +0,0 @@ -body { - background: #FAFAFA; - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; - color: #333; -} - -/* ========================================================================== -Hide ng-cloak on page load, https://docs.angularjs.org/api/ng/directive/ngCloak -========================================================================== */ -[ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], .ng-cloak, .x-ng-cloak { - display: none !important; -} - -/* ========================================================================== -Development Ribbon -========================================================================== */ -.development { - position: absolute; - width: 149px; - height: 149px; - top: 0; - left: 0; - border: 0; - z-index: 1000; - background-image: url("../images/development_ribbon.png"); - background-position: center center; - background-repeat: no-repeat; -} - -/* ========================================================================== -Version number in navbar -========================================================================== */ -.navbar-version { - font-size: 10px; - color: #CCC -} - -/* ========================================================================== -Browser Upgrade Prompt -========================================================================== */ -.browserupgrade { - margin: 0.2em 0; - background: #CCC; - color: #000; - padding: 0.2em 0; -} - -.hero-unit { - margin: 50px auto 0 auto; - width: 300px; - font-size: 18px; - font-weight: 200; - line-height: 30px; - background-color: #EEE; - border-radius: 6px; - padding: 60px; -} - -.hero-unit h1 { - font-size: 60px; - line-height: 1; - letter-spacing: -1px; -} - -.error { - color: white; - background-color: red; -} - -.hand { - cursor: pointer; -} - -#threadDump .popover, #healthCheck .popover { - top: inherit; - display: block; - font-size: 10px; - max-width: 1024px; -} - -#healthCheck .popover { - margin-left: -50px; -} - -.health-details { - min-width: 400px; -} - -.alert .popover pre { - font-size: 10px; -} - -.voffset { - margin-top: 2px; -} - -.voffset1 { - margin-top: 5px; -} - -.voffset2 { - margin-top: 10px; -} - -.voffset3 { - margin-top: 15px; -} - -.voffset4 { - margin-top: 30px; -} - -.voffset5 { - margin-top: 40px; -} - -.voffset6 { - margin-top: 60px; -} - -.voffset7 { - margin-top: 80px; -} - -.voffset8 { - margin-top: 100px; -} - -.voffset9 { - margin-top: 150px; -} - -/* start Password strength bar style */ -ul#strength { - display: inline; - list-style: none; - margin: 0; - margin-left: 15px; - padding: 0; - vertical-align: 2px; -} - -.point:last { - margin: 0 !important; -} - -.point { - background: #DDD; - border-radius: 2px; - display: inline-block; - height: 5px; - margin-right: 1px; - width: 20px; -} - -/* end Password strength bar style */ - -.gridStyle { - border: 1px solid rgb(212, 212, 212); - width: 100%; - height: 100% -} - -.ngCell { - display: table-cell; - height: auto !important; - overflow-y: visible; - position: static; -} - -.ngRow { - display: table-row; - height: auto !important; - position: static; -} - -.ngCellText { - height: auto !important; - white-space: normal; - overflow-y: visible; -} - -.ngViewport.ng-scope { - height: auto !important; -} - -.pointer { - cursor: pointer; -} - -.diffDeletedLine { - background-color: #FDD; -} - -.diffAddedLine { - background-color: #DFD; -} - -[ng-click], -[data-ng-click], -[x-ng-click] { - cursor: pointer; -} - -.top-buffer { - margin-top: 10px; -} - -.file-area { - width: 100%; - height: 500px; -} - -.ace-prefs { - float: right; - margin-top: -40px; - padding-right: 24px; - position: relative; - z-index: 10; -} - -/* Increase the maximum width of the angular-ui-bootstrap popover */ -.popover { - max-width: 320px; /* optional max width */ - width: intrinsic; /* Safari/WebKit uses a non-standard name */ - width: -moz-max-content; /* Firefox/Gecko */ - width: -webkit-max-content; /* Chrome */ -} - -/* Increase the maximum width of the angular-ui-bootstrap tooltip */ -.tooltip-inner { - max-width: 320px; /* optional max width */ - width: intrinsic; /* Safari/WebKit uses a non-standard name */ - width: -moz-max-content; /* Firefox/Gecko */ - width: -webkit-max-content; /* Chrome */ - - /* And left-align the tooltip text */ - text-align: left; - /* And allow multiline tooltip text */ - white-space: pre-wrap; -} - -/* Do not display bullets for the commit list in the revision popover. */ -.commits ul { - list-style-type: none; - padding-left: 0; -} - -/* Ensure the commit list in the revision popover form is single-lined. */ -.commits li { - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; -}