Skip to content
GitLab
    • Explore Projects Groups Snippets
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • User Account User Account
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • m4lab_tv1
  • User AccountUser Account
  • Merge requests
  • !97
An error occurred while fetching the assigned milestone of the selected merge_request.

Mlab 87 ts

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Rosanny Sihombing requested to merge MLAB-87-TS into testing 3 years ago
  • Overview 0
  • Commits 5
  • Pipelines 0
  • Changes 32
  • Rosanny Sihombing @sihombing mentioned in commit 489ae3a2 3 years ago

    mentioned in commit 489ae3a2

  • Rosanny Sihombing @sihombing merged 3 years ago

    merged

  • Loading
  • You're only seeing other activity in the feed. To add a comment, switch to one of the following options.
Please register or sign in to reply
Compare
  • testing (base)

and
  • latest version
    7acf92fe
    5 commits, 3 years ago

32 files
+ 2083
- 1145

    Preferences

    File browser
    Compare changes
__te‎sts__‎
gitlab.un‎it.test.ts‎ +1 -1
method.un‎it.test.ts‎ +2 -2
cla‎sses‎
proje‎ct.ts‎ +16 -9
rep‎o.js‎ +0 -9
rep‎o.ts‎ +9 -0
use‎r.ts‎ +97 -0
websi‎te.js‎ +0 -9
websi‎te.ts‎ +9 -0
con‎fig‎
conf‎ig.ts‎ +4 -4
cons‎t.ts‎ +1 -1
dbco‎nn.ts‎ +5 -5
dbcon‎n2.ts‎ +5 -5
mail‎er.js‎ +0 -39
mail‎er.ts‎ +40 -0
func‎tions‎
gitl‎ab.ts‎ +47 -67
helpe‎rs.ts‎ +2 -2
metho‎ds.ts‎ +58 -69
public/js/jq‎uery-ui/i18n‎
datepick‎er-de.js‎ +0 -37
rou‎tes‎
accou‎nt.ts‎ +596 -0
publ‎ic.js‎ +0 -296
publ‎ic.ts‎ +292 -0
view‎s/DE‎
acc‎ount‎
newInform‎ation.pug‎ +1 -1
updateInfo‎rmation.pug‎ +9 -9
404‎.pug‎ +2 -2
500‎.pug‎ +2 -2
layou‎t.pug‎ +0 -12
.giti‎gnore‎ +2 -2
.gitlab‎-ci.yml‎ +13 -5
app‎.ts‎ +93 -0
package-‎lock.json‎ +740 -550
packag‎e.json‎ +26 -7
tsconf‎ig.json‎ +11 -0
__tests__/gitlab.unit.test.js → __tests__/gitlab.unit.test.ts
+ 1
- 1
  • View file @ 7acf92fe

  • Edit in single-file editor

  • Open in Web IDE


const gitlab = require('../functions/gitlab')
import gitlab from '../functions/gitlab'
//const axios = require('axios')
//jest.mock('axios')
__tests__/gitlab.unit.test.js → __tests__/gitlab.unit.test.ts
+ 1
- 1
  • View file @ 7acf92fe

  • Edit in single-file editor

  • Open in Web IDE


const gitlab = require('../functions/gitlab')
import gitlab from '../functions/gitlab'
//const axios = require('axios')
//jest.mock('axios')
__tests__/method.unit.test.js → __tests__/method.unit.test.ts
+ 2
- 2
  • View file @ 7acf92fe

  • Edit in single-file editor

  • Open in Web IDE


const methods = require('../functions/methods')
import methods from '../functions/methods'
describe("DB methohds test", () => {
@@ -49,4 +49,4 @@ describe("DB methohds test", () => {
expect(user).toBeNull()
})
})
})
\ No newline at end of file
classes/project.js → classes/project.ts
+ 16
- 9
  • View file @ 7acf92fe

  • Edit in single-file editor

  • Open in Web IDE


class Project {
constructor(ownerGitlabId, id, name, desc, logo, path) {
ownerGitlabId:number
name:string
desc:string
id?:number
logo?:string
path?:string
constructor(ownerGitlabId:number, name:string, desc:string, id?:number, logo?:string, path?:string) {
this.ownerGitlabId = ownerGitlabId
this.id = id
this.name = name
this.desc = desc
this.id = id
this.logo = logo
this.path = path
}
@@ -28,24 +35,24 @@ class Project {
return this.path
}
// setter
setOwnerGitlabId(newOwnerGitlabId){
setOwnerGitlabId(newOwnerGitlabId:number){
this.ownerGitlabId = newOwnerGitlabId
}
setId(newId) {
setId(newId:number) {
this.id = newId
}
setName(newName) {
setName(newName:string) {
this.name = newName
}
setDesc(newDesc) {
setDesc(newDesc:string) {
this.desc = newDesc
}
setLogo(newLogoUrl) {
setLogo(newLogoUrl:string) {
this.logo = newLogoUrl
}
setPath(newPath) {
setPath(newPath:string) {
this.path = newPath
}
}
module.exports = Project
\ No newline at end of file
export = Project
\ No newline at end of file
classes/repo.js deleted 100644 → 0
+ 0
- 9
  • View file @ 9299bda6

const Project = require("./project");
class Repo extends Project {
constructor(ownerGitlabId, id, name, desc, logo, path) {
super(ownerGitlabId, id, name, desc, logo, path)
}
}
module.exports = Repo
\ No newline at end of file
classes/repo.ts 0 → 100644
+ 9
- 0
  • View file @ 7acf92fe

  • Edit in single-file editor

  • Open in Web IDE

import Project from "./project"
class Repo extends Project {
constructor(ownerGitlabId:number, name:string, desc:string, id?:number, logo?:string, path?:string) {
super(ownerGitlabId, name, desc, id, logo, path)
}
}
export = Repo
\ No newline at end of file
classes/user.js → classes/user.ts
+ 97
- 0
  • View file @ 7acf92fe

  • Edit in single-file editor

  • Open in Web IDE


class User {
constructor(id, email, salutation, title, firstName, lastName, industry, organisation, speciality, is_m4lab_idp, gitlabUserId, verificationStatus) {
this.id = id
this.email = email
this.salutation = salutation
this.title = title
this.firstName = firstName
this.lastName = lastName
this.industry = industry
this.organisation = organisation
this.speciality = speciality
this.is_m4lab_idp = is_m4lab_idp // 1 or 0
this.gitlabUserId = gitlabUserId
this.verificationStatus = verificationStatus
id:number
email:string
salutation:string // should be enum
title:string // should be enum
firstName:string
lastName:string
industry:string
organisation:string
speciality:string
is_m4lab_idp:number // 1 or 0
verificationStatus:number // 1 or 0 - // should be boolean
gitlabUserId?:number
constructor(id:number, email:string, salutation:string, title:string, firstName:string, lastName:string, industry:string, organisation:string,
speciality:string, is_m4lab_idp:number, verificationStatus:number, gitlabUserId?:number) {
this.id = id
this.email = email
this.salutation = salutation
this.title = title
this.firstName = firstName
this.lastName = lastName
this.industry = industry
this.organisation = organisation
this.speciality = speciality
this.is_m4lab_idp = is_m4lab_idp
this.verificationStatus = verificationStatus
this.gitlabUserId = gitlabUserId
}
// getter
@@ -27,48 +41,48 @@ class User {
getIdpStatus() {
return this.is_m4lab_idp
}
getGitlabUserId() {
return this.gitlabUserId
}
getVerificationStatus() {
return this.verificationStatus
}
getGitlabUserId() {
return this.gitlabUserId
}
// setter
setEmail(email) {
setEmail(email:string) {
this.email = email
}
setSalutation(salutation) {
setSalutation(salutation:string) {
this.salutation = salutation
}
setTitle(title) {
setTitle(title:string) {
this.title = title
}
setFirstName(firstName) {
setFirstName(firstName:string) {
this.firstName = firstName
}
setLastName(lastName) {
setLastName(lastName:string) {
this.lastName = lastName
}
setIndustry(industry) {
setIndustry(industry:string) {
this.industry = industry
}
setOrganisation(organisation) {
setOrganisation(organisation:string) {
this.organisation = organisation
}
setSpeciality(speciality) {
setSpeciality(speciality:string) {
this.speciality = speciality
}
setM4lab_idp(m4lab_idp) {
this.m4lab_idp = m4lab_idp
}
setGitlabUserId(newGitlabUserId) {
this.gitlabUserId = newGitlabUserId
setM4lab_idp(m4lab_idp:number) {
this.is_m4lab_idp = m4lab_idp
}
setVerificationStatus(verificationStatus) {
setVerificationStatus(verificationStatus:number) {
this.verificationStatus = verificationStatus
}
setGitlabUserId(newGitlabUserId:number) {
this.gitlabUserId = newGitlabUserId
}
updateProfile(newSalutation, newTitle, newFirstname, newLastname, newEmail, newOrganisation, newIndustry, newSpeciality) {
updateProfile(newSalutation:string, newTitle:string, newFirstname:string, newLastname:string, newEmail:string, newOrganisation:string, newIndustry:string, newSpeciality:string) {
this.salutation = newSalutation
this.title = newTitle
this.firstName = newFirstname
@@ -80,4 +94,4 @@ class User {
}
}
module.exports = User
\ No newline at end of file
export = User
\ No newline at end of file
classes/website.js deleted 100644 → 0
+ 0
- 9
  • View file @ 9299bda6

const Project = require("./project");
class Website extends Project {
constructor(ownerGitlabId, id, name, desc, logo, path) {
super(ownerGitlabId, id, name, desc, logo, path)
}
}
module.exports = Website
\ No newline at end of file
classes/website.ts 0 → 100644
+ 9
- 0
  • View file @ 7acf92fe

  • Edit in single-file editor

  • Open in Web IDE

import Project from "./project"
class Website extends Project {
constructor(ownerGitlabId:number, name:string, desc:string, id?:number, logo?:string, path?:string) {
super(ownerGitlabId, name, desc, id, logo, path)
}
}
export = Website
\ No newline at end of file
config/config.js → config/config.ts
+ 4
- 4
  • View file @ 7acf92fe

  • Edit in single-file editor

  • Open in Web IDE


module.exports = {
export = {
development: {
app: {
name: 'User Account Management',
@@ -28,7 +28,7 @@ module.exports = {
host: 'mailhost', // hostname
secureConnection: false, // TLS requires secureConnection to be false
port: 587, // port for secure SMTP
TLS: true, // sets requireTLS
TLS: true,
authUser: 'mailuser',
authPass: 'mailpass',
tlsCiphers: 'SSLv3',
@@ -67,7 +67,7 @@ module.exports = {
host: 'mailhost', // hostname
secureConnection: false, // TLS requires secureConnection to be false
port: 587, // port for secure SMTP
TLS: true, // sets requireTLS
TLS: true,
authUser: 'mailuser',
authPass: 'mailpass',
tlsCiphers: 'SSLv3',
@@ -77,4 +77,4 @@ module.exports = {
token_readWriteProjects: 'token-goes-here'
}
}
}
}
\ No newline at end of file
config/const.js → config/const.ts
+ 1
- 1
  • View file @ 7acf92fe

  • Edit in single-file editor

  • Open in Web IDE


module.exports = {
export = {
mailSignature: 'Mit den besten Grüßen,<br/>das Transferportal-Team der HFT Stuttgart<br/><br/>' +
'Transferportal der Hochschule für Technik Stuttgart<br/>' +
config/dbconn.js → config/dbconn.ts
+ 5
- 5
  • View file @ 7acf92fe

  • Edit in single-file editor

  • Open in Web IDE


const mysql = require('mysql')
import mysql from 'mysql'
var env = process.env.NODE_ENV || 'testing';
var env = process.env.NODE_ENV || 'testing'
const config = require('./config')[env]
// ==== USER ACOOUNT DB CONNECTION ====
@@ -14,7 +14,7 @@ var userConnection = mysql.createConnection({
})
userConnection.connect(function(err) {
if (err) throw err;
if (err) throw err
})
userConnection.query('USE '+config.database.dbUser)
@@ -52,7 +52,7 @@ var projectConnection = mysql.createConnection({
})
projectConnection.connect(function(err) {
if (err) throw err;
if (err) throw err
})
projectConnection.query('USE '+config.database.dbProject)
@@ -61,4 +61,4 @@ var connection = {
project: projectConnection
}
module.exports = connection
\ No newline at end of file
export = connection
\ No newline at end of file
config/dbconn2.js → config/dbconn2.ts
+ 5
- 5
  • View file @ 7acf92fe

  • Edit in single-file editor

  • Open in Web IDE


const mysql = require('mysql2')
import mysql from 'mysql2'
var env = process.env.NODE_ENV || 'testing';
var env = process.env.NODE_ENV || 'testing'
const config = require('./config')[env]
// ==== USER ACOOUNT DB CONNECTION ====
@@ -14,7 +14,7 @@ var userConnection = mysql.createConnection({
})
userConnection.connect(function(err) {
if (err) throw err;
if (err) throw err
})
userConnection.query('USE '+config.database.dbUser)
@@ -52,7 +52,7 @@ var projectConnection = mysql.createConnection({
})
projectConnection.connect(function(err) {
if (err) throw err;
if (err) throw err
})
projectConnection.query('USE '+config.database.dbProject)
@@ -61,4 +61,4 @@ var connection = {
project: projectConnection
}
module.exports = connection
\ No newline at end of file
export = connection
\ No newline at end of file
0 Assignees
None
Assign to
0 Reviewers
None
Request review from
Labels
0
None
0
None
    Assign labels
  • Manage project labels

Milestone
No milestone
None
None
Time tracking
No estimate or time spent
Lock merge request
Unlocked
0
0 participants
Reference:
Source branch: MLAB-87-TS

Menu

Explore Projects Groups Snippets

Dies ist die Gitlab-Instanz des Transferportals der Hochschule für Technik Stuttgart. Hier geht es zurück zum Portal