From 599326ee6addc489ffc0534165643c72a4733cf2 Mon Sep 17 00:00:00 2001 From: Adam King Date: Thu, 18 Mar 2021 18:57:07 -0400 Subject: [PATCH 1/2] Consolidate route logging Update aws-sdk back to the original version Rebase packages --- app/apollo/index.js | 12 +- app/index.js | 4 - app/routes/index.js | 32 ++--- app/routes/install/index.js | 7 +- app/routes/v1/channels.js | 16 +-- app/routes/v2/clusters.js | 20 ++- app/routes/v2/orgs.js | 21 ++-- app/routes/v2/resources.js | 13 +- app/routes/v2/webhooks.js | 4 - app/utils/bunyan.js | 3 +- locales/de/razee-resources.json | 78 ------------ locales/ja/razee-resources.json | 78 ------------ locales/pt-br/razee-resources.json | 78 ------------ package-lock.json | 189 +++++++++++++++-------------- package.json | 10 +- 15 files changed, 158 insertions(+), 407 deletions(-) diff --git a/app/apollo/index.js b/app/apollo/index.js index eedd6df5b..6b2d7f31f 100644 --- a/app/apollo/index.js +++ b/app/apollo/index.js @@ -92,7 +92,7 @@ const buildCommonApolloContext = async ({ models, req, res, connection, logger } context = { apiKey: apiKey, req: upgradeReq, req_id: upgradeReq ? upgradeReq.id : undefined, userToken, recoveryHintsMap, orgId, ...context }; } else if (req) { context = { req, req_id: req.id, recoveryHintsMap, ...context }; - } + } return context; }; @@ -165,15 +165,15 @@ const createApolloServer = () => { logger.trace({ req_id, connectionParams, context }, 'subscriptions:onConnect'); const me = await models.User.getMeFromConnectionParams( connectionParams, {req_id, models, logger, ...context},); - + logger.debug({ me }, 'subscriptions:onConnect upgradeReq getMe'); if (me === undefined) { throw Error( 'Can not find the session for this subscription request.', ); } - - // add original upgrade request to the context + + // add original upgrade request to the context return { me, upgradeReq: webSocket.upgradeReq, logger, orgKey, orgId }; }, onDisconnect: (webSocket, context) => { @@ -200,7 +200,7 @@ const apollo = async (options = {}) => { try { const db = await connectDb(options.mongo_url); const app = options.app ? options.app : createDefaultApp(); - router.use(ebl(getBunyanConfig('apollo'))); + app.use(ebl(getBunyanConfig('razeedash-api/apollo'))); if (initModule.playgroundAuth && process.env.GRAPHQL_ENABLE_PLAYGROUND === 'true') { logger.info('Enabled playground route with authorization enforcement.'); app.get(GRAPHQL_PATH, initModule.playgroundAuth); @@ -239,7 +239,7 @@ const apollo = async (options = {}) => { port = options.graphql_port; } httpServer.listen({ port }); - } + } return { db, server, httpServer, stop}; } catch (err) { logger.error(err, 'Apollo api error'); diff --git a/app/index.js b/app/index.js index 5ca937467..156974878 100644 --- a/app/index.js +++ b/app/index.js @@ -19,11 +19,9 @@ const app = express(); const http = require('http'); const compression = require('compression'); const body_parser = require('body-parser'); -const ebl = require('express-bunyan-logger'); const addRequestId = require('express-request-id')(); const {router, initialize} = require('./routes/index.js'); const log = require('./log').log; -const getBunyanConfig = require('./utils/bunyan.js').getBunyanConfig; const port = 3333; const swaggerUi = require('swagger-ui-express'); @@ -39,8 +37,6 @@ const i18nextMiddleware = require('i18next-http-middleware'); const i18nextBackend = require('i18next-fs-backend'); app.use('/api-docs', swaggerUi.serve, swaggerUi.setup(swaggerDocument)); -router.use(ebl(getBunyanConfig('razeedash-api'))); - app.set('trust proxy', true); app.use(addRequestId); app.use(compression()); diff --git a/app/routes/index.js b/app/routes/index.js index fcc475125..6740b2cc3 100644 --- a/app/routes/index.js +++ b/app/routes/index.js @@ -48,7 +48,7 @@ router.get('/v1/health', (req, res)=>{ }); router.use('/kube', Kube); -router.use(ebl(getBunyanConfig('/api/v2/'))); +router.use(ebl(getBunyanConfig('razeedash-api/api'))); router.use(asyncHandler(async (req, res, next) => { const db = req.app.get('db'); @@ -67,7 +67,7 @@ router.use(asyncHandler(async (req, res, next) => { })); // the orgs routes should be above the razee-org-key checks since the user -// won't have a razee-org-key when creating an org for the first time. +// won't have a razee-org-key when creating an org for the first time. router.use('/v2/orgs', Orgs); router.use((req, res, next) => { @@ -92,17 +92,17 @@ async function initialize(){ const options = { 'collection-indexes': { externalApplications: [ - { + { keys: { org_id: 1 }, options: { name: 'org_id', } }, ], deployments: [ - { + { keys: { org_id: 1 }, options: { name: 'org_id', } }, - { + { keys: { org_id: 1, 'containers.image': 1 }, options: { name: 'org_id.containers.image', } } @@ -127,17 +127,17 @@ async function initialize(){ }, ], orgs: [ - { + { keys: { orgKeys: 1 }, options: { name: 'orgKeys', } } ], clusters: [ - { + { keys: { org_id: 1 }, options: { name: 'org_id', } }, - { + { keys: { org_id: 1, 'registration.location' : 1 }, options: { name: 'org_id.registration_text', } }, @@ -171,23 +171,23 @@ async function initialize(){ } ], resources: [ - { + { keys: { org_id: 1 }, options: { name: 'org_id', } }, - { + { keys: { org_id: 1, deleted: 1 }, options: { name: 'org_id.deleted', } }, - { + { keys: { org_id: 1, cluster_id: 1, selfLink: 1 }, options: { name: 'org_id.cluster_id.selfLink', } }, - { + { keys: { org_id: 1, cluster_id: 1, selfLink: 1, 'searchableData.subscription_id': 1, deleted: 1 }, options: { name: 'org_id.cluster_id.subid.deleted', } }, - { + { keys: { org_id: 1, cluster_id: 1, 'searchableData.kind': 1, 'searchableData.children': 1, deleted: 1 }, options: { name: 'org_id.cluster_id.subid.kind.children', } }, @@ -200,7 +200,7 @@ async function initialize(){ options: { name: 'cluster_id_text_selfLink_text_searchableData.searchableExpression_text', } } ], - messages:[ + messages:[ { keys: { org_id: 1, cluster_id: 1 }, options: { name: 'org_id.cluster_id', } @@ -211,11 +211,11 @@ async function initialize(){ } ], user_log: [ - { + { keys: { userid: 1 }, options: { name: 'userid', } }, - { + { keys: { action: 1 }, options: { name: 'action', } }, diff --git a/app/routes/install/index.js b/app/routes/install/index.js index bc35a98aa..e388d9909 100644 --- a/app/routes/install/index.js +++ b/app/routes/install/index.js @@ -17,16 +17,11 @@ const express = require('express'); const router = express.Router(); const asyncHandler = require('express-async-handler'); -const ebl = require('express-bunyan-logger'); const Mustache = require('mustache'); const readFile = require('fs-readfile-promise'); const axios = require('axios'); -const getBunyanConfig = require('../../utils/bunyan.js').getBunyanConfig; const { CLUSTER_REG_STATES } = require('../../apollo/models/const'); -router.use(ebl(getBunyanConfig('/api/install'))); - - router.get('/razeedeploy-job', asyncHandler(async (req, res, next) => { let args = req.query.args ? req.query.args : []; let args_array = Array.isArray(args) ? args : [args]; @@ -42,7 +37,7 @@ router.get('/razeedeploy-job', asyncHandler(async (req, res, next) => { // populate registration data into --razeedash-cluster-metadata64 const Clusters = req.db.collection('clusters'); const preUpdatedCluster = await Clusters.findOneAndUpdate( - {org_id: req.org._id, cluster_id: req.query.clusterId, reg_state: CLUSTER_REG_STATES.REGISTERING}, + {org_id: req.org._id, cluster_id: req.query.clusterId, reg_state: CLUSTER_REG_STATES.REGISTERING}, {$set: {reg_state: CLUSTER_REG_STATES.PENDING}}); if (preUpdatedCluster && preUpdatedCluster.value) { req.log.debug(`preUpdatedCluster = ${JSON.stringify(preUpdatedCluster)}`); diff --git a/app/routes/v1/channels.js b/app/routes/v1/channels.js index 4030f0697..197e08bc7 100644 --- a/app/routes/v1/channels.js +++ b/app/routes/v1/channels.js @@ -1,8 +1,6 @@ const express = require('express'); const router = express.Router(); const asyncHandler = require('express-async-handler'); -const ebl = require('express-bunyan-logger'); -const getBunyanConfig = require('../../utils/bunyan.js').getBunyanConfig; const mongoConf = require('../../conf.js').conf; const MongoClientClass = require('../../mongo/mongoClient.js'); const MongoClient = new MongoClientClass(mongoConf); @@ -15,8 +13,6 @@ const algorithm = 'aes-256-cbc'; const getOrg = require('../../utils/orgs.js').getOrg; -router.use(ebl(getBunyanConfig('razee-api/v1Channels'))); - router.use(asyncHandler(async (req, res, next) => { req.db = await MongoClient.getClient(); next(); @@ -38,7 +34,7 @@ router.get('/:channelName/:versionId', getOrg, asyncHandler(async(req, res, next res.status(404).send({status: 'error', message: `channel "${channelName}" not found for this org`}); return; } - + var deployableVersion = await DeployableVersions.findOne({ org_id: orgId, channel_id: deployable.uuid, uuid: versionId }); if(!deployableVersion){ res.status(404).send({status: 'error', message: `versionId "${versionId}" not found`}); @@ -49,7 +45,7 @@ router.get('/:channelName/:versionId', getOrg, asyncHandler(async(req, res, next if (conf.s3.endpoint) { try { const s3Client = new S3ClientClass(conf); - const link = url.parse(deployableVersion.content); + const link = url.parse(deployableVersion.content); const iv = Buffer.from(deployableVersion.iv, 'base64'); const paths = link.path.split('/'); const bucket = paths[1]; @@ -59,7 +55,7 @@ router.get('/:channelName/:versionId', getOrg, asyncHandler(async(req, res, next const s3stream = s3Client.getObject(bucket, resourceName).createReadStream(); s3stream.on('error', function(error) { req.log.error(error); - return res.status(403).json({ status: 'error', message: error.message}); + return res.status(403).json({ status: 'error', message: error.message}); }); s3stream.pipe(decipher).pipe(res); s3stream.on('httpError', (error) => { @@ -71,10 +67,10 @@ router.get('/:channelName/:versionId', getOrg, asyncHandler(async(req, res, next } }); } catch (error) { - return res.status(403).json({ status: 'error', message: error.message}); + return res.status(403).json({ status: 'error', message: error.message}); } } else { - return res.status(403).json({ status: 'error', message: 'An endpoint must be configured for the S3 client'}); + return res.status(403).json({ status: 'error', message: 'An endpoint must be configured for the S3 client'}); } } else { // in this case the resource was stored directly in mongo rather than in COS @@ -83,7 +79,7 @@ router.get('/:channelName/:versionId', getOrg, asyncHandler(async(req, res, next res.set('Content-Type', deployableVersion.type); res.status(200).send(data); } catch (error) { - return res.status(500).json({ status: 'error', message: error }); + return res.status(500).json({ status: 'error', message: error }); } } })); diff --git a/app/routes/v2/clusters.js b/app/routes/v2/clusters.js index 4a5957464..26d7a4a81 100644 --- a/app/routes/v2/clusters.js +++ b/app/routes/v2/clusters.js @@ -19,7 +19,6 @@ const { v4: uuid } = require('uuid'); const express = require('express'); const router = express.Router(); const asyncHandler = require('express-async-handler'); -const ebl = require('express-bunyan-logger'); const objectHash = require('object-hash'); const _ = require('lodash'); const moment = require('moment'); @@ -29,7 +28,6 @@ var fs = require('fs'); const mongoSanitize = require('express-mongo-sanitize'); const verifyAdminOrgKey = require('../../utils/orgs.js').verifyAdminOrgKey; -const getBunyanConfig = require('../../utils/bunyan.js').getBunyanConfig; const getCluster = require('../../utils/cluster.js').getCluster; const deleteResource = require('../../utils/resources.js').deleteResource; const buildSearchableDataForResource = require('../../utils/cluster.js').buildSearchableDataForResource; @@ -71,7 +69,7 @@ const addUpdateCluster = async (req, res, next) => { res.status(205).send('Please resync'); } else { - await Clusters.updateOne({ org_id: req.org._id, cluster_id: req.params.cluster_id }, + await Clusters.updateOne({ org_id: req.org._id, cluster_id: req.params.cluster_id }, { $set: { metadata, reg_state, updated: new Date() } }); res.status(200).send('Thanks for the update'); } @@ -240,10 +238,10 @@ const updateClusterResources = async (req, res, next) => { req.log.info({ 'milliseconds': Date.now() - childStart, 'operation': 'updateClusterResources:Resources.updateMany', 'data': childSearchKey }, 'satcon-performance'); } } - const rrSearchKey = { - org_id: req.org._id, + const rrSearchKey = { + org_id: req.org._id, cluster_id: req.params.cluster_id, - 'searchableData.kind': 'RemoteResource', + 'searchableData.kind': 'RemoteResource', 'searchableData.children': selfLink, deleted: false }; @@ -253,7 +251,7 @@ const updateClusterResources = async (req, res, next) => { if(remoteResource) { searchableDataObj['subscription_id'] = remoteResource.searchableData['annotations["deploy_razee_io_clustersubscription"]']; searchableDataObj['searchableExpression'] = searchableDataObj['searchableExpression'] + ':' + searchableDataObj['subscription_id']; - } + } const searchableDataHash = buildSearchableDataObjHash(searchableDataObj); start = Date.now(); @@ -323,7 +321,7 @@ const updateClusterResources = async (req, res, next) => { // publish notification to graphql if (result) { let resourceId = null; - let resourceCreated = Date.now; + let resourceCreated = Date.now; if (result.upsertedId) { resourceId = result.upsertedId._id; } else if (currentResource) { @@ -333,7 +331,7 @@ const updateClusterResources = async (req, res, next) => { if (resourceId) { pubSub.resourceChangedFunc( {_id: resourceId, data: dataStr, created: resourceCreated, - deleted: false, org_id: req.org._id, cluster_id: req.params.cluster_id, selfLink: selfLink, + deleted: false, org_id: req.org._id, cluster_id: req.params.cluster_id, selfLink: selfLink, hash: resourceHash, searchableData: searchableDataObj, searchableDataHash: searchableDataHash}); } } @@ -484,12 +482,10 @@ const deleteCluster = async (req, res, next) => { next(); } catch (error) { req.log.error(error.message); - return res.status(500).json({ status: 'error', message: error.message }); + return res.status(500).json({ status: 'error', message: error.message }); } }; -router.use(ebl(getBunyanConfig('razeedash-api/clusters'))); - // /api/v2/clusters/:cluster_id router.post('/:cluster_id', mongoSanitize({ replaceWith: '_' }), asyncHandler(addUpdateCluster)); diff --git a/app/routes/v2/orgs.js b/app/routes/v2/orgs.js index 8b73e5400..66ce8a031 100644 --- a/app/routes/v2/orgs.js +++ b/app/routes/v2/orgs.js @@ -17,23 +17,18 @@ const express = require('express'); const router = express.Router(); const asyncHandler = require('express-async-handler'); -const ebl = require('express-bunyan-logger'); const _ = require('lodash'); const verifyAdminOrgKey = require('../../utils/orgs.js').verifyAdminOrgKey; const { v4: uuid } = require('uuid'); -const getBunyanConfig = require('../../utils/bunyan.js').getBunyanConfig; - -router.use(ebl(getBunyanConfig('razeedash-api/orgs'))); - const createOrg = async(req, res) => { const orgName = (req.body && req.body.name) ? req.body.name.trim() : null; - + if(!orgName) { req.log.warn(`An org name was not specified on route ${req.url}`); return res.status(400).send( 'An org name is required' ); } - + try { const Orgs = req.db.collection('orgs'); const foundOrg = await Orgs.findOne({'name': orgName}); @@ -65,10 +60,10 @@ const createOrg = async(req, res) => { const getOrgs = async(req, res) => { try { - const Orgs = req.db.collection('orgs'); - + const Orgs = req.db.collection('orgs'); + let orgsQuery = {}; - if(req.query && req.query.name) { + if(req.query && req.query.name) { let orgsToSearch = []; if(_.isArray(req.query.name)) { orgsToSearch = req.query.name; // GET api/v2/orgs?name=org1&name=org2 @@ -76,7 +71,7 @@ const getOrgs = async(req, res) => { orgsToSearch.push(req.query.name); // GET api/v2/orgs?name=org1 } orgsQuery.name = { $in: orgsToSearch }; - } + } const foundOrgs = await Orgs.find(orgsQuery).toArray(); return res.status(200).send( foundOrgs ); @@ -89,12 +84,12 @@ const getOrgs = async(req, res) => { const updateOrg = async(req, res) => { const existingOrgId = req.params.id; const updates = req.body; - + if (!updates || _.isEmpty(updates)) { req.log.error('no message body was provided'); return res.status(400).send('Missing message body'); } - + try { const Orgs = req.db.collection('orgs'); const foundOrg = await Orgs.findOne({'_id': existingOrgId}); diff --git a/app/routes/v2/resources.js b/app/routes/v2/resources.js index 208287b0c..319153f37 100644 --- a/app/routes/v2/resources.js +++ b/app/routes/v2/resources.js @@ -17,12 +17,9 @@ const express = require('express'); const router = express.Router(); const asyncHandler = require('express-async-handler'); -const ebl = require('express-bunyan-logger'); const verifyAdminOrgKey = require('../../utils/orgs.js').verifyAdminOrgKey; -const getBunyanConfig = require('../../utils/bunyan.js').getBunyanConfig; const _ = require('lodash'); -router.use(ebl(getBunyanConfig('razeedash-api/resources'))); const getResources = async (req, res, next) => { try { @@ -30,11 +27,11 @@ const getResources = async (req, res, next) => { const orgId = req.org._id + ''; const query = { 'org_id': orgId }; - if(req.query && req.query.kind) { + if(req.query && req.query.kind) { query['searchableData.kind'] = req.query.kind; - } - if(req.query && req.query.name) { - query['searchableData.name'] = {$regex: req.query.name, $options: 'i',}; + } + if(req.query && req.query.name) { + query['searchableData.name'] = {$regex: req.query.name, $options: 'i',}; } if(req.query && req.query.cluster_id){ query['cluster_id'] = req.query.cluster_id; @@ -42,7 +39,7 @@ const getResources = async (req, res, next) => { var limit = 25; var skip = 0; - if(req.query && req.query.skip) { + if(req.query && req.query.skip) { skip = parseInt(req.query.skip); } if(req.query && req.query.limit){ diff --git a/app/routes/v2/webhooks.js b/app/routes/v2/webhooks.js index 34517f5a7..ba92279cd 100644 --- a/app/routes/v2/webhooks.js +++ b/app/routes/v2/webhooks.js @@ -17,14 +17,10 @@ const express = require('express'); const router = express.Router(); const asyncHandler = require('express-async-handler'); -const ebl = require('express-bunyan-logger'); const jkValidate = require('json-key-validate'); -const getBunyanConfig = require('../../utils/bunyan.js').getBunyanConfig; const { WEBHOOK_TRIGGER_CLUSTER, WEBHOOK_TRIGGER_IMAGE, insertClusterBadge, insertImageBadge } = require('../../utils/webhook.js'); -router.use(ebl(getBunyanConfig('razeedash-api/webhooks'))); - // Callback from triggered webhook const addCallbackResult = async (req, res, next) => { try { diff --git a/app/utils/bunyan.js b/app/utils/bunyan.js index 68b82a256..0883bc745 100644 --- a/app/utils/bunyan.js +++ b/app/utils/bunyan.js @@ -36,7 +36,7 @@ const getBunyanConfig = (route) => { streams: [{ level: process.env.LOG_LEVEL || 'info', stream: process.stdout - }] + }] }; } let result = { @@ -44,6 +44,7 @@ const getBunyanConfig = (route) => { parseUA: false, excludes: ['referer', 'url', 'body', 'short-body'], levelFn: responseCodeMapper, + obfuscate: ['razee-org-key'], streams: [{ level: process.env.LOG_LEVEL || 'info', stream: process.stdout diff --git a/locales/de/razee-resources.json b/locales/de/razee-resources.json index 2cf3691e7..f3959de0c 100644 --- a/locales/de/razee-resources.json +++ b/locales/de/razee-resources.json @@ -1,156 +1,78 @@ { - "{{clusterCount}} clusters depend on this group. Please update/remove the group from the clusters.": "{{clusterCount}} Cluster hängen von dieser Gruppe ab. Bitte aktualisieren Sie die Gruppe oder entfernen Sie die Gruppe von den Clustern.", - "{{subCount}} subscription(s) depend on this channel. Please update/remove them before removing this channel.": "{{subCount}} Subskription(en) hängen von diesem Kanal ab. Bitte aktualisieren/entfernen Sie die Subskriptionen, bevor Sie den Kanal entfernen.", - "{{subCount}} subscriptions depend on this channel version. Please update/remove them before removing this channel version.": "{{subCount}} Subskriptionen hängen von dieser Kanalversion ab. Bitte aktualisieren/entfernen Sie die Subskriptionen, bevor Sie sie diese Kanalversion entfernen.", - "{{subCount}} subscriptions depend on this cluster group. Please update/remove them before removing this group.": "{{subCount}} Subskriptionen hängen von dieser Clustergruppe ab. Bitte aktualisieren/entfernen Sie die Subskriptionen, bevor Sie diese Gruppe entfernen.", - "A \"channel_uuid\" must be specified": "Eine \"channel_uuid\" muss angegeben werden.", - "A \"file\" or \"content\" must be specified": "Eine \"file\" oder ein \"content\" muss angegeben werden.", - "A \"name\" must be specified": "Ein \"name\" muss angegeben werden.", - "A \"type\" of application/yaml must be specified": "Ein \"type\" für die Anwendung/YAML muss angegeben werden.", - "A cluster name is not defined in the registration data": "In den Registrierungsdaten ist kein Clustername definiert.", - "Another cluster already exists with the same registration name {{registration.name}}": "Es ist bereits ein anderer Cluster mit demselben eingetragenen Namen {{registration.name}} vorhanden.", - "channel uuid \"{{channel_uuid}}\" not found": "Kanal-UUID \"{{channel_uuid}}\" nicht gefunden", - "Channel uuid \"{{channel_uuid}}\" not found.": "Kanal-UUID \"{{channel_uuid}}\" nicht gefunden.", - "Channel uuid \"{{subscription.channel_uuid}}\" not found.": "Kanal-UUID \"{{subscription.channel_uuid}}\" nicht gefunden.", - "channel uuid \"{{uuid}}\" not found": "Kanal-UUID \"{{uuid}}\" nicht gefunden", - "commonResourceSearch encountered an error. {{error.message}}": "commonResourceSearch hat einen Fehler festgestellt. {{error.message}}", - "commonResourcesSearch encountered an error. {{error.message}}": "commonResourcesSearch hat einen Fehler festgestellt. {{error.message}}", - "Could not find all the cluster groups {{groups}} in the groups database, please create them first.": "In der Gruppendatenbank konnten nicht alle Clustergruppen {{groups}} gefunden werden. Bitte erstellen Sie diese zuerst.", - "could not find group with name {{name}}.": "Die Gruppe mit dem Namen {{name}} konnte nicht gefunden werden.", - "could not find group with uuid {{uuid}}.": "Die Gruppe mit der UUID {{uuid}} konnte nicht gefunden werden.", - "Could not find subscriptions.": "Subskriptionen konnten nicht gefunden werden.", - "Could not find the channel with name {{name}}.": "Der Kanal mit dem Namen {{name}} konnte nicht gefunden werden.", - "Could not find the channel with uuid {{uuid}}.": "Der Kanal mit der UUID {{uuid}} konnte nicht gefunden werden.", - "Could not find the channel with uuid/name {{channel_uuid}}/channelName.": "Der Kanal mit der UUID/dem Namen {{channel_uuid}}/channelName konnte nicht gefunden werden.", - "Could not find the cluster for the cluster id {{cluster_id}}.": "Der Cluster für die Cluster-ID {{cluster_id}} konnte nicht gefunden werden.", - "Could not find the cluster with Id {{clusterId}}.": "Der Cluster mit der ID {{clusterId}} konnte nicht gefunden werden.", - "Could not find the cluster with name {{clusterName}}.": "Der Cluster mit dem Namen {{clusterName}} konnte nicht gefunden werden.", - "Could not find the organization with ID {{org_id}}.": "Die Organisation mit der ID {{org_id}} konnte nicht gefunden werden.", - "Could not find the subscription for the subscription id {{subscription_id}}.": "Die Subskription für die Subskriptions-ID {{subscription_id}} konnte nicht gefunden werden.", - "Could not find the subscription.": "Die Subskription konnte nicht gefunden werden.", - "Could not locate the cluster with cluster_id {{cluster_id}}": "Der Cluster mit der Cluster-ID {{cluster_id}} konnte nicht gefunden werden.", - "Could not locate the cluster with clusterName {{clusterName}}": "Der Cluster mit dem Clusternamen {{clusterName}} konnte nicht gefunden werden.", - "DeployableVersion is not found for {{channel.name}}:{{channel.uuid}}/{{versionObj.name}}:{{versionObj.uuid}}.": "DeployableVersion konnte für {{channel.name}}:{{channel.uuid}}/{{versionObj.name}}:{{versionObj.uuid}} nicht gefunden werden.", - "Error retrieving data from s3 bucket. {{error.message}}": "Fehler beim Abrufen der Daten vom s3-Bucket. {{error.message}}", - "Failed to Publish resource notification, please reload the page.": "Publizieren der Ressourcenbenachrichtigung fehlgeschlagen. Bitte laden Sie die Seite erneut.", - "Failed to Publish resource notification, pubsub is not ready yet, please retry later.": "Publizieren der Ressourcenbenachrichtigung fehlgeschlagen. pubsub ist noch nicht bereit. Bitte versuchen Sie es später erneut.", - "Failed to Publish subscription notification to clusters, please retry.": "Publizieren der Subskriptionsbenachrichtigung an Cluster fehlgeschlagen. Bitte versuchen Sie es erneut.", - "Failed to Publish subscription notification to clusters, pubsub is not ready yet, please retry.": "Publizieren der Subskriptionsbenachrichtigungen an Cluster fehlgeschlagen. pubsub ist noch nicht bereit. Bitte versuchen Sie es später erneut.", - "group name \"{{name}}\" not found": "Gruppenname \"{{name}}\" nicht gefunden", - "group uuid \"{{uuid}}\" not found": "Gruppen-UUID \"{{uuid}}\" nicht gefunden", - "hist _id \"{{histId}}\" not found": "Verlaufs-ID \"{{histId}}\" nicht gefunden", - "Invalid razee-org-key was submitted for {{queryName}}": "Ungültiger razee-org-key wurde für {{queryName}} übergeben.", - "No org was found for the org key.": "Für den Organisationsschlüssel wurde keine Organisation gefunden.", - "No razee-org-key was supplied.": "Es wurde kein razee-org-key bereitgestellt.", - "None of the passed group uuids were found": "Keine der übergebenen Gruppen-UUIDs wurde gefunden.", - "One or more of the passed group uuids were not found": "Mindestens eine der übergebenen Gruppen-UUIDs wurde nicht gefunden.", - "org id was not found": "Organisation-ID nicht gefunden", - "Provided YAML content is not valid: {{error}}": "Bereitgestellter YAML-Inhalt ist ungültig: {{error}}", - "Query {{queryName}} error. {{error.message}}": "Bei Abfrage {{queryName}} Fehler {{error.message}}", - "Query {{queryName}} error. MessageID: {{req_id}}.": "Bei Abfrage {{queryName}} Fehler. Nachrichten-ID: {{req_id}}.", - "Query {{queryName}} find error. MessageID: {{req_id}}.": "Bei Abfrage {{queryName}} Suchfehler. Nachrichten-ID: {{req_id}}.", - "resourcesCount encountered an error. {{error.message}}": "resourcesCount hat einen Fehler festgestellt. {{error.message}}", - "Subscription { uuid: \"{{uuid}}\", org_id:{{org_id}} } not found.": "Subskription { uuid: \"{{uuid}}\", org_id:{{org_id}} } nicht gefunden.", - "Subscription { uuid: \"{{uuid}}\", orgId:{{orgId}} } not found.": "Subskription { uuid: \"{{uuid}}\", orgId:{{orgId}} } nicht gefunden.", - "Subscription uuid \"{{uuid}}\" not found.": "Subskriptions-UUID \"{{uuid}}\" nicht gefunden.", - "The channel name {{name}} already exists.": "Der Kanalname {{name}} ist bereits vorhanden.", - "The group name {{name}} already exists.": "Der Gruppenname {{name}} ist bereits vorhanden.", - "The version name {{name}} already exists": "Der Versionsname {{name}} ist bereits vorhanden.", - "Too many channel version are registered under {{channel_uuid}}.": "Unter {{channel_uuid}} sind zu viele Kanalversionen registriert.", - "Too many channels are registered under {{org_id}}.": "Unter {{org_id}} sind zu viele Kanäle registriert.", - "Too many subscriptions are registered under {{org_id}}.": "Unter {{org_id}} sind zu viele Subskriptionen registriert.", - "version uuid \"{{uuid}}\" not found": "Versions-UUID \"{{uuid}}\" nicht gefunden", - "version uuid \"{{version_uuid}}\" not found": "Versions-UUID \"{{version_uuid}}\" nicht gefunden", - "Version uuid \"{{version_uuid}}\" not found.": "Versions-UUID \"{{version_uuid}}\" nicht gefunden.", - "versionObj \"{{uuid}}\" is not found for {{channel.name}}:{{channel.uuid}}": "Versionsobjekt \"{{uuid}}\" für {{channel.name}}:{{channel.uuid}} nicht gefunden", - "versionObj \"{{versionUuid}}\" is not found for {{channel.name}}:{{channel.uuid}}": "Versionsobjekt \"{{versionUuid}}\" für {{channel.name}}:{{channel.uuid}} nicht gefunden", - "versionObj.location=\"{{versionObj.location}}\" not implemented yet": "versionObj.location=\"{{versionObj.location}}\" noch nicht implementiert", - "YAML file size should not be more than {{CHANNEL_VERSION_YAML_MAX_SIZE_LIMIT_MB}}mb": "YAML-Dateigröße sollte nicht mehr als {{CHANNEL_VERSION_YAML_MAX_SIZE_LIMIT_MB}}MB betragen", - "You are not allowed to {{action}} on {{type}} under organization {{org_id}} for the query {{queryName}}.": "Sie sind nicht für die Ausführung von {{action}} auf {{type}} unter Organisation {{org_id}} für die Abfrage {{queryName}} berechtigt.", - "You are not allowed to access this resource due to missing cluster group permission.": "Sie dürfen nicht auf diese Ressource zugreifen, da die Berechtigung für die Clustergruppe fehlt.", - "You are not allowed to access this resource due to missing cluster tag permission.": "Sie dürfen nicht auf diese Ressource zugreifen, da die Berechtigung für das Cluster-Tag fehlt.", - "You are not allowed to read resources due to missing permissions on cluster group {{group.name}}.": "Sie dürfen Ressourcen nicht lesen, da die Berechtigungen für die Clustergruppe {{group.name}} fehlen.", - "You are not allowed to read resources due to missing permissions on subscription group {{group}}.": "Sie dürfen Ressourcen nicht lesen, da die Berechtigungen für die Subskriptionsgruppe {{group}} fehlen.", - "You are not allowed to read subscriptions due to missing permissions on cluster group {{group.name}}.": "Sie dürfen Subskriptionen nicht lesen, da Berechtigungen für die Clustergruppe {{group.name}} fehlen.", - "You are not allowed to set subscription for all of {{subscription.groups}} groups.": "Sie dürfen keine Subskription für alle {{subscription.groups}}-Gruppen festlegen.", - "You have exceeded the maximum amount of clusters for this org - {{org_id}}": "Sie haben den Maximalwert an Clustern für diese Organisation {{org_id}} überschritten.", - "You have exeeded the maximum amount of pending clusters for this org - {{org_id}}.": "Sie haben den Maximalwert an anstehenden Clustern für diese Organisation {{org_id}} überschritten." - } - diff --git a/locales/ja/razee-resources.json b/locales/ja/razee-resources.json index eeaa1c9ad..f97173f86 100644 --- a/locales/ja/razee-resources.json +++ b/locales/ja/razee-resources.json @@ -1,156 +1,78 @@ { - "{{clusterCount}} clusters depend on this group. Please update/remove the group from the clusters.": "{{clusterCount}} 個のクラスターがこのグループに依存しています。グループを更新するか、クラスターから削除してください。", - "{{subCount}} subscription(s) depend on this channel. Please update/remove them before removing this channel.": "{{subCount}} 個のサブスクリプションがこのチャネルに依存しています。このチャンネルを削除する前に、更新または削除してください。", - "{{subCount}} subscriptions depend on this channel version. Please update/remove them before removing this channel version.": "{{subCount}} 個のサブスクリプションがこのチャネルのバージョンに依存しています。このチャンネルのバージョンを削除する前に、更新または削除してください。", - "{{subCount}} subscriptions depend on this cluster group. Please update/remove them before removing this group.": "{{subCount}} 個のサブスクリプションがこのクラスター・グループに依存しています。このグループを削除する前に、更新または削除してください。", - "A \"channel_uuid\" must be specified": "\"channel_uuid\" を指定する必要があります", - "A \"file\" or \"content\" must be specified": "\"file\" または \"content\" を指定する必要があります", - "A \"name\" must be specified": "\"name\" を指定する必要があります", - "A \"type\" of application/yaml must be specified": "application/yaml の \"type\" を指定する必要があります", - "A cluster name is not defined in the registration data": "クラスター名が登録データに定義されていません", - "Another cluster already exists with the same registration name {{registration.name}}": "同じ登録名 {{registration.name}} の別のクラスターが既に存在します", - "channel uuid \"{{channel_uuid}}\" not found": "チャネル uuid \"{{channel_uuid}}\" が見つかりません", - "Channel uuid \"{{channel_uuid}}\" not found.": "チャネル uuid \"{{channel_uuid}}\" が見つかりません。", - "Channel uuid \"{{subscription.channel_uuid}}\" not found.": "チャネル uuid \"{{subscription.channel_uuid}}\" が見つかりません。", - "channel uuid \"{{uuid}}\" not found": "チャネル uuid \"{{uuid}}\" が見つかりません", - "commonResourceSearch encountered an error. {{error.message}}": "commonResourceSearch がエラーを検出しました。{{error.message}}", - "commonResourcesSearch encountered an error. {{error.message}}": "commonResourcesSearch がエラーを検出しました。{{error.message}}", - "Could not find all the cluster groups {{groups}} in the groups database, please create them first.": "グループ・データベース内のすべてのクラスター・グループ {{groups}} が見つかりませんでした。最初に作成してください。", - "could not find group with name {{name}}.": "名前が {{name}} のグループが見つかりませんでした。", - "could not find group with uuid {{uuid}}.": "uuid が {{uuid}} のグループが見つかりませんでした。", - "Could not find subscriptions.": "サブスクリプションが見つかりませんでした。", - "Could not find the channel with name {{name}}.": "名前が {{name}} のチャネルが見つかりませんでした。", - "Could not find the channel with uuid {{uuid}}.": "uuid が {{uuid}} のチャネルが見つかりませんでした。", - "Could not find the channel with uuid/name {{channel_uuid}}/channelName.": "uuid/名前が {{channel_uuid}}/channelName のチャネルが見つかりませんでした。", - "Could not find the cluster for the cluster id {{cluster_id}}.": "クラスター ID が {{cluster_id}} のクラスターが見つかりませんでした。", - "Could not find the cluster with Id {{clusterId}}.": "ID が {{clusterId}} のクラスターが見つかりませんでした。", - "Could not find the cluster with name {{clusterName}}.": "名前が {{clusterName}} のクラスターが見つかりませんでした。", - "Could not find the organization with ID {{org_id}}.": "ID が {{org_id}} の組織が見つかりませんでした。", - "Could not find the subscription for the subscription id {{subscription_id}}.": "サブスクリプション ID が {{subscription_id}} のサブスクリプションが見つかりませんでした。", - "Could not find the subscription.": "サブスクリプションが見つかりませんでした。", - "Could not locate the cluster with cluster_id {{cluster_id}}": "cluster_id が {{cluster_id}} のクラスターが見つかりませんでした", - "Could not locate the cluster with clusterName {{clusterName}}": "clusterName が {{clusterName}} のクラスターが見つかりませんでした", - "DeployableVersion is not found for {{channel.name}}:{{channel.uuid}}/{{versionObj.name}}:{{versionObj.uuid}}.": "{{channel.name}}:{{channel.uuid}}/{{versionObj.name}}:{{versionObj.uuid}} に対して DeployableVersion が見つかりません。", - "Error retrieving data from s3 bucket. {{error.message}}": "s3 バケットからデータを取得中にエラーが発生しました。{{error.message}}", - "Failed to Publish resource notification, please reload the page.": "リソース通知のパブリッシュに失敗しました。ページを再ロードしてください。", - "Failed to Publish resource notification, pubsub is not ready yet, please retry later.": "リソース通知のパブリッシュに失敗しました。パブリッシュ/サブスクライブはまだ準備ができていません。後で再試行してください。", - "Failed to Publish subscription notification to clusters, please retry.": "クラスターに対するサブスクリプション通知のパブリッシュに失敗しました。再試行してください。", - "Failed to Publish subscription notification to clusters, pubsub is not ready yet, please retry.": "クラスターに対するサブスクリプション通知のパブリッシュに失敗しました。パブリッシュ/サブスクライブはまだ準備ができていません。再試行してください。", - "group name \"{{name}}\" not found": "グループ名 \"{{name}}\" が見つかりません", - "group uuid \"{{uuid}}\" not found": "グループ uuid \"{{uuid}}\" が見つかりません", - "hist _id \"{{histId}}\" not found": "hist _id \"{{histId}}\" が見つかりません", - "Invalid razee-org-key was submitted for {{queryName}}": "無効な razee-org-key が {{queryName}} に対して送信されました", - "No org was found for the org key.": "org key の組織が見つかりませんでした。", - "No razee-org-key was supplied.": "razee-org-key は提供されませんでした。", - "None of the passed group uuids were found": "渡されたグループ uuid は見つかりませんでした", - "One or more of the passed group uuids were not found": "渡されたグループ uuid の 1 つ以上が見つかりませんでした", - "org id was not found": "組織 ID が見つかりませんでした", - "Provided YAML content is not valid: {{error}}": "指定された YAML コンテンツが無効です。{{error}}", - "Query {{queryName}} error. {{error.message}}": "照会 {{queryName}} エラー。{{error.message}}", - "Query {{queryName}} error. MessageID: {{req_id}}.": "照会 {{queryName}} エラー。MessageID: {{req_id}}。", - "Query {{queryName}} find error. MessageID: {{req_id}}.": "照会 {{queryName}} がエラーを検出しました。MessageID: {{req_id}}。", - "resourcesCount encountered an error. {{error.message}}": "resourcesCount がエラーを検出しました。{{error.message}}", - "Subscription { uuid: \"{{uuid}}\", org_id:{{org_id}} } not found.": "サブスクリプション { uuid: \"{{uuid}}\", org_id:{{org_id}} } が見つかりません。", - "Subscription { uuid: \"{{uuid}}\", orgId:{{orgId}} } not found.": "サブスクリプション { uuid: \"{{uuid}}\", orgId:{{orgId}} } が見つかりません。", - "Subscription uuid \"{{uuid}}\" not found.": "サブスクリプション uuid \"{{uuid}}\" が見つかりません。", - "The channel name {{name}} already exists.": "チャネル名 {{name}} は既に存在します。", - "The group name {{name}} already exists.": "グループ名 {{name}} は既に存在します。", - "The version name {{name}} already exists": "バージョン名 {{name}} は既に存在します", - "Too many channel version are registered under {{channel_uuid}}.": "{{channel_uuid}} の下に登録されているチャンネル・バージョンが多すぎます。", - "Too many channels are registered under {{org_id}}.": "{{org_id}} の下に登録されているチャネルが多すぎます。", - "Too many subscriptions are registered under {{org_id}}.": "{{org_id}} の下に登録されているサブスクリプションが多すぎます。", - "version uuid \"{{uuid}}\" not found": "バージョン uuid \"{{uuid}}\" が見つかりません", - "version uuid \"{{version_uuid}}\" not found": "バージョン uuid \"{{version_uuid}}\" が見つかりません", - "Version uuid \"{{version_uuid}}\" not found.": "バージョン uuid \"{{version_uuid}}\" が見つかりません。", - "versionObj \"{{uuid}}\" is not found for {{channel.name}}:{{channel.uuid}}": "{{channel.name}}:{{channel.uuid}} に対して versionObj \"{{uuid}}\" が見つかりません", - "versionObj \"{{versionUuid}}\" is not found for {{channel.name}}:{{channel.uuid}}": "{{channel.name}}:{{channel.uuid}} に対して versionObj \"{{versionUuid}}\" が見つかりません", - "versionObj.location=\"{{versionObj.location}}\" not implemented yet": "versionObj.location=\"{{versionObj.location}}\" はまだ実装されていません。", - "YAML file size should not be more than {{CHANNEL_VERSION_YAML_MAX_SIZE_LIMIT_MB}}mb": "YAML ファイル・サイズは {{CHANNEL_VERSION_YAML_MAX_SIZE_LIMIT_MB}}mb 以下にする必要があります", - "You are not allowed to {{action}} on {{type}} under organization {{org_id}} for the query {{queryName}}.": "照会 {{queryName}} の組織 {{org_id}} の下にある {{type}} に対して {{action}} を実行することはできません。", - "You are not allowed to access this resource due to missing cluster group permission.": "クラスター・グループに対するアクセス権がないため、このリソースにアクセスできません。", - "You are not allowed to access this resource due to missing cluster tag permission.": "クラスター・タグに対するアクセス権がないため、このリソースにアクセスできません。", - "You are not allowed to read resources due to missing permissions on cluster group {{group.name}}.": "クラスター・グループ {{group.name}} に対するアクセス権がないため、リソースを読み取れません。", - "You are not allowed to read resources due to missing permissions on subscription group {{group}}.": "サブスクリプション・グループ {{group}} に対するアクセス権がないため、リソースを読み取れません。", - "You are not allowed to read subscriptions due to missing permissions on cluster group {{group.name}}.": "クラスター・グループ {{group.name}} に対するアクセス権がないため、サブスクリプションを読み取れません。", - "You are not allowed to set subscription for all of {{subscription.groups}} groups.": "{{subscription.groups}} グループのすべてに対してサブスクリプションを設定することはできません。", - "You have exceeded the maximum amount of clusters for this org - {{org_id}}": "この組織 - {{org_id}} のクラスターの最大数を超えました", - "You have exeeded the maximum amount of pending clusters for this org - {{org_id}}.": "この組織 - {{org_id}} の保留中のクラスターの最大数を超えました。" - } - diff --git a/locales/pt-br/razee-resources.json b/locales/pt-br/razee-resources.json index caf479888..a3d7676d1 100644 --- a/locales/pt-br/razee-resources.json +++ b/locales/pt-br/razee-resources.json @@ -1,156 +1,78 @@ { - "{{clusterCount}} clusters depend on this group. Please update/remove the group from the clusters.": "{{clusterCount}} clusters dependem deste grupo. Atualize/remova o grupo dos clusters.", - "{{subCount}} subscription(s) depend on this channel. Please update/remove them before removing this channel.": "{{subCount}} assinaturas dependem deste canal. Atualize-as ou as remova antes de remover este canal.", - "{{subCount}} subscriptions depend on this channel version. Please update/remove them before removing this channel version.": "{{subCount}} assinaturas dependem desta versão do canal. Atualize-as ou as remova antes de remover esta versão do canal.", - "{{subCount}} subscriptions depend on this cluster group. Please update/remove them before removing this group.": "{{subCount}} assinaturas dependem deste grupo de clusters. Atualize-as ou as remova antes de remover este grupo.", - "A \"channel_uuid\" must be specified": "Um \"channel_uuid\" deve ser especificado", - "A \"file\" or \"content\" must be specified": "Um \"file\" ou \"content\" deve ser especificado", - "A \"name\" must be specified": "Um \"name\" deve ser especificado", - "A \"type\" of application/yaml must be specified": "Um \"type\" de aplicativo/YAML deve ser especificado", - "A cluster name is not defined in the registration data": "Não há um nome de cluster definido nos dados de registro", - "Another cluster already exists with the same registration name {{registration.name}}": "Outro cluster já existe com o mesmo nome de registro {{registration.name}}", - "channel uuid \"{{channel_uuid}}\" not found": "UUID do canal \"{{channel_uuid}}\" não localizado", - "Channel uuid \"{{channel_uuid}}\" not found.": "UUID do canal \"{{channel_uuid}}\" não localizado.", - "Channel uuid \"{{subscription.channel_uuid}}\" not found.": "UUID do canal \"{{subscription.channel_uuid}}\" não localizado.", - "channel uuid \"{{uuid}}\" not found": "UUID do canal \"{{uuid}}\" não localizado", - "commonResourceSearch encountered an error. {{error.message}}": "commonResourceSearch encontrou um erro. {{error.message}}", - "commonResourcesSearch encountered an error. {{error.message}}": "commonResourcesSearch encontrou um erro. {{error.message}}", - "Could not find all the cluster groups {{groups}} in the groups database, please create them first.": "Não foi possível localizar todos os grupos de clusters {{groups}} no banco de dados de grupos. Crie-os primeiro.", - "could not find group with name {{name}}.": "não foi possível localizar o grupo com o nome {{name}}.", - "could not find group with uuid {{uuid}}.": "não foi possível localizar o grupo com o UUID {{uuid}}.", - "Could not find subscriptions.": "Não foi possível localizar assinaturas.", - "Could not find the channel with name {{name}}.": "Não foi possível localizar o canal com o nome {{name}}.", - "Could not find the channel with uuid {{uuid}}.": "Não foi possível localizar o canal com o UUID {{uuid}}.", - "Could not find the channel with uuid/name {{channel_uuid}}/channelName.": "Não foi possível localizar o canal com o UUID/nome {{channel_uuid}}/channelName.", - "Could not find the cluster for the cluster id {{cluster_id}}.": "Não foi possível localizar o cluster para o ID de cluster {{cluster_id}}.", - "Could not find the cluster with Id {{clusterId}}.": "Não foi possível localizar o cluster com o ID {{clusterId}}.", - "Could not find the cluster with name {{clusterName}}.": "Não foi possível localizar o cluster com o nome {{clusterName}}.", - "Could not find the organization with ID {{org_id}}.": "Não foi possível localizar a organização com o ID {{org_id}}.", - "Could not find the subscription for the subscription id {{subscription_id}}.": "Não foi possível localizar a assinatura para o ID de assinatura {{subscription_id}}.", - "Could not find the subscription.": "Não foi possível localizar a assinatura.", - "Could not locate the cluster with cluster_id {{cluster_id}}": "Não foi possível localizar o cluster com o cluster_id {{cluster_id}}", - "Could not locate the cluster with clusterName {{clusterName}}": "Não foi possível localizar o cluster com o clusterName {{clusterName}}", - "DeployableVersion is not found for {{channel.name}}:{{channel.uuid}}/{{versionObj.name}}:{{versionObj.uuid}}.": "Não foi localizada uma versão implementável para {{channel.name}}:{{channel.uuid}}/{{versionObj.name}}:{{versionObj.uuid}}.", - "Error retrieving data from s3 bucket. {{error.message}}": "Erro ao recuperar dados do depósito s3. {{error.message}}", - "Failed to Publish resource notification, please reload the page.": "Falha ao publicar a notificação de recurso. Recarregue a página.", - "Failed to Publish resource notification, pubsub is not ready yet, please retry later.": "Falha ao publicar a notificação de recurso. Pubsub ainda não está pronto. Tente novamente mais tarde.", - "Failed to Publish subscription notification to clusters, please retry.": "Falha ao publicar a notificação de assinatura nos clusters. Tente novamente.", - "Failed to Publish subscription notification to clusters, pubsub is not ready yet, please retry.": "Falha ao publicar a notificação de assinatura nos clusters. Pubsub ainda não está pronto. Tente novamente.", - "group name \"{{name}}\" not found": "Nome do grupo \"{{name}}\" não localizado", - "group uuid \"{{uuid}}\" not found": "UUID do grupo \"{{uuid}}\" não localizado", - "hist _id \"{{histId}}\" not found": "hist_id \"{{histId}}\" não localizado", - "Invalid razee-org-key was submitted for {{queryName}}": "Razee-org-key inválida enviada para {{queryName}}", - "No org was found for the org key.": "Nenhuma organização foi localizada para a chave de organização.", - "No razee-org-key was supplied.": "Nenhuma razee-org-key foi fornecida.", - "None of the passed group uuids were found": "Nenhum dos UUIDs do grupo aprovado foi localizado", - "One or more of the passed group uuids were not found": "Um ou mais dos UUIDs do grupo aprovado não foram localizados", - "org id was not found": "o ID da organização não foi localizado", - "Provided YAML content is not valid: {{error}}": "O conteúdo do YAML fornecido não é válido: {{error}}", - "Query {{queryName}} error. {{error.message}}": "Erro na consulta {{queryName}}. {{error.message}}", - "Query {{queryName}} error. MessageID: {{req_id}}.": "Erro na consulta {{queryName}}. ID de mensagem: {{req_id}}.", - "Query {{queryName}} find error. MessageID: {{req_id}}.": "Erro de localização na consulta {{queryName}}. ID de mensagem: {{req_id}}.", - "resourcesCount encountered an error. {{error.message}}": "resourcesCount encontrou um erro. {{error.message}}", - "Subscription { uuid: \"{{uuid}}\", org_id:{{org_id}} } not found.": "Assinatura { uuid: \"{{uuid}}\", org_id:{{org_id}} } não localizada.", - "Subscription { uuid: \"{{uuid}}\", orgId:{{orgId}} } not found.": "Assinatura { uuid: \"{{uuid}}\", orgId:{{orgId}} } não localizada.", - "Subscription uuid \"{{uuid}}\" not found.": "UUID de assinatura \"{{uuid}}\" não localizado.", - "The channel name {{name}} already exists.": "O nome do canal {{name}} já existe.", - "The group name {{name}} already exists.": "O nome do grupo {{name}} já existe.", - "The version name {{name}} already exists": "O nome da versão {{name}} já existe", - "Too many channel version are registered under {{channel_uuid}}.": "Muitas versões de canal estão registradas em {{channel_uuid}}.", - "Too many channels are registered under {{org_id}}.": "Muitos canais estão registrados em {{org_id}}.", - "Too many subscriptions are registered under {{org_id}}.": "Muitas assinaturas estão registradas em {{org_id}}.", - "version uuid \"{{uuid}}\" not found": "UUID da versão \"{{uuid}}\" não localizado", - "version uuid \"{{version_uuid}}\" not found": "UUID da versão \"{{version_uuid}}\" não localizado", - "Version uuid \"{{version_uuid}}\" not found.": "UUID da versão \"{{version_uuid}}\" não localizado.", - "versionObj \"{{uuid}}\" is not found for {{channel.name}}:{{channel.uuid}}": "versionObj \"{{uuid}}\" não foi localizado para {{channel.name}}:{{channel.uuid}}", - "versionObj \"{{versionUuid}}\" is not found for {{channel.name}}:{{channel.uuid}}": "versionObj \"{{versionUuid}}\" não foi localizado para {{channel.name}}:{{channel.uuid}}", - "versionObj.location=\"{{versionObj.location}}\" not implemented yet": "versionObj.location=\"{{versionObj.location}}\" ainda não foi implementado", - "YAML file size should not be more than {{CHANNEL_VERSION_YAML_MAX_SIZE_LIMIT_MB}}mb": "O arquivo YAML não deve ter um tamanho maior que {{CHANNEL_VERSION_YAML_MAX_SIZE_LIMIT_MB}} MB", - "You are not allowed to {{action}} on {{type}} under organization {{org_id}} for the query {{queryName}}.": "Você não tem permissão para {{action}} em {{type}} na organização {{org_id}} para a consulta {{queryName}}.", - "You are not allowed to access this resource due to missing cluster group permission.": "Você não tem a permissão de grupo de clusters necessária para acessar este recurso.", - "You are not allowed to access this resource due to missing cluster tag permission.": "Você não tem a permissão de tag de cluster necessária para acessar este recurso.", - "You are not allowed to read resources due to missing permissions on cluster group {{group.name}}.": "Você não tem as permissões necessárias no grupo de clusters {{group.name}} para ler recursos.", - "You are not allowed to read resources due to missing permissions on subscription group {{group}}.": "Você não tem as permissões necessárias no grupo de assinaturas {{group}} para ler recursos.", - "You are not allowed to read subscriptions due to missing permissions on cluster group {{group.name}}.": "Você não tem as permissões necessárias no grupo de clusters {{group.name}} para ler assinaturas.", - "You are not allowed to set subscription for all of {{subscription.groups}} groups.": "Você não tem permissão para configurar a assinatura para todos os grupos {{subscription.groups}}.", - "You have exceeded the maximum amount of clusters for this org - {{org_id}}": "Você excedeu a quantidade máxima de clusters para esta organização - {{org_id}}", - "You have exeeded the maximum amount of pending clusters for this org - {{org_id}}.": "Você excedeu a quantidade máxima de clusters pendentes para esta organização - {{org_id}}." - } - diff --git a/package-lock.json b/package-lock.json index 84905c6bd..d9ebfd1e4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2410,9 +2410,9 @@ "dev": true }, "@sinonjs/commons": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.1.tgz", - "integrity": "sha512-892K+kWUUi3cl+LlqEWIDrhvLgdL79tECi8JZUyq6IviKy/DNhuzCRlbHUjxK89f4ypPMMaFnFuR9Ie6DoIMsw==", + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.2.tgz", + "integrity": "sha512-sruwd86RJHdsVf/AtBoijDmUqJp3B6hF/DGC23C+JaegnDHaZyewCjoVGTdg3J0uz3Zs7NnIT05OBOmML72lQw==", "dev": true, "requires": { "type-detect": "4.0.8" @@ -2427,20 +2427,10 @@ "@sinonjs/commons": "^1.7.0" } }, - "@sinonjs/formatio": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/@sinonjs/formatio/-/formatio-5.0.1.tgz", - "integrity": "sha512-KaiQ5pBf1MpS09MuA0kp6KBQt2JUOQycqVG1NZXvzeaXe5LGFqAKueIS0bw4w0P9r7KuBSVdUk5QjXsUdu2CxQ==", - "dev": true, - "requires": { - "@sinonjs/commons": "^1", - "@sinonjs/samsam": "^5.0.2" - } - }, "@sinonjs/samsam": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-5.3.0.tgz", - "integrity": "sha512-hXpcfx3aq+ETVBwPlRFICld5EnrkexXuXDwqUNhDdr5L8VjvMeSRwyOa0qL7XFmR+jVWR4rUZtnxlG7RX72sBg==", + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-5.3.1.tgz", + "integrity": "sha512-1Hc0b1TtyfBu8ixF/tpfSHTVWKwCBLY4QJbkgnE7HcwyvT2xArDxb4K7dMgqRm3szI+LJbzmW/s4xxEhv6hwDg==", "dev": true, "requires": { "@sinonjs/commons": "^1.6.0", @@ -3022,6 +3012,47 @@ } } }, + "apollo-datasource": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/apollo-datasource/-/apollo-datasource-0.7.3.tgz", + "integrity": "sha512-PE0ucdZYjHjUyXrFWRwT02yLcx2DACsZ0jm1Mp/0m/I9nZu/fEkvJxfsryXB6JndpmQO77gQHixf/xGCN976kA==", + "requires": { + "apollo-server-caching": "^0.5.3", + "apollo-server-env": "^3.0.0" + }, + "dependencies": { + "apollo-server-caching": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/apollo-server-caching/-/apollo-server-caching-0.5.3.tgz", + "integrity": "sha512-iMi3087iphDAI0U2iSBE9qtx9kQoMMEWr6w+LwXruBD95ek9DWyj7OeC2U/ngLjRsXM43DoBDXlu7R+uMjahrQ==", + "requires": { + "lru-cache": "^6.0.0" + } + }, + "apollo-server-env": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/apollo-server-env/-/apollo-server-env-3.0.0.tgz", + "integrity": "sha512-tPSN+VttnPsoQAl/SBVUpGbLA97MXG990XIwq6YUnJyAixrrsjW1xYG7RlaOqetxm80y5mBZKLrRDiiSsW/vog==", + "requires": { + "node-fetch": "^2.1.2", + "util.promisify": "^1.0.0" + } + }, + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "requires": { + "yallist": "^4.0.0" + } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + } + } + }, "apollo-engine-reporting-protobuf": { "version": "0.4.4", "resolved": "https://registry.npmjs.org/apollo-engine-reporting-protobuf/-/apollo-engine-reporting-protobuf-0.4.4.tgz", @@ -3070,6 +3101,14 @@ "apollo-tracing": "^0.8.8" } }, + "apollo-reporting-protobuf": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/apollo-reporting-protobuf/-/apollo-reporting-protobuf-0.6.2.tgz", + "integrity": "sha512-WJTJxLM+MRHNUxt1RTl4zD0HrLdH44F2mDzMweBj1yHL0kSt8I1WwoiF/wiGVSpnG48LZrBegCaOJeuVbJTbtw==", + "requires": { + "@apollo/protobufjs": "^1.0.3" + } + }, "apollo-server": { "version": "2.21.0", "resolved": "https://registry.npmjs.org/apollo-server/-/apollo-server-2.21.0.tgz", @@ -3360,18 +3399,18 @@ "integrity": "sha512-FeGxW3Batn6sUtX3OVVUm7o56EgjxDlmgpTLNyWcLb0j6P8mw9oLNyAm3B+deHA4KNdNHO5BmHS2g1SJYjqPCQ==" }, "apollo-server-express": { - "version": "2.21.0", - "resolved": "https://registry.npmjs.org/apollo-server-express/-/apollo-server-express-2.21.0.tgz", - "integrity": "sha512-zbOSNGuxUjlOFZnRrbMpga3pKDEroitF4NAqoVxgBivx7v2hGsE7rljct3PucTx2cMN90AyYe3cU4oA8jBxZIQ==", + "version": "2.21.1", + "resolved": "https://registry.npmjs.org/apollo-server-express/-/apollo-server-express-2.21.1.tgz", + "integrity": "sha512-O8msL01rl1iOfx4qmgpdNDXCh2u+adis8m2pHXZJfHciOoBmAgYaLlH7AOxpW5iHK/vQIwBM0dkPpxu5SaWpag==", "requires": { - "@apollographql/graphql-playground-html": "1.6.26", + "@apollographql/graphql-playground-html": "1.6.27", "@types/accepts": "^1.3.5", "@types/body-parser": "1.19.0", "@types/cors": "2.8.8", "@types/express": "4.17.7", "@types/express-serve-static-core": "4.17.18", "accepts": "^1.3.5", - "apollo-server-core": "^2.21.0", + "apollo-server-core": "^2.21.1", "apollo-server-types": "^0.6.3", "body-parser": "^1.18.3", "cors": "^2.8.4", @@ -3383,6 +3422,14 @@ "type-is": "^1.6.16" }, "dependencies": { + "@apollographql/graphql-playground-html": { + "version": "1.6.27", + "resolved": "https://registry.npmjs.org/@apollographql/graphql-playground-html/-/graphql-playground-html-1.6.27.tgz", + "integrity": "sha512-tea2LweZvn6y6xFV11K0KC8ETjmm52mQrW+ezgB2O/aTQf8JGyFmMcRPFgUaQZeHbWdm8iisDC6EjOKsXu0nfw==", + "requires": { + "xss": "^1.0.8" + } + }, "@types/express-serve-static-core": { "version": "4.17.18", "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.18.tgz", @@ -3393,32 +3440,6 @@ "@types/range-parser": "*" } }, - "apollo-cache-control": { - "version": "0.11.6", - "resolved": "https://registry.npmjs.org/apollo-cache-control/-/apollo-cache-control-0.11.6.tgz", - "integrity": "sha512-YZ+uuIG+fPy+mkpBS2qKF0v1qlzZ3PW6xZVaDukeK3ed3iAs4L/2YnkTqau3OmoF/VPzX2FmSkocX/OVd59YSw==", - "requires": { - "apollo-server-env": "^3.0.0", - "apollo-server-plugin-base": "^0.10.4" - } - }, - "apollo-datasource": { - "version": "0.7.3", - "resolved": "https://registry.npmjs.org/apollo-datasource/-/apollo-datasource-0.7.3.tgz", - "integrity": "sha512-PE0ucdZYjHjUyXrFWRwT02yLcx2DACsZ0jm1Mp/0m/I9nZu/fEkvJxfsryXB6JndpmQO77gQHixf/xGCN976kA==", - "requires": { - "apollo-server-caching": "^0.5.3", - "apollo-server-env": "^3.0.0" - } - }, - "apollo-reporting-protobuf": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/apollo-reporting-protobuf/-/apollo-reporting-protobuf-0.6.2.tgz", - "integrity": "sha512-WJTJxLM+MRHNUxt1RTl4zD0HrLdH44F2mDzMweBj1yHL0kSt8I1WwoiF/wiGVSpnG48LZrBegCaOJeuVbJTbtw==", - "requires": { - "@apollo/protobufjs": "^1.0.3" - } - }, "apollo-server-caching": { "version": "0.5.3", "resolved": "https://registry.npmjs.org/apollo-server-caching/-/apollo-server-caching-0.5.3.tgz", @@ -3428,12 +3449,12 @@ } }, "apollo-server-core": { - "version": "2.21.0", - "resolved": "https://registry.npmjs.org/apollo-server-core/-/apollo-server-core-2.21.0.tgz", - "integrity": "sha512-GtIiq2F0dVDLzzIuO5+dK/pGq/sGxYlKCqAuQQqzYg0fvZ7fukyluXtcTe0tMI+FJZjU0j0WnKgiLsboCoAlPQ==", + "version": "2.21.1", + "resolved": "https://registry.npmjs.org/apollo-server-core/-/apollo-server-core-2.21.1.tgz", + "integrity": "sha512-aI+soLaqKMkWxH6l9xvPP1fCuZgD053SK09D79LQfMbJAHHvs3MI90UpydiY/W61K5l8ELl0YsKdqkQg8262nw==", "requires": { "@apollographql/apollo-tools": "^0.4.3", - "@apollographql/graphql-playground-html": "1.6.26", + "@apollographql/graphql-playground-html": "1.6.27", "@apollographql/graphql-upload-8-fork": "^8.1.3", "@types/ws": "^7.0.0", "apollo-cache-control": "^0.11.6", @@ -3466,26 +3487,6 @@ "requires": { "node-fetch": "^2.1.2", "util.promisify": "^1.0.0" - }, - "dependencies": { - "graphql-upload": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/graphql-upload/-/graphql-upload-8.1.0.tgz", - "integrity": "sha512-U2OiDI5VxYmzRKw0Z2dmfk0zkqMRaecH9Smh1U277gVgVe9Qn+18xqf4skwr4YJszGIh7iQDZ57+5ygOK9sM/Q==", - "requires": { - "busboy": "^0.3.1", - "fs-capacitor": "^2.0.4", - "http-errors": "^1.7.3", - "object-path": "^0.11.4" - }, - "dependencies": { - "fs-capacitor": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/fs-capacitor/-/fs-capacitor-2.0.4.tgz", - "integrity": "sha512-8S4f4WsCryNw2mJJchi46YgB6CR5Ze+4L1h8ewl9tEpL4SJ3ZO+c/bS4BWhB8bK+O3TMqhuZarTitd0S0eh2pA==" - } - } - } } }, "apollo-server-plugin-base": { @@ -8229,9 +8230,9 @@ } }, "i18next-fs-backend": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/i18next-fs-backend/-/i18next-fs-backend-1.0.8.tgz", - "integrity": "sha512-1TyOJEGBvwqdIu0vZo/pcAxPXe/0vqOX6/hgsgTnNpcGe0PyHJ/87ABDdwdwfKJSxbtM0j6Pue0NKFcx6rOeJg==" + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/i18next-fs-backend/-/i18next-fs-backend-1.1.0.tgz", + "integrity": "sha512-QfzfrEYEsLsDC5sZsdSQl5fVYg8I5KrJynnWN7xgSU5yfClbBJ009mtNxUszR0uABQZ8PRr2gj3bN9+RNORBlg==" }, "i18next-http-middleware": { "version": "3.1.0", @@ -10545,9 +10546,9 @@ } }, "mongodb": { - "version": "3.6.4", - "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-3.6.4.tgz", - "integrity": "sha512-Y+Ki9iXE9jI+n9bVtbTOOdK0B95d6wVGSucwtBkvQ+HIvVdTCfpVRp01FDC24uhC/Q2WXQ8Lpq3/zwtB5Op9Qw==", + "version": "3.6.5", + "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-3.6.5.tgz", + "integrity": "sha512-mQlYKw1iGbvJJejcPuyTaytq0xxlYbIoVDm2FODR+OHxyEiMR021vc32bTvamgBjCswsD54XIRwhg3yBaWqJjg==", "requires": { "bl": "^2.2.1", "bson": "^1.1.4", @@ -10684,6 +10685,19 @@ "sliced": "1.0.1" }, "dependencies": { + "mongodb": { + "version": "3.6.4", + "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-3.6.4.tgz", + "integrity": "sha512-Y+Ki9iXE9jI+n9bVtbTOOdK0B95d6wVGSucwtBkvQ+HIvVdTCfpVRp01FDC24uhC/Q2WXQ8Lpq3/zwtB5Op9Qw==", + "requires": { + "bl": "^2.2.1", + "bson": "^1.1.4", + "denque": "^1.4.1", + "require_optional": "^1.0.1", + "safe-buffer": "^5.1.2", + "saslprep": "^1.0.0" + } + }, "ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -10955,9 +10969,9 @@ "dev": true }, "nise": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/nise/-/nise-4.0.4.tgz", - "integrity": "sha512-bTTRUNlemx6deJa+ZyoCUTRvH3liK5+N6VQZ4NIw90AgDXY6iPnsqplNFf6STcj+ePk0H/xqxnP75Lr0J0Fq3A==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/nise/-/nise-4.1.0.tgz", + "integrity": "sha512-eQMEmGN/8arp0xsvGoQ+B1qvSkR73B1nWSCh7nOt5neMCtwcQVYQGdzQMhcNscktTsWB54xnlSQFzOAPJD8nXA==", "dev": true, "requires": { "@sinonjs/commons": "^1.7.0", @@ -11867,9 +11881,9 @@ } }, "object-hash": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-2.0.3.tgz", - "integrity": "sha512-JPKn0GMu+Fa3zt3Bmr66JhokJU5BaNBIh4ZeTlaCBzrBsOeXzwcKKAK1tbLiPKgvwmPXsDvvLHoWh5Bm7ofIYg==" + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-2.1.1.tgz", + "integrity": "sha512-VOJmgmS+7wvXf8CjbQmimtCnEx3IAoLxI3fp2fbWehxrWBcAQFbk+vcwb6vzR0VZv/eNCJ/27j151ZTwqW/JeQ==" }, "object-inspect": { "version": "1.8.0", @@ -13931,15 +13945,14 @@ "integrity": "sha1-HdrOSYF5j5O9gzlzgD2A1S6TrWo=" }, "sinon": { - "version": "9.2.1", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-9.2.1.tgz", - "integrity": "sha512-naPfsamB5KEE1aiioaoqJ6MEhdUs/2vtI5w1hPAXX/UwvoPjXcwh1m5HiKx0HGgKR8lQSoFIgY5jM6KK8VrS9w==", + "version": "9.2.4", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-9.2.4.tgz", + "integrity": "sha512-zljcULZQsJxVra28qIAL6ow1Z9tpattkCTEJR4RBP3TGc00FcttsP5pK284Nas5WjMZU5Yzy3kAIp3B3KRf5Yg==", "dev": true, "requires": { "@sinonjs/commons": "^1.8.1", "@sinonjs/fake-timers": "^6.0.1", - "@sinonjs/formatio": "^5.0.1", - "@sinonjs/samsam": "^5.2.0", + "@sinonjs/samsam": "^5.3.1", "diff": "^4.0.2", "nise": "^4.0.4", "supports-color": "^7.1.0" diff --git a/package.json b/package.json index baab9c2fb..d33c04006 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "dependencies": { "apollo-metrics": "^1.0.1", "apollo-server": "^2.21.0", - "apollo-server-express": "^2.18.2", + "apollo-server-express": "^2.21.1", @@ -82,7 +82,7 @@ "gulp-if": "^3.0.0", "gulp-json-editor": "^2.5.4", "i18next": "^19.8.4", - "i18next-fs-backend": "^1.0.8", + "i18next-fs-backend": "^1.1.0", "i18next-http-middleware": "^3.1.0", "i18next-parser": "^3.6.0", "i18next-sync-fs-backend": "^1.1.1", @@ -94,11 +94,11 @@ "lodash": "^4.17.20", "mock-aws-s3": "^4.0.1", "moment": "^2.29.1", - "mongodb": "^3.6.4", + "mongodb": "^3.6.5", "mongoose": "^5.11.18", "mongoose-lean-virtuals": "^0.7.2", "mustache": "^4.0.1", - "object-hash": "^2.0.3", + "object-hash": "^2.1.1", "object-path": "^0.11.5", "p-limit": "^3.0.2", "passport": "^0.4.1", @@ -130,7 +130,7 @@ "npm-run-all": "^4.1.5", "nyc": "^15.1.0", "rewire": "^5.0.0", - "sinon": "^9.2.1", + "sinon": "^9.2.4", "why-is-node-running": "^2.2.0", "yaml-lint": "^1.2.4" } From 13c6513aa64e48a5a748425f64449cf5d0e17643 Mon Sep 17 00:00:00 2001 From: Adam King Date: Fri, 19 Mar 2021 10:04:34 -0400 Subject: [PATCH 2/2] Update bunyan logger configs --- app/apollo/index.js | 2 +- app/apollo/models/user.default.schema.js | 2 +- app/apollo/models/user.local.schema.js | 2 +- .../models/user.passport.local.schema.js | 2 +- app/apollo/subscription/index.js | 20 +++++++++---------- app/routes/index.js | 2 +- app/routes/kube/kube.js | 4 ++-- app/utils/bunyan.js | 18 +++-------------- 8 files changed, 20 insertions(+), 32 deletions(-) diff --git a/app/apollo/index.js b/app/apollo/index.js index 6b2d7f31f..726c8fc7c 100644 --- a/app/apollo/index.js +++ b/app/apollo/index.js @@ -28,7 +28,7 @@ const typeDefs = require('./schema'); const resolvers = require('./resolvers'); const recoveryHintsMap = require('./resolvers/recoveryHintsMap'); const { models, connectDb } = require('./models'); -const bunyanConfig = getBunyanConfig('apollo'); +const bunyanConfig = getBunyanConfig('razeedash-api/apollo'); const logger = bunyan.createLogger(bunyanConfig); const promClient = require('prom-client'); const createMetricsPlugin = require('apollo-metrics'); diff --git a/app/apollo/models/user.default.schema.js b/app/apollo/models/user.default.schema.js index ca015ae88..32d68468a 100644 --- a/app/apollo/models/user.default.schema.js +++ b/app/apollo/models/user.default.schema.js @@ -22,7 +22,7 @@ const { getBunyanConfig } = require('../../utils/bunyan'); const _ = require('lodash'); const logger = bunyan.createLogger( - getBunyanConfig('apollo/models/user.default.schema'), + getBunyanConfig('razeedash-api/apollo/models/user.default.schema'), ); const UserDefaultSchema = new mongoose.Schema({ diff --git a/app/apollo/models/user.local.schema.js b/app/apollo/models/user.local.schema.js index 43e045e7b..8c7a7deb9 100644 --- a/app/apollo/models/user.local.schema.js +++ b/app/apollo/models/user.local.schema.js @@ -29,7 +29,7 @@ const { getBunyanConfig } = require('../../utils/bunyan'); const SECRET = require('./const').SECRET; const logger = bunyan.createLogger( - getBunyanConfig('apollo/models/user.local.schema'), + getBunyanConfig('razeedash-api/apollo/models/user.local.schema'), ); const UserLocalSchema = new mongoose.Schema({ diff --git a/app/apollo/models/user.passport.local.schema.js b/app/apollo/models/user.passport.local.schema.js index a41fb9a08..04a385d8f 100644 --- a/app/apollo/models/user.passport.local.schema.js +++ b/app/apollo/models/user.passport.local.schema.js @@ -29,7 +29,7 @@ const { getBunyanConfig } = require('../../utils/bunyan'); const SECRET = require('./const').SECRET; const logger = bunyan.createLogger( - getBunyanConfig('apollo/models/user.passport.local.schema'), + getBunyanConfig('razeedash-api/apollo/models/user.passport.local.schema'), ); const UserPassportLocalSchema = new mongoose.Schema({ diff --git a/app/apollo/subscription/index.js b/app/apollo/subscription/index.js index 31db73002..19245a837 100644 --- a/app/apollo/subscription/index.js +++ b/app/apollo/subscription/index.js @@ -23,7 +23,7 @@ const { APOLLO_STREAM_SHARDING } = require('../models/const'); const { RazeeQueryError } = require('../resolvers/common'); const { getBunyanConfig } = require('../../utils/bunyan'); -const logger = bunyan.createLogger(getBunyanConfig('apollo/subscription')); +const logger = bunyan.createLogger(getBunyanConfig('razeedash-api/apollo/subscription')); const EVENTS = { RESOURCE: { @@ -43,14 +43,14 @@ function getStreamingTopic(prefix, org_id) { if (org_id) { const last2 = org_id.slice(-2); return `${prefix}_${last2}`; - } + } return `${prefix}_00`; } return prefix; } class PubSubImpl { - + constructor(params) { this.initRetries = 0; this.lastPubSubMessage = null; @@ -64,7 +64,7 @@ class PubSubImpl { ); this.init(); } - + async init() { const url = new URL(this.redisUrl); @@ -118,7 +118,7 @@ class PubSubImpl { this.pubSub.redisSubscriber.subscribe(topic); setInterval( () => { message = { - time: Date.now(), + time: Date.now(), message : 'liveness check' }; this.pubSub.redisPublisher.publish(topic, JSON.stringify(message)); @@ -133,11 +133,11 @@ class PubSubImpl { logger.info({ data, topic }, 'Publishing channel subscription update'); await this.pubSub.publish(topic, { subscriptionUpdated: { data }, }); } catch (error) { - logger.error(error, 'Channel subscription publish error'); throw new RazeeQueryError(context.req.t('Failed to Publish subscription notification to clusters, please retry.'), context); + logger.error(error, 'Channel subscription publish error'); throw new RazeeQueryError(context.req.t('Failed to Publish subscription notification to clusters, please retry.'), context); } } else { logger.warn( { data, topic }, 'Failed to Publish subscription update, since pubsub is not ready.'); - throw new RazeeQueryError(context.req.t('Failed to Publish subscription notification to clusters, pubsub is not ready yet, please retry.'), context); + throw new RazeeQueryError(context.req.t('Failed to Publish subscription notification to clusters, pubsub is not ready yet, please retry.'), context); } return data; } @@ -156,11 +156,11 @@ class PubSubImpl { }); } catch (error) { logger.error(error, 'Resource publish error'); - throw new RazeeQueryError(context.req.t('Failed to Publish resource notification, please reload the page.'), context); + throw new RazeeQueryError(context.req.t('Failed to Publish resource notification, please reload the page.'), context); } } else { logger.warn( { resource, topic }, 'Failed to Publish resource update, since pubsub is not ready.'); - throw new RazeeQueryError(context.req.t('Failed to Publish resource notification, pubsub is not ready yet, please retry later.'), context); + throw new RazeeQueryError(context.req.t('Failed to Publish resource notification, pubsub is not ready yet, please retry later.'), context); } return resource; } @@ -179,7 +179,7 @@ var GraphqlPubSub = (function() { if (singleton && singleton.enabled) { singleton.pubSub.close(); singleton = undefined; - } + } } }; })(); diff --git a/app/routes/index.js b/app/routes/index.js index 6740b2cc3..0ddf1d288 100644 --- a/app/routes/index.js +++ b/app/routes/index.js @@ -20,7 +20,7 @@ const asyncHandler = require('express-async-handler'); const getBunyanConfig = require('../utils/bunyan.js').getBunyanConfig; const bunyan = require('bunyan'); -const logger = bunyan.createLogger(getBunyanConfig('/')); +const logger = bunyan.createLogger(getBunyanConfig('razeedash-api')); const ebl = require('express-bunyan-logger'); const MongoClientClass = require('../mongo/mongoClient.js'); diff --git a/app/routes/kube/kube.js b/app/routes/kube/kube.js index 7b5998862..1cc062fec 100644 --- a/app/routes/kube/kube.js +++ b/app/routes/kube/kube.js @@ -20,7 +20,7 @@ const router = express.Router(); const { GraphqlPubSub } = require('../../apollo/subscription'); const pubSub = GraphqlPubSub.getInstance(); const { getBunyanConfig } = require('../../utils/bunyan'); -const logger = bunyan.createLogger(getBunyanConfig('kube/liveness')); +const logger = bunyan.createLogger(getBunyanConfig('razeedash-api/kube/liveness')); const timeInterval = 300000; //5 mintues // /kube/liveness @@ -40,7 +40,7 @@ const kube = router.get('/liveness', asyncHandler(async(req, res) => { logger.error('Razeedash Api is down due to Redis pubsub connection issue, please check logs.'); return res.sendStatus(503); } - + if (pubSub.lastPubSubMessage !== null && Date.now()- pubSub.lastPubSubMessage.time > timeInterval) { // check if the most recent message received is within ${timeInterval/60000} minitue logger.error(`Razeedash Api is down, haven't received any published messages within ${timeInterval/60000} minitue, please check logs.`); diff --git a/app/utils/bunyan.js b/app/utils/bunyan.js index 0883bc745..22df2c865 100644 --- a/app/utils/bunyan.js +++ b/app/utils/bunyan.js @@ -27,24 +27,12 @@ const responseCodeMapper = (status) => { }; const getBunyanConfig = (route) => { - if (route === 'apollo') { - return { - name: route, - parseUA: false, - excludes: ['referer', 'url', 'short-body', 'user-agent', 'req', 'res'], - levelFn: responseCodeMapper, - streams: [{ - level: process.env.LOG_LEVEL || 'info', - stream: process.stdout - }] - }; - } - let result = { + const result = { name: route, parseUA: false, - excludes: ['referer', 'url', 'body', 'short-body'], + excludes: ['referer', 'body', 'short-body'], levelFn: responseCodeMapper, - obfuscate: ['razee-org-key'], + obfuscate: ['req.headers.razee-org-key'], streams: [{ level: process.env.LOG_LEVEL || 'info', stream: process.stdout