Merge branch 'master' of git@gitlab.eudat.eu:dmp/OpenAIRE-EUDAT-DMP-service-pilot.git
This commit is contained in:
commit
67caeffa54
|
@ -16,7 +16,7 @@ export class RestBase {
|
|||
}
|
||||
|
||||
protocol: string = "http";
|
||||
hostname: string = "localhost";//"dl010.madgik.di.uoa.gr";//
|
||||
hostname: string = "dionysus.di.uoa.gr";//"dl010.madgik.di.uoa.gr";//
|
||||
port: number = 7070;//8080;//
|
||||
webappname: string = "dmp-backend";//"dmp-backend-new";//
|
||||
restpath: string = "rest";
|
||||
|
|
|
@ -450,9 +450,6 @@ ALTER TABLE ONLY "DatasetService"
|
|||
ADD CONSTRAINT "DatasetServiceServiceReference" FOREIGN KEY ("Service") REFERENCES "Service"("ID");
|
||||
|
||||
|
||||
DROP table if exists "UserDMP";
|
||||
DROP table if exists "UserInfo";
|
||||
DROP table if exists "UserAuth";
|
||||
|
||||
CREATE TABLE "UserInfo" (
|
||||
"id" uuid DEFAULT uuid_generate_v4() UNIQUE NOT NULL,
|
||||
|
@ -488,13 +485,13 @@ COMMENT ON COLUMN "UserAuth"."password" IS 'This field stores a password hash';
|
|||
|
||||
create table "UserDMP" (
|
||||
"id" uuid DEFAULT uuid_generate_v4() NOT NULL,
|
||||
"user" uuid NOT NULL,
|
||||
"usr" uuid NOT NULL,
|
||||
"dmp" uuid NOT NUll,
|
||||
"role" integer
|
||||
);
|
||||
|
||||
ALTER TABLE "UserDMP" ADD CONSTRAINT fkey_userdmp_user FOREIGN KEY ("user") REFERENCES "UserInfo"("id");
|
||||
ALTER TABLE "UserDMP" ADD CONSTRAINT fkey_userdmp_dmp FOREIGN KEY ("dmp") REFERENCES "DMP"("ID");
|
||||
ALTER TABLE "UserDMP" ADD CONSTRAINT fkey_userdmp_user FOREIGN KEY (usr) REFERENCES "UserInfo"("id");
|
||||
ALTER TABLE "UserDMP" ADD CONSTRAINT fkey_userdmp_dmp FOREIGN KEY (dmp) REFERENCES "DMP"("ID");
|
||||
|
||||
|
||||
ALTER TABLE "UserInfo" OWNER TO dmptool;
|
||||
|
|
|
@ -175,6 +175,16 @@
|
|||
"tslib": "1.7.1"
|
||||
}
|
||||
},
|
||||
"@angular/platform-server": {
|
||||
"version": "4.4.5",
|
||||
"resolved": "https://registry.npmjs.org/@angular/platform-server/-/platform-server-4.4.5.tgz",
|
||||
"integrity": "sha1-dvI7LDhO1zldwXk8+Fl4iDuiy1A=",
|
||||
"requires": {
|
||||
"parse5": "3.0.2",
|
||||
"tslib": "1.7.1",
|
||||
"xhr2": "0.1.4"
|
||||
}
|
||||
},
|
||||
"@angular/router": {
|
||||
"version": "4.3.6",
|
||||
"resolved": "https://registry.npmjs.org/@angular/router/-/router-4.3.6.tgz",
|
||||
|
@ -240,8 +250,7 @@
|
|||
"@types/node": {
|
||||
"version": "6.0.88",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-6.0.88.tgz",
|
||||
"integrity": "sha512-bYDPZTX0/s1aihdjLuAgogUAT5M+TpoWChEMea2p0yOcfn5bu3k6cJb9cp6nw268XeSNIGGr+4+/8V5K6BGzLQ==",
|
||||
"dev": true
|
||||
"integrity": "sha512-bYDPZTX0/s1aihdjLuAgogUAT5M+TpoWChEMea2p0yOcfn5bu3k6cJb9cp6nw268XeSNIGGr+4+/8V5K6BGzLQ=="
|
||||
},
|
||||
"@types/q": {
|
||||
"version": "0.0.32",
|
||||
|
@ -365,6 +374,57 @@
|
|||
"integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=",
|
||||
"dev": true
|
||||
},
|
||||
"angular-2-data-table": {
|
||||
"version": "0.1.2",
|
||||
"resolved": "https://registry.npmjs.org/angular-2-data-table/-/angular-2-data-table-0.1.2.tgz",
|
||||
"integrity": "sha1-eiz/jPxKpxSpfTMwmLkRaqQourw="
|
||||
},
|
||||
"angular-4-data-table-bootstrap-4": {
|
||||
"version": "0.2.0",
|
||||
"resolved": "https://registry.npmjs.org/angular-4-data-table-bootstrap-4/-/angular-4-data-table-bootstrap-4-0.2.0.tgz",
|
||||
"integrity": "sha512-gw+3z96SSXZZFSjzAXEx69JecBZ9O5K2uMl/asCc7HFrLeS9Q2T0+HGrb4syODEBhJtey0JpzX4GGBotXuHfjg==",
|
||||
"requires": {
|
||||
"@angular/common": "4.3.6",
|
||||
"@angular/core": "4.3.6",
|
||||
"@angular/forms": "4.3.6",
|
||||
"@angular/platform-browser": "4.3.6",
|
||||
"@angular/platform-browser-dynamic": "4.3.6",
|
||||
"@angular/platform-server": "4.4.5",
|
||||
"@types/node": "8.0.44",
|
||||
"rxjs": "5.4.3",
|
||||
"ts-node": "3.3.0",
|
||||
"zone.js": "0.8.17"
|
||||
},
|
||||
"dependencies": {
|
||||
"@types/node": {
|
||||
"version": "8.0.44",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-8.0.44.tgz",
|
||||
"integrity": "sha512-56TeARKE2uMi7xWhpRRws/QdnpSVx9i7E8esGiPYoj90jnonGfmV1vwRLvHWYjPxF5u5l7p5fgdKwdse+VeAQQ=="
|
||||
},
|
||||
"minimist": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
|
||||
"integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ="
|
||||
},
|
||||
"ts-node": {
|
||||
"version": "3.3.0",
|
||||
"resolved": "https://registry.npmjs.org/ts-node/-/ts-node-3.3.0.tgz",
|
||||
"integrity": "sha1-wTxqMCTjC+EYDdUwOPwgkonUv2k=",
|
||||
"requires": {
|
||||
"arrify": "1.0.1",
|
||||
"chalk": "2.1.0",
|
||||
"diff": "3.3.0",
|
||||
"make-error": "1.3.0",
|
||||
"minimist": "1.2.0",
|
||||
"mkdirp": "0.5.1",
|
||||
"source-map-support": "0.4.16",
|
||||
"tsconfig": "6.0.0",
|
||||
"v8flags": "3.0.0",
|
||||
"yn": "2.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"angular-google-signin": {
|
||||
"version": "0.1.5",
|
||||
"resolved": "https://registry.npmjs.org/angular-google-signin/-/angular-google-signin-0.1.5.tgz",
|
||||
|
@ -690,8 +750,7 @@
|
|||
"arrify": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz",
|
||||
"integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=",
|
||||
"dev": true
|
||||
"integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0="
|
||||
},
|
||||
"asap": {
|
||||
"version": "2.0.6",
|
||||
|
@ -1403,7 +1462,6 @@
|
|||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-2.1.0.tgz",
|
||||
"integrity": "sha512-LUHGS/dge4ujbXMJrnihYMcL4AoOweGnw9Tp3kQuqy1Kx5c1qKjqvMJZ6nVJPMWJtKCTN72ZogH3oeSO9g9rXQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ansi-styles": "3.2.0",
|
||||
"escape-string-regexp": "1.0.5",
|
||||
|
@ -1414,7 +1472,6 @@
|
|||
"version": "3.2.0",
|
||||
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz",
|
||||
"integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"color-convert": "1.9.0"
|
||||
}
|
||||
|
@ -1422,14 +1479,12 @@
|
|||
"has-flag": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz",
|
||||
"integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=",
|
||||
"dev": true
|
||||
"integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE="
|
||||
},
|
||||
"supports-color": {
|
||||
"version": "4.2.1",
|
||||
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.2.1.tgz",
|
||||
"integrity": "sha512-qxzYsob3yv6U+xMzPrv170y8AwGP7i74g+pbixCfD6rgso8BscLT2qXIuz6TpOaiJZ3mFgT5O9lyT9nMU4LfaA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"has-flag": "2.0.0"
|
||||
}
|
||||
|
@ -1623,7 +1678,6 @@
|
|||
"version": "1.9.0",
|
||||
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.0.tgz",
|
||||
"integrity": "sha1-Gsz5fdc5uYO/mU1W/sj5WFNkG3o=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"color-name": "1.1.3"
|
||||
}
|
||||
|
@ -1631,8 +1685,7 @@
|
|||
"color-name": {
|
||||
"version": "1.1.3",
|
||||
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
|
||||
"integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
|
||||
"dev": true
|
||||
"integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU="
|
||||
},
|
||||
"color-string": {
|
||||
"version": "0.3.0",
|
||||
|
@ -2268,8 +2321,7 @@
|
|||
"diff": {
|
||||
"version": "3.3.0",
|
||||
"resolved": "https://registry.npmjs.org/diff/-/diff-3.3.0.tgz",
|
||||
"integrity": "sha512-w0XZubFWn0Adlsapj9EAWX0FqWdO4tz8kc3RiYdWLh4k/V8PTb6i0SMgXt0vRM3zyKnT8tKO7mUlieRQHIjMNg==",
|
||||
"dev": true
|
||||
"integrity": "sha512-w0XZubFWn0Adlsapj9EAWX0FqWdO4tz8kc3RiYdWLh4k/V8PTb6i0SMgXt0vRM3zyKnT8tKO7mUlieRQHIjMNg=="
|
||||
},
|
||||
"diffie-hellman": {
|
||||
"version": "5.0.2",
|
||||
|
@ -2717,8 +2769,7 @@
|
|||
"escape-string-regexp": {
|
||||
"version": "1.0.5",
|
||||
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
|
||||
"integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
|
||||
"dev": true
|
||||
"integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ="
|
||||
},
|
||||
"escope": {
|
||||
"version": "3.6.0",
|
||||
|
@ -5025,8 +5076,7 @@
|
|||
"make-error": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.0.tgz",
|
||||
"integrity": "sha1-Uq06M5zPEM5itAQLcI/nByRLi5Y=",
|
||||
"dev": true
|
||||
"integrity": "sha1-Uq06M5zPEM5itAQLcI/nByRLi5Y="
|
||||
},
|
||||
"map-obj": {
|
||||
"version": "1.0.1",
|
||||
|
@ -5248,8 +5298,7 @@
|
|||
"minimist": {
|
||||
"version": "0.0.8",
|
||||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
|
||||
"integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=",
|
||||
"dev": true
|
||||
"integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0="
|
||||
},
|
||||
"mixin-object": {
|
||||
"version": "2.0.1",
|
||||
|
@ -5273,7 +5322,6 @@
|
|||
"version": "0.5.1",
|
||||
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
|
||||
"integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"minimist": "0.0.8"
|
||||
}
|
||||
|
@ -5881,6 +5929,14 @@
|
|||
"error-ex": "1.3.1"
|
||||
}
|
||||
},
|
||||
"parse5": {
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/parse5/-/parse5-3.0.2.tgz",
|
||||
"integrity": "sha1-Be/1fw70V3+xRKefi5qWemzERRA=",
|
||||
"requires": {
|
||||
"@types/node": "6.0.88"
|
||||
}
|
||||
},
|
||||
"parsejson": {
|
||||
"version": "0.0.3",
|
||||
"resolved": "https://registry.npmjs.org/parsejson/-/parsejson-0.0.3.tgz",
|
||||
|
@ -7777,8 +7833,7 @@
|
|||
"source-map": {
|
||||
"version": "0.5.7",
|
||||
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
|
||||
"integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=",
|
||||
"dev": true
|
||||
"integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w="
|
||||
},
|
||||
"source-map-loader": {
|
||||
"version": "0.2.1",
|
||||
|
@ -7824,7 +7879,6 @@
|
|||
"version": "0.4.16",
|
||||
"resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.16.tgz",
|
||||
"integrity": "sha512-A6vlydY7H/ljr4L2UOhDSajQdZQ6dMD7cLH0pzwcmwLyc9u8PNI4WGtnfDDzX7uzGL6c/T+ORL97Zlh+S4iOrg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"source-map": "0.5.7"
|
||||
}
|
||||
|
@ -8166,8 +8220,7 @@
|
|||
"strip-json-comments": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz",
|
||||
"integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=",
|
||||
"dev": true
|
||||
"integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo="
|
||||
},
|
||||
"style-loader": {
|
||||
"version": "0.13.2",
|
||||
|
@ -8491,7 +8544,6 @@
|
|||
"version": "6.0.0",
|
||||
"resolved": "https://registry.npmjs.org/tsconfig/-/tsconfig-6.0.0.tgz",
|
||||
"integrity": "sha1-aw6DdgA9evGGT434+J3QBZ/80DI=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"strip-bom": "3.0.0",
|
||||
"strip-json-comments": "2.0.1"
|
||||
|
@ -8500,8 +8552,7 @@
|
|||
"strip-bom": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz",
|
||||
"integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=",
|
||||
"dev": true
|
||||
"integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM="
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -8776,8 +8827,7 @@
|
|||
"user-home": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/user-home/-/user-home-1.1.1.tgz",
|
||||
"integrity": "sha1-K1viOjK2Onyd640PKNSFcko98ZA=",
|
||||
"dev": true
|
||||
"integrity": "sha1-K1viOjK2Onyd640PKNSFcko98ZA="
|
||||
},
|
||||
"useragent": {
|
||||
"version": "2.2.1",
|
||||
|
@ -8842,7 +8892,6 @@
|
|||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/v8flags/-/v8flags-3.0.0.tgz",
|
||||
"integrity": "sha512-AGl+C+4qpeSu2g3JxCD/mGFFOs/vVZ3XREkD3ibQXEqr4Y4zgIrPWW124/IKJFHOIVFIoH8miWrLf0o84HYjwA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"user-home": "1.1.1"
|
||||
}
|
||||
|
@ -9451,6 +9500,11 @@
|
|||
"integrity": "sha1-OS2LotDxw00e4tYw8V0O+2jhBIo=",
|
||||
"dev": true
|
||||
},
|
||||
"xhr2": {
|
||||
"version": "0.1.4",
|
||||
"resolved": "https://registry.npmjs.org/xhr2/-/xhr2-0.1.4.tgz",
|
||||
"integrity": "sha1-f4dliEdxbbUCYyOBL4GMras4el8="
|
||||
},
|
||||
"xml-char-classes": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/xml-char-classes/-/xml-char-classes-1.0.0.tgz",
|
||||
|
@ -9584,8 +9638,7 @@
|
|||
"yn": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/yn/-/yn-2.0.0.tgz",
|
||||
"integrity": "sha1-5a2ryKz0CPY4X8dklWhMiOavaJo=",
|
||||
"dev": true
|
||||
"integrity": "sha1-5a2ryKz0CPY4X8dklWhMiOavaJo="
|
||||
},
|
||||
"zone.js": {
|
||||
"version": "0.8.17",
|
||||
|
|
|
@ -21,6 +21,8 @@
|
|||
"@angular/platform-browser": "^4.3.6",
|
||||
"@angular/platform-browser-dynamic": "^4.3.6",
|
||||
"@angular/router": "^4.3.6",
|
||||
"angular-2-data-table": "^0.1.2",
|
||||
"angular-4-data-table-bootstrap-4": "^0.2.0",
|
||||
"angular-google-signin": "^0.1.5",
|
||||
"bootstrap": "^3.3.7",
|
||||
"core-js": "^2.4.1",
|
||||
|
|
|
@ -5,6 +5,7 @@ import { DynamicFormComponent } from './form/dynamic-form.component';
|
|||
import { LoginComponent } from './login/login-page';
|
||||
import { AuthGuard } from './guards/auth.guard';
|
||||
import { ProjectsComponent } from './projects/projects.component';
|
||||
import { DatasetsComponent } from './datasets/dataset.component';
|
||||
|
||||
const appRoutes: Routes = [
|
||||
{ path: 'dynamic-form', component: DynamicFormComponent, canActivate: [AuthGuard] },
|
||||
|
|
|
@ -4,8 +4,10 @@ import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|||
import { HttpClientModule } from '@angular/common/http';
|
||||
import { HttpModule } from '@angular/http';
|
||||
import { RouterModule, Routes, Router } from '@angular/router';
|
||||
import {DataTableModule } from 'angular-4-data-table-bootstrap-4';
|
||||
|
||||
import { AppComponent } from './app.component';
|
||||
import { RestBase } from './services/rest-base';
|
||||
import { DynamicFormComponent } from './form/dynamic-form.component';
|
||||
import { DynamicFormFieldComponent } from './form/fields/dynamic-form-field.component';
|
||||
import { ServerService } from './services/server.service';
|
||||
|
@ -21,6 +23,8 @@ import { PageNotFoundComponent } from './not-found.component';
|
|||
import { TocComponent } from './form/tableOfContents/toc.component';
|
||||
import { ProjectsModule } from './projects/project.module';
|
||||
import { PaginationService } from './services/pagination.service';
|
||||
import { EestoreService } from './services/eestore.service';
|
||||
import { DatasetsModule } from './datasets/dataset.module';
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
|
@ -40,10 +44,12 @@ import { PaginationService } from './services/pagination.service';
|
|||
HttpModule,
|
||||
HttpClientModule,
|
||||
ProjectsModule,
|
||||
AppRoutingModule
|
||||
DatasetsModule,
|
||||
AppRoutingModule,
|
||||
DataTableModule
|
||||
|
||||
],
|
||||
providers: [ServerService, dataModelBuilder, AuthGuard, PaginationService, TokenService, LocalStorageService],
|
||||
providers: [ServerService, dataModelBuilder, AuthGuard, PaginationService, TokenService, LocalStorageService, RestBase, EestoreService],
|
||||
bootstrap: [AppComponent]
|
||||
})
|
||||
export class AppModule {
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule, Routes } from '@angular/router';
|
||||
|
||||
import { DatasetsComponent } from './dataset.component';
|
||||
//import { ProjectDetailComponent } from './project.detail';
|
||||
import { DynamicFormComponent } from '../form/dynamic-form.component';
|
||||
import { AuthGuard } from '../guards/auth.guard';
|
||||
|
||||
const datasetsRoutes: Routes = [
|
||||
{ path: 'dataset', component: DatasetsComponent },
|
||||
{ path: 'dynamic-form/:id', component: DynamicFormComponent, canActivate: [AuthGuard] }
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
RouterModule.forChild(datasetsRoutes)
|
||||
],
|
||||
exports: [
|
||||
RouterModule
|
||||
]
|
||||
})
|
||||
export class DatasetRoutingModule { }
|
|
@ -0,0 +1,94 @@
|
|||
import { Component, OnInit, Input, ViewChild, NgZone } from '@angular/core';
|
||||
import {GoogleSignInSuccess} from 'angular-google-signin';
|
||||
import { Router, ActivatedRoute } from '@angular/router';
|
||||
import { ServerService } from '../../app/services/server.service';
|
||||
import { Project } from '../entities/model/project';
|
||||
import { Dataset } from '../entities/model/dataset';
|
||||
import { Dmp } from '../entities/model/Dmp';
|
||||
import { DataTable, DataTableTranslations, DataTableResource } from 'angular-4-data-table-bootstrap-4';
|
||||
|
||||
@Component({
|
||||
selector: 'projects',
|
||||
templateUrl: 'dataset.html',
|
||||
// template: `
|
||||
// <h1 class="title">Projects</h1>
|
||||
|
||||
// <ul class="list-group col-md-4">
|
||||
// <li *ngFor="let project of projects"
|
||||
// class="list-group-item">
|
||||
// <a [routerLink]="['/dynamic-form', project.id]" >
|
||||
// {{ project.name }}
|
||||
// </a>
|
||||
// </li>
|
||||
// </ul>
|
||||
|
||||
// <router-outlet></router-outlet>
|
||||
// `,
|
||||
providers: [ServerService]
|
||||
})
|
||||
|
||||
export class DatasetsComponent implements OnInit{
|
||||
|
||||
returnUrl: string;
|
||||
@Input() datasets: Dataset[];
|
||||
datasetResource :DataTableResource<Dataset>;
|
||||
@Input() datasetCount = 0;
|
||||
|
||||
@ViewChild(DataTable) projectsTable;
|
||||
|
||||
constructor(
|
||||
private serverService: ServerService,
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private ngZone: NgZone){
|
||||
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
//this.projects = this.serverService.getDummyProjects();
|
||||
this.datasets = [];
|
||||
this.serverService.getAllDatasets().subscribe(
|
||||
response => {
|
||||
|
||||
console.log("response");
|
||||
console.log(response);
|
||||
response.forEach(resp => {
|
||||
|
||||
let dt = new Dataset();
|
||||
dt.id = resp.id;
|
||||
dt.name = resp.label;
|
||||
dt.uriDataset = resp.uri;
|
||||
this.datasets.push(dt);
|
||||
var params = {limit:8,offset:0, sortAsc:false}
|
||||
this.afterLoad();
|
||||
this.datasetResource.query(params).then(datasets => this.datasets = datasets);
|
||||
});
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
reloadDatasets(params) {
|
||||
this.datasetResource.query(params).then(projects => this.datasets = projects);
|
||||
}
|
||||
|
||||
afterLoad(){
|
||||
this.datasetResource = new DataTableResource(this.datasets);
|
||||
this.datasetResource.count().then(count => this.datasetCount = count);
|
||||
}
|
||||
|
||||
rowClick(rowEvent){
|
||||
this.ngZone.run(() => this.router.navigateByUrl('dynamic-form', rowEvent.row.item.id));
|
||||
}
|
||||
|
||||
// special params:
|
||||
translations = <DataTableTranslations>{
|
||||
indexColumn: 'Index column',
|
||||
expandColumn: 'Expand column',
|
||||
selectColumn: 'Select column',
|
||||
paginationLimit: 'Max results',
|
||||
paginationRange: 'Result range'
|
||||
};
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
<div style="margin: auto; max-width: 1000px; margin-top:50px">
|
||||
<data-table id="films-grid" headerTitle="Datasets" [items]="datasets" [itemCount]="datasetCount" (reload)="reloadDatasets($event)"
|
||||
[limit]="8" [sortBy]="'rating'" [sortAsc]="false" [substituteRows]="false"
|
||||
[translations]="translations" [selectOnRowClick]="true" (rowClick)="rowClick($event)">
|
||||
|
||||
<data-table-column [property]="'name'" [header]="'Label'" [sortable]="true">
|
||||
</data-table-column>
|
||||
<!-- <data-table-column [property]="'abbreviation'" [header]="'Abbreviation'" [sortable]="true">
|
||||
</data-table-column> -->
|
||||
<data-table-column [property]="'id'" [header]="'Id'" [sortable]="true">
|
||||
</data-table-column>
|
||||
<data-table-column [property]="'uriDataset'" [header]="'Uri'" [sortable]="true">
|
||||
</data-table-column>
|
||||
<!-- <data-table-column [property]="'definition'" [header]="'Definition'" [sortable]="true">
|
||||
</data-table-column> -->
|
||||
</data-table>
|
||||
<div style="margin-top: 10px">
|
||||
<button type="button" class="btn btn-info">New Dataset</button>
|
||||
<!-- <b>Selected:</b>
|
||||
<span *ngIf="projectsTable.selectedRow == null"><i>No item selected</i></span>
|
||||
<span [textContent]="projectsTable.selectedRow && projectsTable.selectedRow.item.name"></span> -->
|
||||
</div>
|
||||
|
||||
</div>
|
|
@ -0,0 +1,24 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
import {DataTableModule } from 'angular-4-data-table-bootstrap-4';
|
||||
|
||||
import { DatasetsComponent } from './dataset.component';
|
||||
|
||||
import { DatasetRoutingModule } from './dataset-routing.module';
|
||||
//import { ProjectDetailComponent } from './project.detail';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
DatasetRoutingModule,
|
||||
DataTableModule
|
||||
],
|
||||
declarations: [
|
||||
DatasetsComponent
|
||||
//ProjectDetailComponent
|
||||
],
|
||||
providers: [ ]
|
||||
})
|
||||
export class DatasetsModule {}
|
|
@ -0,0 +1,7 @@
|
|||
import { Injectable } from '@angular/core';
|
||||
|
||||
export class Dataset {
|
||||
id:string;
|
||||
name: string;
|
||||
uriDataset: string;
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
import { Injectable } from '@angular/core';
|
||||
|
||||
export class Dmp {
|
||||
id:string;
|
||||
dataset: string;
|
||||
name: string;
|
||||
}
|
|
@ -1,7 +1,13 @@
|
|||
import { Injectable } from '@angular/core';
|
||||
import { Dmp } from './dmp'
|
||||
import { Dataset } from './dataset'
|
||||
|
||||
export class Project {
|
||||
name: string;
|
||||
id: string;
|
||||
|
||||
abbreviation: string;
|
||||
definition: string;
|
||||
uri: string;
|
||||
dmp: Dmp;
|
||||
dataset: Dataset;
|
||||
}
|
|
@ -169,7 +169,7 @@ export class DynamicFormComponent implements OnInit {
|
|||
//this.dataModel.groups = this.dataModel.groups.slice(this.pager.startIndex, this.pager.endIndex + 1);
|
||||
}
|
||||
|
||||
signOut2() {debugger;
|
||||
signOut2() {
|
||||
var auth2 = gapi.auth2.getAuthInstance();
|
||||
auth2.signOut().then(function () {
|
||||
console.log('User signed out.');
|
||||
|
|
|
@ -14,6 +14,7 @@ export class FieldBase<T>{
|
|||
description:string;
|
||||
attributes: Attribute;
|
||||
regex:string;
|
||||
url: any;
|
||||
|
||||
constructor(options: {
|
||||
value?: T,
|
||||
|
@ -27,7 +28,8 @@ export class FieldBase<T>{
|
|||
group?: string
|
||||
description?: string,
|
||||
attributes?: Attribute,
|
||||
regex?:string
|
||||
regex?:string,
|
||||
url?: any
|
||||
} = {}) {
|
||||
this.value = options.value;
|
||||
this.key = options.key || '';
|
||||
|
@ -41,5 +43,6 @@ export class FieldBase<T>{
|
|||
this.description = options.description || '';
|
||||
this.attributes = options.attributes || new Attribute();
|
||||
this.regex = options.regex || '';
|
||||
this.url = options.url || {"url":null, "fieldpath":null, "data":null};
|
||||
}
|
||||
}
|
|
@ -1,9 +1,8 @@
|
|||
<body data-spy="scroll" data-target="#toc">
|
||||
<nav id="toc" data-toggle="toc">
|
||||
<ul class="nav flex-column">
|
||||
<li class="nav-item">
|
||||
<div *ngFor="let section of dataModel.sections">
|
||||
<div *ngFor="let group of section.groupFields">
|
||||
<li class="nav-item">
|
||||
<div *ngFor="let group of dataModel.groups"> <!-- All contents in the first page -->
|
||||
<ul>
|
||||
<li><a class="nav-link" [routerLink]="['.']" fragment="{{group.key}}">{{group.title}}</a>
|
||||
<ul *ngFor="let field of group.groupFields">
|
||||
|
@ -18,7 +17,7 @@
|
|||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<!-- <div *ngFor="let group of dataModel.groups">
|
||||
<ul>
|
||||
<li><a class="nav-link" [routerLink]="['.']" fragment="{{group.key}}">{{group.title}}</a>
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
:host /deep/ .index-column,
|
||||
:host /deep/ .index-column-header {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
:host /deep/ .data-table .data-table-row.selected {
|
||||
background-color: #E4EDF9;
|
||||
}
|
||||
|
||||
.fa {
|
||||
display: inline-block;
|
||||
font: normal normal normal 14px/1 FontAwesome;
|
||||
font-size: inherit;
|
||||
text-rendering: auto;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
}
|
|
@ -0,0 +1,50 @@
|
|||
|
||||
<div style="margin: auto; max-width: 1000px; margin-top:50px">
|
||||
<data-table id="films-grid" headerTitle="My Projects" [items]="projects" [itemCount]="projectCount" (reload)="reloadProjects($event)"
|
||||
[limit]="8" [sortBy]="'rating'" [sortAsc]="false" [selectColumn]="true" [multiSelect]="false" [substituteRows]="false"
|
||||
[expandableRows]="true" [translations]="translations" [indexColumnHeader]="'#'" [selectOnRowClick]="true">
|
||||
<template #dataTableExpand let-item="item">
|
||||
<div>
|
||||
<!-- <a [routerLink]="['/dynamic-form', item.id]"> {{ item.dmp.id }}</a> -->
|
||||
<table class="table">
|
||||
<thead class="thead-inverse">
|
||||
<tr>
|
||||
|
||||
<th>Dmp</th>
|
||||
<th>Id</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
|
||||
<!-- <td> <a [routerLink]="['/dynamic-form', item.id]"> {{ item.dmp.id }}</a></td>-->
|
||||
<td> <a [routerLink]="['/dataset']"> {{ item.dmp.id }}</a></td>
|
||||
<td>{{item.dmp.id}}</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
</template>
|
||||
<data-table-column [property]="'name'" [header]="'Label'" [sortable]="true">
|
||||
</data-table-column>
|
||||
<data-table-column [property]="'abbreviation'" [header]="'Abbreviation'" [sortable]="true">
|
||||
</data-table-column>
|
||||
<data-table-column [property]="'id'" [header]="'Id'" [sortable]="true">
|
||||
</data-table-column>
|
||||
<data-table-column [property]="'uri'" [header]="'Uri'" [sortable]="true">
|
||||
</data-table-column>
|
||||
<data-table-column [property]="'definition'" [header]="'Definition'" [sortable]="true">
|
||||
</data-table-column>
|
||||
</data-table>
|
||||
<div style="margin-top: 10px">
|
||||
<b>Selected:</b>
|
||||
<span *ngIf="projectsTable.selectedRow == null"><i>No item selected</i></span>
|
||||
<span [textContent]="projectsTable.selectedRow && projectsTable.selectedRow.item.name"></span>
|
||||
</div>
|
||||
<button type="button" class="btn btn-info">New Project</button>
|
||||
</div>
|
||||
<router-outlet></router-outlet>
|
||||
|
|
@ -1,6 +1,7 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
import {DataTableModule } from 'angular-4-data-table-bootstrap-4';
|
||||
|
||||
import { ProjectsComponent } from './projects.component';
|
||||
|
||||
|
@ -11,7 +12,8 @@ import { ProjectDetailComponent } from './project.detail';
|
|||
imports: [
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
ProjectRoutingModule
|
||||
ProjectRoutingModule,
|
||||
DataTableModule
|
||||
],
|
||||
declarations: [
|
||||
ProjectsComponent,
|
||||
|
|
|
@ -1,31 +1,39 @@
|
|||
import { Component, OnInit } from '@angular/core';
|
||||
import { Component, OnInit, Input, ViewChild } from '@angular/core';
|
||||
import {GoogleSignInSuccess} from 'angular-google-signin';
|
||||
import { Router, ActivatedRoute } from '@angular/router';
|
||||
import { ServerService } from '../../app/services/server.service';
|
||||
import { Project } from '../entities/model/project';
|
||||
import { Dmp } from '../entities/model/Dmp';
|
||||
import { Dataset } from '../entities/model/dataset';
|
||||
import { DataTable, DataTableTranslations, DataTableResource } from 'angular-4-data-table-bootstrap-4';
|
||||
|
||||
@Component({
|
||||
selector: 'projects',
|
||||
template: `
|
||||
<h1 class="title">Projects</h1>
|
||||
templateUrl: 'project.html',
|
||||
// template: `
|
||||
// <h1 class="title">Projects</h1>
|
||||
|
||||
<ul class="list-group col-md-4">
|
||||
<li *ngFor="let project of projects"
|
||||
class="list-group-item">
|
||||
<a [routerLink]="['/dynamic-form', project.id]" >
|
||||
{{ project.name }}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
// <ul class="list-group col-md-4">
|
||||
// <li *ngFor="let project of projects"
|
||||
// class="list-group-item">
|
||||
// <a [routerLink]="['/dynamic-form', project.id]" >
|
||||
// {{ project.name }}
|
||||
// </a>
|
||||
// </li>
|
||||
// </ul>
|
||||
|
||||
<router-outlet></router-outlet>
|
||||
`,
|
||||
// <router-outlet></router-outlet>
|
||||
// `,
|
||||
providers: [ServerService]
|
||||
})
|
||||
|
||||
export class ProjectsComponent implements OnInit{
|
||||
returnUrl: string;
|
||||
projects: Project[];
|
||||
@Input() projects: Project[];
|
||||
projectResource :DataTableResource<Project>;
|
||||
@Input() projectCount = 0;
|
||||
|
||||
@ViewChild(DataTable) projectsTable;
|
||||
|
||||
constructor(
|
||||
private serverService: ServerService,
|
||||
|
@ -37,7 +45,7 @@ export class ProjectsComponent implements OnInit{
|
|||
ngOnInit() {
|
||||
//this.projects = this.serverService.getDummyProjects();
|
||||
this.projects = [];
|
||||
this.serverService.getProjects().subscribe(
|
||||
this.serverService.getAllProjects().subscribe( //getProjects()
|
||||
response => {
|
||||
|
||||
console.log("response");
|
||||
|
@ -46,12 +54,41 @@ export class ProjectsComponent implements OnInit{
|
|||
let pr = new Project();
|
||||
pr.id = resp.id;
|
||||
pr.name = resp.label;
|
||||
pr.abbreviation = resp.abbreviation;
|
||||
pr.definition = resp.definition;
|
||||
pr.uri = resp.uri;
|
||||
pr.dmp = new Dmp();
|
||||
// pr.dmp.id = resp.dmp;
|
||||
pr.dmp.id = resp.dmp =! null || resp.dmp ==! undefined ? resp.dmp.id : null;
|
||||
pr.dataset = new Dataset();
|
||||
pr.dmp.dataset = resp.dmp.dataset != null ? resp.dmp.dataset.id: null;
|
||||
this.projects.push(pr);
|
||||
var params = {limit:8,offset:0, sortAsc:false}
|
||||
this.afterLoad();
|
||||
this.projectResource.query(params).then(projects => this.projects = projects);
|
||||
});
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
reloadProjects(params) {
|
||||
this.projectResource.query(params).then(projects => this.projects = projects);
|
||||
}
|
||||
|
||||
afterLoad(){
|
||||
this.projectResource = new DataTableResource(this.projects);
|
||||
this.projectResource.count().then(count => this.projectCount = count);
|
||||
}
|
||||
|
||||
// special params:
|
||||
translations = <DataTableTranslations>{
|
||||
indexColumn: 'Index column',
|
||||
expandColumn: 'Expand column',
|
||||
selectColumn: 'Select column',
|
||||
paginationLimit: 'Max results',
|
||||
paginationRange: 'Result range'
|
||||
};
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -5,132 +5,135 @@ import { TextboxField } from '../../app/form/fields/textbox/field-textbox';
|
|||
import { CheckBoxField } from '../../app/form/fields/checkbox/field-checkbox';
|
||||
import { RadioBoxField } from '../../app/form/fields/radiobox/field-radiobox';
|
||||
import { DataModel } from '../entities/DataModel';
|
||||
import {Rule} from '../entities/common/rule';
|
||||
import { Rule } from '../entities/common/rule';
|
||||
import { GroupBase } from '../form/dynamic-form-group/group-base';
|
||||
import { Attribute } from '../entities/model/attribute';
|
||||
import { Param } from '../entities/model/param';
|
||||
import { Section } from '../entities/model/section';
|
||||
import { RestBase } from '../services/rest-base';
|
||||
|
||||
@Injectable()
|
||||
export class dataModelBuilder {
|
||||
|
||||
private dataModel : DataModel;
|
||||
private fields : FieldBase<any>[];
|
||||
private dataModel: DataModel;
|
||||
private fields: FieldBase<any>[];
|
||||
|
||||
constructor(private restBase: RestBase) { }
|
||||
|
||||
public getDataModel(data) {
|
||||
|
||||
if (this.dataModel != null)
|
||||
return this.dataModel;
|
||||
|
||||
this.dataModel = new DataModel();
|
||||
this.fields = this.buildFields(data.dataset.profile.viewstyle.definition.root.fields.field);
|
||||
this.dataModel.groups = this.getGroups(data.dataset.profile.viewstyle.definition.root.fieldGroups.fieldGroup, this.fields);
|
||||
this.dataModel.semanticAttr = new Array(new Attribute);
|
||||
//this.dataModel.semanticAttr = data.dataset.profile.definition.root.fields.field;
|
||||
this.dataModel.semanticAttr = this.getFieldsAttributes(data.dataset.profile.definition.root.fields.field, data.dataset.profile.ruleset.definition.root.functions.function, this.fields);
|
||||
this.dataModel.sections = this.getSections(data.dataset.profile.viewstyle.definition.root.sections.section, this.dataModel.groups);
|
||||
this.dataModel.buildIndex();
|
||||
|
||||
public getDataModel(data){
|
||||
|
||||
if(this.dataModel != null)
|
||||
return this.dataModel;
|
||||
|
||||
this.dataModel = new DataModel();
|
||||
this.fields = this.buildFields(data.dataset.profile.viewstyle.definition.root.fields.field);
|
||||
this.dataModel.groups = this.getGroups(data.dataset.profile.viewstyle.definition.root.fieldGroups.fieldGroup, this.fields);
|
||||
this.dataModel.semanticAttr = new Array(new Attribute);
|
||||
//this.dataModel.semanticAttr = data.dataset.profile.definition.root.fields.field;
|
||||
this.dataModel.semanticAttr = this.getFieldsAttributes(data.dataset.profile.definition.root.fields.field, data.dataset.profile.ruleset.definition.root.functions.function, this.fields) ;
|
||||
this.dataModel.sections = this.getSections(data.dataset.profile.viewstyle.definition.root.sections.section, this.dataModel.groups) ;
|
||||
this.dataModel.buildIndex();
|
||||
|
||||
return this.dataModel;
|
||||
}
|
||||
|
||||
|
||||
private buildFields(fields:any[]) {
|
||||
let fieldsVisible :FieldBase<any>[] =[];
|
||||
fields.forEach(element => {
|
||||
if (element.viewStyle._renderstyle == "freetext"){
|
||||
let newfield:FieldBase <any>;
|
||||
let rule = new Rule();
|
||||
newfield = new TextboxField({
|
||||
label: element.title.__cdata,
|
||||
key:element._id,
|
||||
value: element.value,
|
||||
order:element._ordinal,
|
||||
rules: element.visible.rule != undefined ? element.visible.rule: rule,
|
||||
visible: element._defaultVisibility,
|
||||
group : element._group,
|
||||
description: element.description.__cdata
|
||||
});
|
||||
|
||||
fieldsVisible.push(newfield);
|
||||
}
|
||||
else if (element.viewStyle._renderstyle == "dropdown" ||element.viewStyle._renderstyle == "combobox"){//to choose one of these in xml
|
||||
let newfield:DropdownField;
|
||||
let rule = new Rule();
|
||||
newfield = new DropdownField({
|
||||
label: element.title.__cdata,
|
||||
key:element._id,
|
||||
value: element.value,
|
||||
order:element._ordinal,
|
||||
rules: element.visible.rule != undefined ? element.visible.rule: rule,
|
||||
visible: element._defaultVisibility,
|
||||
description: element.description.__cdata,
|
||||
group : element._group
|
||||
});
|
||||
fieldsVisible.push(newfield);
|
||||
}
|
||||
else if (element.viewStyle._renderstyle == "checkbox"||element.viewStyle._renderstyle == "checkBox"){
|
||||
let newfield:CheckBoxField;
|
||||
let rule = new Array<Rule>();
|
||||
newfield = new CheckBoxField({
|
||||
label: element.title.__cdata,
|
||||
key:element._id,
|
||||
value: element.value,
|
||||
order:element._ordinal,
|
||||
rules: element.visible.rule != undefined ? element.visible.rule: rule,
|
||||
visible: element._defaultVisibility,
|
||||
group : element._group,
|
||||
description: element.description.__cdata,
|
||||
type: "checkbox"
|
||||
});
|
||||
fieldsVisible.push(newfield);
|
||||
}
|
||||
else if (element.viewStyle._renderstyle == "booleanDesicion"){
|
||||
let newfield:RadioBoxField;
|
||||
let rule = new Array<Rule>();
|
||||
newfield = new RadioBoxField({
|
||||
label: element.title.__cdata,
|
||||
key:element._id,
|
||||
value: element.value,
|
||||
order:element._ordinal,
|
||||
rules: element.visible.rule != undefined ? element.visible.rule: rule,
|
||||
visible: element._defaultVisibility,
|
||||
group : element._group,
|
||||
type: "radio",
|
||||
description: element.description.__cdata,
|
||||
answers: [
|
||||
{
|
||||
id: 1,
|
||||
answer: "Yes",
|
||||
value: true
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
answer: "No",
|
||||
value:false
|
||||
}]
|
||||
});
|
||||
fieldsVisible.push(newfield);
|
||||
}
|
||||
});
|
||||
fieldsVisible.sort((a, b) => a.order - b.order);
|
||||
return fieldsVisible;
|
||||
}
|
||||
|
||||
private getGroups(fieldGroups:any, fields:any[]){
|
||||
let groups :GroupBase<any>[] =[];
|
||||
|
||||
if(fieldGroups.length>1){
|
||||
fieldGroups.forEach(fieldGroup =>{ // each fiedgroup fills with its fields from json
|
||||
let newfldGroup = new GroupBase();
|
||||
newfldGroup.groupFields = new Array();
|
||||
|
||||
private buildFields(fields: any[]) {
|
||||
let fieldsVisible: FieldBase<any>[] = [];
|
||||
fields.forEach(element => {
|
||||
if (element.viewStyle._renderstyle == "freetext") {
|
||||
let newfield: FieldBase<any>;
|
||||
let rule = new Rule();
|
||||
newfield = new TextboxField({
|
||||
label: element.title.__cdata,
|
||||
key: element._id,
|
||||
value: element.value,
|
||||
order: element._ordinal,
|
||||
rules: element.visible.rule != undefined ? element.visible.rule : rule,
|
||||
visible: element._defaultVisibility,
|
||||
group: element._group,
|
||||
description: element.description.__cdata
|
||||
});
|
||||
|
||||
fieldsVisible.push(newfield);
|
||||
}
|
||||
else if (element.viewStyle._renderstyle == "dropdown" || element.viewStyle._renderstyle == "combobox") {//to choose one of these in xml
|
||||
let newfield: DropdownField;
|
||||
let rule = new Rule();
|
||||
newfield = new DropdownField({
|
||||
label: element.title.__cdata,
|
||||
key: element._id,
|
||||
value: element.value,
|
||||
order: element._ordinal,
|
||||
rules: element.visible.rule != undefined ? element.visible.rule : rule,
|
||||
visible: element._defaultVisibility,
|
||||
description: element.description.__cdata,
|
||||
group: element._group
|
||||
});
|
||||
fieldsVisible.push(newfield);
|
||||
}
|
||||
else if (element.viewStyle._renderstyle == "checkbox" || element.viewStyle._renderstyle == "checkBox") {
|
||||
let newfield: CheckBoxField;
|
||||
let rule = new Array<Rule>();
|
||||
newfield = new CheckBoxField({
|
||||
label: element.title.__cdata,
|
||||
key: element._id,
|
||||
value: element.value,
|
||||
order: element._ordinal,
|
||||
rules: element.visible.rule != undefined ? element.visible.rule : rule,
|
||||
visible: element._defaultVisibility,
|
||||
group: element._group,
|
||||
description: element.description.__cdata,
|
||||
type: "checkbox"
|
||||
});
|
||||
fieldsVisible.push(newfield);
|
||||
}
|
||||
else if (element.viewStyle._renderstyle == "booleanDesicion") {
|
||||
let newfield: RadioBoxField;
|
||||
let rule = new Array<Rule>();
|
||||
newfield = new RadioBoxField({
|
||||
label: element.title.__cdata,
|
||||
key: element._id,
|
||||
value: element.value,
|
||||
order: element._ordinal,
|
||||
rules: element.visible.rule != undefined ? element.visible.rule : rule,
|
||||
visible: element._defaultVisibility,
|
||||
group: element._group,
|
||||
type: "radio",
|
||||
description: element.description.__cdata,
|
||||
answers: [
|
||||
{
|
||||
id: 1,
|
||||
answer: "Yes",
|
||||
value: true
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
answer: "No",
|
||||
value: false
|
||||
}]
|
||||
});
|
||||
fieldsVisible.push(newfield);
|
||||
}
|
||||
});
|
||||
fieldsVisible.sort((a, b) => a.order - b.order);
|
||||
return fieldsVisible;
|
||||
}
|
||||
|
||||
private getGroups(fieldGroups: any, fields: any[]) {
|
||||
let groups: GroupBase<any>[] = [];
|
||||
|
||||
if (fieldGroups.length > 1) {
|
||||
fieldGroups.forEach(fieldGroup => { // each fiedgroup fills with its fields from json
|
||||
let newfldGroup = new GroupBase();
|
||||
newfldGroup.groupFields = new Array();
|
||||
fields.forEach(field => {
|
||||
if(fieldGroup._id == field.group){
|
||||
if (fieldGroup._id == field.group) {
|
||||
newfldGroup.groupFields.push(field);
|
||||
}else{
|
||||
} else {
|
||||
//this.dataModel.fields.push(field);
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
newfldGroup.title = fieldGroup.title.__cdata;
|
||||
newfldGroup.key = fieldGroup._id;
|
||||
|
@ -138,17 +141,17 @@ export class dataModelBuilder {
|
|||
newfldGroup.style = fieldGroup.visible._style;
|
||||
newfldGroup.class = fieldGroup.visible._cssclass;
|
||||
groups.push(newfldGroup)
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
else{
|
||||
let newfldGroup = new GroupBase();
|
||||
|
||||
else {
|
||||
let newfldGroup = new GroupBase();
|
||||
newfldGroup.groupFields = new Array();
|
||||
fields.forEach(field => { //for one fieldgroup, because xml to json transformation doesn't create array of one fieldfroup
|
||||
if(fieldGroups._id == field.group){
|
||||
if (fieldGroups._id == field.group) {
|
||||
newfldGroup.groupFields.push(field);
|
||||
}else
|
||||
this.dataModel.fields.push(field);
|
||||
} else
|
||||
this.dataModel.fields.push(field);
|
||||
});
|
||||
newfldGroup.title = fieldGroups.title.__cdata;
|
||||
newfldGroup.key = fieldGroups._id;
|
||||
|
@ -157,56 +160,56 @@ export class dataModelBuilder {
|
|||
}
|
||||
return groups;
|
||||
}
|
||||
|
||||
|
||||
private getDummyGroups(){
|
||||
|
||||
let groups :GroupBase<any>[] =[];
|
||||
|
||||
|
||||
let group: GroupBase<any>;
|
||||
group = new GroupBase<any>({
|
||||
key: "adfgadfsg",
|
||||
title: "GroupA",
|
||||
rules: new Array(),
|
||||
groupFields: new Array(),
|
||||
value: "value",
|
||||
visible: true,
|
||||
order: 1
|
||||
//,
|
||||
//controlType: "none"
|
||||
});
|
||||
|
||||
|
||||
let newfield1:FieldBase <any>;
|
||||
newfield1 = new TextboxField({
|
||||
key:"tf1-455",
|
||||
label: "Field from group1",
|
||||
value: 'this is a groupfield',
|
||||
required: true,
|
||||
ordinal:1
|
||||
});
|
||||
group.groupFields.push(newfield1);
|
||||
|
||||
let newfield2:FieldBase <any>;
|
||||
newfield2 = new TextboxField({
|
||||
key:"tf1-443",
|
||||
label: "Another field from group1",
|
||||
value: 'this is a groupfield',
|
||||
required: true,
|
||||
ordinal:2
|
||||
});
|
||||
group.groupFields.push(newfield2);
|
||||
|
||||
groups.push(group);
|
||||
|
||||
|
||||
return groups;
|
||||
|
||||
}
|
||||
|
||||
private getFieldsAttributes(attributes:any, functions:any, fields:any[]){
|
||||
let attribute:Attribute[]=[];
|
||||
private getDummyGroups() {
|
||||
|
||||
let groups: GroupBase<any>[] = [];
|
||||
|
||||
|
||||
let group: GroupBase<any>;
|
||||
group = new GroupBase<any>({
|
||||
key: "adfgadfsg",
|
||||
title: "GroupA",
|
||||
rules: new Array(),
|
||||
groupFields: new Array(),
|
||||
value: "value",
|
||||
visible: true,
|
||||
order: 1
|
||||
//,
|
||||
//controlType: "none"
|
||||
});
|
||||
|
||||
|
||||
let newfield1: FieldBase<any>;
|
||||
newfield1 = new TextboxField({
|
||||
key: "tf1-455",
|
||||
label: "Field from group1",
|
||||
value: 'this is a groupfield',
|
||||
required: true,
|
||||
ordinal: 1
|
||||
});
|
||||
group.groupFields.push(newfield1);
|
||||
|
||||
let newfield2: FieldBase<any>;
|
||||
newfield2 = new TextboxField({
|
||||
key: "tf1-443",
|
||||
label: "Another field from group1",
|
||||
value: 'this is a groupfield',
|
||||
required: true,
|
||||
ordinal: 2
|
||||
});
|
||||
group.groupFields.push(newfield2);
|
||||
|
||||
groups.push(group);
|
||||
|
||||
|
||||
return groups;
|
||||
|
||||
}
|
||||
|
||||
private getFieldsAttributes(attributes: any, functions: any, fields: any[]) {
|
||||
let attribute: Attribute[] = [];
|
||||
attributes.forEach(attr => {
|
||||
let newAttribute = new Attribute();
|
||||
newAttribute.datatype = attr._datatype;
|
||||
|
@ -215,65 +218,96 @@ export class dataModelBuilder {
|
|||
newAttribute.multiplicityMax = attr.multiplicity._max;
|
||||
newAttribute.multiplicityMin = attr.multiplicity._min;
|
||||
newAttribute.ordinal = attr._ordinal;
|
||||
newAttribute.sources = new Array();
|
||||
newAttribute.sources = new Array();
|
||||
newAttribute.validation = new Array();
|
||||
//newAttribute.validation.push(attr.validation.rule);
|
||||
|
||||
if(attr.sources){
|
||||
if (attr.sources) {
|
||||
newAttribute.sources.push(attr.sources.source);
|
||||
newAttribute.sources.forEach(src => {
|
||||
src.params=new Array();
|
||||
for (var i=0, len=attr.sources.source.value.length; i<len; i++){
|
||||
let prm = new Param();
|
||||
prm.key= attr.sources.source.value[i]._value;
|
||||
prm.value= attr.sources.source.value[i]._label;
|
||||
src.params.push(prm);
|
||||
}
|
||||
|
||||
if (attr.sources.source.url !== undefined) {
|
||||
|
||||
|
||||
|
||||
fields.find(x => x.key == newAttribute.id).url.url = attr.sources.source.url._value;
|
||||
|
||||
this.restBase.proxy_get(attr.sources.source.url._value).subscribe((data) => {
|
||||
|
||||
|
||||
|
||||
});
|
||||
console.log(data);
|
||||
newAttribute.sources.forEach(src => {
|
||||
src.params = new Array();
|
||||
data.data.forEach(data => {
|
||||
let prm = new Param();
|
||||
prm.key = data.id;
|
||||
prm.value = data.attributes.name;
|
||||
src.params.push(prm);
|
||||
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
} else {
|
||||
newAttribute.sources.forEach(src => {
|
||||
|
||||
src.params = new Array();
|
||||
for (var i = 0, len = attr.sources.source.value.length; i < len; i++) {
|
||||
let prm = new Param();
|
||||
prm.key = attr.sources.source.value[i]._value;
|
||||
prm.value = attr.sources.source.value[i]._label;
|
||||
src.params.push(prm);
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (attr.validation.rule.length)
|
||||
for (var i=0, len=attr.validation.rule.length; i<len; i++){
|
||||
for (var i = 0, len = attr.validation.rule.length; i < len; i++) {
|
||||
let rule = new Rule();
|
||||
rule.ruleStyle= attr.validation.rule[i]._ruleStyle;
|
||||
rule.ruleType= attr.validation.rule[i]._type;
|
||||
rule.ruleStyle = attr.validation.rule[i]._ruleStyle;
|
||||
rule.ruleType = attr.validation.rule[i]._type;
|
||||
if (attr.validation.rule[i]._ruleStyle == "regex")
|
||||
rule.regex= attr.validation.rule[i].__cdata;
|
||||
if (attr.validation.rule[i]._ruleStyle == "customValidation"){
|
||||
rule.method= attr.validation.rule[i]._method;
|
||||
rule.regex = attr.validation.rule[i].__cdata;
|
||||
if (attr.validation.rule[i]._ruleStyle == "customValidation") {
|
||||
rule.method = attr.validation.rule[i]._method;
|
||||
functions.forEach(fnc => {
|
||||
if(fnc._id == rule.method)
|
||||
if (fnc._id == rule.method)
|
||||
rule.methodJs = fnc.script.__cdata;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
newAttribute.validation.push(rule);
|
||||
}
|
||||
|
||||
else{
|
||||
if(attr.validation.rule){
|
||||
|
||||
else {
|
||||
if (attr.validation.rule) {
|
||||
let rule = new Rule();
|
||||
rule.ruleStyle= attr.validation.rule._ruleStyle;
|
||||
rule.ruleType= attr.validation.rule._type;
|
||||
rule.ruleStyle = attr.validation.rule._ruleStyle;
|
||||
rule.ruleType = attr.validation.rule._type;
|
||||
if (attr.validation.rule._ruleStyle == "regex")
|
||||
rule.regex= attr.validation.rule.__cdata;
|
||||
if (attr.validation.rule._ruleStyle == "customValidation"){
|
||||
rule.method= attr.validation.rule._method;
|
||||
functions.forEach(fnc => {
|
||||
if(fnc._id == rule.method)
|
||||
rule.regex = attr.validation.rule.__cdata;
|
||||
if (attr.validation.rule._ruleStyle == "customValidation") {
|
||||
rule.method = attr.validation.rule._method;
|
||||
functions.forEach(fnc => {
|
||||
if (fnc._id == rule.method)
|
||||
rule.methodJs = fnc.__cdata;
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
newAttribute.validation.push(rule);
|
||||
}
|
||||
}
|
||||
|
||||
attribute.push(newAttribute);
|
||||
fields.find(x => x.key == newAttribute.id).attributes.sources = newAttribute.sources;
|
||||
//if (fields.find(x => x.key == newAttribute.id).url.url == null)
|
||||
fields.find(x => x.key == newAttribute.id).attributes.sources = newAttribute.sources;
|
||||
fields.find(x => x.key == newAttribute.id).attributes.validation = newAttribute.validation;
|
||||
});
|
||||
|
||||
|
@ -281,10 +315,10 @@ export class dataModelBuilder {
|
|||
return attribute;
|
||||
}
|
||||
|
||||
private getSections(sections:any, fieldGroups:GroupBase<any>[]){
|
||||
let sects: Section[]= [];
|
||||
private getSections(sections: any, fieldGroups: GroupBase<any>[]) {
|
||||
let sects: Section[] = [];
|
||||
|
||||
if(sections.length){
|
||||
if (sections.length) {
|
||||
sections.forEach(section => {
|
||||
let newSection = new Section();
|
||||
newSection.defaultVisibility = section.defaultVisibility;
|
||||
|
@ -294,7 +328,7 @@ export class dataModelBuilder {
|
|||
newSection.ordinal = section._ordinal;
|
||||
newSection.groupFields = new Array();
|
||||
fieldGroups.forEach(fldgroup => {
|
||||
if(fldgroup.section == newSection.id)
|
||||
if (fldgroup.section == newSection.id)
|
||||
newSection.groupFields.push(fldgroup);
|
||||
})
|
||||
sects.push(newSection);
|
||||
|
@ -303,5 +337,12 @@ export class dataModelBuilder {
|
|||
sects.sort((a, b) => a.ordinal - b.ordinal);
|
||||
return sects;
|
||||
}
|
||||
|
||||
|
||||
getValuesFromEestore(url: string, fieldPath: string) {
|
||||
this.restBase.proxy_get(url).subscribe((data) => {
|
||||
data.data.forEach(data => {
|
||||
console.log(data);
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
|
@ -0,0 +1,61 @@
|
|||
import { Component, Input, OnInit, AfterViewChecked, ViewChild, Injectable } from '@angular/core';
|
||||
|
||||
import {RestBase} from './rest-base';
|
||||
|
||||
|
||||
@Injectable()
|
||||
export class EestoreService implements OnInit {
|
||||
|
||||
base: string = "https://eestore.paas2.uninett.no/api/";
|
||||
|
||||
datarepo: string = this.base+"datarepo/";
|
||||
projectrepo: string = this.base+"projectrepo/";
|
||||
organizationrepo: string = this.base+"organizationrepo/";
|
||||
metadataschemarepo: string = this.base+"metadataschemarepo/";
|
||||
servicerepo: string = this.base+"servicerepo/";
|
||||
personrepo: string = this.base+"personrepo/";
|
||||
config: string = this.base+"config/";
|
||||
configtags: string = this.base+"configtags/";
|
||||
|
||||
|
||||
constructor(public restBase: RestBase) {
|
||||
}
|
||||
|
||||
ngOnInit(){
|
||||
|
||||
}
|
||||
|
||||
|
||||
getDataRepos(){
|
||||
return this.restBase.proxy_get(this.datarepo);
|
||||
}
|
||||
|
||||
getProjectRepos(){
|
||||
return this.restBase.proxy_get(this.projectrepo);
|
||||
}
|
||||
|
||||
getOrganizationRepos(){
|
||||
return this.restBase.proxy_get(this.organizationrepo);
|
||||
}
|
||||
|
||||
getMetadataSchemaRepos(){
|
||||
return this.restBase.proxy_get(this.metadataschemarepo);
|
||||
}
|
||||
|
||||
getServiceRepos(){
|
||||
return this.restBase.proxy_get(this.servicerepo);
|
||||
}
|
||||
|
||||
getPersonRepos(){
|
||||
return this.restBase.proxy_get(this.personrepo);
|
||||
}
|
||||
|
||||
getConfigs(){
|
||||
return this.restBase.proxy_get(this.config);
|
||||
}
|
||||
|
||||
getConfigTags(){
|
||||
return this.restBase.proxy_get(this.configtags);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,69 @@
|
|||
import { HttpClient , HttpHeaders, HttpParams } from '@angular/common/http';
|
||||
import { TokenService, TokenProvider } from './token.service'
|
||||
import 'rxjs/Rx';
|
||||
|
||||
|
||||
declare var X2JS: any;
|
||||
|
||||
export class RestBase {
|
||||
|
||||
xml2jsonOBJ: any;
|
||||
|
||||
static get parameters() { return [HttpClient, TokenService] }
|
||||
|
||||
constructor(public http : HttpClient, public tokenService : TokenService) {
|
||||
this.xml2jsonOBJ = new X2JS();
|
||||
}
|
||||
|
||||
protocol: string = "http";
|
||||
hostname: string ="dl010.madgik.di.uoa.gr" ;//"localhost";//"dl010.madgik.di.uoa.gr";//
|
||||
port: number = 8080;//8080;//
|
||||
webappname: string = "dmp-backend";//"dmp-backend-new";//
|
||||
|
||||
|
||||
proxyPath : string = this.protocol+"://"+this.hostname+":"+this.port+"/"+this.webappname+"/proxy/";
|
||||
loginPath : string = this.protocol+"://"+this.hostname+":"+this.port+"/"+this.webappname+"/login/";
|
||||
restPath: string = this.protocol+"://"+this.hostname+":"+this.port+"/"+this.webappname+"/rest/";
|
||||
|
||||
|
||||
public proxy_get(path : string){
|
||||
var options = this.createOptions();
|
||||
return this.http.get<any>(this.proxyPath +"proxy?url="+ path, options);
|
||||
}
|
||||
|
||||
public login(path : string, data : any){
|
||||
let options = { headers: new HttpHeaders().set('Content-Type', 'application/json') };
|
||||
return this.http.post<any>(this.loginPath + path, JSON.stringify(data), options);
|
||||
}
|
||||
|
||||
public get(path : string){
|
||||
var options = this.createOptions();
|
||||
return this.http.get<any>(this.restPath + path, options);
|
||||
}
|
||||
|
||||
|
||||
public post(path : string, data : any) {
|
||||
var options = this.createOptions();
|
||||
return this.http.post<any>(this.restPath + path, JSON.stringify(data), options);
|
||||
}
|
||||
|
||||
|
||||
private createOptions(){
|
||||
var token = this.tokenService.getToken();
|
||||
var provider: TokenProvider = this.tokenService.getProvider();
|
||||
//var csrfToken : string = this.tokenService.getCSRFToken();
|
||||
|
||||
const params = new HttpParams();
|
||||
var headers;
|
||||
if(provider == TokenProvider.google)
|
||||
headers = new HttpHeaders().set('Content-Type', 'application/json').set("google-token", token);
|
||||
if(provider == TokenProvider.native)
|
||||
headers = new HttpHeaders().set('Content-Type', 'application/json').set("native-token", token);
|
||||
let options = { params: params, headers: headers };
|
||||
return options;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -8,6 +8,7 @@ import {DataModel} from '../entities/DataModel';
|
|||
import {Project} from '../entities/model/project';
|
||||
import {LoginComponent} from '../../app/login/login-page';
|
||||
import { TokenService, TokenProvider } from './token.service';
|
||||
import {RestBase} from './rest-base';
|
||||
import 'rxjs/Rx';
|
||||
|
||||
import './../../assets/xml2json.min.js';
|
||||
|
@ -16,6 +17,7 @@ declare var X2JS: any;
|
|||
@Injectable()
|
||||
export class ServerService {
|
||||
|
||||
|
||||
xml2jsonOBJ: any;
|
||||
//fetchURL: string = 'http://dl010.madgik.di.uoa.gr:8080/dmp-backend/rest/DMP/a868dbbb-ee37-4ce6-81c8-27048e0599a9';
|
||||
//fetchURL: string = 'http://dl010.madgik.di.uoa.gr:8080/dmp-backend/rest/DMP/a71a6a92-5c23-40d7-ab87-e30bc860f5a4';//include rules!
|
||||
|
@ -32,20 +34,71 @@ export class ServerService {
|
|||
|
||||
//data: any;
|
||||
|
||||
constructor(private httpClient: HttpClient, private tokenService: TokenService) { //private http: Http
|
||||
constructor(private httpClient: HttpClient, private tokenService: TokenService, private restBase: RestBase) { //private http: Http
|
||||
this.xml2jsonOBJ = new X2JS();
|
||||
}
|
||||
|
||||
|
||||
|
||||
public listDatasetIDs(){
|
||||
return this.restBase.get("dataset");
|
||||
}
|
||||
|
||||
public getAllDatasets(){
|
||||
return this.restBase.get("getAllDatasets");
|
||||
}
|
||||
|
||||
public getAllDatasetIDs(datasetId: string){
|
||||
return this.restBase.get("dataset/"+datasetId);
|
||||
}
|
||||
|
||||
|
||||
public getAllDmps(){
|
||||
return this.restBase.get("dmp/getAll");
|
||||
}
|
||||
|
||||
public listDmpsLabelID(){
|
||||
return this.restBase.get("dmp/listDMPLabelID");
|
||||
}
|
||||
|
||||
public getDmp(dmpid : string){
|
||||
return this.restBase.get("dmps/"+dmpid);
|
||||
}
|
||||
|
||||
public listDmpIDs(){
|
||||
return this.restBase.get("dmps");
|
||||
}
|
||||
|
||||
|
||||
public listProjectIDs(){
|
||||
return this.restBase.get("projects");
|
||||
}
|
||||
|
||||
public getAllProjects(){
|
||||
return this.restBase.get("project/getAll");
|
||||
}
|
||||
|
||||
public getProject(projectID : string){
|
||||
return this.restBase.get("projects/"+projectID);
|
||||
}
|
||||
|
||||
public listProjectsLabelID(){
|
||||
return this.restBase.get("project/listAllLabelIDs");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
getData() {
|
||||
|
||||
//let headers = new HttpHeaders();
|
||||
let headers = new HttpHeaders().set("google-token", this.tokenService.getToken());
|
||||
|
||||
console.log("google-token: "+ this.tokenService.getToken());
|
||||
// let headers = new HttpHeaders().set("google-token", this.tokenService.getToken());
|
||||
|
||||
return this.httpClient.get<any>(this.fetchURL);
|
||||
// console.log("google-token: "+ this.tokenService.getToken());
|
||||
|
||||
// return this.httpClient.get<any>(this.fetchURL);
|
||||
return this.restBase.get("dmps/9a4a4a57-4d01-465e-9887-254534f31600");
|
||||
|
||||
/*
|
||||
return this.http.get(this.fetchURL)
|
||||
|
@ -75,7 +128,7 @@ export class ServerService {
|
|||
|
||||
console.log("google-token: "+ this.tokenService.getToken());
|
||||
|
||||
return this.httpClient.get<any>("http://dl010.madgik.di.uoa.gr:8080/dmp-backend-no-sec/rest/project/listAllLabelIDs");
|
||||
return this.httpClient.get<any>("http://dl010.madgik.di.uoa.gr:8080/dmp-backend-no-sec/rest/project/getAll");
|
||||
|
||||
// let projects :Project[] =[];
|
||||
|
||||
|
|
|
@ -11,11 +11,11 @@ export class TokenService {
|
|||
|
||||
|
||||
constructor (private storage : LocalStorageService, @Inject(DOCUMENT) private document) {
|
||||
var csrfToken : string = jQuery(document).find('meta[name="csrf-token"]').attr('content');
|
||||
this.setCSRFToken(csrfToken);
|
||||
//var csrfToken : string = jQuery(document).find('meta[name="csrf-token"]').attr('content');
|
||||
//this.setCSRFToken(csrfToken);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
getCSRFToken() : string{
|
||||
return this.storage.retrieve('csrf-token');
|
||||
}
|
||||
|
@ -23,7 +23,7 @@ export class TokenService {
|
|||
setCSRFToken(csrfToken : string){
|
||||
this.storage.store('csrf-token',csrfToken);
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
getProvider() : TokenProvider {
|
||||
return this.storage.retrieve('provider');
|
||||
|
|
|
@ -3,8 +3,9 @@
|
|||
<script src="https://apis.google.com/js/platform.js" ></script>
|
||||
<meta name="google-signin-client_id" content="524432312250-vhgidft856v8qftsc81kls4c74v87d8o.apps.googleusercontent.com">
|
||||
|
||||
<link rel="stylesheet" href="https://cdn.rawgit.com/afeld/bootstrap-toc/v0.4.1/dist/bootstrap-toc.min.css"><!--bootstrap plugin for ToC-->
|
||||
<link rel="stylesheet" href="https://cdn.rawgit.com/afeld/bootstrap-toc/v0.4.1/dist/bootstrap-toc.min.css"><!--bootstrap plugin for ToC-->
|
||||
<!-- add after bootstrap.min.js -->
|
||||
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" />
|
||||
<script src="https://cdn.rawgit.com/afeld/bootstrap-toc/v0.4.1/dist/bootstrap-toc.min.js"></script>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
|
@ -31,7 +32,7 @@
|
|||
|
||||
<div class="panel panel-default" style="margin-top: 30px; margin-bottom: 30px; margin-right: 30px; margin-left: 30px;">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title" style="text-align: center;">Digital Management Plans Editor</h3>
|
||||
<h3 class="panel-title" style="text-align: center;">Digital Management Plan</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
|
||||
|
|
Loading…
Reference in New Issue