move path to variables

This commit is contained in:
Sieciech 2021-07-27 19:46:13 +02:00
parent 4a26262bac
commit 90d5de728d
4 changed files with 108 additions and 92 deletions

13
Jenkinsfile vendored
View File

@ -3,6 +3,7 @@ pipeline {
environment { environment {
DatabaseUrl = sh(returnStdout: true, script: 'bash /var/lib/jenkins/variables/CureNet/var.sh ${BRANCH_NAME} DatabaseUrl').trim() DatabaseUrl = sh(returnStdout: true, script: 'bash /var/lib/jenkins/variables/CureNet/var.sh ${BRANCH_NAME} DatabaseUrl').trim()
ProjectPath = sh(returnStdout: true, script: 'bash /var/lib/jenkins/variables/CureNet/var.sh ${BRANCH_NAME} ProjectPath').trim()
DatabaseUrlTesting = sh(returnStdout: true, script: 'bash /var/lib/jenkins/variables/CureNet/var.sh master DatabaseUrl').trim() DatabaseUrlTesting = sh(returnStdout: true, script: 'bash /var/lib/jenkins/variables/CureNet/var.sh master DatabaseUrl').trim()
} }
@ -172,9 +173,9 @@ pipeline {
stage('Frontend') { stage('Frontend') {
steps { steps {
dir(path: 'src/frontend') { dir(path: 'src/frontend') {
sh 'ssh web@fufle.net touch /web/fufle.net/curenet/dev/frontend/REMOVEME' sh 'ssh web@fufle.net touch ${ProjectPath}/frontend/REMOVEME'
sh 'ssh web@fufle.net rm -rf /web/fufle.net/curenet/dev/frontend/*' sh 'ssh web@fufle.net rm -rf ${ProjectPath}/frontend/*'
sh 'scp -r dist/* web@fufle.net:/web/fufle.net/curenet/dev/frontend/' sh 'scp -r dist/* web@fufle.net:${ProjectPath}/frontend/'
} }
} }
@ -183,9 +184,9 @@ pipeline {
stage('Backend') { stage('Backend') {
steps { steps {
dir(path: 'src/backend') { dir(path: 'src/backend') {
sh 'ssh web@fufle.net touch /web/fufle.net/curenet/dev/backend/REMOVEME' sh 'ssh web@fufle.net touch ${ProjectPath}/backend/REMOVEME'
sh 'ssh web@fufle.net rm -rf /web/fufle.net/curenet/dev/backend/*' sh 'ssh web@fufle.net rm -rf ${ProjectPath}/backend/*'
sh 'scp -r ./* web@fufle.net:/web/fufle.net/curenet/dev/backend/' sh 'scp -r ./* web@fufle.net:${ProjectPath}/backend/'
} }
} }

View File

@ -3,100 +3,111 @@ import { Route, RouterModule } from '@angular/router';
import { NotFoundComponent } from './modules/shared/components/not-found/not-found.component'; import { NotFoundComponent } from './modules/shared/components/not-found/not-found.component';
interface AppMenuEntry { interface AppMenuEntry {
label: string; label: string;
icon: string; icon: string;
path?: string; path?: string;
matchExact?: boolean; matchExact?: boolean;
level?: number; level?: number;
} }
interface AppRoute extends Route { interface AppRoute extends Route {
menuEntries?: AppMenuEntry[]; menuEntries?: AppMenuEntry[];
} }
export const appRoutes: AppRoute[] = [ export const appRoutes: AppRoute[] = [
{ {
path: '', path: '',
component: NotFoundComponent, component: NotFoundComponent,
menuEntries: [ menuEntries: [
{ {
label: 'MENU.HOME', label: 'MENU.HOME',
icon: 'fa fa-home', icon: 'fa fa-home',
matchExact: true, matchExact: true,
}, },
], ],
}, },
{ {
path: 'profile', path: 'profile',
component: NotFoundComponent, component: NotFoundComponent,
menuEntries: [ menuEntries: [
{ {
label: 'MENU.PROFILE', label: 'MENU.PROFILE',
icon: 'fa fa-user', icon: 'fa fa-user',
}, },
], ],
}, },
{ {
path: 'community', path: 'community',
component: NotFoundComponent, component: NotFoundComponent,
menuEntries: [ menuEntries: [
{ {
label: 'MENU.COMMUNITY', label: 'MENU.COMMUNITY',
icon: 'fa fa-users', icon: 'fa fa-users',
}, },
], ],
}, },
{ {
path: 'messages', path: 'questions',
component: NotFoundComponent, component: NotFoundComponent,
menuEntries: [ menuEntries: [
{ {
label: 'MENU.MESSAGES', label: 'MENU.QUESTIONS',
icon: 'fa fa-comments', icon: 'fa fa-question',
}, level: 1,
], }
}, ],
{ },
path: 'tests', {
component: NotFoundComponent, path: 'messages',
menuEntries: [ component: NotFoundComponent,
{ menuEntries: [
label: 'MENU.TESTS', {
icon: 'fa fa-heartbeat', label: 'MENU.MESSAGES',
}, icon: 'fa fa-comments',
], },
}, ],
{ },
path: 'research', {
component: NotFoundComponent, path: 'tests',
menuEntries: [ component: NotFoundComponent,
{ menuEntries: [
label: 'MENU.RESEARCH', {
icon: 'fa fa-flask', label: 'MENU.TESTS',
}, icon: 'fa fa-heartbeat',
], },
}, ],
{ },
path: 'admin', {
loadChildren: () => import('./modules/admin/admin.module').then(m => m.AdminModule), path: 'research',
menuEntries: [ component: NotFoundComponent,
{ menuEntries: [
label: 'MENU.ADMIN', {
icon: 'fa fa-id-card', label: 'MENU.RESEARCH',
matchExact: true, icon: 'fa fa-flask',
}, },
{ ],
path: 'admin/users', },
label: 'MENU.USERS', {
icon: 'fa fa-users', path: 'admin',
level: 1, loadChildren: () => import('./modules/admin/admin.module').then(m => m.AdminModule),
} menuEntries: [
], {
}, label: 'MENU.ADMIN',
icon: 'fa fa-id-card',
matchExact: true,
},
{
path: 'admin/users',
label: 'MENU.USERS',
icon: 'fa fa-users',
level: 1,
}
],
},
]; ];
@NgModule({ @NgModule({
imports: [RouterModule.forRoot(appRoutes)], imports: [RouterModule.forRoot(appRoutes)],
exports: [RouterModule] exports: [RouterModule]
}) })
export class AppRoutingModule { } export class AppRoutingModule { }

View File

@ -19,7 +19,9 @@
"HOME": "Dashboard", "HOME": "Dashboard",
"PROFILE": "Profile", "PROFILE": "Profile",
"COMMUNITY": "Community", "COMMUNITY": "Community",
"GROUP": "My group",
"MESSAGES": "Messages", "MESSAGES": "Messages",
"QUESTIONS": "Q&A",
"TESTS": "Laboratory tests", "TESTS": "Laboratory tests",
"RESEARCH": "Research", "RESEARCH": "Research",
"ADMIN": "Admin", "ADMIN": "Admin",

View File

@ -19,7 +19,9 @@
"HOME": "Kokpit", "HOME": "Kokpit",
"PROFILE": "Profil", "PROFILE": "Profil",
"COMMUNITY": "Społeczność", "COMMUNITY": "Społeczność",
"GROUP": "Moja grupa",
"MESSAGES": "Wiadomości", "MESSAGES": "Wiadomości",
"QUESTIONS": "Pytania i odpowiedzi",
"TESTS": "Wyniki badań", "TESTS": "Wyniki badań",
"RESEARCH": "Badania naukowe", "RESEARCH": "Badania naukowe",
"ADMIN": "Panel administratora", "ADMIN": "Panel administratora",