Commits (2)
/built
/node_modules
\ No newline at end of file
pages-testing: pages-testing:
stage: deploy stage: deploy
script: script:
- npm install
- npm run clean
- npm run build
- cat $configfiledev > ./built/config/config.js - cat $configfiledev > ./built/config/config.js
- "pm2 delete --silent project || :" - "pm2 delete --silent project || :"
- pm2 start ./built/app.js --name=project - pm2 start ./built/app.js --name=project
......
import request from 'supertest'
const express = require('express')
const app = express()
app.set('port', 8888)
describe('Test endpoint(s)', () => {
it('should return a 200 status code', async () => {
request(app)
.get('/mailinglists')
.expect(200)
.end(function (err, res) {
if (err) throw err
})
})
it('should return a 200 status code', async () => {
request(app)
.get('/projektdaten')
.expect(200)
.end(function (err, res) {
if (err) throw err
})
})
it('should return a 200 status code', async () => {
request(app)
.get('/projektinformationen')
.expect(200)
.end(function (err, res) {
if (err) throw err
})
})
it('should return a 200 status code', async () => {
request(app)
.get('/projectoverview?projectID=1')
.expect(200)
.end(function (err, res) {
if (err) throw err
})
})
})
import { helpers } from '../built/utils/helpers'
import { gitlab } from '../built/controller/gitlab'
test('[/utils/helpers] convert string to array', () => {
expect(helpers.stringToArray('foo')).toStrictEqual(['foo'])
expect(helpers.stringToArray('foo,bar')).toStrictEqual(['foo', 'bar'])
expect(helpers.stringToArray('')).toBeNull
expect(helpers.stringToArray(String(null))).toBeNull
})
test('[/controller/gitlab] get projects from gitlab', async () => {
expect(await gitlab.getProjects(100, 0)).not.toBeNull
})
test('[/controller/gitlab] get latest pipeline status from gitlab', async () => {
expect(await gitlab.getLatestPipelineStatus(97)).toBe('success')
expect(await gitlab.getLatestPipelineStatus(0)).toBeFalsy
})
"use strict";var _process$env$NODE_ENV,_express=_interopRequireDefault(require("express")),_path=_interopRequireDefault(require("path")),_morgan=_interopRequireDefault(require("morgan")),_cookieParser=_interopRequireDefault(require("cookie-parser")),_bodyParser=_interopRequireDefault(require("body-parser")),_helmet=_interopRequireDefault(require("helmet")),_compression=_interopRequireDefault(require("compression"));function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}var env=null!==(_process$env$NODE_ENV=process.env.NODE_ENV)&&void 0!==_process$env$NODE_ENV?_process$env$NODE_ENV:"testing",config=require("./config/config")[env],lang="DE",app=(0,_express["default"])();// import {config} from './config/config'
// app.use(helmet())
// caching disabled for every route
// NOTE: Works in Firefox and Opera. Does not work in Edge
// Handle 404
// Handle 500 - any server error
app.set("port",config.app.port),app.set("views",_path["default"].join(__dirname,"/views")),app.set("view engine","pug"),app.use((0,_compression["default"])()),app.use((0,_morgan["default"])("combined")),app.use((0,_cookieParser["default"])()),app.use(_bodyParser["default"].json()),app.use(_bodyParser["default"].urlencoded({extended:!1})),app.use(_express["default"]["static"](_path["default"].join(__dirname,"public"))),app.use(_helmet["default"].contentSecurityPolicy({useDefaults:!0,directives:{"font-src":["'self'","https://use.fontawesome.com"],"img-src":["'self'","https://transfer.hft-stuttgart.de"],"script-src":["'self'","https://code.jquery.com/jquery-3.3.1.min.js","https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js","https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"],"style-src":["'self'","https://use.fontawesome.com/releases/v5.8.2/css/all.css"],"frame-src":["'self'"]},reportOnly:!0})),app.use((0,_compression["default"])()),app.use((0,_morgan["default"])("combined")),app.use((0,_cookieParser["default"])()),app.use(_bodyParser["default"].json()),app.use(_bodyParser["default"].urlencoded({extended:!1})),app.use(_express["default"]["static"](_path["default"].join(__dirname,"public"))),app.use(function(a,b,c){b.set("Cache-Control","no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0"),c()}),require("./routes/project")(app),app.use(function(a,b){b.status(404).render(lang+"/404")}),app.use(function(a,b,c){console.error(a.stack),c.status(500).render(lang+"/500",{error:a})}),app.listen(app.get("port"),function(){console.log("Project Page listening on port "+(app.get("port")+""))});
\ No newline at end of file
"use strict";var _process$env$PORT,_process$env$SAML_PAT,_process$env$SAML_ENT,_process$env$PORT2,_process$env$SAML_PAT2,_process$env$SAML_ENT2;Object.defineProperty(exports,"__esModule",{value:!0});module.exports={development:{app:{name:"Project Page Manager",port:null!==(_process$env$PORT=process.env.PORT)&&void 0!==_process$env$PORT?_process$env$PORT:8888,sessionSecret:"thisisasecret-thisisasecret-thisisasecret"},passport:{strategy:"saml",saml:{path:null!==(_process$env$SAML_PAT=process.env.SAML_PATH)&&void 0!==_process$env$SAML_PAT?_process$env$SAML_PAT:"/saml/SSO",entryPoint:null!==(_process$env$SAML_ENT=process.env.SAML_ENTRY_POINT)&&void 0!==_process$env$SAML_ENT?_process$env$SAML_ENT:"saml entry URL",issuer:"saml issuer URL",logoutUrl:"saml Logout URL"}},database:{user:"usernamedb",// DB username
password:"passworddb",// DB password
port:3306,// MySQL port
dbUser:"userdb",// User DB
host_project:"localhost",// local
dbProject:"projectdb"// Project DB
},mailer:{host:"mailhost",// hostname
secureConnection:!1,// TLS requires secureConnection to be false
port:587,// port for secure SMTP
authUser:"usernamemail",authPass:"passwordmail",tlsCiphers:"SSLv3",from:"email_from"},gitlab:{token_readWriteProjects:"putyourtokenhere"}},testing:{app:{name:"Project Page Manager",port:null!==(_process$env$PORT2=process.env.PORT)&&void 0!==_process$env$PORT2?_process$env$PORT2:8888,sessionSecret:"thisisasecret-thisisasecret-thisisasecret"},passport:{strategy:"saml",saml:{path:null!==(_process$env$SAML_PAT2=process.env.SAML_PATH)&&void 0!==_process$env$SAML_PAT2?_process$env$SAML_PAT2:"/saml/SSO",entryPoint:null!==(_process$env$SAML_ENT2=process.env.SAML_ENTRY_POINT)&&void 0!==_process$env$SAML_ENT2?_process$env$SAML_ENT2:"saml entry URL",issuer:"saml issuer URL",logoutUrl:"saml Logout URL"}},database:{user:"usernamedb",// DB username
password:"passworddb",// DB password
port:3306,// MySQL port
dbUser:"userdb",// User DB
host_project:"localhost",// local
dbProject:"projectdb"// Project DB
},mailer:{host:"mailhost",// hostname
secureConnection:!1,// TLS requires secureConnection to be false
port:587,// port for secure SMTP
authUser:"usernamemail",authPass:"passwordmail",tlsCiphers:"SSLv3",from:"email_from"},gitlab:{token_readWriteProjects:"putyourtokenhere"}},production:{// to be defined
}};
\ No newline at end of file
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.dbconn=void 0;var _process$env$NODE_ENV,_mysql=_interopRequireDefault(require("mysql2"));function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}var env=null!==(_process$env$NODE_ENV=process.env.NODE_ENV)&&void 0!==_process$env$NODE_ENV?_process$env$NODE_ENV:"testing",config=require("./config")[env],userConnection=_mysql["default"].createConnection({host:config.database.host,user:config.database.user,password:config.database.password,port:config.database.port,database:config.database.dbUser,multipleStatements:!0});userConnection.connect(function(a){if(null!=a)throw a}),userConnection.query("USE "+(config.database.dbUser+""));// ==== PROJECT DB CONNECTION ====
var projectConnection=_mysql["default"].createConnection({host:config.database.host_project,user:config.database.user,password:config.database.password,port:config.database.port,database:config.database.dbProject});projectConnection.connect(function(a){if(null!=a)throw a}),projectConnection.query("USE "+(config.database.dbProject+""));var dbconn={user:userConnection,project:projectConnection};exports.dbconn=dbconn;
\ No newline at end of file
"use strict";function _typeof(a){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},_typeof(a)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.controller=void 0;var _https=_interopRequireDefault(require("https")),_helpers=require("../utils/helpers"),_gitlab=require("./gitlab"),_dbconn=require("../config/dbconn");function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}function _regeneratorRuntime(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */function a(a,b,c){return Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}),a[b]}function b(a,b,e,f){var g=b&&b.prototype instanceof d?b:d,h=Object.create(g.prototype),j=new l(f||[]);return h._invoke=function(a,b,d){var e="suspendedStart";return function(f,g){if("executing"===e)throw new Error("Generator is already running");if("completed"===e){if("throw"===f)throw g;return n()}for(d.method=f,d.arg=g;;){var h=d.delegate;if(h){var j=i(h,d);if(j){if(j===v)continue;return j}}if("next"===d.method)d.sent=d._sent=d.arg;else if("throw"===d.method){if("suspendedStart"===e)throw e="completed",d.arg;d.dispatchException(d.arg)}else"return"===d.method&&d.abrupt("return",d.arg);e="executing";var k=c(a,b,d);if("normal"===k.type){if(e=d.done?"completed":"suspendedYield",k.arg===v)continue;return{value:k.arg,done:d.done}}"throw"===k.type&&(e="completed",d.method="throw",d.arg=k.arg)}}}(a,e,j),h}function c(a,b,c){try{return{type:"normal",arg:a.call(b,c)}}catch(a){return{type:"throw",arg:a}}}function d(){}function e(){}function f(){}function g(b){["next","throw","return"].forEach(function(c){a(b,c,function(a){return this._invoke(c,a)})})}function h(a,b){function d(e,f,g,h){var i=c(a[e],a,f);if("throw"!==i.type){var j=i.arg,k=j.value;return k&&"object"==_typeof(k)&&q.call(k,"__await")?b.resolve(k.__await).then(function(a){d("next",a,g,h)},function(a){d("throw",a,g,h)}):b.resolve(k).then(function(a){j.value=a,g(j)},function(a){return d("throw",a,g,h)})}h(i.arg)}var e;this._invoke=function(a,c){function f(){return new b(function(b,e){d(a,c,b,e)})}return e=e?e.then(f,f):f()}}function i(a,b){var d=a.iterator[b.method];if(void 0===d){if(b.delegate=null,"throw"===b.method){if(a.iterator["return"]&&(b.method="return",b.arg=void 0,i(a,b),"throw"===b.method))return v;b.method="throw",b.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var e=c(d,a.iterator,b.arg);if("throw"===e.type)return b.method="throw",b.arg=e.arg,b.delegate=null,v;var f=e.arg;return f?f.done?(b[a.resultName]=f.value,b.next=a.nextLoc,"return"!==b.method&&(b.method="next",b.arg=void 0),b.delegate=null,v):f:(b.method="throw",b.arg=new TypeError("iterator result is not an object"),b.delegate=null,v)}function j(a){var b={tryLoc:a[0]};1 in a&&(b.catchLoc=a[1]),2 in a&&(b.finallyLoc=a[2],b.afterLoc=a[3]),this.tryEntries.push(b)}function k(a){var b=a.completion||{};b.type="normal",delete b.arg,a.completion=b}function l(a){this.tryEntries=[{tryLoc:"root"}],a.forEach(j,this),this.reset(!0)}function m(a){if(a){var b=a[s];if(b)return b.call(a);if("function"==typeof a.next)return a;if(!isNaN(a.length)){var c=-1,d=function b(){for(;++c<a.length;)if(q.call(a,c))return b.value=a[c],b.done=!1,b;return b.value=void 0,b.done=!0,b};return d.next=d}}return{next:n}}function n(){return{value:void 0,done:!0}}_regeneratorRuntime=function(){return o};var o={},p=Object.prototype,q=p.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},s=r.iterator||"@@iterator",t=r.asyncIterator||"@@asyncIterator",u=r.toStringTag||"@@toStringTag";try{a({},"")}catch(b){a=function(a,b,c){return a[b]=c}}o.wrap=b;var v={},w={};a(w,s,function(){return this});var x=Object.getPrototypeOf,y=x&&x(x(m([])));y&&y!==p&&q.call(y,s)&&(w=y);var z=f.prototype=d.prototype=Object.create(w);return e.prototype=f,a(z,"constructor",f),a(f,"constructor",e),e.displayName=a(f,u,"GeneratorFunction"),o.isGeneratorFunction=function(a){var b="function"==typeof a&&a.constructor;return!!b&&(b===e||"GeneratorFunction"===(b.displayName||b.name))},o.mark=function(b){return Object.setPrototypeOf?Object.setPrototypeOf(b,f):(b.__proto__=f,a(b,u,"GeneratorFunction")),b.prototype=Object.create(z),b},o.awrap=function(a){return{__await:a}},g(h.prototype),a(h.prototype,t,function(){return this}),o.AsyncIterator=h,o.async=function(a,c,d,e,f){void 0===f&&(f=Promise);var g=new h(b(a,c,d,e),f);return o.isGeneratorFunction(c)?g:g.next().then(function(a){return a.done?a.value:g.next()})},g(z),a(z,u,"Generator"),a(z,s,function(){return this}),a(z,"toString",function(){return"[object Generator]"}),o.keys=function(a){var b=[];for(var c in a)b.push(c);return b.reverse(),function c(){for(;b.length;){var d=b.pop();if(d in a)return c.value=d,c.done=!1,c}return c.done=!0,c}},o.values=m,l.prototype={constructor:l,reset:function reset(a){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(k),!a)for(var b in this)"t"===b.charAt(0)&&q.call(this,b)&&!isNaN(+b.slice(1))&&(this[b]=void 0)},stop:function stop(){this.done=!0;var a=this.tryEntries[0].completion;if("throw"===a.type)throw a.arg;return this.rval},dispatchException:function dispatchException(a){function b(b,d){return f.type="throw",f.arg=a,c.next=b,d&&(c.method="next",c.arg=void 0),!!d}if(this.done)throw a;for(var c=this,d=this.tryEntries.length-1;0<=d;--d){var e=this.tryEntries[d],f=e.completion;if("root"===e.tryLoc)return b("end");if(e.tryLoc<=this.prev){var g=q.call(e,"catchLoc"),h=q.call(e,"finallyLoc");if(g&&h){if(this.prev<e.catchLoc)return b(e.catchLoc,!0);if(this.prev<e.finallyLoc)return b(e.finallyLoc)}else if(!g){if(!h)throw new Error("try statement without catch or finally");if(this.prev<e.finallyLoc)return b(e.finallyLoc)}else if(this.prev<e.catchLoc)return b(e.catchLoc,!0)}}},abrupt:function abrupt(a,b){for(var c,d=this.tryEntries.length-1;0<=d;--d)if(c=this.tryEntries[d],c.tryLoc<=this.prev&&q.call(c,"finallyLoc")&&this.prev<c.finallyLoc){var e=c;break}e&&("break"===a||"continue"===a)&&e.tryLoc<=b&&b<=e.finallyLoc&&(e=null);var f=e?e.completion:{};return f.type=a,f.arg=b,e?(this.method="next",this.next=e.finallyLoc,v):this.complete(f)},complete:function complete(a,b){if("throw"===a.type)throw a.arg;return"break"===a.type||"continue"===a.type?this.next=a.arg:"return"===a.type?(this.rval=this.arg=a.arg,this.method="return",this.next="end"):"normal"===a.type&&b&&(this.next=b),v},finish:function finish(a){for(var b,c=this.tryEntries.length-1;0<=c;--c)if(b=this.tryEntries[c],b.finallyLoc===a)return this.complete(b.completion,b.afterLoc),k(b),v},catch:function _catch(a){for(var b,c=this.tryEntries.length-1;0<=c;--c)if(b=this.tryEntries[c],b.tryLoc===a){var d=b.completion;if("throw"===d.type){var e=d.arg;k(b)}return e}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(a,b,c){return this.delegate={iterator:m(a),resultName:b,nextLoc:c},"next"===this.method&&(this.arg=void 0),v}},o}function asyncGeneratorStep(a,b,c,d,e,f,g){try{var h=a[f](g),i=h.value}catch(a){return void c(a)}h.done?b(i):Promise.resolve(i).then(d,e)}function _asyncToGenerator(a){return function(){var b=this,c=arguments;return new Promise(function(d,e){function f(a){asyncGeneratorStep(h,d,e,f,g,"next",a)}function g(a){asyncGeneratorStep(h,d,e,f,g,"throw",a)}var h=a.apply(b,c);f(void 0)})}}var lang="DE",controller={getAllMailinglists:function(){function a(){return b.apply(this,arguments)}var b=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function a(){var b;return _regeneratorRuntime().wrap(function c(a){for(;1;)switch(a.prev=a.next){case 0:return a.prev=0,a.next=3,_dbconn.dbconn.project.promise().query("CALL getAllLists");case 3:if(b=a.sent,console.log(b),!b[0][0]){a.next=9;break}return a.abrupt("return",b[0][0]);case 9:return a.abrupt("return",null);case 10:a.next=15;break;case 12:a.prev=12,a.t0=a["catch"](0),console.error(a.t0);case 15:case"end":return a.stop();}},a,null,[[0,12]])}));return a}(),getProjectOverviewById:function(){function a(a){return b.apply(this,arguments)}var b=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function b(a){var c;return _regeneratorRuntime().wrap(function d(b){for(;1;)switch(b.prev=b.next){case 0:return b.prev=0,b.next=3,_dbconn.dbconn.project.promise().query("CALL GetProjectInformationByProjectID("+(a+")"));case 3:if(c=b.sent,!c[0][0]){b.next=8;break}return b.abrupt("return",c[0][0]);case 8:return b.abrupt("return",null);case 9:b.next=14;break;case 11:b.prev=11,b.t0=b["catch"](0),console.error(b.t0);case 14:case"end":return b.stop();}},b,null,[[0,11]])}));return a}(),getProjectImagesById:function(){function a(a){return b.apply(this,arguments)}var b=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function b(a){var c;return _regeneratorRuntime().wrap(function d(b){for(;1;)switch(b.prev=b.next){case 0:return b.prev=0,b.next=3,_dbconn.dbconn.project.promise().query("CALL getImagesByProjectID("+(a+")"));case 3:if(c=b.sent,!c[0][0]){b.next=8;break}return b.abrupt("return",c[0][0]);case 8:return b.abrupt("return",null);case 9:b.next=14;break;case 11:b.prev=11,b.t0=b["catch"](0),console.error(b.t0);case 14:return b.abrupt("return",null);case 15:case"end":return b.stop();}},b,null,[[0,11]])}));return a}(),showHome:function showHome(a){a.render("DE/project/project-simplified")},showMailingList:function(){function a(a){return b.apply(this,arguments)}var b=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function b(a){var c,d,e;return _regeneratorRuntime().wrap(function f(b){for(;1;)switch(b.prev=b.next){case 0:return b.next=2,controller.getAllMailinglists();case 2:// JSON object
if(c=b.sent,d=[],c)for(e=0;e<c.length;e++)// add data to JSON object
d.push({id:c[e].id,name:c[e].name,src:c[e].src,projectstatus:c[e].projectstatus,project_title:c[e].project_title,keywords:c[e].keywords});a.render("DE/project/mailinglists",{mailinglists:d});case 6:case"end":return b.stop();}},b)}));return a}(),showProjOverview:function(){function a(a,c,d){return b.apply(this,arguments)}var b=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function d(a,b,c){var e,f,g,h,i,j,k,l,m,n;return _regeneratorRuntime().wrap(function o(d){for(;1;)switch(d.prev=d.next){case 0:return e=a.query.projectID,d.next=3,controller.getProjectOverviewById(e);case 3:if(f=d.sent,e&&0!==f.length){d.next=8;break}c(),d.next=19;break;case 8:return g=_helpers.helpers.stringToArray(f[0].partner_website),h=_helpers.helpers.stringToArray(f[0].partner_name),i=_helpers.helpers.stringToArray(f[0].award_website),j=_helpers.helpers.stringToArray(f[0].award_name),k=_helpers.helpers.stringToArray(f[0].sponsor_website),l=_helpers.helpers.stringToArray(f[0].sponsor_img),m=_helpers.helpers.stringToArray(f[0].sponsor_name),d.next=17,controller.getProjectImagesById(e);case 17:n=d.sent,b.render("DE/project/projectOverview",{projectOV:f,projectImgs:n,partnerWS:g,partnerN:h,awardWS:i,awardN:j,sponsorWS:k,sponsorIMG:l,sponsorN:m});case 19:case"end":return d.stop();}},d)}));return a}(),showProjData:function(){function a(a,c){return b.apply(this,arguments)}var b=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function c(a,b){var d,e,f,g,h,j,k,l;return _regeneratorRuntime().wrap(function i(c){for(;1;)switch(c.prev=c.next){case 0:d=[],e=!0,f=0,g=a.query.sort;case 4:if(!e){c.next=13;break}return c.next=7,_gitlab.gitlab.getProjects(100,f);case 7:if(h=c.sent,j=h.data[0],0===j.length)e=!1;else{for(k=0;k<j.length;k++)null==j[k].avatar_url&&(j[k].avatar_url="https://m4lab.hft-stuttgart.de/img/body/M4_LAB_LOGO_NO_TEXT.png"),""===j[k].description&&(j[k].description="- no description -"),l={logo:j[k].avatar_url,name:j[k].name,weburl:j[k].web_url,desc:j[k].description,keywords:j[k].tag_list,createdAt:j[k].created_at,lastUpdatedAt:j[k].last_activity_at},d.push(l);f=j[j.length-1].id}// MLAB-576
"created_at"===g?d.sort(function(c,a){var b=new Date(c.createdAt),d=new Date(a.createdAt);return d-b}):"updated_at"===g?d.sort(function(c,a){var b=new Date(c.lastUpdatedAt),d=new Date(a.lastUpdatedAt);return d-b}):d.sort(function(c,a){var b=c.name.toLowerCase(),d=a.name.toLowerCase();return b<d?-1:b>d?1:0}),c.next=4;break;case 13:b.render("DE/project/projectList",{project:d});case 14:case"end":return c.stop();}},c)}));return a}(),showProjInformations:function(){function a(a,c){return b.apply(this,arguments)}var b=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function c(a,b){var d,e,f,g,h,j,k,l;return _regeneratorRuntime().wrap(function i(c){for(;1;)switch(c.prev=c.next){case 0:d=[],e=!0,f=0,g=a.query.sort;case 4:if(!e){c.next=26;break}return c.next=7,_gitlab.gitlab.getProjects(100,f);case 7:if(h=c.sent,j=h.data[1],0!==j.length){c.next=13;break}e=!1,c.next=23;break;case 13:k=0;case 14:if(!(k<j.length)){c.next=22;break}return c.next=17,_gitlab.gitlab.getLatestPipelineStatus(j[k].id);case 17:l=c.sent,l&&function(){null==j[k].avatar_url&&(j[k].avatar_url="https://m4lab.hft-stuttgart.de/img/body/M4_LAB_LOGO_NO_TEXT.png"),""===j[k].description&&(j[k].description="- no description -"),j[k].web_url="https://transfer.hft-stuttgart.de/pages/"+(j[k].namespace.path+"/")+(j[k].name+"/");// remove 'website' from tag list
var a=j[k].tag_list.indexOf("website");-1<a&&j[k].tag_list.splice(a,1);// fill in pagesArr
var b={logo:j[k].avatar_url,name:j[k].name,weburl:j[k].web_url,desc:j[k].description,keywords:j[k].tag_list,createdAt:j[k].created_at,lastUpdatedAt:j[k].last_activity_at};_https["default"].get(j[k].web_url,function(a){200<=a.statusCode&&299>=a.statusCode&&d.push(b)})}();case 19:k++,c.next=14;break;case 22:f=j[j.length-1].id;case 23:"created_at"===g?d.sort(function(c,a){var b=new Date(c.createdAt),d=new Date(a.createdAt);return d-b}):"updated_at"===g?d.sort(function(c,a){var b=new Date(c.lastUpdatedAt),d=new Date(a.lastUpdatedAt);return d-b}):d.sort(function(c,a){var b=c.name.toLowerCase(),d=a.name.toLowerCase();return b<d?-1:b>d?1:0}),c.next=4;break;case 26:b.render("DE/project/pagesList",{pages:d});case 27:case"end":return c.stop();}},c)}));return a}()};exports.controller=controller;
\ No newline at end of file
"use strict";var _axios=_interopRequireDefault(require("axios"));function _typeof(a){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},_typeof(a)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.gitlab=void 0;function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}function _regeneratorRuntime(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */function a(a,b,c){return Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}),a[b]}function b(a,b,e,f){var g=b&&b.prototype instanceof d?b:d,h=Object.create(g.prototype),j=new l(f||[]);return h._invoke=function(a,b,d){var e="suspendedStart";return function(f,g){if("executing"===e)throw new Error("Generator is already running");if("completed"===e){if("throw"===f)throw g;return n()}for(d.method=f,d.arg=g;;){var h=d.delegate;if(h){var j=i(h,d);if(j){if(j===v)continue;return j}}if("next"===d.method)d.sent=d._sent=d.arg;else if("throw"===d.method){if("suspendedStart"===e)throw e="completed",d.arg;d.dispatchException(d.arg)}else"return"===d.method&&d.abrupt("return",d.arg);e="executing";var k=c(a,b,d);if("normal"===k.type){if(e=d.done?"completed":"suspendedYield",k.arg===v)continue;return{value:k.arg,done:d.done}}"throw"===k.type&&(e="completed",d.method="throw",d.arg=k.arg)}}}(a,e,j),h}function c(a,b,c){try{return{type:"normal",arg:a.call(b,c)}}catch(a){return{type:"throw",arg:a}}}function d(){}function e(){}function f(){}function g(b){["next","throw","return"].forEach(function(c){a(b,c,function(a){return this._invoke(c,a)})})}function h(a,b){function d(e,f,g,h){var i=c(a[e],a,f);if("throw"!==i.type){var j=i.arg,k=j.value;return k&&"object"==_typeof(k)&&q.call(k,"__await")?b.resolve(k.__await).then(function(a){d("next",a,g,h)},function(a){d("throw",a,g,h)}):b.resolve(k).then(function(a){j.value=a,g(j)},function(a){return d("throw",a,g,h)})}h(i.arg)}var e;this._invoke=function(a,c){function f(){return new b(function(b,e){d(a,c,b,e)})}return e=e?e.then(f,f):f()}}function i(a,b){var d=a.iterator[b.method];if(void 0===d){if(b.delegate=null,"throw"===b.method){if(a.iterator["return"]&&(b.method="return",b.arg=void 0,i(a,b),"throw"===b.method))return v;b.method="throw",b.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var e=c(d,a.iterator,b.arg);if("throw"===e.type)return b.method="throw",b.arg=e.arg,b.delegate=null,v;var f=e.arg;return f?f.done?(b[a.resultName]=f.value,b.next=a.nextLoc,"return"!==b.method&&(b.method="next",b.arg=void 0),b.delegate=null,v):f:(b.method="throw",b.arg=new TypeError("iterator result is not an object"),b.delegate=null,v)}function j(a){var b={tryLoc:a[0]};1 in a&&(b.catchLoc=a[1]),2 in a&&(b.finallyLoc=a[2],b.afterLoc=a[3]),this.tryEntries.push(b)}function k(a){var b=a.completion||{};b.type="normal",delete b.arg,a.completion=b}function l(a){this.tryEntries=[{tryLoc:"root"}],a.forEach(j,this),this.reset(!0)}function m(a){if(a){var b=a[s];if(b)return b.call(a);if("function"==typeof a.next)return a;if(!isNaN(a.length)){var c=-1,d=function b(){for(;++c<a.length;)if(q.call(a,c))return b.value=a[c],b.done=!1,b;return b.value=void 0,b.done=!0,b};return d.next=d}}return{next:n}}function n(){return{value:void 0,done:!0}}_regeneratorRuntime=function(){return o};var o={},p=Object.prototype,q=p.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},s=r.iterator||"@@iterator",t=r.asyncIterator||"@@asyncIterator",u=r.toStringTag||"@@toStringTag";try{a({},"")}catch(b){a=function(a,b,c){return a[b]=c}}o.wrap=b;var v={},w={};a(w,s,function(){return this});var x=Object.getPrototypeOf,y=x&&x(x(m([])));y&&y!==p&&q.call(y,s)&&(w=y);var z=f.prototype=d.prototype=Object.create(w);return e.prototype=f,a(z,"constructor",f),a(f,"constructor",e),e.displayName=a(f,u,"GeneratorFunction"),o.isGeneratorFunction=function(a){var b="function"==typeof a&&a.constructor;return!!b&&(b===e||"GeneratorFunction"===(b.displayName||b.name))},o.mark=function(b){return Object.setPrototypeOf?Object.setPrototypeOf(b,f):(b.__proto__=f,a(b,u,"GeneratorFunction")),b.prototype=Object.create(z),b},o.awrap=function(a){return{__await:a}},g(h.prototype),a(h.prototype,t,function(){return this}),o.AsyncIterator=h,o.async=function(a,c,d,e,f){void 0===f&&(f=Promise);var g=new h(b(a,c,d,e),f);return o.isGeneratorFunction(c)?g:g.next().then(function(a){return a.done?a.value:g.next()})},g(z),a(z,u,"Generator"),a(z,s,function(){return this}),a(z,"toString",function(){return"[object Generator]"}),o.keys=function(a){var b=[];for(var c in a)b.push(c);return b.reverse(),function c(){for(;b.length;){var d=b.pop();if(d in a)return c.value=d,c.done=!1,c}return c.done=!0,c}},o.values=m,l.prototype={constructor:l,reset:function reset(a){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(k),!a)for(var b in this)"t"===b.charAt(0)&&q.call(this,b)&&!isNaN(+b.slice(1))&&(this[b]=void 0)},stop:function stop(){this.done=!0;var a=this.tryEntries[0].completion;if("throw"===a.type)throw a.arg;return this.rval},dispatchException:function dispatchException(a){function b(b,d){return f.type="throw",f.arg=a,c.next=b,d&&(c.method="next",c.arg=void 0),!!d}if(this.done)throw a;for(var c=this,d=this.tryEntries.length-1;0<=d;--d){var e=this.tryEntries[d],f=e.completion;if("root"===e.tryLoc)return b("end");if(e.tryLoc<=this.prev){var g=q.call(e,"catchLoc"),h=q.call(e,"finallyLoc");if(g&&h){if(this.prev<e.catchLoc)return b(e.catchLoc,!0);if(this.prev<e.finallyLoc)return b(e.finallyLoc)}else if(!g){if(!h)throw new Error("try statement without catch or finally");if(this.prev<e.finallyLoc)return b(e.finallyLoc)}else if(this.prev<e.catchLoc)return b(e.catchLoc,!0)}}},abrupt:function abrupt(a,b){for(var c,d=this.tryEntries.length-1;0<=d;--d)if(c=this.tryEntries[d],c.tryLoc<=this.prev&&q.call(c,"finallyLoc")&&this.prev<c.finallyLoc){var e=c;break}e&&("break"===a||"continue"===a)&&e.tryLoc<=b&&b<=e.finallyLoc&&(e=null);var f=e?e.completion:{};return f.type=a,f.arg=b,e?(this.method="next",this.next=e.finallyLoc,v):this.complete(f)},complete:function complete(a,b){if("throw"===a.type)throw a.arg;return"break"===a.type||"continue"===a.type?this.next=a.arg:"return"===a.type?(this.rval=this.arg=a.arg,this.method="return",this.next="end"):"normal"===a.type&&b&&(this.next=b),v},finish:function finish(a){for(var b,c=this.tryEntries.length-1;0<=c;--c)if(b=this.tryEntries[c],b.finallyLoc===a)return this.complete(b.completion,b.afterLoc),k(b),v},catch:function _catch(a){for(var b,c=this.tryEntries.length-1;0<=c;--c)if(b=this.tryEntries[c],b.tryLoc===a){var d=b.completion;if("throw"===d.type){var e=d.arg;k(b)}return e}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(a,b,c){return this.delegate={iterator:m(a),resultName:b,nextLoc:c},"next"===this.method&&(this.arg=void 0),v}},o}function asyncGeneratorStep(a,b,c,d,e,f,g){try{var h=a[f](g),i=h.value}catch(a){return void c(a)}h.done?b(i):Promise.resolve(i).then(d,e)}function _asyncToGenerator(a){return function(){var b=this,c=arguments;return new Promise(function(d,e){function f(a){asyncGeneratorStep(h,d,e,f,g,"next",a)}function g(a){asyncGeneratorStep(h,d,e,f,g,"throw",a)}var h=a.apply(b,c);f(void 0)})}}var gitlab={getProjects:function(){function a(){return b.apply(this,arguments)}var b=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function c(a,b){var d,e,f,g,h;return _regeneratorRuntime().wrap(function i(c){for(;1;)switch(c.prev=c.next){case 0:return c.prev=0,c.next=3,(0,_axios["default"])({method:"get",url:"https://transfer.hft-stuttgart.de/gitlab/api/v4/projects?visibility=public&pagination=keyset&per_page="+(a+"&order_by=id&sort=asc&id_after=")+(b+"")});case 3:d=c.sent,e=d.data,f=[],g=[],h=0;case 8:if(!(h<e.length)){c.next=17;break}if("page_basic"!==e[h].name&&"generic"!==e[h].name&&"simple_raw"!==e[h].name&&"simple_thesis"!==e[h].name){c.next=13;break}return c.abrupt("continue",14);case 13:e[h].tag_list.includes("website")?g.push(e[h]):f.push(e[h]);case 14:h++,c.next=8;break;case 17:return c.abrupt("return",{error:!1,data:[f,g]});case 20:return c.prev=20,c.t0=c["catch"](0),c.abrupt("return",{error:!0,data:c.t0});case 23:case"end":return c.stop();}},c,null,[[0,20]])}));return a}(),getLatestPipelineStatus:function(){function a(a){return b.apply(this,arguments)}var b=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function b(a){return _regeneratorRuntime().wrap(function c(b){for(;1;)switch(b.prev=b.next){case 0:return b.next=2,(0,_axios["default"])({method:"get",url:"https://transfer.hft-stuttgart.de/gitlab/api/v4/projects/"+(a+"/pipelines")}).then(function(a){return a.data[0].status})["catch"](function(a){return console.error(a.response)});case 2:return b.abrupt("return",b.sent);case 3:case"end":return b.stop();}},b)}));return a}()};exports.gitlab=gitlab;
\ No newline at end of file
/* German initialisation for the jQuery UI date picker plugin. */
/* Written by Milian Wolff (mail@milianw.de). */
(function (factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['../widgets/datepicker'], factory)
} else {
// Browser globals
factory(jQuery.datepicker)
}
}(function (datepicker) {
datepicker.regional.de = {
closeText: 'Schließen',
prevText: '&#x3C;Zurück',
nextText: 'Vor&#x3E;',
currentText: 'Heute',
monthNames: ['Januar', 'Februar', 'März', 'April', 'Mai', 'Juni',
'Juli', 'August', 'September', 'Oktober', 'November', 'Dezember'],
monthNamesShort: ['Jan', 'Feb', 'Mär', 'Apr', 'Mai', 'Jun',
'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Dez'],
dayNames: ['Sonntag', 'Montag', 'Dienstag', 'Mittwoch', 'Donnerstag', 'Freitag', 'Samstag'],
dayNamesShort: ['So', 'Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa'],
dayNamesMin: ['So', 'Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa'],
weekHeader: 'KW',
dateFormat: 'dd.mm.yy',
firstDay: 1,
isRTL: false,
showMonthAfterYear: false,
yearSuffix: ''
}
datepicker.setDefaults(datepicker.regional.de)
return datepicker.regional.de
}))
"use strict";var _controller=require("../controller/controller");module.exports=function(a){// ======== APP ROUTES - PROJECT ====================
// Projektdaten
// Projektinformationen
a.get("/",function(a,b){_controller.controller.showHome(b)}),a.get("/mailinglists",function(a,b){_controller.controller.showMailingList(b)["catch"](function(a){return console.error(a)})}),a.get("/projectoverview",function(a,b,c){_controller.controller.showProjOverview(a,b,c)["catch"](function(a){return console.error(a)})}),a.get("/projektdaten",function(a,b){_controller.controller.showProjData(a,b)["catch"](function(a){return console.error(a)})}),a.get("/projektinformationen",function(a,b){_controller.controller.showProjInformations(a,b)["catch"](function(a){return console.error(a)})})};
\ No newline at end of file
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.helpers=void 0;var helpers={stringToArray:function stringToArray(a){return a?a.split(","):null}};exports.helpers=helpers;
\ No newline at end of file
doctype html
html(lang="de")
head
title= "404 - Page not found"
meta(charset="UTF-8")
meta(name="viewport", content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no")
link(rel="stylesheet", type="text/css", href="/css/bootstrap.min.css")
style.
.container {
height: 400px;
position: relative;
}
.center {
margin: 0;
position: absolute;
top: 50%;
left: 50%;
-ms-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
}
body
div(class="container")
div(class="center", align="center")
a(href="https://m4lab.hft-stuttgart.de")
img(src="https://transfer.hft-stuttgart.de/img/M4_LAB_LOGO.jpg", class="img-responsive center-block", width="185", height="192")
br
br
p(class="h5") 404. The requested URL was not found.
p <a href="./">go back home</a>
// Bootstrap
script(src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous")
\ No newline at end of file
doctype html
html(lang="de")
head
title= "500 - Internal Server Error"
meta(charset="UTF-8")
meta(name="viewport", content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no")
link(rel="stylesheet", type="text/css", href="/css/bootstrap.min.css")
style.
.container {
height: 400px;
position: relative;
}
.center {
margin: 0;
position: absolute;
top: 50%;
left: 50%;
-ms-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
}
body
div(class="container")
div(class="center", align="center")
a(href="https://m4lab.hft-stuttgart.de")
img(src="https://transfer.hft-stuttgart.de/img/M4_LAB_LOGO.jpg", class="img-responsive center-block", width="185", height="192")
br
br
p <a href="./">go back home</a>
p(class="h5") 500. Unexpected Error :(
p #{ error }
// Bootstrap
script(src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous")
\ No newline at end of file
html(lang="de")
head
title= "Mailinglisten"
meta(charset="UTF-8")
meta(name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no")
link(rel="stylesheet", type="text/css", href="/css/bootstrap.min.css")
link(rel="stylesheet", type="text/css", href="/css/m4lab.css")
link(rel="stylesheet", type="text/css", href="/css/m4lab-mobile.css")
link(rel="stylesheet", href="https://use.fontawesome.com/releases/v5.8.2/css/all.css", integrity="sha384-oS3vJWv+0UjzBfQzYUhtDYW+Pj2yciDJxpsK1OYPAYjqT085Qq/1cq5FLXAZQ7Ay", crossorigin="anonymous")
link(rel="stylesheet" href="/fonts/ionicons.min.css")
link(rel="stylesheet" href="/css/Testimonials.css")
body
div(class="container")
div(class="row")
div(class="col-md-12 margin_bottom_40")
img(class="mx-auto" src="/img/Mailinglisten.jpg" width="100%")
div(class="container")
div(class="row")
div(class="col-md-12 margin_bottom_30")
h4(class="text-center") Durch Mailinglisten können Sie interessierten Personen<br/> <strong>regelmäßig Informationen</strong> zu Ihrem Projekt oder Thema zukommen lassen.<br/> Ebenso können Sie über ein Abonnement in einer Mailingliste Mitglied des Verteilers<br/>werden und so <strong>im Austausch</strong> bleiben. <br/>
div(class="col-md-12 margin_bottom_30")
h2(class="text-center color_708090") <strong>Aktive Mailinglisten</strong>
div(class="table-responsive table-borderless")
if !mailinglists || !mailinglists.length
p There is no active mailing list at the moment
else
table(class="table table-striped table-bordered table-hover")
thead()
tr()
th Name
th Zum Abonnement der Mailingliste
th Zum zugehörigen Projekt
th Keywords
tbody()
for item in mailinglists
if item.projectstatus == '1'
tr
td #{item.name}
td <a href="#{item.src}">#{item.src}</a>
td <a href='projectoverview?projectID=#{item.id}'>#{item.project_title}</a>
td #{item.keywords}
div(id="aboText" class="mailingList_aboText")
div(class="container")
div(class="row m_bottom_0 p_top_20 p_bottom_20")
div(class="col-lg-12 background_ffffff")
h2(class="text-center color_708090 m_top_15") <strong> Mailingliste abonnieren </strong>
div(class="col-md-4 col-lg-6 background_ffffff")
p() Das Deutsche Forschungsnetz (DFN) bietet Mailinglisten für Wissenschaft und Forschung an. Mailinglisten sind E-Mail-Verteilerlisten, d.h. Personen, die sich für Ihr Forschungsthema interessieren, können sich über das DFN registrieren und erhalten im Anschluss daran regelmäßig die über die Mailinglisten geteilten Informationen.
p() Sie als Verteiler senden die zu versendende Mail folglich nur noch an die festgelegte Mailinglistenadresse und das Programm leitet die Nachricht an alle registrierten Personen weiter.
div(class="col-md-4 col-lg-6 justify-content-between flex-wrap background_ffffff")
div(class="justify-content-between order-2 background_ffffff")
p(class="text-left d-flex d-md-flex flex-row flex-grow-1 flex-shrink-1 flex-fill justify-content-between align-items-start align-content-start align-self-start flex-wrap order-1 justify-content-md-center align-items-md-start justify-content-lg-start") Oben finden Sie eine Übersicht über die aktiven Mailinglisten. Wenn Sie sich in eine Mailingliste eintragen wollen, dann klicken Sie auf den entsprechend hinterlegten Link.
p() Es öffnet sich daraufhin die Hauptseite der Liste. Nach der Auswahl des Buttons "Abonnieren", können Sie Ihre Mailadresse hinterlegen und sich in die Liste eintragen.
a(class="btn btn-primary text-center d-inline-flex d-lg-flex flex-column flex-grow-1 flex-shrink-1 flex-fill justify-content-between align-items-baseline align-content-center align-self-baseline flex-wrap order-3 justify-content-md-center align-items-md-end align-items-lg-center justify-content-xl-center mx-auto background_e0001b m_top_10" role="button" href="/downloads/Handout_Mailinglisten_Abonnieren.pdf") <strong>Erste Schritte (Anleitung als PDF)</strong>
a(class="btn btn-primary text-center d-inline-flex d-lg-flex flex-column flex-grow-1 flex-shrink-1 flex-fill justify-content-between align-items-baseline align-content-center align-self-baseline flex-wrap mb-auto justify-content-md-center align-items-md-end align-items-lg-center justify-content-xl-center mx-auto background_e0001b m_top_10" role="button" href="https://www.listserv.dfn.de/sympa/help") <strong>Weitergehende Dokumentation bei DFN (externer Link)</strong>
div(id="newListText" class="mailingList_text")
div(class="container")
div(class="row m_bottom_0 p_top_20 p_bottom_20")
div(class="col-lg-12 background_ffffff")
h2(class="text-center color_708090 m_top_15") <strong>Neue Mailingliste erstellen</strong>
div(class="col-md-4 col-lg-6 background_ffffff")
p() Über das Transferportal können Sie selbst eine Liste zu Ihrem Projekt anlegen, um mit Ihren Partnern in Verbindung zu bleiben.
p() Folgen Sie hierzu der Anleitung des DFN.
div(class="col-md-4 col-lg-6 justify-content-between flex-wrap background_ffffff")
a(class="btn btn-primary text-center d-inline-flex d-lg-flex flex-column flex-grow-1 flex-shrink-1 flex-fill justify-content-between align-items-baseline align-content-center align-self-baseline flex-wrap order-3 justify-content-md-center align-items-md-end align-items-lg-center justify-content-xl-center mx-auto background_e0001b m_top_10" role="button" href="/downloads/Handout_Mailinglisten_Erstellen.pdf") <strong>Erste Schritte (Anleitung als PDF)</strong>
a(class="btn btn-primary text-center d-inline-flex d-lg-flex flex-column flex-grow-1 flex-shrink-1 flex-fill justify-content-between align-items-baseline align-content-center align-self-baseline flex-wrap order-3 justify-content-md-center align-items-md-end align-items-lg-center justify-content-xl-center mx-auto background_e0001b m_top_10" role="button" href="https://www.listserv.dfn.de/sympa/help/admin") <strong>Gesamtes Tutorial bei DFN (externer Link)</strong>
div(id="addListText" class="mailingList_text")
div(class="container")
div(class="row m_bottom_0 p_top_20 p_bottom_20")
div(class="col-lg-12 background_ffffff")
h2(class="text-center color_708090 m_top_15") <strong>Neue Mailingliste eintragen</strong>
div(class="col-xl background_ffffff")
p() Um Ihre beim DFN angelegte Mailingliste hier aufzunehmen, schicken Sie uns bitte eine Email an <a href="mailto:support-transfer@hft-stuttgart.de">support-transfer@hft-stuttgart.de</a>
// jQuery
script(src="https://code.jquery.com/jquery-3.3.1.min.js")
script(src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js", integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1", crossorigin="anonymous")
// Bootstrap
script(src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous")
// Header
script(src="/js/headfoot.js")
script(src="/js/mobile.js")
\ No newline at end of file
doctype html
html(lang="de")
head
title= "Projektinformationen"
meta(charset="UTF-8")
meta(name="viewport", content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no")
link(rel="stylesheet", type="text/css", href="/css/bootstrap.min.css")
link(rel="stylesheet", type="text/css", href="/css/m4lab.css")
link(rel="stylesheet", type="text/css", href="/css/m4lab-mobile.css")
link(rel="stylesheet", href="https://use.fontawesome.com/releases/v5.8.2/css/all.css", integrity="sha384-oS3vJWv+0UjzBfQzYUhtDYW+Pj2yciDJxpsK1OYPAYjqT085Qq/1cq5FLXAZQ7Ay", crossorigin="anonymous")
style.
.title-container {
position: relative;
color: white;
height: 12rem;
overflow: hidden;
}
.card-title-bottom-left {
position: absolute;
bottom: 0px;
width: 100%;
color: black;
font-weight: bold;
background: rgb(255, 255, 255, 0.9);
text-align: left;
padding: 5px
}
.card-img-top {
height: 100%;
object-fit: contain;
position: absolute;
top: 0;
left: 0;
right: 0;
margin-left: 0;
margin-right: 0;
}
.card-img-bg {
background-size: cover;
filter: blur(30px);
width: 100%;
height: 100%;
}
.clamp-lines {
display: -webkit-box;
-webkit-line-clamp: 6;
-webkit-box-orient: vertical;
overflow: hidden;
}
body
div(class="container")
div(class="row")
div(class="col-md-12 margin_bottom_40")
img(class="mx-auto" src="/img/Projektinformationen.png" width="100%")
div(class="container")
p Hier finden Sie Informationen zu den bei uns gehosteten Projekten, wie z.B. Projektbeschreibungen, Projektwebseiten, Visualisierungen, Demonstrationen.
p Für eine Übersicht über den bei uns gehosteten Projektcode und andere Projektdaten klicken Sie <a href="/projektdaten"> hier </a>.
p Wenn Sie zu einem Projekt beitragen möchten, oder eines erstellen möchten, finden Sie weitere Informationen <a href="/help/gitlab.html">hier</a>.
div(class="container")
p#pagesCounter #{pages.length} Projektinformationen werden angezeigt
div(class="pt-4 pb-4 form-row")
div(class="form-group col-md-10")
input(id="searchInput", class="form-control form-control-lg", type="text", placeholder="Suchen Sie hier nach Themen und Projekten", onkeyup="searchFunction()")
div(class="form-group col-md-2")
select#sortingSelect(class="form-control form-control-lg")
option(value="" disabled) Sort by
option(value="name") &nbsp; Name
option(value="created_at") &nbsp; Last created
option(value="updated_at") &nbsp; Last updated
| <div class="row">
for item in pages
div(class="card-deck py-4 col-sm")
div(class="card card-portrait" style="transform: rotate(0);")
div(class="title-container")
div(class="card-img-bg" style=`background-image: url(${item.logo});`)
img(class="card-img-top", src=item.logo)
h5(class="card-title-bottom-left") #{item.name}
div(class="card-body-fixed-height")
div(class="row")
each key in item.keywords
h6
span(class="badge badge-pill badge-primary px-2") #{key}
| &nbsp;
div(class="row")
div(class="col-9")
p(class="card-text clamp-lines") #{item.desc}
a(href=item.weburl, class="no_text_decoration stretched-link", target="_blank")
| </div>
// jQuery
script(src="https://code.jquery.com/jquery-3.3.1.min.js")
script(src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js", integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1", crossorigin="anonymous")
// Bootstrap
script(src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous")
// Header
script(src="/js/headfoot.js")
script(src="/js/mobile.js")
// General functions
script(src="/js/generalFunction.js")
script.
function searchFunction() {
var input = document.getElementById("searchInput")
var filter = input.value.toUpperCase()
var cardsCol = document.getElementsByClassName("col-sm")
var cardTitle, cardBadges, cardText, titleValue, badgesValue, textValue, allValues;
var i
var counterBlock = 0
for (i = 0; i < cardsCol.length; i++) {
cardTitle = cardsCol[i].getElementsByClassName("card-title-bottom-left");
//cardBody = cardsCol[i].getElementsByClassName("card-body");
cardBadges = [...cardsCol[i].getElementsByClassName("badge-pill")];
cardText = cardsCol[i].getElementsByClassName("card-text");
titleValue = cardTitle[0].textContent || cardTitle[0].innerText;
badgesValue = cardBadges.map(b => b.textContent).join(" ");
//bodyValue = cardBody[0].textContent || cardBody[0].innerText;
textValue = cardText[0].textContent || cardText[0].innerText;
allValues = [titleValue, badgesValue, textValue].map(v => v.toUpperCase()).join(" ");
if (allValues.indexOf(filter)!= -1) {
cardsCol[i].style.display = "block"
counterBlock++
} else {
cardsCol[i].style.display = "none"
}
}
document.getElementById("pagesCounter").innerHTML = counterBlock+" Projektinformationen werden angezeigt"
}
$("#sortingSelect").change(function() {
window.location.replace('/projektinformationen?sort='+$("#sortingSelect").val())
});
function setSortSelect() {
let sortKeyword = getQueryStringParams('sort', window.location.href)
if (sortKeyword == "created_at") {
$("#sortingSelect").val("created_at")
} else if(sortKeyword == "updated_at") {
$("#sortingSelect").val("updated_at")
} else {
$("#sortingSelect").val("name")
}
}
setSortSelect()
\ No newline at end of file
doctype html
html(lang="de")
head
title= "Project List"
meta(charset="UTF-8")
meta(name="viewport", content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no")
link(rel="stylesheet", type="text/css", href="/css/bootstrap.min.css")
link(rel="stylesheet", type="text/css", href="/css/m4lab.css")
link(rel="stylesheet", type="text/css", href="/css/m4lab-mobile.css")
link(rel="stylesheet", href="https://use.fontawesome.com/releases/v5.8.2/css/all.css", integrity="sha384-oS3vJWv+0UjzBfQzYUhtDYW+Pj2yciDJxpsK1OYPAYjqT085Qq/1cq5FLXAZQ7Ay", crossorigin="anonymous")
body
include project.html
// jQuery
script(src="https://code.jquery.com/jquery-3.3.1.min.js")
script(src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js", integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1", crossorigin="anonymous")
// Bootstrap
script(src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous")
// Header
script(src="/js/headfoot.js")
script(src="/js/mobile.js")
\ No newline at end of file
<div>
<div class="container">
<div class="row">
<div class="col-md-12 margin_bottom_40"><img class="mx-auto" src="/img/Projekte.png"
width="100%"></div>
</div>
</div>
</div>
<div>
<div class="container">
<div class="row">
<div class="col-md-12 margin_bottom_30">
<h4 class="text-center">Diese Seite bietet den Einstieg zu den Inhalten der unterschiedlichen Projekte,
die über das Portal zur Verfügung gestellt werden.</h4>
</div>
</div>
</div>
</div>
<div>
<div class="container">
<div class="row">
<div class="col-lg-1"></div>
<div class="col-md-6 col-lg-4 p_left_5 p_right_5">
<img class="d-flex d-lg-flex justify-content-center align-items-center align-content-center align-self-center mx-auto"
src="/img/Icon_Haken.png" height="150" />
<br />
<h2 class="text-center heading"><small><strong>Open-Source-/ Open-Data-Projekte</strong></small><br></h2>
<p class="text-left">Für die Veröffentlichung von Open-Source-Projekten steht Ihnen eine von der HFT
Stuttgart selbstverwaltete Gitlab-Instanz bereit.
<br /> <br />
Eine Übersicht der aktuellen Open-Source-/Open-Data-Projekte erreichen Sie über diesen <a
href="https://transfer.hft-stuttgart.de/gitlab/explore/projects">
<i class="fas fa-chevron-right">Link zu den Gitlab-Projekten</i></a>.<br />
</p>
</div>
<div class="col-lg-2"></div>
<div class="col-md-6 col-lg-4 p_left_5 p_right_5">
<img src="/img/Icon_Sandclock.png"
class="d-flex d-lg-flex justify-content-center align-items-center align-content-center align-self-center mx-auto"
height="150px" />
<br />
<h2 class="text-center heading"><small><strong>Andere Projekte</strong></small><br></h2>
<p class="text-left">Aktuell unterstützt das Transferportal Projekte, die einer Open-Source bzw.
Open-Data-Lizenz
unterliegen. Die Gründe hierfür liegen in den Lizenzbedingungen unserer Gitlab-Instanz als
Plattform.
<br /> <br />
Künftig möchten wir auch andere Projekttypen unterstützen. Es soll dann beispielsweise möglich sein,
Projektergebnisse zu veröffentlichen ohne die dazugehörigen Quellcodes oder Rohdaten offenzulegen.
<br /> <br />
Wir entwickeln das Portal kontinuierlich weiter und prüfen dabei auch andere Plattformen zur
Nutzung.
</p>
</div>
<div class="col-lg-1"></div>
</div>
<hr />
<!-- text: Zweck dieser Seite / purpose of this page -->
<div>
<p class="text-justify"><i id="infoicon" class="fas fa-info-circle fa-lg"></i> Falls Sie mehr über die
Weiterentwicklung des Portals
erfahren wollen oder sich mit Anregungen auch aktiv einbringen
wollen, regen wir an, unsere Mailingliste <a href="https://www.listserv.dfn.de/sympa/info/transferportalhft">
<i class="fas fa-chevron-right">transferportalhft</i></a> zu abonnieren. Sie können uns aber auch
jederzeit
direkt unter <a href="/account/contact"><i class="fas fa-chevron-right">Kontakt</i></a> anschreiben.
</p>
</div>
</div>
</div>
<div class="container">
<!-- text: Hilfestellung zu Gitlab / short help about Gitlab -->
<hr />
<h2 class="text-center heading"><small><strong>Hilfestellung zu GitLab</strong></small></h2>
<br />
<p> Falls Sie Hilfe zu Gitlab benötigen, besuchen Sie unseren <a href="/help/gitlab.html" target="_blank">Hilfebereich </a>
</p>
<!-- / content body -->
</div>
\ No newline at end of file
doctype html
html(lang="de")
head
title= "Projektdaten"
meta(charset="UTF-8")
meta(name="viewport", content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no")
link(rel="stylesheet", type="text/css", href="/css/bootstrap.min.css")
link(rel="stylesheet", type="text/css", href="/css/m4lab.css")
link(rel="stylesheet", type="text/css", href="/css/m4lab-mobile.css")
link(rel="stylesheet", href="https://use.fontawesome.com/releases/v5.8.2/css/all.css", integrity="sha384-oS3vJWv+0UjzBfQzYUhtDYW+Pj2yciDJxpsK1OYPAYjqT085Qq/1cq5FLXAZQ7Ay", crossorigin="anonymous")
style.
.title-container {
position: relative;
color: white;
height: 12rem;
overflow: hidden;
}
.card-title-bottom-left {
position: absolute;
bottom: 0px;
width: 100%;
color: black;
font-weight: bold;
background: rgb(255, 255, 255, 0.9);
text-align: left;
padding: 5px
}
.card-img-top {
height: 100%;
object-fit: contain;
position: absolute;
top: 0;
left: 0;
right: 0;
margin-left: 0;
margin-right: 0;
}
.card-img-bg {
background-size: cover;
filter: blur(30px);
width: 100%;
height: 100%;
}
.clamp-lines {
display: -webkit-box;
-webkit-line-clamp: 6;
-webkit-box-orient: vertical;
overflow: hidden;
}
body
div(class="container")
div(class="row")
div(class="col-md-12 margin_bottom_40")
img(class="mx-auto" src="https://transfer.hft-stuttgart.de/img/ProjektcodeDaten.png" width="100%")
div(class="container")
p Hier finden Sie den direkten Zugang zu den Inhalten der bei uns gehosteten Projekte.
p Weitere Informationen zu den bei uns gehosteten Projekten finden Sie <a href="/projektinformationen">hier</a>.
p Wenn Sie zu einem Projekt beitragen möchten, oder eines erstellen möchten, finden Sie weitere Informationen <a href="/help/gitlab.html">hier</a>.
div(class="container")
p#projectCounter #{project.length} Projektdaten werden angezeigt
div(class="pt-4 pb-4 form-row")
div(class="form-group col-md-10")
input(id="searchInput", class="form-control form-control-lg", type="text", placeholder="Suchen Sie hier nach Themen und Projekten", onkeyup="searchFunction()")
div(class="form-group col-md-2")
select#sortingSelect(class="form-control form-control-lg")
option(value="" disabled) Sort by
option(value="name") &nbsp; Name
option(value="created_at") &nbsp; Last created
option(value="updated_at") &nbsp; Last updated
| <div class="row">
for item in project
div(class="card-deck py-4 col-sm")
div(class="card card-portrait" style="transform: rotate(0);")
div(class="title-container")
div(class="card-img-bg" style=`background-image: url(${item.logo});`)
img(class="card-img-top", src=item.logo)
h5(class="card-title-bottom-left") #{item.name}
div(class="card-body-fixed-height")
div(class="row")
each key in item.keywords
h6
span(class="badge badge-pill badge-primary px-2") #{key}
| &nbsp;
div(class="row")
div(class="col-9")
p(class="card-text clamp-lines") #{item.desc}
a(href=item.weburl, class="no_text_decoration stretched-link", target="_blank")
| </div>
button(onclick="topFunction()" id="topBtn")
i(class="fa fa-chevron-up")
// jQuery
script(src="https://code.jquery.com/jquery-3.3.1.min.js")
script(src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js", integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1", crossorigin="anonymous")
// Bootstrap
script(src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous")
// Header
script(src="/js/headfoot.js")
script(src="/js/mobile.js")
// General functions
script(src="/js/generalFunction.js")
script.
function searchFunction() {
var input = document.getElementById("searchInput")
var filter = input.value.toUpperCase()
var cardsCol = document.getElementsByClassName("col-sm")
var cardTitle, cardBadges, cardText, titleValue, badgesValue, textValue, allValues;
var i
var counterBlock = 0
for (i = 0; i < cardsCol.length; i++) {
cardTitle = cardsCol[i].getElementsByClassName("card-title-bottom-left");
//cardBody = cardsCol[i].getElementsByClassName("card-body");
cardBadges = [...cardsCol[i].getElementsByClassName("badge-pill")];
cardText = cardsCol[i].getElementsByClassName("card-text");
titleValue = cardTitle[0].textContent || cardTitle[0].innerText;
badgesValue = cardBadges.map(b => b.textContent).join(" ");
//bodyValue = cardBody[0].textContent || cardBody[0].innerText;
textValue = cardText[0].textContent || cardText[0].innerText;
allValues = [titleValue, badgesValue, textValue].map(v => v.toUpperCase()).join(" ");
if (allValues.indexOf(filter)!= -1) {
cardsCol[i].style.display = "block"
counterBlock++
} else {
cardsCol[i].style.display = "none"
}
}
document.getElementById("projectCounter").innerHTML = counterBlock+" Projektdaten werden angezeigt"
}
$("#sortingSelect").change(function() {
window.location.replace('/projektdaten?sort='+$("#sortingSelect").val())
});
function setSortSelect() {
let sortKeyword = getQueryStringParams('sort', window.location.href)
if (sortKeyword == "created_at") {
$("#sortingSelect").val("created_at")
} else if(sortKeyword == "updated_at") {
$("#sortingSelect").val("updated_at")
} else {
$("#sortingSelect").val("name")
}
}
setSortSelect()
\ No newline at end of file
doctype html
html(lang="de")
head
title= "Project List"
meta(charset="UTF-8")
meta(name="viewport", content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no")
link(rel="stylesheet", type="text/css", href="/css/bootstrap.min.css")
link(rel="stylesheet", type="text/css", href="/css/m4lab.css")
link(rel="stylesheet", type="text/css", href="/css/m4lab-mobile.css")
link(rel="stylesheet", href="https://use.fontawesome.com/releases/v5.8.2/css/all.css", integrity="sha384-oS3vJWv+0UjzBfQzYUhtDYW+Pj2yciDJxpsK1OYPAYjqT085Qq/1cq5FLXAZQ7Ay", crossorigin="anonymous")
body
div(class="container")
for project in projectOV
div(class="row")
div(class="col-sm-8 pt-3")
h1 #{project.title}
div(class="project_overview")
img(src=project.src, width="100%")
p(class="text-center mr-5") #{project.caption}
h2(class="pt-4") Projektüberblick
p !{project.overview}
br
b keywords: &nbsp;
span #{project.keywords}
h2(class="pt-4") Fragestellung
p !{project.question}
h2(class="pt-4") Vorgehensweise
p !{project.approach}
h2(class="pt-4") Ergebnis und Nutzung
p !{project.result}
div(class="col-sm-4 pt-3 background_f1f1f1")
for image in projectImgs
if image.pos == '2' || image.pos == '3'
div(class="projectimg")
<img src="#{image.src}", width="100%">
if image.caption
span #{image.caption}
</img>
div(class="fakeimg")
if project.leader_lastname
p
b Projektleitung HfT: &nbsp;
<a href="mailto: #{project.leader_email}">#{project.leader_lastname}</a>
div(class="fakeimg")
if project.contact_lastname
p
b Ansprechperson: &nbsp;
<a href="mailto: #{project.contact_email}">#{project.contact_lastname} </a>
div(class="fakeimg")
if project.announcement
p
b Ausschreibung: &nbsp;
span !{project.announcement}
div(class="fakeimg")
if project.partner_name
p
b Projektpartner:
br
for website, i in partnerWS
if website
<a href="#{website}">#{partnerN[i]}</a>
br
else
#{partnerN[i]}
br
div(class="fakeimg")
if project.term
p
b Projektlaufzeit: &nbsp;
span #{project.term}
div(class="fakeimg")
if project.award_name
p
b Preise:
br
for awardsite, i in awardWS
if awardsite
<a href="#{awardsite}">#{awardN[i]}</a>
br
else
#{awardN[i]}
br
div(class="fakeimg")
if project.administrator
p
b Projektträger: &nbsp;
span #{project.administrator}
div(class="fakeimg")
if project.sponsor_name
p
b Geldgeber:
br
for website, i in sponsorWS
if website
<a href="#{website}">#{sponsorN[i]}</a>
br
else
#{sponsorN[i]}
br
div(class="fakeimg")
if project.website || project.further_details
p
b Mehr Informationen: &nbsp;
if project.website
<a href="#{project.website}">#{project.website}</a>
br
span !{project.further_details}
if project.pname == 'M4LAB'
div(class="Downloads")
h5 Downloads
div(class="Projektlogos")
img(src="./images/M4_LAB_Projekt/WRS_Logo.jpg" width="32%")
img(src="./images/M4_LAB_Projekt/IBA2027_Logo.jpg" width="32%")
img(src="./images/M4_LAB_Projekt/GWK_Logo.jpg" width="32%")
br
br
img(src="./images/M4_LAB_Projekt/Innovative_Hochschule_Initiative_BMBF_GWK_RGB.png" width="100%")
//jQuery
script(src="https://code.jquery.com/jquery-3.3.1.min.js")
script(src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js", integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1", crossorigin="anonymous")
// Bootstrap
script(src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous")
// Header
script(src="/js/headfoot.js")
script(src="/js/mobile.js")
\ No newline at end of file