diff --git a/ngapp/package-lock.json b/ngapp/package-lock.json index 1c446176..ad5956a6 100644 --- a/ngapp/package-lock.json +++ b/ngapp/package-lock.json @@ -114,7 +114,6 @@ "version": "4.4.4", "resolved": "https://registry.npmjs.org/@angular/compiler-cli/-/compiler-cli-4.4.4.tgz", "integrity": "sha1-BjCApJfZF1OWglBQIixxfaGE9s8=", - "dev": true, "requires": { "@angular/tsc-wrapped": "4.4.4", "minimist": "1.2.0", @@ -124,8 +123,7 @@ "minimist": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" } } }, @@ -175,6 +173,16 @@ "tslib": "1.7.1" } }, + "@angular/platform-server": { + "version": "4.4.4", + "resolved": "https://registry.npmjs.org/@angular/platform-server/-/platform-server-4.4.4.tgz", + "integrity": "sha1-c+5B+hzshij8wDF0cnsnywAxsio=", + "requires": { + "parse5": "3.0.2", + "tslib": "1.7.1", + "xhr2": "0.1.4" + } + }, "@angular/router": { "version": "4.4.4", "resolved": "https://registry.npmjs.org/@angular/router/-/router-4.4.4.tgz", @@ -187,7 +195,6 @@ "version": "4.4.4", "resolved": "https://registry.npmjs.org/@angular/tsc-wrapped/-/tsc-wrapped-4.4.4.tgz", "integrity": "sha1-mEGCHlVha4JsoWAlD+heFfx0/8M=", - "dev": true, "requires": { "tsickle": "0.21.6" } @@ -352,6 +359,16 @@ "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=", "dev": true }, + "angular-tree-component": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/angular-tree-component/-/angular-tree-component-4.1.0.tgz", + "integrity": "sha1-bPQhg4KRnJbmRacbUNffXJOySjs=", + "requires": { + "lodash": "4.17.4", + "mobx": "3.1.11", + "mobx-angular": "1.5.0" + } + }, "ansi-escapes": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.0.0.tgz", @@ -1063,6 +1080,14 @@ "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=", "dev": true }, + "c3": { + "version": "0.4.18", + "resolved": "https://registry.npmjs.org/c3/-/c3-0.4.18.tgz", + "integrity": "sha512-37TiFeCrbe69gg7SxFpTBOLDwulnk+opKp1AFDi43mONtErpRoUIZfGSimGiSYQmNu6Zh9W2yNOx0066UikqSg==", + "requires": { + "d3": "3.5.17" + } + }, "callsite": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/callsite/-/callsite-1.0.0.tgz", @@ -1182,7 +1207,6 @@ "requires": { "anymatch": "1.3.2", "async-each": "1.0.1", - "fsevents": "1.1.2", "glob-parent": "2.0.0", "inherits": "2.0.3", "is-binary-path": "1.0.1", @@ -1846,6 +1870,11 @@ "es5-ext": "0.10.30" } }, + "d3": { + "version": "3.5.17", + "resolved": "https://registry.npmjs.org/d3/-/d3-3.5.17.tgz", + "integrity": "sha1-vEZ0gAQ3iyGjYMn8fPUjF5B2L7g=" + }, "dashdash": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", @@ -2751,1049 +2780,150 @@ "filename-regex": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz", - "integrity": "sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY=", - "dev": true - }, - "fileset": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/fileset/-/fileset-2.0.3.tgz", - "integrity": "sha1-jnVIqW08wjJ+5eZ0FocjozO7oqA=", - "dev": true, - "requires": { - "glob": "7.1.2", - "minimatch": "3.0.4" - } - }, - "fill-range": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.3.tgz", - "integrity": "sha1-ULd9/X5Gm8dJJHCWNpn+eoSFpyM=", - "dev": true, - "requires": { - "is-number": "2.1.0", - "isobject": "2.1.0", - "randomatic": "1.1.7", - "repeat-element": "1.1.2", - "repeat-string": "1.6.1" - }, - "dependencies": { - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true - }, - "isobject": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", - "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", - "dev": true, - "requires": { - "isarray": "1.0.0" - } - } - } - }, - "finalhandler": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.0.tgz", - "integrity": "sha1-zgtoVbRYU+eRsvzGgARtiCU91/U=", - "dev": true, - "requires": { - "debug": "2.6.9", - "encodeurl": "1.0.1", - "escape-html": "1.0.3", - "on-finished": "2.3.0", - "parseurl": "1.3.2", - "statuses": "1.3.1", - "unpipe": "1.0.0" - } - }, - "find-up": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", - "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", - "dev": true, - "requires": { - "path-exists": "2.1.0", - "pinkie-promise": "2.0.1" - } - }, - "flatten": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/flatten/-/flatten-1.0.2.tgz", - "integrity": "sha1-2uRqnXj74lKSJYzB54CkHZXAN4I=", - "dev": true - }, - "for-in": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", - "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", - "dev": true - }, - "for-own": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz", - "integrity": "sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs=", - "dev": true, - "requires": { - "for-in": "1.0.2" - } - }, - "forever-agent": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", - "dev": true - }, - "form-data": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.1.tgz", - "integrity": "sha1-b7lPvXGIUwbXPRXMSX/kzE7NRL8=", - "dev": true, - "requires": { - "asynckit": "0.4.0", - "combined-stream": "1.0.5", - "mime-types": "2.1.17" - } - }, - "forwarded": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", - "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=", - "dev": true - }, - "fresh": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", - "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=", - "dev": true - }, - "fs-access": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/fs-access/-/fs-access-1.0.1.tgz", - "integrity": "sha1-1qh/JiJxzv6+wwxVNAf7mV2od3o=", - "dev": true, - "requires": { - "null-check": "1.0.0" - } - }, - "fs-extra": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.2.tgz", - "integrity": "sha1-+RcExT0bRh+JNFKwwwfZmXZHq2s=", - "dev": true, - "requires": { - "graceful-fs": "4.1.11", - "jsonfile": "4.0.0", - "universalify": "0.1.1" - } - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", - "dev": true - }, - "fsevents": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.1.2.tgz", - "integrity": "sha512-Sn44E5wQW4bTHXvQmvSHwqbuiXtduD6Rrjm2ZtUEGbyrig+nUH3t/QD4M4/ZXViY556TBpRgZkHLDx3JxPwxiw==", - "dev": true, - "optional": true, - "requires": { - "nan": "2.7.0", - "node-pre-gyp": "0.6.36" - }, - "dependencies": { - "abbrev": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "optional": true - }, - "ajv": { - "version": "4.11.8", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "co": "4.6.0", - "json-stable-stringify": "1.0.1" - } - }, - "ansi-regex": { - "version": "2.1.1", - "bundled": true, - "dev": true - }, - "aproba": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "are-we-there-yet": { - "version": "1.1.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "delegates": "1.0.0", - "readable-stream": "2.2.9" - } - }, - "asn1": { - "version": "0.2.3", - "bundled": true, - "dev": true, - "optional": true - }, - "assert-plus": { - "version": "0.2.0", - "bundled": true, - "dev": true, - "optional": true - }, - "asynckit": { - "version": "0.4.0", - "bundled": true, - "dev": true, - "optional": true - }, - "aws-sign2": { - "version": "0.6.0", - "bundled": true, - "dev": true, - "optional": true - }, - "aws4": { - "version": "1.6.0", - "bundled": true, - "dev": true, - "optional": true - }, - "balanced-match": { - "version": "0.4.2", - "bundled": true, - "dev": true - }, - "bcrypt-pbkdf": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "tweetnacl": "0.14.5" - } - }, - "block-stream": { - "version": "0.0.9", - "bundled": true, - "dev": true, - "requires": { - "inherits": "2.0.3" - } - }, - "boom": { - "version": "2.10.1", - "bundled": true, - "dev": true, - "requires": { - "hoek": "2.16.3" - } - }, - "brace-expansion": { - "version": "1.1.7", - "bundled": true, - "dev": true, - "requires": { - "balanced-match": "0.4.2", - "concat-map": "0.0.1" - } - }, - "buffer-shims": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "caseless": { - "version": "0.12.0", - "bundled": true, - "dev": true, - "optional": true - }, - "co": { - "version": "4.6.0", - "bundled": true, - "dev": true, - "optional": true - }, - "code-point-at": { - "version": "1.1.0", - "bundled": true, - "dev": true - }, - "combined-stream": { - "version": "1.0.5", - "bundled": true, - "dev": true, - "requires": { - "delayed-stream": "1.0.0" - } - }, - "concat-map": { - "version": "0.0.1", - "bundled": true, - "dev": true - }, - "console-control-strings": { - "version": "1.1.0", - "bundled": true, - "dev": true - }, - "core-util-is": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "cryptiles": { - "version": "2.0.5", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "boom": "2.10.1" - } - }, - "dashdash": { - "version": "1.14.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "assert-plus": "1.0.0" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - } - } - }, - "debug": { - "version": "2.6.8", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ms": "2.0.0" - } - }, - "deep-extend": { - "version": "0.4.2", - "bundled": true, - "dev": true, - "optional": true - }, - "delayed-stream": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "delegates": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "ecc-jsbn": { - "version": "0.1.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "jsbn": "0.1.1" - } - }, - "extend": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "extsprintf": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "forever-agent": { - "version": "0.6.1", - "bundled": true, - "dev": true, - "optional": true - }, - "form-data": { - "version": "2.1.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "asynckit": "0.4.0", - "combined-stream": "1.0.5", - "mime-types": "2.1.15" - } - }, - "fs.realpath": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "fstream": { - "version": "1.0.11", - "bundled": true, - "dev": true, - "requires": { - "graceful-fs": "4.1.11", - "inherits": "2.0.3", - "mkdirp": "0.5.1", - "rimraf": "2.6.1" - } - }, - "fstream-ignore": { - "version": "1.0.5", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "fstream": "1.0.11", - "inherits": "2.0.3", - "minimatch": "3.0.4" - } - }, - "gauge": { - "version": "2.7.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "aproba": "1.1.1", - "console-control-strings": "1.1.0", - "has-unicode": "2.0.1", - "object-assign": "4.1.1", - "signal-exit": "3.0.2", - "string-width": "1.0.2", - "strip-ansi": "3.0.1", - "wide-align": "1.1.2" - } - }, - "getpass": { - "version": "0.1.7", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "assert-plus": "1.0.0" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - } - } - }, - "glob": { - "version": "7.1.2", - "bundled": true, - "dev": true, - "requires": { - "fs.realpath": "1.0.0", - "inflight": "1.0.6", - "inherits": "2.0.3", - "minimatch": "3.0.4", - "once": "1.4.0", - "path-is-absolute": "1.0.1" - } - }, - "graceful-fs": { - "version": "4.1.11", - "bundled": true, - "dev": true - }, - "har-schema": { - "version": "1.0.5", - "bundled": true, - "dev": true, - "optional": true - }, - "har-validator": { - "version": "4.2.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ajv": "4.11.8", - "har-schema": "1.0.5" - } - }, - "has-unicode": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "hawk": { - "version": "3.1.3", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "boom": "2.10.1", - "cryptiles": "2.0.5", - "hoek": "2.16.3", - "sntp": "1.0.9" - } - }, - "hoek": { - "version": "2.16.3", - "bundled": true, - "dev": true - }, - "http-signature": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "assert-plus": "0.2.0", - "jsprim": "1.4.0", - "sshpk": "1.13.0" - } - }, - "inflight": { - "version": "1.0.6", - "bundled": true, - "dev": true, - "requires": { - "once": "1.4.0", - "wrappy": "1.0.2" - } - }, - "inherits": { - "version": "2.0.3", - "bundled": true, - "dev": true - }, - "ini": { - "version": "1.3.4", - "bundled": true, - "dev": true, - "optional": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "number-is-nan": "1.0.1" - } - }, - "is-typedarray": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "isarray": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "isstream": { - "version": "0.1.2", - "bundled": true, - "dev": true, - "optional": true - }, - "jodid25519": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "jsbn": "0.1.1" - } - }, - "jsbn": { - "version": "0.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "json-schema": { - "version": "0.2.3", - "bundled": true, - "dev": true, - "optional": true - }, - "json-stable-stringify": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "jsonify": "0.0.0" - } - }, - "json-stringify-safe": { - "version": "5.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "jsonify": { - "version": "0.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "jsprim": { - "version": "1.4.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "assert-plus": "1.0.0", - "extsprintf": "1.0.2", - "json-schema": "0.2.3", - "verror": "1.3.6" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - } - } - }, - "mime-db": { - "version": "1.27.0", - "bundled": true, - "dev": true - }, - "mime-types": { - "version": "2.1.15", - "bundled": true, - "dev": true, - "requires": { - "mime-db": "1.27.0" - } - }, - "minimatch": { - "version": "3.0.4", - "bundled": true, - "dev": true, - "requires": { - "brace-expansion": "1.1.7" - } - }, - "minimist": { - "version": "0.0.8", - "bundled": true, - "dev": true - }, - "mkdirp": { - "version": "0.5.1", - "bundled": true, - "dev": true, - "requires": { - "minimist": "0.0.8" - } - }, - "ms": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "node-pre-gyp": { - "version": "0.6.36", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "mkdirp": "0.5.1", - "nopt": "4.0.1", - "npmlog": "4.1.0", - "rc": "1.2.1", - "request": "2.81.0", - "rimraf": "2.6.1", - "semver": "5.3.0", - "tar": "2.2.1", - "tar-pack": "3.4.0" - } - }, - "nopt": { - "version": "4.0.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "abbrev": "1.1.0", - "osenv": "0.1.4" - } - }, - "npmlog": { - "version": "4.1.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "are-we-there-yet": "1.1.4", - "console-control-strings": "1.1.0", - "gauge": "2.7.4", - "set-blocking": "2.0.0" - } - }, - "number-is-nan": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "oauth-sign": { - "version": "0.8.2", - "bundled": true, - "dev": true, - "optional": true - }, - "object-assign": { - "version": "4.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "once": { - "version": "1.4.0", - "bundled": true, - "dev": true, - "requires": { - "wrappy": "1.0.2" - } - }, - "os-homedir": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "os-tmpdir": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "osenv": { - "version": "0.1.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "os-homedir": "1.0.2", - "os-tmpdir": "1.0.2" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "performance-now": { - "version": "0.2.0", - "bundled": true, - "dev": true, - "optional": true - }, - "process-nextick-args": { - "version": "1.0.7", - "bundled": true, - "dev": true - }, - "punycode": { - "version": "1.4.1", - "bundled": true, - "dev": true, - "optional": true - }, - "qs": { - "version": "6.4.0", - "bundled": true, - "dev": true, - "optional": true - }, - "rc": { - "version": "1.2.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "deep-extend": "0.4.2", - "ini": "1.3.4", - "minimist": "1.2.0", - "strip-json-comments": "2.0.1" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "optional": true - } - } - }, - "readable-stream": { - "version": "2.2.9", - "bundled": true, - "dev": true, - "requires": { - "buffer-shims": "1.0.0", - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "1.0.0", - "process-nextick-args": "1.0.7", - "string_decoder": "1.0.1", - "util-deprecate": "1.0.2" - } - }, - "request": { - "version": "2.81.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "aws-sign2": "0.6.0", - "aws4": "1.6.0", - "caseless": "0.12.0", - "combined-stream": "1.0.5", - "extend": "3.0.1", - "forever-agent": "0.6.1", - "form-data": "2.1.4", - "har-validator": "4.2.1", - "hawk": "3.1.3", - "http-signature": "1.1.1", - "is-typedarray": "1.0.0", - "isstream": "0.1.2", - "json-stringify-safe": "5.0.1", - "mime-types": "2.1.15", - "oauth-sign": "0.8.2", - "performance-now": "0.2.0", - "qs": "6.4.0", - "safe-buffer": "5.0.1", - "stringstream": "0.0.5", - "tough-cookie": "2.3.2", - "tunnel-agent": "0.6.0", - "uuid": "3.0.1" - } - }, - "rimraf": { - "version": "2.6.1", - "bundled": true, - "dev": true, - "requires": { - "glob": "7.1.2" - } - }, - "safe-buffer": { - "version": "5.0.1", - "bundled": true, - "dev": true - }, - "semver": { - "version": "5.3.0", - "bundled": true, - "dev": true, - "optional": true - }, - "set-blocking": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "signal-exit": { - "version": "3.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "sntp": { - "version": "1.0.9", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "hoek": "2.16.3" - } - }, - "sshpk": { - "version": "1.13.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "asn1": "0.2.3", - "assert-plus": "1.0.0", - "bcrypt-pbkdf": "1.0.1", - "dashdash": "1.14.1", - "ecc-jsbn": "0.1.1", - "getpass": "0.1.7", - "jodid25519": "1.0.2", - "jsbn": "0.1.1", - "tweetnacl": "0.14.5" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - } - } - }, - "string-width": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "requires": { - "code-point-at": "1.1.0", - "is-fullwidth-code-point": "1.0.0", - "strip-ansi": "3.0.1" - } - }, - "string_decoder": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "requires": { - "safe-buffer": "5.0.1" - } - }, - "stringstream": { - "version": "0.0.5", - "bundled": true, - "dev": true, - "optional": true - }, - "strip-ansi": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "requires": { - "ansi-regex": "2.1.1" - } - }, - "strip-json-comments": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "tar": { - "version": "2.2.1", - "bundled": true, - "dev": true, - "requires": { - "block-stream": "0.0.9", - "fstream": "1.0.11", - "inherits": "2.0.3" - } - }, - "tar-pack": { - "version": "3.4.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "debug": "2.6.8", - "fstream": "1.0.11", - "fstream-ignore": "1.0.5", - "once": "1.4.0", - "readable-stream": "2.2.9", - "rimraf": "2.6.1", - "tar": "2.2.1", - "uid-number": "0.0.6" - } - }, - "tough-cookie": { - "version": "2.3.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "punycode": "1.4.1" - } - }, - "tunnel-agent": { - "version": "0.6.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "safe-buffer": "5.0.1" - } - }, - "tweetnacl": { - "version": "0.14.5", - "bundled": true, - "dev": true, - "optional": true - }, - "uid-number": { - "version": "0.0.6", - "bundled": true, - "dev": true, - "optional": true - }, - "util-deprecate": { - "version": "1.0.2", - "bundled": true, + "integrity": "sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY=", + "dev": true + }, + "fileset": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/fileset/-/fileset-2.0.3.tgz", + "integrity": "sha1-jnVIqW08wjJ+5eZ0FocjozO7oqA=", + "dev": true, + "requires": { + "glob": "7.1.2", + "minimatch": "3.0.4" + } + }, + "fill-range": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.3.tgz", + "integrity": "sha1-ULd9/X5Gm8dJJHCWNpn+eoSFpyM=", + "dev": true, + "requires": { + "is-number": "2.1.0", + "isobject": "2.1.0", + "randomatic": "1.1.7", + "repeat-element": "1.1.2", + "repeat-string": "1.6.1" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", "dev": true }, - "uuid": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "verror": { - "version": "1.3.6", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "extsprintf": "1.0.2" - } - }, - "wide-align": { - "version": "1.1.2", - "bundled": true, + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", "dev": true, - "optional": true, "requires": { - "string-width": "1.0.2" + "isarray": "1.0.0" } - }, - "wrappy": { - "version": "1.0.2", - "bundled": true, - "dev": true } } }, + "finalhandler": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.0.tgz", + "integrity": "sha1-zgtoVbRYU+eRsvzGgARtiCU91/U=", + "dev": true, + "requires": { + "debug": "2.6.9", + "encodeurl": "1.0.1", + "escape-html": "1.0.3", + "on-finished": "2.3.0", + "parseurl": "1.3.2", + "statuses": "1.3.1", + "unpipe": "1.0.0" + } + }, + "find-up": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", + "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", + "dev": true, + "requires": { + "path-exists": "2.1.0", + "pinkie-promise": "2.0.1" + } + }, + "flatten": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/flatten/-/flatten-1.0.2.tgz", + "integrity": "sha1-2uRqnXj74lKSJYzB54CkHZXAN4I=", + "dev": true + }, + "for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", + "dev": true + }, + "for-own": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz", + "integrity": "sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs=", + "dev": true, + "requires": { + "for-in": "1.0.2" + } + }, + "forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", + "dev": true + }, + "form-data": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.1.tgz", + "integrity": "sha1-b7lPvXGIUwbXPRXMSX/kzE7NRL8=", + "dev": true, + "requires": { + "asynckit": "0.4.0", + "combined-stream": "1.0.5", + "mime-types": "2.1.17" + } + }, + "forwarded": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", + "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=", + "dev": true + }, + "fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=", + "dev": true + }, + "fs-access": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/fs-access/-/fs-access-1.0.1.tgz", + "integrity": "sha1-1qh/JiJxzv6+wwxVNAf7mV2od3o=", + "dev": true, + "requires": { + "null-check": "1.0.0" + } + }, + "fs-extra": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.2.tgz", + "integrity": "sha1-+RcExT0bRh+JNFKwwwfZmXZHq2s=", + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "jsonfile": "4.0.0", + "universalify": "0.1.1" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, "fstream": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.11.tgz", @@ -5410,8 +4540,7 @@ "lodash": { "version": "4.17.4", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", - "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=", - "dev": true + "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=" }, "lodash.assign": { "version": "4.2.0", @@ -5757,8 +4886,7 @@ "minimist": { "version": "0.0.8", "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", - "dev": true + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" }, "mixin-object": { "version": "2.0.1", @@ -5782,11 +4910,25 @@ "version": "0.5.1", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", - "dev": true, "requires": { "minimist": "0.0.8" } }, + "mobx": { + "version": "3.1.11", + "resolved": "https://registry.npmjs.org/mobx/-/mobx-3.1.11.tgz", + "integrity": "sha1-QAsePACkJJ3+Num8oo7zbwV9Sig=" + }, + "mobx-angular": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/mobx-angular/-/mobx-angular-1.5.0.tgz", + "integrity": "sha1-bIBkg+v30WHltfUEjtwwD4UhyAw=" + }, + "moment": { + "version": "2.17.1", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.17.1.tgz", + "integrity": "sha1-/tlQYGPzaxDwZsi1mhRNf66+HYI=" + }, "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", @@ -6358,6 +5500,14 @@ "integrity": "sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY=", "dev": true }, + "parse5": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-3.0.2.tgz", + "integrity": "sha1-Be/1fw70V3+xRKefi5qWemzERRA=", + "requires": { + "@types/node": "6.0.89" + } + }, "parsejson": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/parsejson/-/parsejson-0.0.3.tgz", @@ -6447,6 +5597,261 @@ "pinkie-promise": "2.0.1" } }, + "patternfly": { + "version": "3.27.7", + "resolved": "https://registry.npmjs.org/patternfly/-/patternfly-3.27.7.tgz", + "integrity": "sha1-okEYcgvBPuu+b9bkgP2m65kBLaQ=", + "requires": { + "bootstrap": "3.3.7", + "bootstrap-datepicker": "1.6.4", + "bootstrap-select": "1.12.4", + "bootstrap-switch": "3.3.4", + "bootstrap-touchspin": "3.1.1", + "c3": "0.4.17", + "d3": "3.5.17", + "datatables.net": "1.10.15", + "datatables.net-colreorder": "1.3.3", + "datatables.net-colreorder-bs": "1.3.3", + "datatables.net-select": "1.2.2", + "drmonty-datatables-colvis": "1.1.2", + "eonasdan-bootstrap-datetimepicker": "4.17.47", + "font-awesome": "4.7.0", + "google-code-prettify": "1.0.5", + "jquery": "3.2.1", + "jquery-match-height": "0.7.2", + "moment": "2.14.1", + "moment-timezone": "0.4.1", + "patternfly-bootstrap-combobox": "1.1.7", + "patternfly-bootstrap-treeview": "2.1.5" + }, + "dependencies": { + "bootstrap": { + "version": "3.3.7", + "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-3.3.7.tgz", + "integrity": "sha1-WjiTlFSfIzMIdaOxUGVldPip63E=" + }, + "bootstrap-datepicker": { + "version": "1.6.4", + "resolved": "https://registry.npmjs.org/bootstrap-datepicker/-/bootstrap-datepicker-1.6.4.tgz", + "integrity": "sha1-iJ6+ztjqov8V7B8nPksHUxzEPaA=", + "optional": true, + "requires": { + "jquery": "3.2.1" + } + }, + "bootstrap-select": { + "version": "1.12.4", + "resolved": "https://registry.npmjs.org/bootstrap-select/-/bootstrap-select-1.12.4.tgz", + "integrity": "sha1-fxXTwM6XiGjZwJxw+WYk9V+gLuE=", + "optional": true, + "requires": { + "jquery": "3.2.1" + } + }, + "bootstrap-switch": { + "version": "3.3.4", + "resolved": "https://registry.npmjs.org/bootstrap-switch/-/bootstrap-switch-3.3.4.tgz", + "integrity": "sha1-cOCusqh3wNx2aZHeEI4hcPwpov8=", + "optional": true + }, + "bootstrap-touchspin": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/bootstrap-touchspin/-/bootstrap-touchspin-3.1.1.tgz", + "integrity": "sha1-l3nerHKq9Xfl52K4USx0fIcdlZc=", + "optional": true + }, + "c3": { + "version": "0.4.17", + "resolved": "https://registry.npmjs.org/c3/-/c3-0.4.17.tgz", + "integrity": "sha512-41T3yS3jq1XgA7ruvV1wFVEK1E2az2iUAqS7hU5de62JVrjPyxWqIPu8AHlKpShZxJbD+DXLRkQHfOLASYyqyg==", + "optional": true, + "requires": { + "d3": "3.5.17" + } + }, + "d3": { + "version": "3.5.17", + "resolved": "https://registry.npmjs.org/d3/-/d3-3.5.17.tgz", + "integrity": "sha1-vEZ0gAQ3iyGjYMn8fPUjF5B2L7g=", + "optional": true + }, + "datatables.net": { + "version": "1.10.15", + "resolved": "https://registry.npmjs.org/datatables.net/-/datatables.net-1.10.15.tgz", + "integrity": "sha1-x4kHe7/jhedf9aIz+l8jJRpy32g=", + "requires": { + "jquery": "3.2.1" + } + }, + "datatables.net-bs": { + "version": "1.10.15", + "resolved": "https://registry.npmjs.org/datatables.net-bs/-/datatables.net-bs-1.10.15.tgz", + "integrity": "sha1-ssImEAfYTKW1q/VsGO3CJ+DaGk0=", + "optional": true, + "requires": { + "datatables.net": "1.10.15", + "jquery": "3.2.1" + } + }, + "datatables.net-colreorder": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/datatables.net-colreorder/-/datatables.net-colreorder-1.3.3.tgz", + "integrity": "sha1-/HYuNQ+UIkyyzUXCuWImGg//73I=", + "optional": true, + "requires": { + "datatables.net": "1.10.15", + "jquery": "3.2.1" + } + }, + "datatables.net-colreorder-bs": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/datatables.net-colreorder-bs/-/datatables.net-colreorder-bs-1.3.3.tgz", + "integrity": "sha1-Op3LCN7r612FQHlZHgbkk615OlM=", + "optional": true, + "requires": { + "datatables.net-bs": "1.10.15", + "datatables.net-colreorder": "1.3.3", + "jquery": "3.2.1" + } + }, + "datatables.net-select": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/datatables.net-select/-/datatables.net-select-1.2.2.tgz", + "integrity": "sha1-llF5P1KJn05XRcByCCHouChvv0U=", + "optional": true, + "requires": { + "datatables.net": "1.10.15", + "jquery": "3.2.1" + } + }, + "drmonty-datatables-colvis": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/drmonty-datatables-colvis/-/drmonty-datatables-colvis-1.1.2.tgz", + "integrity": "sha1-lque37SGQ8wu3aP4e4iTPN7oEnw=", + "optional": true, + "requires": { + "jquery": "3.2.1" + } + }, + "eonasdan-bootstrap-datetimepicker": { + "version": "4.17.47", + "resolved": "https://registry.npmjs.org/eonasdan-bootstrap-datetimepicker/-/eonasdan-bootstrap-datetimepicker-4.17.47.tgz", + "integrity": "sha1-ekmXAEQGUnbnll79Fvgic1IZ5zU=", + "optional": true, + "requires": { + "bootstrap": "3.3.7", + "jquery": "3.2.1", + "moment": "2.14.1", + "moment-timezone": "0.4.1" + } + }, + "font-awesome": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/font-awesome/-/font-awesome-4.7.0.tgz", + "integrity": "sha1-j6jPBBGhoxr9B7BtKQK7n8gVoTM=" + }, + "google-code-prettify": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/google-code-prettify/-/google-code-prettify-1.0.5.tgz", + "integrity": "sha1-n0d/Ik2/piNy5e+AOn4VdBBAAIQ=", + "optional": true + }, + "jquery": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.2.1.tgz", + "integrity": "sha1-XE2d5lKvbNCncBVKYxu6ErAVx4c=" + }, + "jquery-match-height": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/jquery-match-height/-/jquery-match-height-0.7.2.tgz", + "integrity": "sha1-+NnzulMU2qsQnPB0CGdL4gS+Xw4=", + "optional": true + }, + "moment": { + "version": "2.14.1", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.14.1.tgz", + "integrity": "sha1-s1snxH5X7S3ccAU9awe+zbKRdBw=" + }, + "moment-timezone": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/moment-timezone/-/moment-timezone-0.4.1.tgz", + "integrity": "sha1-gfWYw61eIs2teWtn7NjYjQ9bqgY=", + "optional": true, + "requires": { + "moment": "2.14.1" + } + }, + "patternfly-bootstrap-combobox": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/patternfly-bootstrap-combobox/-/patternfly-bootstrap-combobox-1.1.7.tgz", + "integrity": "sha1-al48zRFwwhs8S0qhaKdBPh3btuE=", + "optional": true + }, + "patternfly-bootstrap-treeview": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/patternfly-bootstrap-treeview/-/patternfly-bootstrap-treeview-2.1.5.tgz", + "integrity": "sha1-TCnyWC+4ovKPCpKPLw0yTSHWmQ0=", + "optional": true, + "requires": { + "bootstrap": "3.3.7", + "jquery": "3.2.1" + } + } + } + }, + "patternfly-ng": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/patternfly-ng/-/patternfly-ng-0.13.1.tgz", + "integrity": "sha1-1DYXTcCqqllUc6UG1o0Kc/432Qo=", + "requires": { + "@angular/animations": "4.4.4", + "@angular/common": "4.4.4", + "@angular/compiler": "4.4.4", + "@angular/compiler-cli": "4.4.4", + "@angular/core": "4.4.4", + "@angular/forms": "4.4.4", + "@angular/http": "4.4.4", + "@angular/platform-browser": "4.4.4", + "@angular/platform-browser-dynamic": "4.4.4", + "@angular/platform-server": "4.4.4", + "@angular/router": "4.4.4", + "angular-tree-component": "4.1.0", + "c3": "0.4.18", + "core-js": "2.4.1", + "moment": "2.17.1", + "ngx-bootstrap": "1.8.0", + "patternfly": "3.27.7", + "rxjs": "5.4.3", + "zone.js": "0.8.4" + }, + "dependencies": { + "core-js": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.4.1.tgz", + "integrity": "sha1-TekR5mew6ukSTjQlS1OupvxhjT4=" + }, + "ngx-bootstrap": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/ngx-bootstrap/-/ngx-bootstrap-1.8.0.tgz", + "integrity": "sha512-y4+9cQkCAZ8C2iHfGC9PMu6tqHqDPyZN0ejz4fDwWljAUtxqXqwUgPKAnebkckdLw/EFmozgvf27ouVqhDA+CA==", + "requires": { + "moment": "2.18.1" + }, + "dependencies": { + "moment": { + "version": "2.18.1", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.18.1.tgz", + "integrity": "sha1-w2GT3Tzhwu7SrbfIAtu8d6gbHA8=" + } + } + }, + "zone.js": { + "version": "0.8.4", + "resolved": "https://registry.npmjs.org/zone.js/-/zone.js-0.8.4.tgz", + "integrity": "sha1-zECuWhyHlgHF67oglrXIDwxMNgI=" + } + } + }, "pbkdf2": { "version": "3.0.14", "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.14.tgz", @@ -7466,8 +6871,7 @@ "reflect-metadata": { "version": "0.1.10", "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.1.10.tgz", - "integrity": "sha1-tPg3BEFqytiZiMmxVjXUfgO5NEo=", - "dev": true + "integrity": "sha1-tPg3BEFqytiZiMmxVjXUfgO5NEo=" }, "regenerate": { "version": "1.3.3", @@ -8199,8 +7603,7 @@ "source-map": { "version": "0.5.7", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" }, "source-map-loader": { "version": "0.2.1", @@ -8246,7 +7649,6 @@ "version": "0.4.18", "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz", "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", - "dev": true, "requires": { "source-map": "0.5.7" } @@ -8836,7 +8238,6 @@ "version": "0.21.6", "resolved": "https://registry.npmjs.org/tsickle/-/tsickle-0.21.6.tgz", "integrity": "sha1-U7Abl5xcE/2xOvs/uVgXflmRWI0=", - "dev": true, "requires": { "minimist": "1.2.0", "mkdirp": "0.5.1", @@ -8847,8 +8248,7 @@ "minimist": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" } } }, @@ -9728,6 +9128,11 @@ "integrity": "sha1-OS2LotDxw00e4tYw8V0O+2jhBIo=", "dev": true }, + "xhr2": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/xhr2/-/xhr2-0.1.4.tgz", + "integrity": "sha1-f4dliEdxbbUCYyOBL4GMras4el8=" + }, "xml-char-classes": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/xml-char-classes/-/xml-char-classes-1.0.0.tgz", diff --git a/ngapp/package.json b/ngapp/package.json index ae8f8c79..c4ca6315 100644 --- a/ngapp/package.json +++ b/ngapp/package.json @@ -23,6 +23,7 @@ "@angular/router": "^4.2.4", "core-js": "^2.4.1", "ngx-bootstrap": "^1.9.3", + "patternfly-ng": "^0.13.1", "rxjs": "^5.4.2", "zone.js": "^0.8.14" }, diff --git a/ngapp/src/app/activities/activities-cards/activities-cards.component.html b/ngapp/src/app/activities/activities-cards/activities-cards.component.html index a96ebbfa..3a2e409a 100644 --- a/ngapp/src/app/activities/activities-cards/activities-cards.component.html +++ b/ngapp/src/app/activities/activities-cards/activities-cards.component.html @@ -12,13 +12,11 @@


-
- Source: - {{ activity.getSourceConnection() }}    +
+ Source:  {{ activity.getSourceConnection() }}
-
- Target: - {{ activity.getSourceConnection() }}    +
+ Target:  {{ activity.getTargetConnection() }}
-
- Source: - {{ activity.getSourceConnection() }}    +
+ Source:  {{ activity.getSourceConnection() }}    
-
- Target: - {{ activity.getTargetConnection() }}    +
+ Target:  {{ activity.getTargetConnection() }}
+ + + +

{{ step1InstructionMessage }}

+
+
+
+
+
+ +
+ +
{{ getBasicPropertyErrorMessage("driver") }}
+
+
+ +
+ +
+ +
{{ getBasicPropertyErrorMessage("name") }}
+
+
+
+ +
+ +
{{ getBasicPropertyErrorMessage("jndi") }}
+
+
+
+
+ + + + +

{{ step2InstructionMessage }}

+
+
+
+
+ +
+
+ + + + + + +

{{ step3InstructionMessage }}

+

Connection Properties:

+
+
+ + +
+
+ + +
+
+ + +
+
+

Connection Detail Required Properties:

+
+
+
+ + +
+
+
+
+ + +
+ +
+
+

Creation in progress

+

The connection is being created.

+
+ +
+
+

Creation was successful

+

The connection was created successfully. Click on the button to see all connections.

+ View All Connections +
+ +
+
+

Creation failed

+

The connection creation failed. Correct any properties and retry.

+
+
+
+
+ diff --git a/ngapp/src/app/connections/add-connection-wizard/add-connection-wizard.component.spec.ts b/ngapp/src/app/connections/add-connection-wizard/add-connection-wizard.component.spec.ts new file mode 100644 index 00000000..b0f193d7 --- /dev/null +++ b/ngapp/src/app/connections/add-connection-wizard/add-connection-wizard.component.spec.ts @@ -0,0 +1,36 @@ +import { async, ComponentFixture, TestBed } from "@angular/core/testing"; + +import {FormGroup, FormsModule, ReactiveFormsModule} from "@angular/forms"; +import {RouterTestingModule} from "@angular/router/testing"; +import {CoreModule} from "@core/core.module"; +import {PropertyFormPropertyComponent} from "@shared/property-form/property-form-property/property-form-property.component"; +import {PropertyFormComponent} from "@shared/property-form/property-form.component"; +import {SharedModule} from "@shared/shared.module"; +import {PatternFlyNgModule, WizardConfig, WizardStepComponent} from "patternfly-ng"; +import { AddConnectionWizardComponent } from "./add-connection-wizard.component"; + +describe("AddConnectionWizardComponent", () => { + let component: AddConnectionWizardComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + imports: [ CoreModule, FormsModule, PatternFlyNgModule, ReactiveFormsModule, RouterTestingModule, SharedModule ], + declarations: [ AddConnectionWizardComponent, FormGroup, PropertyFormComponent, PropertyFormPropertyComponent, + WizardConfig, WizardStepComponent ] + }) + .compileComponents().then(() => { + // nothing to do + }); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(AddConnectionWizardComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it("should be created", () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/ngapp/src/app/connections/add-connection-wizard/add-connection-wizard.component.ts b/ngapp/src/app/connections/add-connection-wizard/add-connection-wizard.component.ts new file mode 100644 index 00000000..5d9cdfdc --- /dev/null +++ b/ngapp/src/app/connections/add-connection-wizard/add-connection-wizard.component.ts @@ -0,0 +1,392 @@ +import { + Component, + OnInit, + ViewChild, + ViewEncapsulation, +} from "@angular/core"; + +import { FormControl, FormGroup} from "@angular/forms"; +import { AbstractControl } from "@angular/forms"; +import { Validators } from "@angular/forms"; +import { Router } from "@angular/router"; +import { ConnectionService} from "@connections/shared/connection.service"; +import { ConnectionsConstants } from "@connections/shared/connections-constants"; +import { NewConnection } from "@connections/shared/new-connection.model"; +import { TemplateDefinition} from "@connections/shared/template-definition.model"; +import { LoggerService } from "@core/logger.service"; +import { PropertyDefinition } from "@shared/property-form/property-definition.model"; +import {PropertyFormComponent} from "@shared/property-form/property-form.component"; +import { WizardComponent } from "patternfly-ng"; +import { WizardEvent } from "patternfly-ng"; +import { WizardStepConfig } from "patternfly-ng"; +import { WizardConfig } from "patternfly-ng"; + +@Component({ + encapsulation: ViewEncapsulation.None, + selector: "app-add-connection-wizard", + templateUrl: "./add-connection-wizard.component.html" +}) +export class AddConnectionWizardComponent implements OnInit { + public readonly connectionSummaryLink: string = ConnectionsConstants.connectionsRootPath; + + // Wizard Config + public wizardConfig: WizardConfig; + + @ViewChild("wizard") private wizard: WizardComponent; + @ViewChild(PropertyFormComponent) private detailPropForm: PropertyFormComponent; + + private connectionService: ConnectionService; + private allTemplates: TemplateDefinition[] = []; + private templatesLoaded = false; + private detailPropertiesLoaded = false; + private basicPropertyForm: FormGroup; + private detailProperties: Array> = []; + private requiredPropValues: Array<[string, string]> = []; + + private createComplete = true; + private createSuccessful = false; + + // Wizard Step 1 + private step1Config: WizardStepConfig; + + // Wizard Step 2 + private step2Config: WizardStepConfig; + + // Wizard Step 3 + private step3Config: WizardStepConfig; + private step3aConfig: WizardStepConfig; + private step3bConfig: WizardStepConfig; + private logger: LoggerService; + private router: Router; + + constructor( router: Router, connectionService: ConnectionService, logger: LoggerService ) { + this.connectionService = connectionService; + this.router = router; + this.logger = logger; + this.createBasicPropertyForm(); + } + + /* + * Initialization + */ + public ngOnInit(): void { + // Step 1 - Basic Properties + this.step1Config = { + id: "step1", + priority: 0, + title: "Basic Properties", + allowClickNav: false + } as WizardStepConfig; + + // Step 2 - Advanced Properties + this.step2Config = { + id: "step2", + priority: 0, + title: "Detail Properties", + allowClickNav: false + } as WizardStepConfig; + + // Step 3 - Review and Create + this.step3Config = { + id: "step3", + priority: 2, + title: "Review and Create", + allowClickNav: false + } as WizardStepConfig; + this.step3aConfig = { + id: "step3a", + priority: 0, + title: "Review", + allowClickNav: false + } as WizardStepConfig; + this.step3bConfig = { + id: "step3b", + priority: 1, + title: "Create", + allowClickNav: false + } as WizardStepConfig; + + // Wizard Configuration + this.wizardConfig = { + embedInPage: true, + loadingTitle: "Add Connection Wizard loading", + loadingSecondaryInfo: "Please wait for the wizard to finish loading...", + title: "Add Connection", + sidebarStyleClass: "example-wizard-sidebar", + stepStyleClass: "example-wizard-step" + } as WizardConfig; + + // Load the templates for the first step + this.templatesLoaded = false; + this.connectionService + .getConnectionTemplates() + .subscribe( + (templates) => { + this.allTemplates = templates; + this.templatesLoaded = true; + }, + (error) => { + this.logger.error("[AddConnectionWizardComponent] Error getting templates: %o", error); + } + ); + + this.setNavAway(false); + } + + // ---------------- + // Public Methods + // ---------------- + + /* + * Return the name valid state + */ + public get nameValid(): boolean { + return this.basicPropertyForm.controls["name"].valid; + } + + /* + * Return the driver valid state + */ + public get driverValid(): boolean { + return this.basicPropertyForm.controls["driver"].valid; + } + + /* + * Return the jndi valid state + */ + public get jndiValid(): boolean { + return this.basicPropertyForm.controls["jndi"].valid; + } + + /* + * Step 1 instruction message + */ + public get step1InstructionMessage(): string { + if (!this.driverValid) { + return "Please select a Connection type"; + } else if (!this.nameValid) { + return "Please enter a name for the Connection"; + } else if (!this.jndiValid) { + return "Please enter a JNDI identifier for the Connection"; + } else { + return "When finished entering properties, click Next to continue"; + } + } + + /* + * Step 2 instruction message + */ + public get step2InstructionMessage(): string { + return "Enter advanced properties for the Connection, then click Next to continue"; + } + + /* + * Step 3 instruction message + */ + public get step3InstructionMessage(): string { + return "Review your entries. When finished, click Create to create the Connection"; + } + + /* + * Return the name error message if invalid + */ + public getBasicPropertyErrorMessage( name: string ): string { + const control: AbstractControl = this.basicPropertyForm.controls[name]; + if (control.invalid) { + // The first error found is returned + if (control.errors.required) { + return name + " is a required property"; + } + } + return ""; + } + + /* + * Return the array of template names + */ + public get templateNames(): string[] { + const templateNames: string[] = []; + for ( const templ of this.allTemplates ) { + templateNames.push(templ.getId()); + } + return templateNames.sort(); + } + + public nextClicked($event: WizardEvent): void { + // When leaving page 1, load the driver-specific property definitions + if ($event.step.config.id === "step1") { + this.loadPropertyDefinitions(this.basicPropertyForm.controls["driver"].value); + } + } + + public cancelClicked($event: WizardEvent): void { + const link: string[] = [ ConnectionsConstants.connectionsRootPath ]; + this.logger.log("[AddConnectionWizardComponent] Navigating to: %o", link); + this.router.navigate(link).then(() => { + // nothing to do + }); + } + + /* + * Return the array of [name,value] for the required properties. + * So that the current required property entries can be shown on page 3 (review) + */ + public get requiredPropertyValues(): Array<[string, string]> { + return this.requiredPropValues; + } + + /* + * Create the Connection via komodo REST interface, + * using the currently entered properties + */ + public createConnection(): void { + this.createComplete = false; + this.wizardConfig.done = true; + + const connection: NewConnection = new NewConnection(); + + // Connection basic properties from step 1 + connection.setName(this.connectionName); + connection.setJndiName(this.connectionJndiName); + connection.setDriverName(this.connectionDriverName); + connection.setJdbc(this.isJdbc); + + // Connection advanced properties from step 2 + const propMap: Map = this.detailPropForm.propertyValuesNonDefault; + connection.setProperties(propMap); + + this.connectionService + .createConnection(connection) + .subscribe( + () => { + this.createComplete = true; + this.createSuccessful = true; + this.step3bConfig.nextEnabled = false; + }, + (error) => { + this.createComplete = true; + this.createSuccessful = false; + } + ); + } + + public stepChanged($event: WizardEvent): void { + if ($event.step.config.id === "step1") { + this.updatePage1ValidStatus(); + } else if ($event.step.config.id === "step3a") { + this.wizardConfig.nextTitle = "Create"; + this.updateRequiredPropertyValues(); + } else if ($event.step.config.id === "step3b") { + // Note: The next button is not disabled by default when wizard is done + this.step3Config.nextEnabled = false; + } else { + this.wizardConfig.nextTitle = "Next >"; + } + } + + public updatePage1ValidStatus( ): void { + this.step1Config.nextEnabled = this.basicPropertyForm.valid; + this.setNavAway(this.step1Config.nextEnabled); + } + + /** + * @returns {string} the name of the connection + */ + public get connectionName(): string { + return this.basicPropertyForm.controls["name"].value; + } + + /** + * @returns {string} the driver name of the connection + */ + public get connectionDriverName(): string { + return this.basicPropertyForm.controls["driver"].value; + } + + /** + * @returns {string} the JNDI name of the connection + */ + public get connectionJndiName(): string { + return this.basicPropertyForm.controls["jndi"].value; + } + + /** + * @returns {boolean} 'true' if connection is JDBC + */ + public get isJdbc(): boolean { + return true; + } + + // ---------------- + // Private Methods + // ---------------- + + /* + * Create the BasicProperty form (page 1) + */ + private createBasicPropertyForm(): void { + this.basicPropertyForm = new FormGroup({ + name: new FormControl("", Validators.required), + jndi: new FormControl("", Validators.required), + driver: new FormControl("", Validators.required) + }); + this.onChanges(); + } + + /* + * React to basic property changes - update the page 1 status + */ + private onChanges(): void { + this.basicPropertyForm.valueChanges.subscribe((val) => { + this.updatePage1ValidStatus( ); + }); + } + + private setNavAway(allow: boolean): void { + this.step1Config.allowNavAway = allow; + } + + /** + * Load the driver-specific property definitions + */ + private loadPropertyDefinitions( driverName ): void { + this.detailPropertiesLoaded = false; + const that = this; + this.connectionService + .getConnectionTemplateProperties(driverName) + .subscribe( + (props) => { + that.detailProperties = props; + this.detailPropertiesLoaded = true; + }, + (error) => { + this.logger.error("[AddConnectionWizardComponent] Error: %o", error); + // this.error(error); + this.detailPropertiesLoaded = false; + } + ); + } + + /** + * @returns {PropertyDefinition[]} the property definitions (can be null) + */ + private getPropertyDefinitions(): Array> { + return this.detailProperties; + } + + /** + * Generates array of required property values when page 3 (Review) is shown + */ + private updateRequiredPropertyValues(): void { + const propMap: Map = new Map(); + for (const property of this.detailProperties) { + if (property.isRequired()) { + const name = property.getId(); + const theValue = this.detailPropForm.getPropertyValue(name); + propMap.set(name, theValue); + } + } + this.requiredPropValues = Array.from(propMap); + } + +} diff --git a/ngapp/src/app/connections/add-connection/add-connection.component.css b/ngapp/src/app/connections/add-connection/add-connection.component.css index a9b865e5..e69de29b 100644 --- a/ngapp/src/app/connections/add-connection/add-connection.component.css +++ b/ngapp/src/app/connections/add-connection/add-connection.component.css @@ -1,12 +0,0 @@ -.add-connection-form { - padding: 15px -} - -.add-connection-form /*.form-instructions*/ { - font-size: 15px; - padding-top: 10px -} - -.add-connection-form .form-instructions ol { - padding-left: 20px; -} diff --git a/ngapp/src/app/connections/add-connection/add-connection.component.html b/ngapp/src/app/connections/add-connection/add-connection.component.html index 7576883d..a1d573d2 100644 --- a/ngapp/src/app/connections/add-connection/add-connection.component.html +++ b/ngapp/src/app/connections/add-connection/add-connection.component.html @@ -7,10 +7,11 @@
-

Add Connection

+

-
- + +
+
diff --git a/ngapp/src/app/connections/add-connection/add-connection.component.spec.ts b/ngapp/src/app/connections/add-connection/add-connection.component.spec.ts index 6d996ee2..1395eb59 100644 --- a/ngapp/src/app/connections/add-connection/add-connection.component.spec.ts +++ b/ngapp/src/app/connections/add-connection/add-connection.component.spec.ts @@ -1,12 +1,9 @@ import { async, ComponentFixture, TestBed } from "@angular/core/testing"; -import { FormsModule } from "@angular/forms"; -import { HttpModule } from "@angular/http"; + import { RouterTestingModule } from "@angular/router/testing"; -import { AddConnectionComponent } from "@connections/add-connection/add-connection.component"; -import { AddConnectionFormComponent } from "@connections/shared/add-connection-form/add-connection-form.component"; -import { ConnectionService } from "@connections/shared/connection.service"; -import { MockConnectionService } from "@connections/shared/mock-connection.service"; +import { AddConnectionWizardComponent } from "@connections/add-connection-wizard/add-connection-wizard.component"; import { CoreModule } from "@core/core.module"; +import { AddConnectionComponent } from "./add-connection.component"; describe("AddConnectionComponent", () => { let component: AddConnectionComponent; @@ -14,11 +11,8 @@ describe("AddConnectionComponent", () => { beforeEach(async(() => { TestBed.configureTestingModule({ - imports: [ CoreModule, FormsModule, HttpModule, RouterTestingModule ], - declarations: [ AddConnectionComponent, AddConnectionFormComponent ], - providers: [ - { provide: ConnectionService, useClass: MockConnectionService }, - ] + imports: [ CoreModule, RouterTestingModule ], + declarations: [ AddConnectionComponent, AddConnectionWizardComponent ] }) .compileComponents().then(() => { // nothing to do diff --git a/ngapp/src/app/connections/add-connection/add-connection.component.ts b/ngapp/src/app/connections/add-connection/add-connection.component.ts index 309d10d0..738e69da 100644 --- a/ngapp/src/app/connections/add-connection/add-connection.component.ts +++ b/ngapp/src/app/connections/add-connection/add-connection.component.ts @@ -1,72 +1,21 @@ -/** - * @license - * Copyright 2017 JBoss Inc - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { Component } from "@angular/core"; -import { ViewChild } from "@angular/core"; -import { ActivatedRoute } from "@angular/router"; -import { Router } from "@angular/router"; -import { AddConnectionFormComponent } from "@connections/shared/add-connection-form/add-connection-form.component"; -import { ConnectionService } from "@connections/shared/connection.service"; -import { ConnectionsConstants } from "@connections/shared/connections-constants"; -import { NewConnection } from "@connections/shared/new-connection.model"; -import { LoggerService } from "@core/logger.service"; -import { AbstractPageComponent } from "@shared/abstract-page.component"; +import { Component, OnInit } from "@angular/core"; +import {ConnectionsConstants} from "@connections/shared/connections-constants"; @Component({ - moduleId: module.id, - selector: "app-add-connection", + selector: "app-add-connection-page", templateUrl: "./add-connection.component.html", styleUrls: ["./add-connection.component.css"] }) -export class AddConnectionComponent extends AbstractPageComponent { +export class AddConnectionComponent implements OnInit { public readonly connectionsLink = ConnectionsConstants.connectionsRootPath; - private router: Router; - private connectionService: ConnectionService; - - @ViewChild(AddConnectionFormComponent) private form: AddConnectionFormComponent; - - constructor(router: Router, route: ActivatedRoute, connectionService: ConnectionService, logger: LoggerService ) { - super(route, logger); - this.router = router; - this.connectionService = connectionService; + constructor() { + // Nothing } - /** - * Called when the Add Connection form (component) emits a "add-connection" event. This is bound to - * from the add-connection.page.html template. - * @param {NewConnection} connection - */ - public onCreateConnection(connection: NewConnection): void { - this.logger.log("[AddConnectionComponent] onCreateConnection(): " + JSON.stringify(connection)); - this.connectionService - .createConnection(connection) - .subscribe( - () => { - this.form.connectionCreated(); - const link: string[] = [ ConnectionsConstants.connectionsRootPath ]; - this.logger.log("[AddConnectionComponent] Navigating to: %o", link); - this.router.navigate(link).then(() => { - // nothing to do - }); - } - ); - + public ngOnInit(): void { + // Nothing } } diff --git a/ngapp/src/app/connections/connections-cards/connections-cards.component.html b/ngapp/src/app/connections/connections-cards/connections-cards.component.html index 184bc372..6a1ac4e1 100644 --- a/ngapp/src/app/connections/connections-cards/connections-cards.component.html +++ b/ngapp/src/app/connections/connections-cards/connections-cards.component.html @@ -9,16 +9,13 @@

{{ connection.getId() }} -


-
- JNDI: - {{ connection.getJndiName() }}    +
+ JNDI:  {{ connection.getJndiName() }}
-
- Driver: - {{ connection.getDriverName() }}    +
+ Driver:  {{ connection.getDriverName() }}
-
- JNDI: - {{ connection.getDriverName() }}    +
+ JNDI:  {{ connection.getJndiName() }}    
-
- Driver: - {{ connection.getDriverName() }}    +
+ Driver:  {{ connection.getDriverName() }}
diff --git a/ngapp/src/app/connections/connections.component.ts b/ngapp/src/app/connections/connections.component.ts index 1d75907c..cda917d3 100644 --- a/ngapp/src/app/connections/connections.component.ts +++ b/ngapp/src/app/connections/connections.component.ts @@ -132,13 +132,6 @@ export class ConnectionsComponent extends AbstractPageComponent { // this.selectedConnections.splice(this.selectedConnections.indexOf(connection), 1); } - public onEdit(connName: string): void { - const link: string[] = [ ConnectionsConstants.editConnectionPath ]; - this.router.navigate(link).then(() => { - // nothing to do - }); - } - public onDelete(connName: string): void { this.connectionNameForDelete = connName; this.confirmDeleteDialog.open(); diff --git a/ngapp/src/app/connections/connections.module.ts b/ngapp/src/app/connections/connections.module.ts index 56921641..20458a0d 100644 --- a/ngapp/src/app/connections/connections.module.ts +++ b/ngapp/src/app/connections/connections.module.ts @@ -17,18 +17,18 @@ import { CommonModule } from "@angular/common"; import { NgModule } from "@angular/core"; -import { FormsModule } from "@angular/forms"; +import {FormsModule, ReactiveFormsModule} from "@angular/forms"; import { RouterModule } from "@angular/router"; -import { AddConnectionComponent } from "@connections/add-connection/add-connection.component"; import { ConnectionsCardsComponent } from "@connections/connections-cards/connections-cards.component"; import { ConnectionsListComponent } from "@connections/connections-list/connections-list.component"; import { ConnectionsRoutingModule } from "@connections/connections-routing.module"; import { ConnectionsComponent } from "@connections/connections.component"; -import { EditConnectionComponent } from "@connections/edit-connection/edit-connection.component"; -import { AddConnectionFormComponent } from "@connections/shared/add-connection-form/add-connection-form.component"; import { ConnectionService } from "@connections/shared/connection.service"; import { CoreModule } from "@core/core.module"; import { SharedModule } from "@shared/shared.module"; +import { PatternFlyNgModule } from "patternfly-ng"; +import { AddConnectionComponent } from "./add-connection/add-connection.component"; +import { AddConnectionWizardComponent } from "./add-connection-wizard/add-connection-wizard.component"; @NgModule({ imports: [ @@ -37,15 +37,16 @@ import { SharedModule } from "@shared/shared.module"; CoreModule, SharedModule, FormsModule, - RouterModule + ReactiveFormsModule, + RouterModule, + PatternFlyNgModule ], declarations: [ - AddConnectionComponent, - AddConnectionFormComponent, ConnectionsCardsComponent, ConnectionsComponent, ConnectionsListComponent, - EditConnectionComponent + AddConnectionWizardComponent, + AddConnectionComponent ], providers: [ ConnectionService diff --git a/ngapp/src/app/connections/edit-connection/edit-connection.component.css b/ngapp/src/app/connections/edit-connection/edit-connection.component.css deleted file mode 100644 index 1561fd4c..00000000 --- a/ngapp/src/app/connections/edit-connection/edit-connection.component.css +++ /dev/null @@ -1,12 +0,0 @@ -.edit-connection-form { - padding: 15px -} - -.edit-connection-form /*.form-instructions*/ { - font-size: 15px; - padding-top: 10px -} - -.edit-connection-form .form-instructions ol { - padding-left: 20px; -} diff --git a/ngapp/src/app/connections/edit-connection/edit-connection.component.html b/ngapp/src/app/connections/edit-connection/edit-connection.component.html deleted file mode 100644 index f4550b53..00000000 --- a/ngapp/src/app/connections/edit-connection/edit-connection.component.html +++ /dev/null @@ -1,21 +0,0 @@ -
-
- -
  • -
  • -
    -
    -
    -
    -

    Connection Properties

    -
    -
    - -
    - -
    -
    diff --git a/ngapp/src/app/connections/edit-connection/edit-connection.component.spec.ts b/ngapp/src/app/connections/edit-connection/edit-connection.component.spec.ts deleted file mode 100644 index 531a69dd..00000000 --- a/ngapp/src/app/connections/edit-connection/edit-connection.component.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { async, ComponentFixture, TestBed } from "@angular/core/testing"; -import { ReactiveFormsModule } from "@angular/forms"; -import { HttpModule } from "@angular/http"; -import { RouterTestingModule } from "@angular/router/testing"; -import { ConnectionService } from "@connections/shared/connection.service"; -import { MockConnectionService } from "@connections/shared/mock-connection.service"; -import { CoreModule } from "@core/core.module"; -import { PropertyFormPropertyComponent } from "@shared/property-form/property-form-property/property-form-property.component"; -import { PropertyFormComponent } from "@shared/property-form/property-form.component"; -import { EditConnectionComponent } from "./edit-connection.component"; - -describe("EditConnectionComponent", () => { - let component: EditConnectionComponent; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - imports: [ CoreModule, HttpModule, ReactiveFormsModule, RouterTestingModule ], - declarations: [ EditConnectionComponent, PropertyFormComponent, PropertyFormPropertyComponent ], - providers: [ - { provide: ConnectionService, useClass: MockConnectionService }, - ] - }) - .compileComponents().then(() => { - // nothing to do - }); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(EditConnectionComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it("should be created", () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/ngapp/src/app/connections/edit-connection/edit-connection.component.ts b/ngapp/src/app/connections/edit-connection/edit-connection.component.ts deleted file mode 100644 index 76ac0b06..00000000 --- a/ngapp/src/app/connections/edit-connection/edit-connection.component.ts +++ /dev/null @@ -1,75 +0,0 @@ -/** - * @license - * Copyright 2017 JBoss Inc - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { ViewChild } from "@angular/core"; -import { Component } from "@angular/core"; -import { ActivatedRoute } from "@angular/router"; -import { Router } from "@angular/router"; -import { ConnectionService } from "@connections/shared/connection.service"; -import { ConnectionsConstants } from "@connections/shared/connections-constants"; -import { LoggerService } from "@core/logger.service"; -import { AbstractPageComponent } from "@shared/abstract-page.component"; -import { PropertyDefinition } from "@shared/property-form/property-definition.model"; -import { PropertyFormComponent } from "@shared/property-form/property-form.component"; - -@Component({ - moduleId: module.id, - selector: "app-edit-connection", - templateUrl: "./edit-connection.component.html", - styleUrls: ["./edit-connection.component.css"] -}) -export class EditConnectionComponent extends AbstractPageComponent { - - public readonly connectionsLink: string = ConnectionsConstants.connectionsRootPath; - - private router: Router; - private connectionService: ConnectionService; - private properties: Array> = []; - @ViewChild(PropertyFormComponent) private connectionForm: PropertyFormComponent; - - constructor(router: Router, route: ActivatedRoute, connectionService: ConnectionService, logger: LoggerService) { - super(route, logger); - this.router = router; - this.connectionService = connectionService; - } - - public loadAsyncPageData(): void { - const that = this; - this.connectionService - .getConnectionTemplateProperties("h2") - .subscribe( - (props) => { - that.properties = props; - that.connectionForm.setFormProperties(that.properties); - that.connectionForm.updateForm(); - console.log("[AddConnectionComponent] Navigating to: %o"); - }, - (error) => { - console.error("[ConnectionsComponent] Error getting connections."); - this.error(error); - } - ); - } - - /** - * @returns {PropertyDefinition[]} the property definitions (can be null) - */ - public getPropertyDefinitions(): Array> { - return this.properties; - } - -} diff --git a/ngapp/src/app/connections/shared/add-connection-form/add-connection-form.component.css b/ngapp/src/app/connections/shared/add-connection-form/add-connection-form.component.css deleted file mode 100644 index c6783af4..00000000 --- a/ngapp/src/app/connections/shared/add-connection-form/add-connection-form.component.css +++ /dev/null @@ -1,68 +0,0 @@ -select { - width: auto; -} - -/* -.create-connection-form-panel.dragging { - border: 1px dashed #39a5dc; - background-color: #eef; -} -*/ - -.create-connection-form-panel { - padding-top: 25px; -} - -/* -span.disabled { - color: #999; -} -*/ - -.dropdown ul { - max-height: 250px; - overflow: auto; -} - -/* -div.spinner { - display: inline-block; - margin-right: 5px; -} -*/ - -/* -.platform-toggle { - display: inline-block; - text-align: center; - cursor: pointer; - border: 1px solid transparent; - padding: 5px; - margin-right: 8px; - border-radius: 3px; -} -.platform-toggle:hover { - border: 1px solid #bee1f4; - background-color: #def3ff; -} -.platform-toggle.selected { - background-color: #0088ce; - color: white; - cursor: default; - border: 1px solid transparent; -} -.platform-toggle.disabled { - opacity: 0.6; - cursor: not-allowed; -} -.platform-toggle span.fa { - font-size: 32px; -} -.platform-toggle span.lbl { - font-size: 14px; -} - -.account-link-warning { - margin-top: 10px; -} -*/ diff --git a/ngapp/src/app/connections/shared/add-connection-form/add-connection-form.component.html b/ngapp/src/app/connections/shared/add-connection-form/add-connection-form.component.html deleted file mode 100644 index dbeebae0..00000000 --- a/ngapp/src/app/connections/shared/add-connection-form/add-connection-form.component.html +++ /dev/null @@ -1,43 +0,0 @@ -
    -

    Connection Properties

    -
    -
    -
    - -
    - -
    -
    -
    - -
    - -
    -
    -
    - -
    - -
    -
    -
    - -
    - -
    -
    -
    -
    -
    - - -
    -
    -
    -
    -
    diff --git a/ngapp/src/app/connections/shared/add-connection-form/add-connection-form.component.spec.ts b/ngapp/src/app/connections/shared/add-connection-form/add-connection-form.component.spec.ts deleted file mode 100644 index bd3417a6..00000000 --- a/ngapp/src/app/connections/shared/add-connection-form/add-connection-form.component.spec.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { async, ComponentFixture, inject, TestBed } from "@angular/core/testing"; -import { FormsModule } from "@angular/forms"; -import { RouterTestingModule } from "@angular/router/testing"; -import { AddConnectionFormComponent } from "@connections/shared/add-connection-form/add-connection-form.component"; -import { LoggerService } from "@core/logger.service"; - -describe("AddConnectionFormComponent", () => { - let component: AddConnectionFormComponent; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - imports: [ FormsModule, RouterTestingModule ], - declarations: [ AddConnectionFormComponent ], - providers: [ LoggerService ] - }) - .compileComponents().then(() => { - // nothing to do - }); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(AddConnectionFormComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it("should be created", inject([ LoggerService ], ( logger: LoggerService ) => { - expect(component).toBeTruthy(); - })); -}); diff --git a/ngapp/src/app/connections/shared/add-connection-form/add-connection-form.component.ts b/ngapp/src/app/connections/shared/add-connection-form/add-connection-form.component.ts deleted file mode 100644 index a4e037d0..00000000 --- a/ngapp/src/app/connections/shared/add-connection-form/add-connection-form.component.ts +++ /dev/null @@ -1,140 +0,0 @@ -/** - * @license - * Copyright 2017 JBoss Inc - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { Component, EventEmitter, Output } from "@angular/core"; -import { Router } from "@angular/router"; -import { ConnectionsConstants } from "@connections/shared/connections-constants"; -import { NewConnection } from "@connections/shared/new-connection.model"; -import { LoggerService } from "@core/logger.service"; - -@Component({ - moduleId: module.id, - selector: "app-add-connection-form", - templateUrl: "./add-connection-form.component.html", - styleUrls: ["./add-connection-form.component.css"] -}) -export class AddConnectionFormComponent { - - private creating = false; - private logger: LoggerService; - private model = new NewConnection(); - private router: Router; - - @Output() private createConnection = new EventEmitter(); - - constructor( router: Router, logger: LoggerService ) { - this.router = router; - this.logger = logger; - } - - /** - * @returns {string} the name of the connection - */ - public get connectionName(): string { - return this.model.getName(); - } - - /** - * @param {string} name the new connection name - */ - public set connectionName( name: string ) { - this.model.setName( name ); - } - - /** - * @returns {string} the driver name of the connection - */ - public get connectionDriverName(): string { - return this.model.getDriverName(); - } - - /** - * @param {string} driverName the new connection driver name - */ - public set connectionDriverName( driverName: string ) { - this.model.setDriverName( driverName ); - } - - /** - * @returns {boolean} true if a JDBC connection - */ - public get connectionIsJdbc(): boolean { - return this.model.isJdbc(); - } - - /** - * @param {boolean} isJdbc true if the new connection is a JDBC connection - */ - public set connectionIsJdbc( isJdbc: boolean ) { - this.model.setJdbc( isJdbc ); - } - - /** - * @returns {string} the JNDI name of the connection - */ - public get connectionJndiName(): string { - return this.model.getJndiName(); - } - - /** - * @param {string} jndiName the new connection JNDI name - */ - public set connectionJndiName( jndiName: string ) { - this.model.setJndiName( jndiName ); - } - - public currentConnection(): string { - return JSON.stringify(this.model); - } - - /** - * Called when the user clicks the "Create Connection" submit button on the form. - */ - public onCreateConnection(): void { - const connection: NewConnection = new NewConnection(); - connection.setName(this.model.getName()); - connection.setJndiName(this.model.getJndiName()); - connection.setDriverName(this.model.getDriverName()); - connection.setJdbc(this.model.isJdbc()); - - this.logger.log("[AddConnectionFormComponent] Firing create-connection event: %o", connection); - - this.creating = true; - this.createConnection.emit(connection); - } - - public cancelAdd(): void { - const link: string[] = [ ConnectionsConstants.connectionsRootPath ]; - this.router.navigate(link).then(() => { - // nothing to do - }); - } - - /** - * @returns {boolean} 'true' if the connection is being created - */ - public get creatingConnection(): boolean { - return this.creating; - } - - /** - * Called when the connection has been created. - */ - public connectionCreated(): void { - this.creating = false; - } -} diff --git a/ngapp/src/app/connections/shared/connection.service.ts b/ngapp/src/app/connections/shared/connection.service.ts index 256f431a..d401ad08 100644 --- a/ngapp/src/app/connections/shared/connection.service.ts +++ b/ngapp/src/app/connections/shared/connection.service.ts @@ -20,6 +20,7 @@ import { Http } from "@angular/http"; import { Connection } from "@connections/shared/connection.model"; import { ConnectionsConstants } from "@connections/shared/connections-constants"; import { NewConnection } from "@connections/shared/new-connection.model"; +import { TemplateDefinition } from "@connections/shared/template-definition.model"; import { ApiService } from "@core/api.service"; import { LoggerService } from "@core/logger.service"; import { environment } from "@environments/environment"; @@ -78,6 +79,20 @@ export class ConnectionService extends ApiService { .catch(this.handleError); } + /** + * Get the connection templates from the komodo rest interface + * @returns {Observable>>} + */ + public getConnectionTemplates(): Observable { + return this.http + .get( environment.komodoTeiidUrl + "/templates", this.getAuthRequestOptions()) + .map((response) => { + const templates = response.json(); + return templates.map((template) => TemplateDefinition.create( template )); + }) + .catch(this.handleError); + } + /** * Get the connection template property definitions from the komodo rest interface * @param {string} templateName diff --git a/ngapp/src/app/connections/shared/connections-constants.ts b/ngapp/src/app/connections/shared/connections-constants.ts index 17d5f152..571694ed 100644 --- a/ngapp/src/app/connections/shared/connections-constants.ts +++ b/ngapp/src/app/connections/shared/connections-constants.ts @@ -17,8 +17,4 @@ export class ConnectionsConstants { public static readonly addConnectionRoute = ConnectionsConstants.connectionsRootRoute + "/add-connection"; public static readonly addConnectionPath = ConnectionsConstants.connectionsRootPath + "/add-connection"; - - public static readonly editConnectionRoute = ConnectionsConstants.connectionsRootRoute + "/edit-connection"; - public static readonly editConnectionPath = ConnectionsConstants.connectionsRootPath + "/edit-connection"; - } diff --git a/ngapp/src/app/connections/shared/new-connection.model.ts b/ngapp/src/app/connections/shared/new-connection.model.ts index 903eee0a..2a36cfd7 100644 --- a/ngapp/src/app/connections/shared/new-connection.model.ts +++ b/ngapp/src/app/connections/shared/new-connection.model.ts @@ -106,7 +106,17 @@ export class NewConnection { jndiName: this.jndiName, driverName: this.driverName, jdbc: this.jdbc, - parameters: this.properties + parameters: this.strMapToObj(this.properties) }; } + + private strMapToObj(strMap: Map): any { + const obj = Object.create(null); + for (const [k, v] of Array.from(strMap)) { + // We don’t escape the key '__proto__' + // which can cause problems on older engines + obj[k] = v; + } + return obj; + } } diff --git a/ngapp/src/app/connections/shared/template-definition.model.ts b/ngapp/src/app/connections/shared/template-definition.model.ts new file mode 100644 index 00000000..f707fbd2 --- /dev/null +++ b/ngapp/src/app/connections/shared/template-definition.model.ts @@ -0,0 +1,87 @@ +/** + * @license + * Copyright 2017 JBoss Inc + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export class TemplateDefinition { + private keng__id: string; + private isJdbc: boolean; + private entries: string[]; + + /** + * @param {Object} json the JSON representation of a Template + * @returns {TemplateDefinition} the new TemplateDefinition (never null) + */ + public static create( json: object = {} ): TemplateDefinition { + const template = new TemplateDefinition(); + template.setValues( json ); + return template; + } + + constructor() { + // nothing to do + } + + /** + * @returns {string} the property id + */ + public getId(): string { + return this.keng__id; + } + + /** + * @returns {boolean} 'true' if jdbc + */ + public getJdbc(): boolean { + return this.isJdbc; + } + + /** + * @returns {string[]} the array of entries + */ + public getEntries(): string[] { + return this.entries; + } + + /** + * @param {string} id the property id + */ + public setId( id?: string ): void { + this.keng__id = id ? id : null; + } + + /** + * @param {boolean} jdbc 'true' if template is jdbc + */ + public setJdbc( jdbc?: boolean ): void { + this.isJdbc = jdbc ? jdbc : null; + } + + /** + * @param {string[]} entries the array of entries + */ + public setEntries( entries?: string[] ): void { + this.entries = entries ? entries : null; + } + + /** + * Set all object values using the supplied Template json + * @param {Object} values + */ + public setValues(values: object = {}): void { + Object.assign(this, values); + } + +} diff --git a/ngapp/src/app/shared/property-form/property-definition.model.ts b/ngapp/src/app/shared/property-form/property-definition.model.ts index ecd79fbb..011cce13 100644 --- a/ngapp/src/app/shared/property-form/property-definition.model.ts +++ b/ngapp/src/app/shared/property-form/property-definition.model.ts @@ -102,6 +102,9 @@ export class PropertyDefinition { if (this.isConstrainedToAllowedValues()) { return "dropdown"; } else if (className === "java.lang.String") { + if (this.isMasked() || this.getId() === "password") { + return "maskedTextbox"; + } return "textbox"; } else if (className === "java.lang.Boolean") { return "checkbox"; diff --git a/ngapp/src/app/shared/property-form/property-form-property/property-form-property.component.html b/ngapp/src/app/shared/property-form/property-form-property/property-form-property.component.html index 07ef24ac..96702d1d 100644 --- a/ngapp/src/app/shared/property-form/property-form-property/property-form-property.component.html +++ b/ngapp/src/app/shared/property-form/property-form-property/property-form-property.component.html @@ -6,6 +6,9 @@ + + diff --git a/ngapp/src/app/shared/property-form/property-form-property/property-form-property.component.ts b/ngapp/src/app/shared/property-form/property-form-property/property-form-property.component.ts index 00c5ccac..ab5a00b1 100644 --- a/ngapp/src/app/shared/property-form/property-form-property/property-form-property.component.ts +++ b/ngapp/src/app/shared/property-form/property-form-property/property-form-property.component.ts @@ -26,6 +26,7 @@ import { PropertyDefinition } from "@shared/property-form/property-definition.mo }) export class PropertyFormPropertyComponent { + @Input() private property: PropertyDefinition; @Input() private form: FormGroup; diff --git a/ngapp/src/app/shared/property-form/property-form.component.html b/ngapp/src/app/shared/property-form/property-form.component.html index 6f486ca0..95ac15ae 100644 --- a/ngapp/src/app/shared/property-form/property-form.component.html +++ b/ngapp/src/app/shared/property-form/property-form.component.html @@ -1,16 +1,7 @@
    -
    - +
    - -
    - -
    - -
    - Saved the following values
    {{ payLoad }} -
    diff --git a/ngapp/src/app/shared/property-form/property-form.component.ts b/ngapp/src/app/shared/property-form/property-form.component.ts index 3fd0c1f1..a7de629d 100644 --- a/ngapp/src/app/shared/property-form/property-form.component.ts +++ b/ngapp/src/app/shared/property-form/property-form.component.ts @@ -1,6 +1,7 @@ import { Component, Input, OnInit } from "@angular/core"; import { FormControl, FormGroup, Validators } from "@angular/forms"; +import {ObjectUtils} from "@core/utils/object-utils"; import { PropertyDefinition } from "@shared/property-form/property-definition.model"; @Component({ @@ -12,7 +13,6 @@ export class PropertyFormComponent implements OnInit { @Input() private formProperties: Array> = []; private form: FormGroup; - private payLoad = ""; constructor( ) { // Nothing to do @@ -26,14 +26,44 @@ export class PropertyFormComponent implements OnInit { this.form = this.toFormGroup(this.formProperties); } - public onSubmit(): void { - this.payLoad = JSON.stringify(this.form.value); - } - public setFormProperties( props: Array> ): void { this.formProperties = props; } + /* + * Get the properties from the form that have values that aren't default values + */ + public get propertyValuesNonDefault(): Map { + const propertyMap: Map = new Map(); + for (const property of this.formProperties) { + const theValue = this.form.controls[property.getId()].value; + if (!ObjectUtils.isNullOrUndefined(theValue)) { + if (typeof theValue === "string" && theValue.length > 0) { + if (theValue !== property.theDefaultValue) { + propertyMap.set(property.getId(), theValue); + } + } else if (typeof theValue === "boolean") { + if (theValue.toString() !== property.theDefaultValue) { + propertyMap.set(property.getId(), theValue.toString()); + } + } + } + } + return propertyMap; + } + + /* + * Get the property value + */ + public getPropertyValue(name: string): string { + const theValue = this.form.controls[name].value; + if (typeof theValue === "string") { + return theValue; + } else { + return theValue.toString(); + } + } + /* NOTE: The appropriate Validators for properties are applied in this function. Angular has a number of built-in validators. For a complete listing of the built-in validators, go here : https://angular.io/api/forms/Validators diff --git a/ngapp/src/app/shared/shared.module.ts b/ngapp/src/app/shared/shared.module.ts index 9b12a962..b9d82c4f 100644 --- a/ngapp/src/app/shared/shared.module.ts +++ b/ngapp/src/app/shared/shared.module.ts @@ -43,7 +43,8 @@ import { PropertyFormComponent } from "./property-form/property-form.component"; ConfirmDeleteComponent, PageErrorComponent, PageNotFoundComponent, - PropertyFormComponent + PropertyFormComponent, + PropertyFormPropertyComponent ] }) export class SharedModule {