Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creation of new "By Version" tab by JumpStart team #549

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added TestResultSummaryService/.Database.js.swp
Binary file not shown.
Binary file added TestResultSummaryService/.trssConf.json.swp
Binary file not shown.
22 changes: 17 additions & 5 deletions TestResultSummaryService/Database.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,22 @@ let db;

const dbConnect = await MongoClient.connect(url, { useUnifiedTopology: true });
db = dbConnect.db("exampleDb");
await db.createCollection('testResults');
await db.createCollection('output');
await db.createCollection('auditLogs');
await db.createCollection('user');
await db.createCollection('testResults').catch(err => {
if (err.code !== 48) throw err;
return db.collection('testResults');
});
await db.createCollection('output').catch(err => {
if (err.code !== 48) throw err;
return db.collection('output');
});
await db.createCollection('auditLogs').catch(err => {
if (err.code !== 48) throw err;
return db.collection('auditLogs');
});
await db.createCollection('user').catch(err => {
if (err.code !== 48) throw err;
return db.collection('user');
});
})()

class Database {
Expand Down Expand Up @@ -301,4 +313,4 @@ class UserDB extends Database {
}
}

module.exports = { TestResultsDB, OutputDB, BuildListDB, ApplicationTestsDB, AuditLogsDB, UserDB, ObjectID };
module.exports = { TestResultsDB, OutputDB, BuildListDB, ApplicationTestsDB, AuditLogsDB, UserDB, ObjectID };
2 changes: 1 addition & 1 deletion TestResultSummaryService/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ WORKDIR /usr/src/app

COPY . .

EXPOSE 3001
EXPOSE 3002
CMD npm ci &&\
npm start

2 changes: 1 addition & 1 deletion TestResultSummaryService/frontend.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ let options = {
expressSwagger(options);

// all environments
app.set( 'port', process.env.PORT || 3001 );
app.set( 'port', process.env.PORT || 3002 );

app.listen( app.get( 'port' ), function() {
logger.info( 'Express server listening on port ' + app.get( 'port' ) );
Expand Down
6 changes: 3 additions & 3 deletions TestResultSummaryService/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ server {
server_name trss.adoptium.net;

location ~ /api-docs {
proxy_pass http://localhost:3001;
proxy_pass http://localhost:3002;
proxy_http_version 1.1;
}
location /api/ {
proxy_pass http://localhost:3001;
proxy_pass http://localhost:3002;
proxy_http_version 1.1;
}

Expand All @@ -34,4 +34,4 @@ server {
try_files $uri $uri/ /index.html;
}

}
}
Loading