new training stuff

This commit is contained in:
Manuel Romero
2023-05-09 16:23:45 +02:00
parent 8e8a23454a
commit ad6d7a1082
42 changed files with 3148 additions and 421 deletions

View File

@@ -80,7 +80,8 @@
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "qmi-cloud:build"
"browserTarget": "qmi-cloud:build",
"proxyConfig": "proxy.conf.json"
},
"configurations": {
"production": {

View File

@@ -11,5 +11,5 @@
<link rel="stylesheet" href="styles.fc71de1623889098932b.css"></head>
<body>
<app-root></app-root>
<script src="runtime.c51bd5b1c616d9ffddc1.js" defer></script><script src="polyfills-es5.6fef7e679f78bcc42760.js" nomodule defer></script><script src="polyfills.51f5cc3d1309de3a873d.js" defer></script><script src="scripts.1af868998801499c8755.js" defer></script><script src="main.f5a7e1f913f2da3aa71e.js" defer></script></body>
<script src="runtime.c51bd5b1c616d9ffddc1.js" defer></script><script src="polyfills-es5.6fef7e679f78bcc42760.js" nomodule defer></script><script src="polyfills.51f5cc3d1309de3a873d.js" defer></script><script src="scripts.1af868998801499c8755.js" defer></script><script src="main.14a2f758020d66364f7b.js" defer></script></body>
</html>

File diff suppressed because one or more lines are too long

View File

@@ -1,6 +1,6 @@
{
"name": "qmi-cloud-app",
"version": "2.0.5",
"version": "3.0.0",
"scripts": {
"start": "node -r esm server/server.js",
"start:dev": "nodemon -r esm server/server.js",
@@ -45,7 +45,7 @@
"leonardo-ui": "^1.7.1",
"moment": "^2.24.0",
"moment-timezone": "^0.5.31",
"mongoose": "^5.7.4",
"mongoose": "^6.11.1",
"ngx-markdown": "^9.0.0",
"nodemon": "^1.19.1",
"passport": "^0.4.0",

9
proxy.conf.json Normal file
View File

@@ -0,0 +1,9 @@
{
"/api/*": {
"target": "http://localhost:3000/api",
"secure": false,
"logLevel": "debug",
"changeOrigin": true,
"pathRewrite": { "^/api": "" }
}
}

View File

@@ -1,7 +1,5 @@
const mongoose = require('mongoose');
mongoose.set('useFindAndModify', false);
const crypto = require("crypto");
//mongoose.set('debug', true)
const schema = new mongoose.Schema({

View File

@@ -1,6 +1,4 @@
const mongoose = require('mongoose');
mongoose.set('useFindAndModify', false);
//mongoose.set('debug', true)
const destroySchema = new mongoose.Schema({

View File

@@ -1,8 +1,4 @@
const mongoose = require('mongoose');
mongoose.set('useFindAndModify', false);
const crypto = require("crypto");
//mongoose.set('debug', true)
const schema = new mongoose.Schema({
created: {

View File

@@ -1,7 +1,4 @@
const mongoose = require('mongoose');
mongoose.set('useFindAndModify', false);
//mongoose.set('debug', true)
const sc = new mongoose.Schema({
created: {

View File

@@ -1,6 +1,4 @@
const mongoose = require('mongoose');
mongoose.set('useFindAndModify', false);
//mongoose.set('debug', true)
const provisionSchema = new mongoose.Schema({
user: {

View File

@@ -1,6 +1,4 @@
const mongoose = require('mongoose')
mongoose.set('useFindAndModify', false);
//mongoose.set('debug', true)
const scenarioSchema = new mongoose.Schema({

View File

@@ -1,6 +1,4 @@
const mongoose = require('mongoose');
mongoose.set('useFindAndModify', false);
//mongoose.set('debug', true)
const sc = new mongoose.Schema({

View File

@@ -1,6 +1,5 @@
const mongoose = require('mongoose')
mongoose.set('useFindAndModify', false);
//mongoose.set('debug', true)
const schema = new mongoose.Schema({
created: {
type: Date,

View File

@@ -1,6 +1,4 @@
const mongoose = require('mongoose')
mongoose.set('useFindAndModify', false);
//mongoose.set('debug', true)
const subSchema = new mongoose.Schema({
created: {

View File

@@ -0,0 +1,52 @@
const mongoose = require('mongoose');
const crypto = require("crypto");
const schema = new mongoose.Schema({
description: {
type: String
},
user: {
type: mongoose.Types.ObjectId, ref: 'User'
},
template: {
type: mongoose.Types.ObjectId, ref: 'TrainingTemplate'
},
created: {
type: Date,
default: Date.now
},
updated: {
type: Date,
default: Date.now
},
isFinished: {
type: Boolean,
default: false
},
qcsTenantHost: {
type: String
},
qcsApiKey: {
type: String
},
qaUrl: {
type: String
},
qaToken: {
type: String
},
cloudshareClass: {
type: String
},
passwd: {
type: String,
default: function() {
return crypto.randomBytes(8).toString('hex');
}
}
});
module.exports = mongoose.model('TrainingSession', schema);

View File

@@ -0,0 +1,18 @@
const mongoose = require('mongoose');
const schema = new mongoose.Schema({
created: {
type: Date,
default: Date.now
},
email: {
type: String
},
session: {
type: mongoose.Types.ObjectId, ref: 'TrainingSession'
}
});
module.exports = mongoose.model('TrainingStudent', schema);

View File

@@ -0,0 +1,29 @@
const mongoose = require('mongoose');
const schema = new mongoose.Schema({
created: {
type: Date,
default: Date.now
},
title: {
type: String
},
description: {
type: String
},
cloudshare: {
type: Boolean
},
qcs: {
type: Boolean
},
needQcsAutomation: {
type: Boolean
},
needQcsApiKey: {
type: Boolean
}
});
module.exports = mongoose.model('TrainingTemplate', schema);

View File

@@ -1,6 +1,4 @@
const mongoose = require('mongoose')
mongoose.set('useFindAndModify', false);
//mongoose.set('debug', true)
const userSchema = new mongoose.Schema({

View File

@@ -1,7 +1,4 @@
const mongoose = require('mongoose')
mongoose.set('useFindAndModify', false);
//mongoose.set('debug', true)
const userSchema = new mongoose.Schema({
type: String,

View File

@@ -1,18 +1,10 @@
const mongoose = require('mongoose');
const boom = require('@hapi/boom');
const options = {
loggerLevel: 'error',
useNewUrlParser: true,
//reconnectInterval: 2000,
//reconnectTries: 30, // Retry up to 30 times
useCreateIndex: true,
useUnifiedTopology: true
};
console.log("--- MongoDB connecting... ", process.env.MONGO_URI);
// Connect to DB
mongoose.connect(process.env.MONGO_URI, options);
mongoose.connect(process.env.MONGO_URI);
// When successfully connected
mongoose.connection.on('connected', () => {
@@ -44,7 +36,9 @@ const Notification = require('./models/Notification');
const Subscription = require('./models/Subscription');
const Event = require('./models/Event');
const SharedProvision = require('./models/SharedProvision');
const TrainingTemplate = require('./models/TrainingTemplate');
const TrainingSession = require('./models/TrainingSession');
const TrainingStudent = require('./models/TrainingStudent');
const getNewCountExtend = function(provision) {
return provision.countExtend !== undefined? (provision.countExtend + 1) : 1;
@@ -110,6 +104,10 @@ const getPage = async ( model, filter, page, populates, select ) => {
if ( model === Event ) {
exec = exec.populate({path: 'user', select: 'displayName'});
}
if ( model === TrainingSession ) {
exec = exec.populate('user').populate('template');
}
}
const entity = await exec;
@@ -192,6 +190,9 @@ const get = async (model, filter, select, skip, limit, populates, reply) => {
if ( model === Event ) {
exec = exec.populate({path: 'user', select: 'displayName'});
}
if ( model === TrainingSession ) {
exec = exec.populate('user').populate('template');
}
}
const entity = await exec;
@@ -229,6 +230,9 @@ const getById = async (model, id, reply) => {
if ( model === Event ) {
exec = exec.populate({path: 'user', select: 'displayName'});
}
if ( model === TrainingSession ) {
exec = exec.populate('user').populate('template');
}
const entity = await exec;
return entity;
} catch (err) {
@@ -254,6 +258,9 @@ const getOne = async (model, filter, reply) => {
if ( model === Event ) {
exec = exec.populate({path: 'user', select: 'displayName'});
}
if ( model === TrainingSession ) {
exec = exec.populate('user').populate('template');
}
const entity = await exec;
return entity;
} catch (err) {
@@ -288,6 +295,9 @@ const update = async (model, id, body, reply) => {
if ( model === Scenario ) {
exec = exec.populate('subscription').populate('deployOpts');
}
if ( model === TrainingSession ) {
exec = exec.populate('user').populate('template');
}
const update = await exec;
return update;
} catch (err) {
@@ -315,6 +325,9 @@ const updateMany = async (model, filter, body, reply) => {
if ( model === Scenario ) {
exec = exec.populate('subscription').populate('deployOpts');
}
if ( model === TrainingSession ) {
exec = exec.populate('user').populate('template');
}
return await exec;
@@ -396,6 +409,9 @@ module.exports = {
event: _m(Event),
user: _m(User),
sharedProvision: _m(SharedProvision),
trainingSession: _m(TrainingSession),
trainingTemplate: _m(TrainingTemplate),
trainingStudent: _m(TrainingStudent),
utils: {
getNewTimeRunning: getNewTimeRunning,
getNewCountExtend: getNewCountExtend
@@ -412,7 +428,10 @@ module.exports = {
ApiKey: ApiKey,
Subscription: Subscription,
Event: Event,
SharedProvision: SharedProvision
SharedProvision: SharedProvision,
TrainingSession: TrainingSession,
TrainingTemplate: TrainingTemplate,
TrainingStudent: TrainingStudent
}
};

View File

@@ -10,7 +10,7 @@
"axios": "^0.21.1",
"barracuda-api": "https://gitlab.com/qlik_gear/barracuda-api-node.git#1.1.0",
"bull": "^3.11.0",
"mongoose": "^5.7.4",
"mongoose": "^6.11.1",
"nodemailer": "^6.4.2",
"uuid": "^8.3.2"
}

File diff suppressed because it is too large Load Diff

View File

@@ -18,6 +18,16 @@
"@azure/ms-rest-js" "^2.0.4"
tslib "^1.10.0"
"@azure/arm-dns@^4.0.0":
version "4.1.1"
resolved "https://registry.yarnpkg.com/@azure/arm-dns/-/arm-dns-4.1.1.tgz#50ad92fd2b292da7753a7f39df2d3c5f3789ffb5"
integrity sha512-6AW0gy5v5hugLwtVM8F7Hx1yLmqbs2qmEoTwtbnG7X/6TYQtrWL4CwM7tQ+Ltu0PPYA/swDMH6vtOAUpmd3XFA==
dependencies:
"@azure/core-auth" "^1.1.4"
"@azure/ms-rest-azure-js" "^2.1.0"
"@azure/ms-rest-js" "^2.2.0"
tslib "^1.10.0"
"@azure/core-auth@^1.1.4":
version "1.2.0"
resolved "https://registry.yarnpkg.com/@azure/core-auth/-/core-auth-1.2.0.tgz#a5a181164e99f8446a3ccf9039345ddc9bb63bb9"
@@ -31,7 +41,7 @@
resolved "https://registry.yarnpkg.com/@azure/ms-rest-azure-env/-/ms-rest-azure-env-2.0.0.tgz#45809f89763a480924e21d3c620cd40866771625"
integrity sha512-dG76W7ElfLi+fbTjnZVGj+M9e0BIEJmRxU6fHaUQ12bZBe8EJKYb2GV50YWNaP2uJiVQ5+7nXEVj1VN1UQtaEw==
"@azure/ms-rest-azure-js@^2.0.1":
"@azure/ms-rest-azure-js@^2.0.1", "@azure/ms-rest-azure-js@^2.1.0":
version "2.1.0"
resolved "https://registry.yarnpkg.com/@azure/ms-rest-azure-js/-/ms-rest-azure-js-2.1.0.tgz#8c90b31468aeca3146b06c7144b386fd4827f64c"
integrity sha512-CjZjB8apvXl5h97Ck6SbeeCmU0sk56YPozPtTyGudPp1RGoHXNjFNtoOvwOG76EdpmMpxbK10DqcygI16Lu60Q==
@@ -103,6 +113,19 @@
dependencies:
"@types/node" "*"
"@types/webidl-conversions@*":
version "7.0.0"
resolved "https://registry.yarnpkg.com/@types/webidl-conversions/-/webidl-conversions-7.0.0.tgz#2b8e60e33906459219aa587e9d1a612ae994cfe7"
integrity sha512-xTE1E+YF4aWPJJeUzaZI5DRntlkY3+BCVJi0axFptnjGmAoWxkyREIh/XMrfxVLejwQxMCfDXdICo0VLxThrog==
"@types/whatwg-url@^8.2.1":
version "8.2.2"
resolved "https://registry.yarnpkg.com/@types/whatwg-url/-/whatwg-url-8.2.2.tgz#749d5b3873e845897ada99be4448041d4cc39e63"
integrity sha512-FtQu10RWgn3D9U4aazdwIE2yzphmTJREDqNdODHrbrZmmMqI0vMheC/6NE/J1Yveaj8H+ela+YwWTjq5PGmuhA==
dependencies:
"@types/node" "*"
"@types/webidl-conversions" "*"
abbrev@1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8"
@@ -224,6 +247,27 @@ atob@^2.1.2:
resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9"
integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==
available-typed-arrays@^1.0.5:
version "1.0.5"
resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz#92f95616501069d07d10edb2fc37d3e1c65123b7"
integrity sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==
aws-sdk@^2.942.0:
version "2.1374.0"
resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.1374.0.tgz#f915dd6a946cab810d1bd46ca14892e985ce69ab"
integrity sha512-Q7TExvBskRM23GfE1iy0GRxpUF+d9LY7ggmdHvL+2gX/QTzxSYaHHRPa8MNzFtzZLz+BDcDIgAcMjYKsrm18Rw==
dependencies:
buffer "4.9.2"
events "1.1.1"
ieee754 "1.1.13"
jmespath "0.16.0"
querystring "0.2.0"
sax "1.2.1"
url "0.10.3"
util "^0.12.4"
uuid "8.0.0"
xml2js "0.5.0"
aws-sign2@~0.7.0:
version "0.7.0"
resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8"
@@ -246,6 +290,12 @@ balanced-match@^1.0.0:
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767"
integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c=
"barracuda-api@https://gitlab.com/qlik_gear/barracuda-api-node.git#1.1.0":
version "0.0.10"
resolved "https://gitlab.com/qlik_gear/barracuda-api-node.git#ce8be42102398a45bf896cf973290b46d2e18666"
dependencies:
axios "^0.21.1"
base64-js@^1.0.2:
version "1.3.1"
resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.3.1.tgz#58ece8cb75dd07e71ed08c736abc5fac4dbf8df1"
@@ -283,14 +333,6 @@ bindings@^1.5.0:
dependencies:
file-uri-to-path "1.0.0"
bl@^2.2.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/bl/-/bl-2.2.0.tgz#e1a574cdf528e4053019bb800b041c0ac88da493"
integrity sha512-wbgvOpqopSr7uq6fJrLH8EsvYMJf9gzfo2jCsL2eTy75qXPukA4pCgHamOQkZtY5vmfVtjB+P3LNlMHW5CEZXA==
dependencies:
readable-stream "^2.3.5"
safe-buffer "^5.1.1"
bl@^4.0.1:
version "4.0.2"
resolved "https://registry.yarnpkg.com/bl/-/bl-4.0.2.tgz#52b71e9088515d0606d9dd9cc7aa48dc1f98e73a"
@@ -300,11 +342,6 @@ bl@^4.0.1:
inherits "^2.0.4"
readable-stream "^3.4.0"
bluebird@3.5.1:
version "3.5.1"
resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.1.tgz#d9551f9de98f1fcda1e683d17ee91a0602ee2eb9"
integrity sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA==
boxen@^1.2.1:
version "1.3.0"
resolved "https://registry.yarnpkg.com/boxen/-/boxen-1.3.0.tgz#55c6c39a8ba58d9c61ad22cd877532deb665a20b"
@@ -342,10 +379,10 @@ braces@^2.3.1, braces@^2.3.2:
split-string "^3.0.2"
to-regex "^3.0.1"
bson@^1.1.4:
version "1.1.4"
resolved "https://registry.yarnpkg.com/bson/-/bson-1.1.4.tgz#f76870d799f15b854dffb7ee32f0a874797f7e89"
integrity sha512-S/yKGU1syOMzO86+dGpg2qGoDL0zvzcb262G+gqEy6TgP6rt6z6qxSFX/8X6vLC91P7G7C3nLs0+bvDzmvBA3Q==
bson@^5.2.0:
version "5.2.0"
resolved "https://registry.yarnpkg.com/bson/-/bson-5.2.0.tgz#c81d35dd30e2798203e5422a639780ea98dd25ba"
integrity sha512-HevkSpDbpUfsrHWmWiAsNavANKYIErV2ePXllp1bwq5CDreAaFVj6RVlZpJnxK4WWDCJ/5jMUpaY6G526q3Hjg==
buffer-equal-constant-time@1.0.1:
version "1.0.1"
@@ -357,6 +394,15 @@ buffer-from@^1.0.0:
resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef"
integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==
buffer@4.9.2:
version "4.9.2"
resolved "https://registry.yarnpkg.com/buffer/-/buffer-4.9.2.tgz#230ead344002988644841ab0244af8c44bbe3ef8"
integrity sha512-xq+q3SRMOxGivLhBNaUdC64hDTQwejJ+H0T/NB1XMtTVEwNTrfFF3gAxiyW0Bu/xWEGhjVKgUcMhCrUy2+uCWg==
dependencies:
base64-js "^1.0.2"
ieee754 "^1.1.4"
isarray "^1.0.0"
buffer@^5.5.0:
version "5.6.0"
resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.6.0.tgz#a31749dc7d81d84db08abf937b6b8c4033f62786"
@@ -396,6 +442,14 @@ cache-base@^1.0.1:
union-value "^1.0.0"
unset-value "^1.0.0"
call-bind@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c"
integrity sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==
dependencies:
function-bind "^1.1.1"
get-intrinsic "^1.0.2"
camelcase@^4.0.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd"
@@ -579,12 +633,12 @@ date-utils@*:
resolved "https://registry.yarnpkg.com/date-utils/-/date-utils-1.2.21.tgz#61fb16cdc1274b3c9acaaffe9fc69df8720a2b64"
integrity sha1-YfsWzcEnSzyayq/+n8ad+HIKK2Q=
debug@3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261"
integrity sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==
debug@4.x:
version "4.3.4"
resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865"
integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==
dependencies:
ms "2.0.0"
ms "2.1.2"
debug@^2.2.0, debug@^2.3.3:
version "2.6.9"
@@ -656,7 +710,7 @@ delayed-stream@~1.0.0:
resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619"
integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk=
denque@^1.1.0, denque@^1.4.1:
denque@^1.1.0:
version "1.4.1"
resolved "https://registry.yarnpkg.com/denque/-/denque-1.4.1.tgz#6744ff7641c148c3f8a69c307e51235c1f4a37cf"
integrity sha512-OfzPuSZKGcgr96rf1oODnfjqBFmr1DVoc/TrItj3Ohe0Ah1C5WX5Baquw/9U9KovnQ88EqmJbD66rKYUQYN1tQ==
@@ -755,6 +809,11 @@ event-target-shim@^5.0.0:
resolved "https://registry.yarnpkg.com/event-target-shim/-/event-target-shim-5.0.1.tgz#5d4d3ebdf9583d63a5333ce2deb7480ab2b05789"
integrity sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==
events@1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/events/-/events-1.1.1.tgz#9ebdb7635ad099c70dcc4c2a1f5004288e8bd924"
integrity sha512-kEcvvCBByWXGnZy6JUlgAp2gBIUjfCAV6P6TgT1/aaQKcmuAEC4OZTV1I4EWQLz2gxZw76atuVyvHhTxvi0Flw==
execa@^0.7.0:
version "0.7.0"
resolved "https://registry.yarnpkg.com/execa/-/execa-0.7.0.tgz#944becd34cc41ee32a63a9faf27ad5a65fc59777"
@@ -855,6 +914,13 @@ follow-redirects@^1.10.0:
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.13.3.tgz#e5598ad50174c1bc4e872301e82ac2cd97f90267"
integrity sha512-DUgl6+HDzB0iEptNQEXLx/KhTmDb8tZUHSeLqpnjpknR70H0nC2t9N73BK6fN4hOvJ84pKlIQVQ4k5FFlBedKA==
for-each@^0.3.3:
version "0.3.3"
resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.3.tgz#69b447e88a0a5d32c3e7084f3f1710034b21376e"
integrity sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==
dependencies:
is-callable "^1.1.3"
for-in@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80"
@@ -917,6 +983,15 @@ function-bind@^1.1.1:
resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d"
integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==
get-intrinsic@^1.0.2, get-intrinsic@^1.1.3:
version "1.2.0"
resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.0.tgz#7ad1dc0535f3a2904bba075772763e5051f6d05f"
integrity sha512-L049y6nFOuom5wGyRc3/gdTLO94dySVKRACj1RmJZBQXlbTMhtNIgkWkUHq+jYmZvKf14EW1EoJnnjbmoHij0Q==
dependencies:
function-bind "^1.1.1"
has "^1.0.3"
has-symbols "^1.0.3"
get-port@^5.1.1:
version "5.1.1"
resolved "https://registry.yarnpkg.com/get-port/-/get-port-5.1.1.tgz#0469ed07563479de6efb986baf053dcd7d4e3193"
@@ -954,6 +1029,13 @@ global-dirs@^0.1.0:
dependencies:
ini "^1.3.4"
gopd@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.0.1.tgz#29ff76de69dac7489b7c0918a5788e56477c332c"
integrity sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==
dependencies:
get-intrinsic "^1.1.3"
got@^6.7.1:
version "6.7.1"
resolved "https://registry.yarnpkg.com/got/-/got-6.7.1.tgz#240cd05785a9a18e561dc1b44b41c763ef1e8db0"
@@ -999,6 +1081,18 @@ has-symbols@^1.0.0, has-symbols@^1.0.1:
resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.1.tgz#9f5214758a44196c406d9bd76cebf81ec2dd31e8"
integrity sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==
has-symbols@^1.0.2, has-symbols@^1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8"
integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==
has-tostringtag@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.0.tgz#7e133818a7d394734f941e73c3d3f9291e658b25"
integrity sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==
dependencies:
has-symbols "^1.0.2"
has-value@^0.3.1:
version "0.3.1"
resolved "https://registry.yarnpkg.com/has-value/-/has-value-0.3.1.tgz#7b1f58bada62ca827ec0a2078025654845995e1f"
@@ -1046,7 +1140,7 @@ http-signature@~1.2.0:
jsprim "^1.2.2"
sshpk "^1.7.0"
ieee754@^1.1.4:
ieee754@1.1.13, ieee754@^1.1.4:
version "1.1.13"
resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.13.tgz#ec168558e95aa181fd87d37f55c32bbcb6708b84"
integrity sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==
@@ -1096,6 +1190,11 @@ ip-regex@^2.1.0:
resolved "https://registry.yarnpkg.com/ip-regex/-/ip-regex-2.1.0.tgz#fa78bf5d2e6913c911ce9f819ee5146bb6d844e9"
integrity sha1-+ni/XS5pE8kRzp+BnuUUa7bYROk=
ip@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/ip/-/ip-2.0.0.tgz#4cf4ab182fee2314c75ede1276f8c80b479936da"
integrity sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ==
is-accessor-descriptor@^0.1.6:
version "0.1.6"
resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz#a9e12cb3ae8d876727eeef3843f8a0897b5c98d6"
@@ -1110,6 +1209,14 @@ is-accessor-descriptor@^1.0.0:
dependencies:
kind-of "^6.0.0"
is-arguments@^1.0.4:
version "1.1.1"
resolved "https://registry.yarnpkg.com/is-arguments/-/is-arguments-1.1.1.tgz#15b3f88fda01f2a97fec84ca761a560f123efa9b"
integrity sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==
dependencies:
call-bind "^1.0.2"
has-tostringtag "^1.0.0"
is-binary-path@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-1.0.1.tgz#75f16642b480f187a711c814161fd3a4a7655898"
@@ -1122,6 +1229,11 @@ is-buffer@^1.1.5:
resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be"
integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==
is-callable@^1.1.3:
version "1.2.7"
resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.7.tgz#3bc2a85ea742d9e36205dcacdd72ca1fdc51b055"
integrity sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==
is-callable@^1.1.4, is-callable@^1.1.5:
version "1.2.0"
resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.0.tgz#83336560b54a38e35e3a2df7afd0454d691468bb"
@@ -1193,6 +1305,13 @@ is-fullwidth-code-point@^2.0.0:
resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f"
integrity sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=
is-generator-function@^1.0.7:
version "1.0.10"
resolved "https://registry.yarnpkg.com/is-generator-function/-/is-generator-function-1.0.10.tgz#f1558baf1ac17e0deea7c0415c438351ff2b3c72"
integrity sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==
dependencies:
has-tostringtag "^1.0.0"
is-glob@^3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-3.1.0.tgz#7ba5ae24217804ac70707b96922567486cc3e84a"
@@ -1282,6 +1401,17 @@ is-symbol@^1.0.2:
dependencies:
has-symbols "^1.0.1"
is-typed-array@^1.1.10, is-typed-array@^1.1.3:
version "1.1.10"
resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.10.tgz#36a5b5cb4189b575d1a3e4b08536bfb485801e3f"
integrity sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A==
dependencies:
available-typed-arrays "^1.0.5"
call-bind "^1.0.2"
for-each "^0.3.3"
gopd "^1.0.1"
has-tostringtag "^1.0.0"
is-typedarray@~1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a"
@@ -1292,10 +1422,10 @@ is-windows@^1.0.2:
resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d"
integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==
isarray@1.0.0, isarray@~1.0.0:
isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11"
integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=
integrity sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==
isexe@^2.0.0:
version "2.0.0"
@@ -1319,6 +1449,11 @@ isstream@~0.1.2:
resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a"
integrity sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=
jmespath@0.16.0:
version "0.16.0"
resolved "https://registry.yarnpkg.com/jmespath/-/jmespath-0.16.0.tgz#b15b0a85dfd4d930d43e69ed605943c802785076"
integrity sha512-9FzQjJ7MATs1tSpnco1K6ayiYE3figslrXA72G2HQ/n76RzvYlofyi5QM+iX4YRs/pu3yzxlVQSST23+dMDknw==
jsbn@~0.1.0:
version "0.1.1"
resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513"
@@ -1366,10 +1501,10 @@ jws@3.x.x:
jwa "^1.4.1"
safe-buffer "^5.0.1"
kareem@2.3.1:
version "2.3.1"
resolved "https://registry.yarnpkg.com/kareem/-/kareem-2.3.1.tgz#def12d9c941017fabfb00f873af95e9c99e1be87"
integrity sha512-l3hLhffs9zqoDe8zjmb/mAN4B8VT3L56EUvKNqLFVs9YlFA+zx7ke1DO8STAdDyYNkeSo1nKmjuvQeI12So8Xw==
kareem@2.5.1:
version "2.5.1"
resolved "https://registry.yarnpkg.com/kareem/-/kareem-2.5.1.tgz#7b8203e11819a8e77a34b3517d3ead206764d15d"
integrity sha512-7jFxRVm+jD+rkq3kY0iZDJfsO2/t4BBPeEb2qKn2lR/9KhuksYk5hxzfRYWMPV8P/x2d0kHD306YyWLzjjH+uA==
kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0:
version "3.2.2"
@@ -1522,56 +1657,49 @@ moment-timezone@^0.5.31:
resolved "https://registry.yarnpkg.com/moment/-/moment-2.26.0.tgz#5e1f82c6bafca6e83e808b30c8705eed0dcbd39a"
integrity sha512-oIixUO+OamkUkwjhAVE18rAMfRJNsNe/Stid/gwHSOfHrOtw9EhAY2AHvdKZ/k/MggcYELFCJz/Sn2pL8b8JMw==
mongodb@3.5.8:
version "3.5.8"
resolved "https://registry.yarnpkg.com/mongodb/-/mongodb-3.5.8.tgz#34550856449b745d145873734bf922c12d6b9caa"
integrity sha512-jz7mR58z66JKL8Px4ZY+FXbgB7d0a0hEGCT7kw8iye46/gsqPrOEpZOswwJ2BQlfzsrCLKdsF9UcaUfGVN2HrQ==
mongodb-connection-string-url@^2.6.0:
version "2.6.0"
resolved "https://registry.yarnpkg.com/mongodb-connection-string-url/-/mongodb-connection-string-url-2.6.0.tgz#57901bf352372abdde812c81be47b75c6b2ec5cf"
integrity sha512-WvTZlI9ab0QYtTYnuMLgobULWhokRjtC7db9LtcVfJ+Hsnyr5eo6ZtNAt3Ly24XZScGMelOcGtm7lSn0332tPQ==
dependencies:
bl "^2.2.0"
bson "^1.1.4"
denque "^1.4.1"
require_optional "^1.0.1"
safe-buffer "^5.1.2"
"@types/whatwg-url" "^8.2.1"
whatwg-url "^11.0.0"
mongodb@5.3.0:
version "5.3.0"
resolved "https://registry.yarnpkg.com/mongodb/-/mongodb-5.3.0.tgz#9bef3ff35511a66fb7d9aafb7b06112787138db1"
integrity sha512-Wy/sbahguL8c3TXQWXmuBabiLD+iVmz+tOgQf+FwkCjhUIorqbAxRbbz00g4ZoN4sXIPwpAlTANMaGRjGGTikQ==
dependencies:
bson "^5.2.0"
mongodb-connection-string-url "^2.6.0"
socks "^2.7.1"
optionalDependencies:
saslprep "^1.0.0"
saslprep "^1.0.3"
mongoose-legacy-pluralize@1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/mongoose-legacy-pluralize/-/mongoose-legacy-pluralize-1.0.2.tgz#3ba9f91fa507b5186d399fb40854bff18fb563e4"
integrity sha512-Yo/7qQU4/EyIS8YDFSeenIvXxZN+ld7YdV9LqFVQJzTLye8unujAWPZ4NWKfFA+RNjh+wvTWKY9Z3E5XM6ZZiQ==
mongoose@^5.7.4:
version "5.9.17"
resolved "https://registry.yarnpkg.com/mongoose/-/mongoose-5.9.17.tgz#9b74659481807cd9ff5b9c120cdb5087cbbd92bd"
integrity sha512-9EDmTiKrOu/41twlPWUA1aOsdxSN6PRIdFwTpLu4MjyNcJ/vuBE+VewKrN1jsD4oXO5rB8bMYtYxVmJQ02SrPg==
mongoose@^7.1.0:
version "7.1.0"
resolved "https://registry.yarnpkg.com/mongoose/-/mongoose-7.1.0.tgz#ad7f23184a0c19eb8efbbad4f1ff2113ede1515d"
integrity sha512-shoo9z/7o96Ojx69wpJn65+EC+Mt3q1SWTducW+F2Y4ieCXo0lZwpCZedgC841MIvJ7V8o6gmzoN1NfcnOTOuw==
dependencies:
bson "^1.1.4"
kareem "2.3.1"
mongodb "3.5.8"
mongoose-legacy-pluralize "1.0.2"
mpath "0.7.0"
mquery "3.2.2"
ms "2.1.2"
regexp-clone "1.0.0"
safe-buffer "5.1.2"
sift "7.0.1"
sliced "1.0.1"
bson "^5.2.0"
kareem "2.5.1"
mongodb "5.3.0"
mpath "0.9.0"
mquery "5.0.0"
ms "2.1.3"
sift "16.0.1"
mpath@0.7.0:
version "0.7.0"
resolved "https://registry.yarnpkg.com/mpath/-/mpath-0.7.0.tgz#20e8102e276b71709d6e07e9f8d4d0f641afbfb8"
integrity sha512-Aiq04hILxhz1L+f7sjGyn7IxYzWm1zLNNXcfhDtx04kZ2Gk7uvFdgZ8ts1cWa/6d0TQmag2yR8zSGZUmp0tFNg==
mpath@0.9.0:
version "0.9.0"
resolved "https://registry.yarnpkg.com/mpath/-/mpath-0.9.0.tgz#0c122fe107846e31fc58c75b09c35514b3871904"
integrity sha512-ikJRQTk8hw5DEoFVxHG1Gn9T/xcjtdnOKIU1JTmGjZZlg9LST2mBLmcX3/ICIbgJydT2GOc15RnNy5mHmzfSew==
mquery@3.2.2:
version "3.2.2"
resolved "https://registry.yarnpkg.com/mquery/-/mquery-3.2.2.tgz#e1383a3951852ce23e37f619a9b350f1fb3664e7"
integrity sha512-XB52992COp0KP230I3qloVUbkLUxJIu328HBP2t2EsxSFtf4W1HPSOBWOXf1bqxK4Xbb66lfMJ+Bpfd9/yZE1Q==
mquery@5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/mquery/-/mquery-5.0.0.tgz#a95be5dfc610b23862df34a47d3e5d60e110695d"
integrity sha512-iQMncpmEK8R8ncT8HJGsGc9Dsp8xcgYMVSbs5jgnm1lFHTZqMJTUWTDx1LBO8+mK3tPNZWFLBghQEIOULSTHZg==
dependencies:
bluebird "3.5.1"
debug "3.1.0"
regexp-clone "^1.0.0"
safe-buffer "5.1.2"
sliced "1.0.1"
debug "4.x"
ms@2.0.0:
version "2.0.0"
@@ -1583,6 +1711,11 @@ ms@2.1.2, ms@^2.1.1:
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009"
integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==
ms@2.1.3:
version "2.1.3"
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2"
integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==
nan@^2.12.1:
version "2.14.1"
resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.1.tgz#d7be34dfa3105b91494c3147089315eff8874b01"
@@ -1824,27 +1957,41 @@ pump@^3.0.0:
end-of-stream "^1.1.0"
once "^1.3.1"
punycode@1.3.2:
version "1.3.2"
resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d"
integrity sha512-RofWgt/7fL5wP1Y7fxE7/EmTLzQVnB0ycyibJ0OOHIlJqTNzglYFxVwETOcIoJqJmpDXJ9xImDv+Fq34F/d4Dw==
punycode@^2.1.0, punycode@^2.1.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec"
integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==
qmi-cloud-common@../qmi-cloud-common:
version "1.1.6"
version "2.0.0"
dependencies:
"@azure/arm-compute" "^15.0.0"
"@azure/arm-dns" "^4.0.0"
"@azure/ms-rest-nodeauth" "^3.0.7"
"@hapi/boom" "^9.1.0"
aws-sdk "^2.942.0"
axios "^0.21.1"
barracuda-api "https://gitlab.com/qlik_gear/barracuda-api-node.git#1.1.0"
bull "^3.11.0"
mongoose "^5.7.4"
mongoose "^7.1.0"
nodemailer "^6.4.2"
uuid "^8.3.2"
qs@~6.5.2:
version "6.5.2"
resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36"
integrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==
querystring@0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620"
integrity sha512-X/xY82scca2tau62i9mDyU9K+I+djTMUsvwf7xnUX5GLvVzgJybOJf4Y6o9Zx3oJK/LSXg5tTZBjwzqVPaPO2g==
rc@^1.0.1, rc@^1.1.6:
version "1.2.8"
resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed"
@@ -1855,7 +2002,7 @@ rc@^1.0.1, rc@^1.1.6:
minimist "^1.2.0"
strip-json-comments "~2.0.1"
readable-stream@^2.0.2, readable-stream@^2.3.5:
readable-stream@^2.0.2:
version "2.3.7"
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57"
integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==
@@ -1911,11 +2058,6 @@ regex-not@^1.0.0, regex-not@^1.0.2:
extend-shallow "^3.0.2"
safe-regex "^1.1.0"
regexp-clone@1.0.0, regexp-clone@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/regexp-clone/-/regexp-clone-1.0.0.tgz#222db967623277056260b992626354a04ce9bf63"
integrity sha512-TuAasHQNamyyJ2hb97IuBEif4qBHGjPHBS64sZwytpLEqtBQ1gPJTnOaQ6qmpET16cK14kkjbazl6+p0RRv0yw==
registry-auth-token@^3.0.1:
version "3.4.0"
resolved "https://registry.yarnpkg.com/registry-auth-token/-/registry-auth-token-3.4.0.tgz#d7446815433f5d5ed6431cd5dca21048f66b397e"
@@ -1972,19 +2114,6 @@ repeat-string@^1.6.1:
tunnel-agent "^0.6.0"
uuid "^3.3.2"
require_optional@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/require_optional/-/require_optional-1.0.1.tgz#4cf35a4247f64ca3df8c2ef208cc494b1ca8fc2e"
integrity sha512-qhM/y57enGWHAe3v/NcwML6a3/vfESLe/sGM2dII+gEO0BpKRUkWZow/tyloNqJyN6kXSl3RyyM8Ll5D/sJP8g==
dependencies:
resolve-from "^2.0.0"
semver "^5.1.0"
resolve-from@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-2.0.0.tgz#9480ab20e94ffa1d9e80a804c7ea147611966b57"
integrity sha1-lICrIOlP+h2egKgEx+oUdhGWa1c=
resolve-url@^0.2.1:
version "0.2.1"
resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a"
@@ -1995,16 +2124,16 @@ ret@~0.1.10:
resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc"
integrity sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==
safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1:
version "5.1.2"
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d"
integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==
safe-buffer@^5.0.1, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@~5.2.0:
safe-buffer@^5.0.1, safe-buffer@^5.1.2, safe-buffer@~5.2.0:
version "5.2.1"
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6"
integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==
safe-buffer@~5.1.0, safe-buffer@~5.1.1:
version "5.1.2"
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d"
integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==
safe-regex@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e"
@@ -2017,13 +2146,18 @@ safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0:
resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a"
integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==
saslprep@^1.0.0:
saslprep@^1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/saslprep/-/saslprep-1.0.3.tgz#4c02f946b56cf54297e347ba1093e7acac4cf226"
integrity sha512-/MY/PEMbk2SuY5sScONwhUDsV2p77Znkb/q3nSVstq/yQzYJOH/Azh29p9oJLsl3LnQwSvZDKagDGBsBwSooag==
dependencies:
sparse-bitfield "^3.0.3"
sax@1.2.1:
version "1.2.1"
resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.1.tgz#7b8e656190b228e81a66aea748480d828cd2d37a"
integrity sha512-8I2a3LovHTOpm7NV5yOyO8IHqgVsfK4+UuySrXU8YXkSRX7k6hCV9b3HrkKCr3nMpgj+0bmocaJJWpvp1oc7ZA==
sax@>=0.6.0:
version "1.2.4"
resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9"
@@ -2068,20 +2202,20 @@ shebang-regex@^1.0.0:
resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3"
integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=
sift@7.0.1:
version "7.0.1"
resolved "https://registry.yarnpkg.com/sift/-/sift-7.0.1.tgz#47d62c50b159d316f1372f8b53f9c10cd21a4b08"
integrity sha512-oqD7PMJ+uO6jV9EQCl0LrRw1OwsiPsiFQR5AR30heR+4Dl7jBBbDLnNvWiak20tzZlSE1H7RB30SX/1j/YYT7g==
sift@16.0.1:
version "16.0.1"
resolved "https://registry.yarnpkg.com/sift/-/sift-16.0.1.tgz#e9c2ccc72191585008cf3e36fc447b2d2633a053"
integrity sha512-Wv6BjQ5zbhW7VFefWusVP33T/EM0vYikCaQ2qR8yULbsilAT8/wQaXvuQ3ptGLpoKx+lihJE3y2UTgKDyyNHZQ==
signal-exit@^3.0.0, signal-exit@^3.0.2:
version "3.0.3"
resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c"
integrity sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==
sliced@1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/sliced/-/sliced-1.0.1.tgz#0b3a662b5d04c3177b1926bea82b03f837a2ef41"
integrity sha1-CzpmK10Ewxd7GSa+qCsD+Dei70E=
smart-buffer@^4.2.0:
version "4.2.0"
resolved "https://registry.yarnpkg.com/smart-buffer/-/smart-buffer-4.2.0.tgz#6e1d71fa4f18c05f7d0ff216dd16a481d0e8d9ae"
integrity sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==
snapdragon-node@^2.0.1:
version "2.1.1"
@@ -2113,6 +2247,14 @@ snapdragon@^0.8.1:
source-map-resolve "^0.5.0"
use "^3.1.0"
socks@^2.7.1:
version "2.7.1"
resolved "https://registry.yarnpkg.com/socks/-/socks-2.7.1.tgz#d8e651247178fde79c0663043e07240196857d55"
integrity sha512-7maUZy1N7uo6+WVEX6psASxtNlKaNVMlGQKkG/63nEDdLOWNbiUMoLK7X4uYoLhQstau72mLgfEWcXcwsaHbYQ==
dependencies:
ip "^2.0.0"
smart-buffer "^4.2.0"
source-map-resolve@^0.5.0:
version "0.5.3"
resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.3.tgz#190866bece7553e1f8f267a2ee82c606b5509a1a"
@@ -2364,6 +2506,13 @@ tough-cookie@~2.5.0:
psl "^1.1.28"
punycode "^2.1.1"
tr46@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/tr46/-/tr46-3.0.0.tgz#555c4e297a950617e8eeddef633c87d4d9d6cbf9"
integrity sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA==
dependencies:
punycode "^2.1.1"
tslib@^1.10.0:
version "1.14.1"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00"
@@ -2478,6 +2627,14 @@ url-parse-lax@^1.0.0:
dependencies:
prepend-http "^1.0.1"
url@0.10.3:
version "0.10.3"
resolved "https://registry.yarnpkg.com/url/-/url-0.10.3.tgz#021e4d9c7705f21bbf37d03ceb58767402774c64"
integrity sha512-hzSUW2q06EqL1gKM/a+obYHLIO6ct2hwPuviqTTOcfFVc61UbfJ2Q32+uGL/HCPxKqrdGB5QUwIe7UqlDgwsOQ==
dependencies:
punycode "1.3.2"
querystring "0.2.0"
use@^3.1.0:
version "3.1.1"
resolved "https://registry.yarnpkg.com/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f"
@@ -2498,11 +2655,32 @@ util.promisify@^1.0.1:
has-symbols "^1.0.1"
object.getownpropertydescriptors "^2.1.0"
util@^0.12.4:
version "0.12.5"
resolved "https://registry.yarnpkg.com/util/-/util-0.12.5.tgz#5f17a6059b73db61a875668781a1c2b136bd6fbc"
integrity sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA==
dependencies:
inherits "^2.0.3"
is-arguments "^1.0.4"
is-generator-function "^1.0.7"
is-typed-array "^1.1.3"
which-typed-array "^1.1.2"
uuid@8.0.0:
version "8.0.0"
resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.0.0.tgz#bc6ccf91b5ff0ac07bbcdbf1c7c4e150db4dbb6c"
integrity sha512-jOXGuXZAWdsTH7eZLtyXMqUb9EcWMGZNbL9YcGBJl4MH4nrxHmZJhEHvyLFrkxo+28uLb/NYRcStH48fnD0Vzw==
uuid@^3.1.0, uuid@^3.3.2, uuid@^3.4.0:
version "3.4.0"
resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee"
integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==
uuid@^8.3.2:
version "8.3.2"
resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2"
integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==
verror@1.10.0:
version "1.10.0"
resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400"
@@ -2512,6 +2690,31 @@ verror@1.10.0:
core-util-is "1.0.2"
extsprintf "^1.2.0"
webidl-conversions@^7.0.0:
version "7.0.0"
resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-7.0.0.tgz#256b4e1882be7debbf01d05f0aa2039778ea080a"
integrity sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==
whatwg-url@^11.0.0:
version "11.0.0"
resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-11.0.0.tgz#0a849eebb5faf2119b901bb76fd795c2848d4018"
integrity sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==
dependencies:
tr46 "^3.0.0"
webidl-conversions "^7.0.0"
which-typed-array@^1.1.2:
version "1.1.9"
resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.9.tgz#307cf898025848cf995e795e8423c7f337efbde6"
integrity sha512-w9c4xkx6mPidwp7180ckYWfMmvxpjlZuIudNtDf4N/tTAUB8VJbX25qZoAsrtGuYNnGw3pa0AXgbGKRB8/EceA==
dependencies:
available-typed-arrays "^1.0.5"
call-bind "^1.0.2"
for-each "^0.3.3"
gopd "^1.0.1"
has-tostringtag "^1.0.0"
is-typed-array "^1.1.10"
which@^1.2.9:
version "1.3.1"
resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a"
@@ -2545,6 +2748,14 @@ xdg-basedir@^3.0.0:
resolved "https://registry.yarnpkg.com/xdg-basedir/-/xdg-basedir-3.0.0.tgz#496b2cc109eca8dbacfe2dc72b603c17c5870ad4"
integrity sha1-SWsswQnsqNus/i3HK2A8F8WHCtQ=
xml2js@0.5.0:
version "0.5.0"
resolved "https://registry.yarnpkg.com/xml2js/-/xml2js-0.5.0.tgz#d9440631fbb2ed800203fad106f2724f62c493b7"
integrity sha512-drPFnkQJik/O+uPKpqSgr22mpuFHqKdbS835iAQrUC73L2F5WkboIRd63ai/2Yg6I1jzifPFKH2NTK+cfglkIA==
dependencies:
sax ">=0.6.0"
xmlbuilder "~11.0.0"
xml2js@^0.4.19:
version "0.4.23"
resolved "https://registry.yarnpkg.com/xml2js/-/xml2js-0.4.23.tgz#a0c69516752421eb2ac758ee4d4ccf58843eac66"

View File

@@ -0,0 +1,181 @@
const express = require('express');
const router = express.Router();
const db = require('qmi-cloud-common/mongo');
const passport = require('../passport');
/**
* @swagger
* /training/template:
* get:
* description: Get all training templates
* summary: Get all training templates
* produces:
* - application/json
* responses:
* 200:
* description: TrainingTemplate
*/
router.get('/templates', passport.ensureAuthenticated, async (req, res, next) => {
try {
const result = await db.trainingTemplate.get();
return res.json(result);
} catch (error) {
next(error);
}
});
/**
* @swagger
* /training/session/{id}:
* get:
* description: Get all training templates
* summary: Get all training templates
* produces:
* - application/json
* parameters:
* - name: id
* in: path
* type: string
* required: true
* responses:
* 200:
* description: TrainingTemplate
*/
router.get('/session/:id', async (req, res, next) => {
try {
const result = await db.trainingSession.getById(req.params.id);
return res.json(result);
} catch (error) {
next(error);
}
});
/**
* @swagger
* /training/template:
* post:
* description: Create new training template
* summary: Create new training template
* tags:
* - admin
* produces:
* - application/json
* requestBody:
* required: true
* content:
* application/json:
* schema:
* type: object
* properties:
* description:
* type: string
* responses:
* 200:
* description: TrainingTemplate
*/
router.post('/template', passport.ensureAuthenticatedAndAdmin, async (req, res, next) => {
try {
let data = req.body;
const result = await db.trainingTemplate.add(data);
return res.json(result);
} catch (error) {
next(error);
}
});
/**
* @swagger
* /training/{userId}/sessions:
* post:
* description: Add new training session
* summary: Add new training session
* parameters:
* - name: userId
* in: path
* type: string
* required: true
* requestBody:
* required: true
* content:
* application/json:
* schema:
* type: object
* produces:
* - application/json
* responses:
* 200:
* description: TrainingSession
*/
router.post('/:userId/sessions', passport.ensureAuthenticatedAndIsMe, async (req, res, next) => {
try {
const userId = req.params.userId === 'me'? req.user._id : req.params.userId;
let data = req.body;
data.user = userId;
const result = await db.trainingSession.add(data);
return res.json(result);
} catch (error) {
next(error);
}
});
/**
* @swagger
* /training/{userId}/sessions:
* get:
* description: Get all training session by user
* summary: Get all training session by user
* parameters:
* - name: userId
* in: path
* type: string
* required: true
* produces:
* - application/json
* responses:
* 200:
* description: TrainingSession
*/
router.get('/:userId/sessions', passport.ensureAuthenticatedAndIsMe, async (req, res, next) => {
try {
const userId = req.params.userId === 'me'? req.user._id : req.params.userId;
const result = await db.trainingSession.get({user: userId});
return res.json(result);
} catch (error) {
next(error);
}
});
/**
* @swagger
* /training/{userId}/sessions/{id}:
* get:
* description: Get training session by Id for a user
* summary: Get training session by Id for a user
* parameters:
* - name: userId
* in: path
* type: string
* required: true
* - name: id
* in: path
* type: string
* required: true
* produces:
* - application/json
* responses:
* 200:
* description: TrainingSession
*/
router.get('/:userId/sessions/:id', passport.ensureAuthenticatedAndIsMe, async (req, res, next) => {
try {
const userId = req.params.userId === 'me'? req.user._id : req.params.userId;
const id = req.params.id;
const result = await db.trainingSession.getOne({user: userId, _id: id});
return res.json(result);
} catch (error) {
next(error);
}
});
module.exports = router;

View File

@@ -11,9 +11,10 @@ const routesApiProvisions = require('./routes/api-provisions');
const routesApiDestroyProvisions = require('./routes/api-destroyprovisions');
const routesApiNotifications = require('./routes/api-notifications');
const routesApiDivvy = require('./routes/api-divvy');
const routesApiDeployOpts = require('./routes/api-deployopts')
const routesApiApikeys = require('./routes/api-apikeys')
const routesApiStats = require('./routes/api-stats')
const routesApiDeployOpts = require('./routes/api-deployopts');
const routesApiApikeys = require('./routes/api-apikeys');
const routesApiStats = require('./routes/api-stats');
const routesApiTraining = require('./routes/api-training');
const swaggerUi = require('swagger-ui-express');
const swaggerJsdoc = require('swagger-jsdoc');
const cookieParser = require('cookie-parser');
@@ -97,6 +98,7 @@ app.use("/api/v1/divvy", routesApiDivvy);
app.use("/api/v1/deployopts", routesApiDeployOpts);
app.use("/api/v1/apikeys", routesApiApikeys);
app.use("/api/v1/stats", routesApiStats);
app.use("/api/v1/training", routesApiTraining);
function _isAllowedPath(path){
const allowedPaths = [ '/api-docs', '/arena', '/costexport', '/backendlogs', '/photos/user/' ];

View File

@@ -11,6 +11,8 @@ import { ScenariosSectionComponent } from './scenarios/scenarios-section.compone
import { ProvisionsSharedComponent } from './provisions/provisions-shared.component';
import { CostComponent } from './cost/cost.component';
import { ProvComponent } from './provisions/prov.component';
import { TrainingComponent } from './training/training.component';
import { SessionFormComponent } from './sessionform/sessionform.component';
const routes: Routes = [
@@ -24,6 +26,8 @@ const routes: Routes = [
{ path: 'admin', component: AdminComponent, canActivate: [AuthGuard]},
{ path: 'admin/:tab', component: AdminComponent, canActivate: [AuthGuard]},
{ path: 'stats', component: StatsComponent, canActivate: [AuthGuard]},
{ path: 'training', component: TrainingComponent, canActivate: [AuthGuard]},
{ path: 'training/session/:id/public', component: SessionFormComponent},
{ path: 'user/:id', component: UserDashboardComponent, canActivate: [AuthGuard]},
{ path: '',
redirectTo: '/home',

View File

@@ -1 +1 @@
<app-layout></app-layout>
<app-layout [header]="noHeaderFooter"></app-layout>

View File

@@ -1,4 +1,6 @@
import { Component } from '@angular/core';
import { DOCUMENT } from '@angular/common';
import { Component, Inject } from '@angular/core';
import { Router } from '@angular/router';
@Component({
selector: 'app-root',
@@ -8,7 +10,19 @@ import { Component } from '@angular/core';
export class AppComponent {
title = 'qmi-cloud';
constructor() {
domain;
noHeaderFooter: boolean = true;
constructor(private router: Router, @Inject(DOCUMENT) private document: any) {
console.log(this.router)
this.domain = this.document.location.pathname;
console.log(this.domain);
this.noHeaderFooter = this.domain.indexOf("training/session/") !== -1;
console.log("noHeaderFooter", this.noHeaderFooter);
}
}

View File

@@ -48,13 +48,14 @@ import { TableApiKeysComponent } from './tables/table-apikeys.component';
import { ApikeyModalComponent } from './modals/edit-apikey.component';
import { VmTypeModalComponent } from './modals/edit-vmtype.component';
import { StatsComponent } from './stats/stats.component';
import { TrainingComponent } from './training/training.component';
//import { QdtComponentComponent } from './qdt-components/qdt-components.component';
import { ProvisionModalComponent } from './modals/edit-provision.component';
import { UserDashboardComponent } from './user/user-dashboard.component'
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
import { ProvComponent } from './provisions/prov.component';
import { TrainingService } from './services/training.service';
import { SessionFormComponent } from './sessionform/sessionform.component';
export function markedOptions(): MarkedOptions {
@@ -101,7 +102,9 @@ export function markedOptions(): MarkedOptions {
ProvisionModalComponent,
UserDashboardComponent,
CostComponent,
ProvComponent
ProvComponent,
TrainingComponent,
SessionFormComponent
],
imports: [
BrowserModule,
@@ -125,6 +128,7 @@ export function markedOptions(): MarkedOptions {
AlertService,
AuthGuard,
StatsService,
TrainingService
],
bootstrap: [AppComponent]
})

View File

@@ -1,3 +1,7 @@
h1 {
font-weight: 200;
}
.cost-analysis {
width: 100%;
border: 0;

View File

@@ -0,0 +1,3 @@
h1 {
font-weight: 200;
}

View File

@@ -0,0 +1,26 @@
import { Injectable } from '@angular/core';
import { HttpClient, HttpParams } from '@angular/common/http';
import { Observable } from 'rxjs';
import { environment } from '../../environments/environment.prod';
@Injectable({
providedIn: 'root'
})
export class TrainingService {
constructor( private httpClient: HttpClient ) {
}
getTrainingSessions(userId) : Observable<any> {
return this.httpClient.get(`${environment.apiVersionPath}/training/${userId}/sessions`);
}
getTrainingSessionDetails(id) : Observable<any> {
return this.httpClient.get(`${environment.apiVersionPath}/training/session/${id}`);
}
getTemplates() : Observable<any> {
return this.httpClient.get(`${environment.apiVersionPath}/training/templates`);
}
}

View File

@@ -0,0 +1,126 @@
body {
font-family: 'Source Sans Pro', sans-serif;
background-color: var(--color-bg);
background: #006580;
}
.qlikLogo {
width: 180px;
}
/* Page structure */
.wrapper {
min-height: var(--wrapper-height);
display: grid;
/*place-items: center;
border: 5px solid #006580;*/
max-width: 1000px;
margin: 40px auto;
background: white;
}
.content {
display: flex;
flex-direction: column;
align-items: left;
justify-content: left;
place-items: center;
margin: 20px;
}
/* Title h1 style */
.title {
color: #61a729;
font-family: HK Grotesk;
font-style: normal;
font-weight: bold;
font-size: 100px;
line-height: 105%;
margin: 2rem 0 0;
}
canvas{
/*prevent interaction with the canvas*/
pointer-events:none;
}
.btn {
display: inline-block;
position: relative;
margin: 0;
padding: 15px 24px 17px;
box-sizing: border-box;
background: #009845;
font-family: SourceSansPro,helvetica neue,Helvetica,Arial,lucida grande,sans-serif;
color: #fff;
font-size: 19px;
font-size: 1.0556rem;
line-height: 19px;
font-weight: 700;
text-align: center;
text-decoration: none;
letter-spacing: .25px;
cursor: pointer;
border: 1px solid #009845;
border-radius: 0;
transition: background .2s ease-in-out,color .2s ease-in-out,border .2s ease-in-out;
-webkit-appearance: none;
}
.lds-ring {
display: inline-block;
position: relative;
width: 40px;
height: 40px;
}
.lds-ring div {
box-sizing: border-box;
display: block;
position: absolute;
width: 44px;
height: 44px;
margin: 4px;
border: 4px solid #009845;
border-radius: 50%;
animation: lds-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
border-color: #009845 transparent transparent transparent;
}
.lds-ring div:nth-child(1) {
animation-delay: -0.45s;
}
.lds-ring div:nth-child(2) {
animation-delay: -0.3s;
}
.lds-ring div:nth-child(3) {
animation-delay: -0.15s;
}
@keyframes lds-ring {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
.lui-select {
height: 38px !important;
font-size: 16px;
}
.lui-input {
height: 38px !important;
font-size: 16px;
}
@media screen and (max-width: 700px) {
.yourClass {
display: none !important;
}
.wrapper {
margin: 0px auto;
}
}

View File

@@ -0,0 +1,76 @@
<div class="wrapper">
<!--<img class="qlikLogo" src="https://www.qlik.com/us/-/media/images/qlik/global/qlik-logo-2x.png">-->
<div style="height: 167px;width:100%;max-width: 1000px;background: #f5f4f8">
<img style="margin: 48px;width: 240px"
src="https://www.qlik.com/us/-/media/images/qlik/global/qlik-logo-2x.png?rev=1167e952ae934867bc9ee7f3d4952e1f"
alt="Qlik">
</div>
<div class="content" role="main">
<h1>Welcome to this Qlik workshop session</h1>
<h2 style="margin-top:0px;">
Let's get you started! please, fill the form and press 'Submit' button.
</h2>
<div class="color-form" style="display: grid;gap: 40px;">
<form id="myform" class="color-search" autocomplete="off" style="grid-row: 1;">
<p for="session">
Select this session:
</p>
<select class="lui-select" id="session" name="session" required="required"
style="width:300px" [(ngModel)]="selectedSession" (ngModelChange)="onChangeSession($event)">
<option value="">-- Select --</option>
<option *ngFor="let s of sessions" [value]="s._id" [disabled]="s.disabled" [selected]="s.selected">{{s.title}}</option>
</select>
<p for="email">
Your email:
</p>
<input class="lui-input" id="email" name="email" [(ngModel)]="email" required="required" type="text" placeholder="name@company.com"
style="width:300px" />
<div id="invalidemail" class="lui-text-danger" style="display:none;">
Invalid email, please try again.
</div>
<br>
<div id="captcha" style="height: 50px">
<canvas #myCanvas></canvas>
</div>
<input type="text" class="lui-input" placeholder="Enter captcha" id="cpatchaTextBox" style="width:150px"
required="required" />
<!-- If the user submits a value through the form
it'll be passed to the server in the request body -->
<div id="invalidcaptcha" class="lui-text-danger" style="font-weight:bold;display:none;">
Invalid captcha, please try again.
</div>
<br>
<button id="submitbtn" class="btn" type="button" (click)="submitForm()">Submit</button>
<div id="spinner" style="display: none;">
<span style="color:#009845 ">Please wait...</span>
<div class="lds-ring">
<div></div>
<div></div>
<div></div>
<div></div>
</div>
</div>
</form>
<div class="yourClass" style="grid-row: 1;">
<img id="qrcode" style="width:100%;max-width: 1000px"
[src]="qrCodeUrl">
<div style="text-align:center">
<i id="qrcode-caption">{{sessionName}}</i>
</div>
</div>
</div>
</div>
</div>

View File

@@ -0,0 +1,92 @@
import { AfterViewInit, Component, ElementRef, OnInit, ViewChild } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { TrainingService } from '../services/training.service';
@Component({
selector: 'sessionform-root',
templateUrl: './sessionform.component.html',
styleUrls: ['./sessionform.component.css']
})
export class SessionFormComponent implements AfterViewInit, OnInit {
id: string;
title = 'qlik-enablement';
sessionId = "qcdi1";
hostname = "asdfas";
sessionName = "";
sessions : any[] = [];
selectedSession = "";
qrCodeUrl = "";
code = "";
email = "";
@ViewChild('myCanvas')
private myCanvas: ElementRef = {} as ElementRef;
constructor(private _trainingService : TrainingService, private route: ActivatedRoute) {
this.hostname = window.location.protocol + "//" + window.location.host;
this.qrCodeUrl = `https://quickchart.io/qr?size=300&text=${this.hostname}`;
}
ngOnInit(): void {
this.route.params.subscribe(params => {
this.id = params['id']; // (+) converts string 'id' to a number
this._trainingService.getTrainingSessionDetails(this.id).subscribe(res=>{
console.log("Session details", res);
});
});
}
ngAfterViewInit(): void {
//clear the contents of captcha div first
var charsArray =
"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ@!#$%^&*";
var lengthOtp = 6;
var captcha = [];
for (var i = 0; i < lengthOtp; i++) {
//below code will not allow Repetition of Characters
var index = Math.floor(Math.random() * charsArray.length + 1); //get the next character from the array
if (captcha.indexOf(charsArray[index]) == -1)
captcha.push(charsArray[index]);
else i--;
}
var ctx = this.myCanvas.nativeElement.getContext('2d');
if (ctx) {
ctx.font = "36px Georgia";
ctx.strokeStyle = "#009845";
ctx.strokeText(captcha.join(""), 0, 30);
}
//storing captcha so that can validate you can save it somewhere else according to your specific requirements
this.code = captcha.join("");
}
onChangeSession(value: any) {
console.log("value", value);
if ( value.length && this.sessions ){
let o = this.sessions.find((s) => value === s._id);
this.sessionName = o? o.title : "";
this.qrCodeUrl = `https://quickchart.io/qr?size=300&text=${this.hostname}/?session=${this.selectedSession}`;
} else {
this.qrCodeUrl = `https://quickchart.io/qr?size=300&text=${this.hostname}`;
}
}
submitForm() {
/*this.sessionService.postUser({
session: this.selectedSession,
email: this.email
}).subscribe(function(results){
})*/
}
}

View File

@@ -0,0 +1,67 @@
<div style="margin-top: 80px; min-height: 650px;">
<h1>Session Templates</h1>
<div class="flexcontainer" *ngIf="templates">
<mdb-card class="qmicard" *ngFor="let s of templates;">
<!--Card content-->
<mdb-card-header>
<!--Title-->
<mdb-card-title>
<h4 [innerHTML]="s.title"></h4>
<div>
<span style="margin-right: 5px;" *ngFor="let tag of s.labels" class="badge badge-secondary">{{tag}}</span>
</div>
</mdb-card-title>
</mdb-card-header>
<mdb-card-body style="position: relative;">
<!--Text-->
<mdb-card-text class="qmicardtext">
<div [innerHTML]="s.description"></div>
</mdb-card-text>
<div *ngIf="s.supportEmails" class="support">
<i>Support: {{s.supportEmails}}</i>
</div>
</mdb-card-body>
<mdb-card-footer>
<button mdbBtn mdbTooltip="Provision" type="button" [disabled]="disabledProvisions" style="margin-top: 5px;" block="true" size="sm" color="dark-green" (click)="openNewProvisionConfirmModal(s)" mdbWavesEffect>New session</button>
</mdb-card-footer>
</mdb-card>
</div>
<h1>My Training Session</h1>
<div *ngIf="sessions" class="flexcontainer">
<div *ngFor="let s of sessions" class="box">
<div class="title desc">
<div mdbTooltip="subititle" class="subtitle">{{s.description || "session title"}}</div>
</div>
<div style="border-top: 1px dashed #fff;" class="title">
<div class="maintitle">{{s.template.title}}</div>
</div>
<div class="contentbox">
<div *ngIf="s.template.qcs">{{s.qcsTenantHost}}</div>
<div *ngIf="s.template.cloudshare">{{s.cloudshareClass}}</div>
</div>
<div class="buttons">
<button mdbTooltip="Provision information" style="margin-right: 2px;" class="lui-button">
<span class="lui-icon lui-icon--info" aria-hidden="true"></span>
</button>
</div>
</div>
</div>
</div>

View File

@@ -0,0 +1,129 @@
h1 {
font-weight: 200;
}
.flexcontainer{
display: flex;
flex-direction: row;
flex-wrap: wrap;
border-top: 1px solid #ccc;
padding-top: 10px;
.qmicard {
margin-bottom: 20px;
margin-right: 20px;
position: relative;
max-width: 525px;
.card-badge {
position: absolute;
bottom: 5px;
right: 15px;
}
.card-body {
padding:10px 15px;
}
.card-icon {
margin-left: 5px;
cursor: pointer;
}
.card-header {
padding: 10px 15px;
border-bottom: none;
position: relative;
}
.card-footer {
padding:10px 15px;
background-color: #fff;
border-top: none;
}
}
.box {
border: 1px solid #ccc;
background: white;
/*flex-grow: 1;*/
min-height: 100px;
/*width: 340px;*/
margin-bottom: 10px;
margin-right: 10px;
max-width: 400px;
min-width: 300px;
position: relative;
.title {
&.desc {
height: 42px;
max-height: 42px;
min-height: 42px;
}
padding: 10px;
min-height: 46px;
background: #54565A;
color: white;
.maintitle {
//font-weight: bold;
font-size: 14px;
}
.subtitle {
font-weight: bold;
font-size: 16px;
text-overflow: ellipsis;
/* Required for text-overflow to do anything */
white-space: nowrap;
overflow: hidden;
}
&.queued, &.initializing, &.provisioning {
background: #54565A;
}
&.provisioned {
background: #009845;
&.Stopped, &.Starting {
background: #FFC72A;
color: #595959;
}
}
&.error {
background: #E7004C;
}
&.error_init {
background: #E7004C;
}
&.error_plan {
background: #E7004C;
}
&.destroyed {
background: #ccc;
color: #777;
}
}
.contentbox {
font-size: 12px;
padding: 10px;
min-height: 200px;
&.destroyed {
min-height: 100px;
}
}
.buttons {
padding: 10px;
width: 100%;
position: absolute;
bottom: 0px;
.compact {
width: calc(80% - 5px);
margin-right: 5px;
}
}
}
}

View File

@@ -0,0 +1,37 @@
import { Component, OnInit } from '@angular/core';
import { TrainingService } from '../services/training.service';
import { AuthGuard } from '../services/auth.guard';
@Component({
selector: 'training-component',
templateUrl: './training.component.html',
styleUrls: ['./training.component.scss']
})
export class TrainingComponent implements OnInit {
private _userId;
sessions;
templates;
constructor( private _trainingService : TrainingService, private _auth: AuthGuard ) {
this._auth.getUserInfo().subscribe( value => {
this._userId = value? value._id : null;
});
}
ngOnInit(): void {
this._trainingService.getTemplates().subscribe(res=>{
this.templates = res.results;
console.log("templates", this.templates);
})
this._trainingService.getTrainingSessions(this._userId).subscribe(res=>{
this.sessions = res.results;
console.log("sessions", this.sessions);
})
}
}

View File

@@ -11,6 +11,7 @@
<a *ngIf="user" class="nav-item nav-link" routerLink="/scenarios" routerLinkActive="active">Scenarios</a>
<a *ngIf="user" class="nav-item nav-link" routerLink="/provisions" routerLinkActive="active">My Provisions</a>
<a *ngIf="user" class="nav-item nav-link" routerLink="/sharedprovision" routerLinkActive="active">Shared Provisions</a>
<a *ngIf="user" class="nav-item nav-link" routerLink="/training" routerLinkActive="active">Training</a>
<a *ngIf="user" class="nav-item nav-link" routerLink="/cost-analysis" routerLinkActive="active">Cost Analysis</a>
<!--<a *ngIf="user && (user.role === 'admin' || user.role === 'superadmin')" class="nav-item nav-link" routerLink="/admin" routerLinkActive="active">ADMIN</a>
<a *ngIf="user" class="nav-item nav-link" routerLink="/stats" routerLinkActive="active">Stats</a>-->

View File

@@ -1,8 +1,8 @@
<app-header></app-header>
<app-header *ngIf="!header"></app-header>
<div class="container-fluid">
<ng-content></ng-content>
<router-outlet></router-outlet>
</div>
<app-footer></app-footer>
<app-footer *ngIf="!header"></app-footer>

View File

@@ -1,4 +1,4 @@
import { Component, OnInit } from '@angular/core';
import { Component, Input, OnInit } from '@angular/core';
@Component({
selector: 'app-layout',
@@ -7,9 +7,12 @@ import { Component, OnInit } from '@angular/core';
})
export class LayoutComponent implements OnInit {
@Input() header;
constructor() { }
ngOnInit() {
console.log("header", this.header);
}
}

1095
yarn.lock

File diff suppressed because it is too large Load Diff