This commit is contained in:
Diamantis Tziotzios 2017-12-19 19:34:00 +02:00
parent 74f11f0f1b
commit ad4af5aa1f
105 changed files with 251 additions and 7739 deletions

View File

@ -1,13 +0,0 @@
# Editor configuration, see http://editorconfig.org
root = true
[*]
charset = utf-8
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true
[*.md]
max_line_length = off
trim_trailing_whitespace = false

View File

View File

@ -1 +0,0 @@
{"sections":[{"sections":[],"fieldGroups":[{"id":"dataSummaryGroup","title":"Data Summary","value":null,"description":null,"extendedDescription":null,"defaultVisibility":true,"page":null,"ordinal":"1","compositeFields":[{"id":"dataSummaryFS","ordinal":1,"fields":[{"id":"dataSummary","title":null,"description":null,"extendedDescription":null,"defaultVisibility":null,"page":null,"ordinal":1,"multiplicity":{"min":1,"max":1},"defaultValue":{"type":null,"value":null},"viewStyle":{"cssClass":null,"renderStyle":"textarea"},"visible":{"style":null,"rules":[]}}],"multiplicity":{"min":1,"max":1}}]}],"defaultVisibility":true,"page":null,"id":"datasummary","title":"Data Summary","description":null,"ordinal":"1"},{"sections":[{"sections":[],"fieldGroups":[{"id":"FindDataMetadataGroup","title":null,"value":null,"description":null,"extendedDescription":null,"defaultVisibility":true,"page":null,"ordinal":"2","compositeFields":[{"id":"useMetadataQ211FS","ordinal":1,"fields":[{"id":"useMetadataQ211","title":"Q2.1.1 Will you use metadata to describe the data?","description":"User can select from a list of metadata standards. If they cannot find the standard in the list provided then they should choose \"not listed\". Selecting this will result in a field in which the user can insert the URL to the description of the metadata scheme used. A \"comments\" box should exist to allow users to add comments. They may select more than one metadata standard. They may specify more than one URL when selecting \"not listed\". They are also presented with a field in which to specify the location of the metadata service. Users can select the \"no metadata\" button to specify no metadata will be used to describe the data.","extendedDescription":null,"defaultVisibility":true,"page":null,"ordinal":1,"multiplicity":{"min":1,"max":1},"defaultValue":{"type":null,"value":null},"viewStyle":{"cssClass":null,"renderStyle":"booleanDesicion"},"visible":{"style":null,"rules":[]}}],"multiplicity":{"min":1,"max":1}}]}],"defaultVisibility":true,"page":null,"id":"dataMetadata","title":"2.1 Making data findable, including provisions for metadata","description":null,"ordinal":"3"}],"fieldGroups":[],"defaultVisibility":null,"page":null,"id":"fairData","title":"2 Fair Data","description":null,"ordinal":null}],"label":"Horizon 2020 template"}

File diff suppressed because it is too large Load Diff

View File

@ -1,33 +0,0 @@
// Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular/cli'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage-istanbul-reporter'),
require('@angular/cli/plugins/karma')
],
client:{
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
coverageIstanbulReporter: {
reports: [ 'html', 'lcovonly' ],
fixWebpackSourcePaths: true
},
angularCli: {
environment: 'dev'
},
reporters: ['progress', 'kjhtml'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
singleRun: false
});
};

View File

@ -24,27 +24,9 @@
"@angular/platform-browser-dynamic": "5.1.1",
"@angular/router": "5.1.1",
"@covalent/core": "^1.0.0-rc.1",
"@ng-bootstrap/ng-bootstrap": "1.0.0-beta.7",
"@ngui/auto-complete": "^0.16.0",
"@ngx-translate/core": "^9.0.1",
"@ngx-translate/http-loader": "^2.0.0",
"angular-2-data-table": "^0.1.2",
"angular-google-signin": "^0.1.5",
"angular2-datatable": "^0.6.0",
"angular2-draggable": "^1.0.7",
"angular2-number-picker": "^0.8.8",
"angular2-uuid": "^1.1.1",
"bootstrap": "^3.3.7",
"core-js": "^2.4.1",
"flat": "^4.0.0",
"jquery": "^3.2.1",
"jspdf": "^1.3.5",
"moment": "^2.19.1",
"ng-sidebar": "^6.0.4",
"ng2-datepicker": "^2.1.3",
"ng4-loading-spinner": "^1.0.27",
"ngx-webstorage": "^2.0.1",
"primeng": "^5.0.2",
"rxjs": "^5.4.2",
"zone.js": "^0.8.17"
},
@ -52,20 +34,8 @@
"@angular/cli": "1.6.1",
"@angular/compiler-cli": "^5.1.1",
"@angular/language-service": "^5.1.1",
"@types/jasmine": "~2.8.2",
"@types/jasminewd2": "~2.0.2",
"@types/node": "^8.5.1",
"angular-ide": "^0.9.31",
"codelyzer": "~4.0.2",
"jasmine-core": "~2.8.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~1.7.0",
"karma-chrome-launcher": "~2.2.0",
"karma-cli": "~1.0.1",
"karma-coverage-istanbul-reporter": "^1.2.1",
"karma-jasmine": "~1.1.0",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "~5.2.2",
"ts-node": "~4.0.1",
"tslint": "~5.8.0",
"typescript": "2.4.2"

View File

@ -1,28 +0,0 @@
// Protractor configuration file, see link for more information
// https://github.com/angular/protractor/blob/master/lib/config.ts
const { SpecReporter } = require('jasmine-spec-reporter');
exports.config = {
allScriptsTimeout: 11000,
specs: [
'./e2e/**/*.e2e-spec.ts'
],
capabilities: {
'browserName': 'chrome'
},
directConnect: true,
baseUrl: 'http://localhost:4200/',
framework: 'jasmine',
jasmineNodeOpts: {
showColors: true,
defaultTimeoutInterval: 30000,
print: function() {}
},
onPrepare() {
require('ts-node').register({
project: 'e2e/tsconfig.e2e.json'
});
jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
}
};

View File

@ -6,8 +6,6 @@ import { HomepageComponent } from './homepage/homepage.component';
import { DynamicFormComponent } from './form/dynamic-form.component';
import { AuthGuard } from './guards/auth.guard';
import { AppComponent } from './app.component';
import { DmpDetailedComponent } from './viewers/dmp-detailed/dmp-detailed.component';
import { ProjectDetailedComponent } from './viewers/project-detailed/project-detailed.component';
import { ProjectListingModel } from './models/projects/ProjectListingModel';
import { ProjectListingComponent } from './projects/project-listing.component';
import { DataManagementPlanListingComponent } from './dmps/dmp-listing.component';

View File

@ -1,22 +0,0 @@
.full-width {
width: 100%;
}
.full-height {
height: 100%;
}
html,
body {
height: 100%;
width: 100%;
}
app-root {
display: block;
height: 100%;
}
html {
/* overflow-y: hidden */
}

View File

@ -1,2 +1,4 @@
<app-navigation></app-navigation>
<router-outlet></router-outlet>
<div class="container">
<router-outlet></router-outlet>
</div>

View File

@ -0,0 +1,2 @@
body {
}

View File

@ -1,77 +1,46 @@
import { Component, OnInit, ViewEncapsulation} from '@angular/core';
import { ServerService } from './services/server.service';
import { JsonObjest } from '../app/entities/JsonObject.class';
import { Component, OnInit, ViewEncapsulation } from '@angular/core';
import { Router, CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot, ActivatedRoute, NavigationExtras } from '@angular/router';
import {BreadcrumbModule,MenuItem} from 'primeng/primeng';
import { BreadcrumbComponent } from './widgets/breadcrumb/breadcrumb.component';
import { TranslateService } from '@ngx-translate/core';
declare const gapi: any;
declare var $ :any;
declare var $: any;
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css'],
providers: [],
styleUrls: ['./app.component.scss'],
providers: [],
encapsulation: ViewEncapsulation.None
})
export class AppComponent implements OnInit {
fields: any[];
sliderExpanded : boolean = false;
breadcrumbHome: MenuItem = {icon: 'fa fa-home', routerLink: "/welcome"};
breadcrumbData: MenuItem[] = new Array<MenuItem>();
constructor( private router: Router, private route: ActivatedRoute, private translate: TranslateService) {
// this language will be used as a fallback when a translation isn't found in the current language
translate.setDefaultLang('en');
// the lang to use, if the lang isn't available, it will use the current loader to get them
translate.use('en');
constructor(private router: Router, private route: ActivatedRoute, private translate: TranslateService) {
// this language will be used as a fallback when a translation isn't found in the current language
translate.setDefaultLang('en');
// the lang to use, if the lang isn't available, it will use the current loader to get them
translate.use('en');
}
ngOnInit() {
}
slideNav(){
$("#appSidebar").toggleClass("expanded");
$("#appBody").toggleClass("expanded");
}
//loggedInAs : string = null;
showLogin : boolean = false;
login(){
login() {
//redirect to login page
this.router.navigate(['/login'], { queryParams: { /*refresh : Math.random() ,returnUrl: this.state.url*/ }});
}
logout(){
this.router.navigate(['/login'], { queryParams: { /*refresh : Math.random() ,returnUrl: this.state.url*/ } });
}
logout() {
goToDMPs(){
this.router.navigate(['/dmps'], { queryParams: { /*refresh : Math.random() ,returnUrl: this.state.url*/ }});
}
goToProjects(){
this.router.navigate(['/projects'], { queryParams: { /*refresh : Math.random() ,returnUrl: this.state.url*/ }});
goToDMPs() {
this.router.navigate(['/dmps'], { queryParams: { /*refresh : Math.random() ,returnUrl: this.state.url*/ } });
}
goToProjects() {
this.router.navigate(['/projects'], { queryParams: { /*refresh : Math.random() ,returnUrl: this.state.url*/ } });
}
}

View File

@ -32,64 +32,17 @@ import { FormsModule, ReactiveFormsModule, NG_VALUE_ACCESSOR } from '@angular/fo
import { HttpClientModule, HttpClient } from '@angular/common/http';
import { HttpModule } from '@angular/http';
import { RouterModule, Routes, Router } from '@angular/router';
import { DataTableModule } from "angular2-datatable";
import { AppComponent } from './app.component';
import { RestBase } from './services/rest-base';
import { DynamicFormComponent } from './form/dynamic-form.component';
import { DynamicFormFieldComponent } from './form/dynamic-fields/dynamic-form-field.component';
import { ServerService } from './services/server.service';
import { GlobalVariables } from './services/global-variables.service';
import { LocalStorageService } from 'ngx-webstorage';
import { DynamicFormGroupComponent } from './form/dynamic-form-group/dynamic-form-group.component';
import { AppRoutingModule } from './app-routing.module';
import { AuthGuard } from './guards/auth.guard';
import { PageNotFoundComponent } from './not-found.component';
import { HomepageComponent } from './homepage/homepage.component';
import { ConfirmationComponent } from './widgets/confirmation/confirmation.component';
import { EestoreService } from './services/eestore.service';
import { PDFService } from './services/transformers/pdf.service';
import { TabModule } from './tabs/tab.module';
import { AngularDraggableModule } from 'angular2-draggable';
import { NguiAutoCompleteModule } from '@ngui/auto-complete';
import { HTTP_INTERCEPTORS } from '@angular/common/http';
import { BreadcrumbModule, PanelModule } from 'primeng/primeng';
import { CommonModule } from '@angular/common';
import { DatasetTableFilterPipe } from './pipes/dataset-table-filter.pipe';
import { DatasetStatusFilterPipe } from './pipes/dataset-status-filter.pipe';
import { DmpTableFilterPipe } from './pipes/dmp-table-filter.pipe';
import { DmpStatusFilterPipe } from './pipes/dmp-status-filter.pipe';
import { DmpVersionFilterPipe } from './pipes/dmp-version-filter.pipe';
import { ProjectTableFilterPipe } from './pipes/project-table-filter.pipe';
import { ModalComponent } from './modal/modal.component';
import { NgDatepickerModule } from 'ng2-datepicker';
import { StatusToString } from './pipes/various/status-to-string';
import { SidebarModule } from 'ng-sidebar';
import { BreadcrumbComponent } from './widgets/breadcrumb/breadcrumb.component';
import { DmpDetailedComponent } from './viewers/dmp-detailed/dmp-detailed.component';
import { ProjectDetailedComponent } from './viewers/project-detailed/project-detailed.component';
import { ProgressBarModule } from 'primeng/primeng';
import { StepsModule, MenuItem } from 'primeng/primeng';
import { CheckboxModule } from 'primeng/primeng';
import { RadioButtonModule } from 'primeng/primeng';
import { AutoCompleteModule } from 'primeng/primeng';
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
import { TranslateModule } from '@ngx-translate/core';
import { TranslateLoader } from '@ngx-translate/core';
import { TranslateHttpLoader } from '@ngx-translate/http-loader';
@ -105,10 +58,9 @@ import { BaseHttpService } from './utilities/cite-http-service-module/base-http.
import { DataManagementPlanListingComponent } from './dmps/dmp-listing.component';
import { ProjectEditorComponent } from './projects/editor/project-editor.component';
import { DataManagementPlanEditorComponent } from './dmps/editor/dmp-editor.component';
import { FigurecardComponent } from './shared/components/figurecard/figurecard.component';
import { DataManagementPlanWizardComponent } from './dmp-wizard/dmp-wizard.component';
import { LoginComponent } from './login/login.component';
import { FigurecardComponent } from './shared/components/figurecard/figurecard.component';
@ -128,29 +80,19 @@ import { LoginComponent } from './login/login.component';
LoginComponent,
PageNotFoundComponent,
HomepageComponent,
ModalComponent,
ProjectListingComponent,
DatasetListingComponent,
DataManagementPlanListingComponent,
ConfirmationComponent,
DataManagementPlanListingComponent,
AutocompleteRemoteComponent,
DynamicFieldDropdownComponent,
DynamicFormSectionComponent,
ProjectTableFilterPipe,
DmpVersionFilterPipe,
DmpStatusFilterPipe,
DmpTableFilterPipe,
DatasetTableFilterPipe,
DatasetStatusFilterPipe,
StatusToString,
TableOfContentsFieldComponent,
ProgressBarComponent,
DynamicFieldCheckBoxComponent,
BreadcrumbComponent, DmpDetailedComponent, ProjectDetailedComponent,
ProjectEditorComponent,
DataManagementPlanEditorComponent,
FigurecardComponent,
DataManagementPlanWizardComponent
DataManagementPlanWizardComponent,
FigurecardComponent
],
imports: [
BrowserModule,
@ -159,23 +101,9 @@ import { LoginComponent } from './login/login.component';
FormsModule,
HttpModule,
HttpClientModule,
TabModule,
CommonModule,
AppRoutingModule,
AngularDraggableModule,
DataTableModule,
NgDatepickerModule,
NguiAutoCompleteModule,
BreadcrumbModule,
ProgressBarModule,
PanelModule,
BrowserAnimationsModule,
SidebarModule.forRoot(),
NgbModule.forRoot(),
StepsModule,
CheckboxModule,
RadioButtonModule,
AutoCompleteModule,
TranslateModule.forRoot({
loader: {
provide: TranslateLoader,
@ -187,9 +115,12 @@ import { LoginComponent } from './login/login.component';
MaterialModule
],
providers: [
ServerService, VisibilityRulesService, PaginationService, GlobalVariables, AuthGuard,
LocalStorageService, RestBase, EestoreService, PDFService,
AuthService,DashboardService,DatasetService,
VisibilityRulesService,
PaginationService,
AuthGuard,
AuthService,
DashboardService,
DatasetService,
BaseHttpService
],
bootstrap: [AppComponent]

View File

@ -10,7 +10,6 @@ import { SnackBarNotificationComponent } from "../../shared/components/notificai
import { BaseErrorModel } from "../../models/error/BaseErrorModel";
import { DatasetService } from "../../services/dataset/dataset.service";
import { DatasetModel } from "../../models/datasets/DatasetModel";
import { ServerService } from "../../services/server.service";
import { ExternalSourcesService } from "../../services/external-sources/external-sources.service";
import { ExternalSourcesItemModel } from "../../models/external-sources/ExternalSourcesItemModel";

View File

@ -10,7 +10,6 @@ import { SnackBarNotificationComponent } from "../../shared/components/notificai
import { BaseErrorModel } from "../../models/error/BaseErrorModel";
import { DataManagementPlanService } from "../../services/data-management-plan/data-management-plan.service";
import { DataManagementPlanModel } from "../../models/data-managemnt-plans/DataManagementPlanModel";
import { ServerService } from "../../services/server.service";
import { ExternalSourcesService } from "../../services/external-sources/external-sources.service";
import { ExternalSourcesItemModel } from "../../models/external-sources/ExternalSourcesItemModel";

View File

@ -1,10 +0,0 @@
import {Title} from "../../app/entities/view/viewTitle.view";
import {ViewStyle} from "../../app/entities/view/viewStyle.view";
export class JsonObjest {
groups: any[];
fields: any[];
title: Title;
viewStyle: ViewStyle;
renderStyle: string;
}

View File

@ -1,13 +0,0 @@
import { Injectable } from '@angular/core';
import { Func } from './functions/func';
import { Model } from './model/model';
import { View } from './view2/view';
@Injectable()
export class DatasetProfile{
view: View;
model: Model;
func: Func[];
}

View File

@ -1,9 +0,0 @@
export class Func {
id: string;
signature:string;
code: string;
}

View File

@ -1,10 +0,0 @@
import { Injectable } from '@angular/core';
export class Dataset {
id:string;
name: string;
uriDataset: string;
dmp:string;
profile:string;
profileId:string;
}

View File

@ -1,9 +0,0 @@
import { Injectable } from '@angular/core';
import { DatatypeField } from './datatypefield';
@Injectable()
export class Datatype {
id: string;
fields: DatatypeField[];
}

View File

@ -1,9 +0,0 @@
import { Injectable } from '@angular/core';
@Injectable()
export class DatatypeField{
id: string;
ordinal: number;
datatype: string;
}

View File

@ -1,14 +0,0 @@
import { Injectable } from '@angular/core';
export class Dmp {
id:string;
dataset: string;
label: string;
organisations:string;
previous:string;
profile:string;
profileData:string;
projectLabel:string;
projectid:string;
version: number;
}

View File

@ -1,11 +0,0 @@
import { Injectable } from '@angular/core';
import { Attribute } from './attribute';
import { Datatype } from './datatype';
import { Rule } from '../common/rule';
@Injectable()
export class Model {
attributes : Attribute[];
rules: Rule[];
datatypes : Datatype[];
}

View File

@ -1,13 +0,0 @@
import { Injectable } from '@angular/core';
import { Dmp } from './dmp'
import { Dataset } from './dataset'
export class Project {
label: string;
id: string;
abbreviation: string;
definition: string;
uri: string;
dmp: Dmp;
dataset: Dataset;
}

View File

@ -1,9 +0,0 @@
import {ViewStyleProfile} from "../../app/entities/view/viewProfile.view";
class PlanDefinition{
viewStyle: ViewStyleProfile;
dataModel:{};
rules:{};
}

View File

@ -1,14 +0,0 @@
import {Title} from "../../../app/entities/view/viewTitle.view";
import {ViewStyle} from "../../../app/entities/view/viewStyle.view";
export class Field {
description: {};
extendedDescription:{};
title:Title;
viewStyle:ViewStyle;
visible:{};
group:string;
id:string;
ordinal:string;
}

View File

@ -1,11 +0,0 @@
import {Title} from "../../../app/entities/view/viewTitle.view";
import {GroupVisibility} from "../../../app/entities/view/viewGrVisibility.view";
export class FieldGroup{
description: {};
extendedDescription:{};
title: Title;
visible: GroupVisibility;
id: string;
ordinal: string;
}

View File

@ -1,4 +0,0 @@
export class GroupVisibility{
rules: any[];
style: string;
}

View File

@ -1,8 +0,0 @@
import {Field} from "../../../app/entities/view/field.view";
import {FieldGroup} from "../../../app/entities/view/viewFieldGroup.view";
export class ViewStyleProfile{
fieldGroup: FieldGroup
field: Field
}

View File

@ -1,4 +0,0 @@
export class ViewStyle{
_cssclass:string;
_renderstyle:string;
}

View File

@ -1,3 +0,0 @@
export class Title {
__cdata:string
}

View File

@ -1,23 +0,0 @@
import { Injectable } from '@angular/core';
import { Rule } from '../common/rule';
@Injectable()
export class Field {
id: string;
group: string;
ordinal: number;
title: string;
titleLang: string;
description: string;
descriptionLang: string;
ext_description: string;
ext_descriptionLang: string;
visibilityStyle: string = 'any';
visibilityRules: Rule[];
renderStyle: string;
cssClass: string;
}

View File

@ -1,18 +0,0 @@
import { Injectable } from '@angular/core';
import { Rule } from '../common/rule';
@Injectable()
export class FieldGroup{
id: string;
ordinal: number;
title: string;
titleLang: string;
description: string;
descriptionLang: string;
ext_description: string;
ext_descriptionLang: string;
visibilityStyle: string = 'any';
visibilityRules: Rule[];
}

View File

@ -1,10 +0,0 @@
import { Injectable } from '@angular/core';
import { Field } from './field';
import { FieldGroup } from './fieldGroup';
@Injectable()
export class View {
fieldGroups: FieldGroup[];
fields : Field[];
}

View File

@ -1,3 +1,3 @@
<div [formGroup]="textFormGroup">
<input auto-complete class="form-control autocomplete" formControlName="text" [source]="values">
<!-- <input auto-complete class="form-control autocomplete" formControlName="text" [source]="values"> -->
</div>

View File

@ -2,10 +2,6 @@ import { Field } from '../../../models/Field';
import { Component, OnInit, Input, Output, EventEmitter, forwardRef, ViewEncapsulation } from '@angular/core';
import { ControlValueAccessor, FormControl, FormGroup, NG_VALUE_ACCESSOR, Validators } from '@angular/forms';
import { ServerService } from '../../../services/server.service';
import { UUID } from 'angular2-uuid';
import { NguiAutoCompleteModule } from '@ngui/auto-complete';
declare var $: any;
@ -29,7 +25,7 @@ export class AutocompleteRemoteComponent implements OnInit/* , ControlValueAcces
values: any[] = new Array();
typeaheadMS: number = 1400;
constructor(private serverService: ServerService) {
constructor() {
}
@ -60,17 +56,17 @@ export class AutocompleteRemoteComponent implements OnInit/* , ControlValueAcces
updateByQuery(query: string) {
this.serverService.getThroughProxy(this.field.data.url, query).subscribe(
response => {
this.values.length = 0;
/* response.data.forEach(element => {
this.values.push(element.attributes.name);
}); */
},
error => {
console.log(error);
}
);
// this.serverService.getThroughProxy(this.field.data.url, query).subscribe(
// response => {
// this.values.length = 0;
// /* response.data.forEach(element => {
// this.values.push(element.attributes.name);
// }); */
// },
// error => {
// console.log(error);
// }
// );
}

View File

@ -1,5 +1,5 @@
<div [formGroup]="form">
<p-radioButton name="{{field.id}}" value="true" label="Yes" formControlName="value"></p-radioButton>
<!-- <p-radioButton name="{{field.id}}" value="true" label="Yes" formControlName="value"></p-radioButton> -->
<br>
<p-radioButton name="{{field.id}}" value="false" label="No" formControlName="value"></p-radioButton>
<!-- <p-radioButton name="{{field.id}}" value="false" label="No" formControlName="value"></p-radioButton> -->
</div>

View File

@ -1,3 +1,3 @@
<div [formGroup]="form" class="form-group">
<p-checkbox [formControl]="form.get('value')" label="{{field.data.label}}" binary="true"></p-checkbox>
<!-- <p-checkbox [formControl]="form.get('value')" label="{{field.data.label}}" binary="true"></p-checkbox> -->
</div>

View File

@ -1,5 +1,5 @@
<div [formGroup]="form">
<div *ngFor="let option of this.field.data.options let index = index">
<p-radioButton name="{{field.id}}" [value]="option.value" label="{{option.label}}" formControlName="value"></p-radioButton>
<!-- <p-radioButton name="{{field.id}}" [value]="option.value" label="{{option.label}}" formControlName="value"></p-radioButton> -->
</div>
</div>

View File

@ -1,5 +1,5 @@
<div class="ui-g dynamic-formc full-width full-height">
<ng-sidebar-container contentClass="scrollableContent">
<!-- <ng-sidebar-container contentClass="scrollableContent">
<ng-sidebar mode="push" position="right" [(opened)]="visibleSidebar">
<table-of-content class="toc-container full-height" [model]="dataModel"></table-of-content>
</ng-sidebar>
@ -28,5 +28,5 @@
</form>
</div>
</div>
</ng-sidebar-container>
</ng-sidebar-container> -->
</div>

View File

@ -1,5 +1,4 @@
import { VisibilityRulesService } from '../visibility-rules/visibility-rules.service';
import { TestModel } from '../testModel/testmodel';
import { DatasetModel } from '../models/DatasetModel';
import { Rule } from '../models/Rule';
import { Section } from '../models/Section';
@ -10,36 +9,10 @@ import { FormGroup, Validators, ControlValueAccessor, NG_VALUE_ACCESSOR } from '
import { NgForm } from '@angular/forms';
import { Router, ActivatedRoute, ParamMap, Params } from '@angular/router';
import 'rxjs/add/operator/switchMap';
//import { FieldBase } from '../../app/form/fields/field-base';
import { FieldControlService } from '../../app/services/field-control.service';
import { ServerService } from '../../app/services/server.service';
import { ModalComponent } from '../modal/modal.component';
import { Location } from '@angular/common';
import { AngularDraggableModule } from 'angular2-draggable';
import { MenuItem } from 'primeng/primeng';
import { PDFService } from '../services/transformers/pdf.service';
import './../../assets/xml2json.min.js';
declare var X2JS: any;
var flatten = require('flat');
// declare var $: any;
// import * as scroll from '../../assets/jquery.scrollTo.min.js';
declare function simple_notifier(type: string, title: string, message: string): any;
//import '../../assets/perfect-scrollbar/perfect-scrollbar.js';
declare var PerfectScrollbar: any;
@Component({
selector: 'dynamic-form',
templateUrl: './dynamic-form.component.html',
@ -47,7 +20,6 @@ declare var PerfectScrollbar: any;
'./dynamic-form.component.css'
],
providers: [
FieldControlService, ServerService
],
encapsulation: ViewEncapsulation.None,
})
@ -60,7 +32,6 @@ export class DynamicFormComponent implements OnInit {
datasetId: string;
pathName: string;
pages: Array<number>;
stepperItems: MenuItem[] = new Array<MenuItem>();
activeStepperIndex: number = 1;
visibleSidebar: boolean = false;
@ -68,9 +39,10 @@ export class DynamicFormComponent implements OnInit {
private currentPageIndex: number = 0;
private fragment: string;
constructor(private serverService: ServerService, private router: Router, private pdfService: PDFService,
private _location: Location, private route: ActivatedRoute
, private visibilityRulesService: VisibilityRulesService
constructor(private router: Router,
private _location: Location,
private route: ActivatedRoute,
private visibilityRulesService: VisibilityRulesService
) {
this.datasetId = route.snapshot.params['id'];
}
@ -82,31 +54,31 @@ export class DynamicFormComponent implements OnInit {
ngOnInit() {
this.serverService.getSingleDataset(this.datasetId).subscribe(
(response:any) => {
this.dataModel = new JsonSerializer<DatasetModel>().fromJSONObject(response, DatasetModel);
this.pages = this.getPages(this.dataModel);
this.createPagination();
this.form = this.dataModel.buildForm();
this.visibilityRulesService.formGroup = this.form;
let rules: Rule[] = new JsonSerializer<Rule>().fromJSONArray(response.rules, Rule);
this.visibilityRulesService.buildVisibilityRules(rules)
this.progressbar = true;
// this.serverService.getSingleDataset(this.datasetId).subscribe(
// (response: any) => {
// this.dataModel = new JsonSerializer<DatasetModel>().fromJSONObject(response, DatasetModel);
// this.pages = this.getPages(this.dataModel);
// this.createPagination();
// this.form = this.dataModel.buildForm();
// this.visibilityRulesService.formGroup = this.form;
// let rules: Rule[] = new JsonSerializer<Rule>().fromJSONArray(response.rules, Rule);
// this.visibilityRulesService.buildVisibilityRules(rules)
// this.progressbar = true;
this.route.fragment.subscribe((fragment: string) => {
var self = this;
setTimeout(function () { self.scrollTo(fragment) });
});
// this.route.fragment.subscribe((fragment: string) => {
// var self = this;
// setTimeout(function () { self.scrollTo(fragment) });
// });
this.route.queryParams.subscribe((params) => {
if (params && "page" in params)
this.changeCurrentPage(params["page"]);
});
},
error => {
console.log("Could not load dmp");
}
)
// this.route.queryParams.subscribe((params) => {
// if (params && "page" in params)
// this.changeCurrentPage(params["page"]);
// });
// },
// error => {
// console.log("Could not load dmp");
// }
// )
/* else{
@ -120,7 +92,7 @@ export class DynamicFormComponent implements OnInit {
}
submit() {
this.serverService.updateDataset(this.datasetId, this.form.value).subscribe()
//this.serverService.updateDataset(this.datasetId, this.form.value).subscribe()
}
toggleSidebar() {
@ -143,14 +115,14 @@ export class DynamicFormComponent implements OnInit {
createPagination() {
this.pages.forEach(item => {
this.stepperItems.push({
label: '',
})
// this.stepperItems.push({
// label: '',
// })
});
}
changePageIndex(index: any) {
this.router.navigate([this.route.snapshot.url[0] + "/" + this.route.snapshot.url[1]], { queryParams: { page: this.pages[index-1] } });
this.router.navigate([this.route.snapshot.url[0] + "/" + this.route.snapshot.url[1]], { queryParams: { page: this.pages[index - 1] } });
}
scrollTo(sectionID: string) {
@ -171,82 +143,4 @@ export class DynamicFormComponent implements OnInit {
if (pageIndex === -1) return;
this.currentPageIndex = page;
}
/* scrollToElemID(elemID) {
scroll("#" + elemID);
}
private patchForm(flatList: any) {
for (var prop in flatList) {
if (flatList.hasOwnProperty(prop)) {
if (prop.endsWith('.id') || prop.endsWith('.answer') || prop.endsWith('.value')) continue;
//console.log("updating value of "+prop +" to "+flatList[prop].valueOf())
this.form.get(prop).setValue(flatList[prop].valueOf());
}
}
}
ngAfterViewChecked(): void { //navigate to certain section of the page
try {
document.querySelector('#' + this.fragment).scrollIntoView();
} catch (e) { }
}
SaveForm() {
let final = false;
this.submitForm(false);
this.payLoad = JSON.stringify(this.form.value);
}
SaveFinalizeForm(){
$("#confirmModal").modal("hide");
let final = true;
this.submitForm(final);
}
shouldIShow(element) { //pagination , pages are declared in xml for every groupfield
if (this.pagination.currentPage == element.page){
return true;
}
else
return false;
}
setPage(page: number) {
if (page < 1 || page > this.pagination.totalPages) {
return;
}
var pagesize = 4;
// get pagination object from service
this.pagination = this.pagerService.getPagination(this.dataModel.groups, this.dataModel.groups.length, page, pagesize);
//get current page of items
// this.dataModel.sections.forEach(section => {
// if (section.groupFields.length > 0) {
// section.groupFields = this.dataModel.groups.slice(this.pagination.startIndex, this.pagination.endIndex + 1);
// }
// });
//this.dataModel.groups = this.dataModel.groups.slice(this.pagination.startIndex, this.pagination.endIndex + 1);
}
toggleTOC(){
this.expandedToc = !this.expandedToc;
}
*/
createPDF(elementID: string, pdffilename: string) {
this.pdfService.toPDF(elementID, pdffilename);
}
}

View File

@ -1 +1 @@
<p-progressBar [value]="value" [style]="{'height': '30px'}" [styleClass]="'alwaysVisible'"></p-progressBar>
<!-- <p-progressBar [value]="value" [style]="{'height': '30px'}" [styleClass]="'alwaysVisible'"></p-progressBar> -->

View File

@ -1,4 +1,3 @@
import { Model } from '../../entities/model/model';
import { DatasetModel } from '../../models/DatasetModel';
import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';

View File

@ -41,4 +41,32 @@
position: relative;
margin-top: 40px;
}
.card{
box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.14);
border-radius: 6px;
color: rgba(0,0,0, 0.87);
background: #fff;
}
.card-raised{
box-shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.42), 0 4px 25px 0px rgba(0, 0, 0, 0.12), 0 8px 10px -5px rgba(0, 0, 0, 0.2);
}
@media screen and (max-width: 990px){
#sidebar, #nav-right, #nav-left-button{
display: none;
}
#menu{
display: inline;
}
#main-panel{
padding-left: 0;
-webkit-transition: all 400ms;
-moz-transition: all 400ms;
-ms-transition: all 400ms;
-o-transition: all 400ms;
transition: all 400ms;
}
}

View File

@ -1,6 +1,5 @@
import { Component, OnInit } from '@angular/core';
import { Router, ActivatedRoute } from '@angular/router';
import { ServerService } from '../../app/services/server.service';
import { DashboardService } from '../../app/services/dashboard/dashboard.service';
import { DashboardStatisticsModel } from '../models/dashboard/DashboardStatisticsModel';
import { JsonSerializer } from '../utilities/JsonSerializer';
@ -10,25 +9,29 @@ import { DatasetListingComponent } from '../../app/datasets_new/dataset-listing.
selector: 'homepage',
templateUrl: './homepage.component.html',
styleUrls: ['./homepage.component.css'],
providers: []
providers: []
})
export class HomepageComponent implements OnInit{
export class HomepageComponent implements OnInit {
private userInfo: any;
private dashboardStatisticsData:DashboardStatisticsModel = new DashboardStatisticsModel();
constructor(private serverService: ServerService, private route: ActivatedRoute, private router: Router, private dashBoardService: DashboardService){
private dashboardStatisticsData: DashboardStatisticsModel = new DashboardStatisticsModel();
constructor(
private route: ActivatedRoute,
private router: Router,
private dashBoardService: DashboardService
) {
this.dashboardStatisticsData.totalDataManagementPlanCount = 0;
this.dashboardStatisticsData.totalDataSetCount = 0;
this.dashboardStatisticsData.totalProjectCount = 0;
}
ngOnInit() {
this.dashBoardService.getStatistics().subscribe(results =>{
ngOnInit() {
this.dashBoardService.getStatistics().subscribe(results => {
//let data = results['payload'];
this.dashboardStatisticsData = new JsonSerializer<DashboardStatisticsModel>().fromJSONObject(results,DashboardStatisticsModel);
this.dashboardStatisticsData = new JsonSerializer<DashboardStatisticsModel>().fromJSONObject(results, DashboardStatisticsModel);
})
}

View File

@ -1,42 +1,44 @@
<div class="login">
<div class="row">
<div class="col-md-4 col-sm-6 col-md-offset-4 col-sm-offset-3">
<div class="card col-md-offset-2 col-md-8">
<div class="card-header">
<h4>Login</h4>
<div class="social-btns">
<button mat-icon-button id="googleSignInButton">
<i class="fa fa-google-plus"></i>
</button>
<button mat-icon-button>
<i class="fa fa-linkedin"></i>
</button>
<button mat-icon-button>
<i class="fa fa-facebook-square"></i>
</button>
<button mat-icon-button>
<i class="fa fa-twitter"></i>
</button>
<div class="container">
<div class="container">
<div class="row">
<div class="row col-md-6 col-sm-6 col-md-offset-3 col-sm-offset-3">
<div class="card col-md-8 col-md-offset-2">
<div class="card-header">
<h4>Login</h4>
<div class="social-btns">
<button mat-icon-button id="googleSignInButton">
<i class="fa fa-google-plus"></i>
</button>
<button mat-icon-button>
<i class="fa fa-linkedin"></i>
</button>
<button mat-icon-button>
<i class="fa fa-facebook-square"></i>
</button>
<button mat-icon-button>
<i class="fa fa-twitter"></i>
</button>
</div>
</div>
</div>
<p class="tip">Or Be Classical</p>
<div class="card-form">
<div class="form-row">
<i class="material-icons">email</i>
<mat-input-container color="accent">
<input type="text" matInput placeholder="Email address" />
</mat-input-container>
<p class="tip">Or Be Classical</p>
<div class="card-form">
<div class="form-row">
<i class="material-icons">email</i>
<mat-input-container color="accent">
<input type="text" matInput placeholder="Email address" />
</mat-input-container>
</div>
<div class="form-row">
<i class="material-icons">lock_outline</i>
<mat-input-container color="accent">
<input type="password" matInput placeholder="Password" />
</mat-input-container>
</div>
</div>
<div class="form-row">
<i class="material-icons">lock_outline</i>
<mat-input-container color="accent">
<input type="password" matInput placeholder="Password" />
</mat-input-container>
<div class="card-footer">
<button mat-button (click)="loginBtn()">LET'S GO</button>
</div>
</div>
<div class="card-footer">
<button mat-button (click)="loginBtn()">LET'S GO</button>
</div>
</div>
</div>
</div>

View File

@ -1,3 +1,40 @@
.container{
padding: 15px 30px;
}
.card{
box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.14);
border-radius: 6px;
color: rgba(0,0,0, 0.87);
background: #fff;
}
.card-raised{
box-shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.42), 0 4px 25px 0px rgba(0, 0, 0, 0.12), 0 8px 10px -5px rgba(0, 0, 0, 0.2);
}
.page-title{
margin-top: 40px;
}
@media (min-width: 1200px) {
.container {
width: 100%;
}
}
@media (min-width: 992px) {
.container {
width: 100%;
}
}
@media (min-width: 768px) {
.container {
width: 100%;
}
}
.container{
height: 100%;
position: relative;

View File

@ -1,113 +0,0 @@
import { Component, OnInit, Input,Output,EventEmitter, ViewChild, ElementRef, NgZone } from '@angular/core';
import { ServerService } from '../../app/services/server.service';
import { DropdownField } from '../../app/form/fields/dropdown/field-dropdown';
import { Param } from '../entities/model/param';
import { Dataset } from '../entities/model/dataset';
import { Project } from '../entities/model/project';
import { Router, ActivatedRoute } from '@angular/router';
declare var jquery:any;
declare var $ :any;
@Component({
selector: 'modal',
templateUrl: './modal.html'
})
export class ModalComponent implements OnInit {
@Input() datasetDropDown: DropdownField;
// public dataSetVisibe:boolean;
@Input() datasets: Dataset[];
public project: Project;
//datasetResource :DataTableResource<Dataset>;
@Input() datasetCount = 0;
@ViewChild('modalDmps') modalDmps;
@Input()
public item:any
showValue:boolean
@Input()
get show(){
return this.showValue;
}
@Output()
public showChange = new EventEmitter();
set show(value:any){
this.showValue = value
this.showChange.emit(this.showValue)
}
dataSetValue:boolean
@Input()
get dataSetVisibe(){
return this.dataSetValue;
}
@Output()
public dataSetValueChange = new EventEmitter();
set dataSetVisibe(value:any){
this.dataSetValue = value;
this.dataSetValueChange.emit(this.dataSetValue)
}
constructor(private serverService: ServerService, private router: Router, private ngZone: NgZone) {
this.datasetDropDown = new DropdownField();
this.datasetDropDown.options = [];
//this.dataSetVisibe= false;
this.datasets = [];
this.project = new Project();
}
ngOnInit() {
this.serverService.listDmpsLabelID().subscribe(
(response:any) => {
console.log("response");
console.log(response);
//let params = new Param();
response.forEach((dmp) => {
let params = new Param();
params.key = dmp.id;
params.value = dmp.label;
this.datasetDropDown.options.push(params);
});
}
)
if(this.show) this.showModal()
}
showModal(){
this.project.label = this.item.label;
this.project.abbreviation = this.item.abbreviation;
this.project.uri = this.item.uri;
this.project.id = this.item.id;
$("#exampleModalDmps").modal("show");
}
closeModal(){
$("#exampleModalDmps").modal("hide");
this.show = false;
}
showDatasets(dmpId, event) {
debugger;
this.dataSetVisibe = true;
$("#exampleModalDmps").modal("hide");
this.show = false;
// this.ngZone.run(() => this.router.navigateByUrl('dataset')); //change router
}
afterLoad(){
//this.datasetResource = new DataTableResource(this.datasets);
//this.datasetResource.count().then(count => this.datasetCount = count);
}
}

View File

@ -1,58 +0,0 @@
<div class="modal fade" id="exampleModalDmps" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true" #exampleModalDmps>
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Project</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<form #ModalProjectForm="ngForm">
<div class="form-group">
<label for="recipient-name" class="col-form-label">DMP:</label>
<select class="form-control" [id]="datasetDropDownKey" [(ngModel)]="datasetDropDownKey" [name]="datasetDropDown" #datasetfield>
<option *ngFor="let opt of datasetDropDown.options" [value]="opt.key">{{opt.value}}</option>
</select>
</div>
<div class="form-group">
<label for="label-name" class="form-control-label">Label:{{project.label}}</label>
<input type="text" class="form-control" id="label" [(ngModel)]= "project.label" name = "label">
</div>
<div class="form-group">
<label for="abbreviation-text" class="form-control-label">Abbreviation:</label>
<input class="form-control" id="abbreviation" [(ngModel)]= "project.abbreviation" name = "abbreviation">
</div>
<div class="form-group">
<label for="reference-text" class="form-control-label">Reference:</label>
<input class="form-control" id="reference" [(ngModel)]= "project.reference" name = "reference">
</div>
<div class="form-group">
<label for="uri-text" class="form-control-label">Uri:</label>
<input class="form-control" id="uri" [(ngModel)]= "project.uri" name = "uri">
</div>
<div class="form-group">
<label for="start-date" class="form-control-label">Start Date:</label>
<input class="form-control" id="startDate" [(ngModel)]= "project.startDate" name = "startDate">
</div>
<div class="form-group">
<label for="end-date" class="form-control-label">End Date:</label>
<input class="form-control" id="endDate" [(ngModel)]= "project.endDate" name = "endDate">
</div>
<div class="form-group">
<label for="code-name" class="form-control-label">Code:</label>
<input type="text" class="form-control" id="code" [(ngModel)]= "project.id" name = "id" disabled>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal" (click)= "closeModal()">Close</button>
<button type="button" class="btn btn-primary">Save</button>
<button type="button" class="btn btn-primary" (click)= "showDatasets(datasetfield.value, exampleModalDmps)" >Show Datasets</button>
</div>
</div>
</div>
</div>
<!--DATASET TABLE-->
<!-- <datasets-table *ngIf="dataSetVisibe == true"></datasets-table> -->

View File

@ -1,23 +0,0 @@
import * as _ from "lodash";
import { Pipe, PipeTransform } from "@angular/core";
@Pipe({
name: "datasetstatusFilter"
})
export class DatasetStatusFilterPipe implements PipeTransform {
transform(array: any[], status: number): any {
if (status) {
return _.filter(array, row => {
return (
row.status == status
)
});
}
return array;
}
}

View File

@ -1,28 +0,0 @@
import * as _ from "lodash";
import {Pipe, PipeTransform} from "@angular/core";
@Pipe({
name: "datasetTableFilter"
})
export class DatasetTableFilterPipe implements PipeTransform {
transform(array: any[], query: string): any {
if (query) {
return _.filter(array, row => {
if (row.uri == null) row.uri = "";
if (row.label == null) row.label = "";
if (row.id == null) row.id = "";
return (
row.label.toLowerCase().indexOf(query.toLowerCase()) > -1
//|| row.version == query
//|| row.id.indexOf(query) > -1
)
});
}
return array;
}
}

View File

@ -1,23 +0,0 @@
import * as _ from "lodash";
import { Pipe, PipeTransform } from "@angular/core";
@Pipe({
name: "dmpstatusFilter"
})
export class DmpStatusFilterPipe implements PipeTransform {
transform(array: any[], status: number): any {
if (status) {
return _.filter(array, row => {
return (
row.status == status
)
});
}
return array;
}
}

View File

@ -1,29 +0,0 @@
import * as _ from "lodash";
import {Pipe, PipeTransform} from "@angular/core";
@Pipe({
name: "dmpTableFilter"
})
export class DmpTableFilterPipe implements PipeTransform {
transform(array: any[], query: string): any {
if (query) {
return _.filter(array, row => {
if (row.uri == null) row.uri = "";
if (row.label == null) row.label = "";
if (row.id == null) row.id = "";
return (
row.label.toLowerCase().indexOf(query.toLowerCase()) > -1 ||
//row.version == query ||
row.id.indexOf(query) > -1
)
});
}
return array;
}
}

View File

@ -1,22 +0,0 @@
import * as _ from "lodash";
import {Pipe, PipeTransform} from "@angular/core";
@Pipe({
name: "dmpVersionFilter"
})
export class DmpVersionFilterPipe implements PipeTransform {
transform(array: any[], version: number): any {
if (version) {
return _.filter(array, row => {
return (
row.version == version
)
});
}
return array;
}
}

View File

@ -1,28 +0,0 @@
import * as _ from "lodash";
import {Pipe, PipeTransform} from "@angular/core";
@Pipe({
name: "projectTableFilter"
})
export class ProjectTableFilterPipe implements PipeTransform {
transform(array: any[], query: string, userid : string, onlyMyProjects : boolean): any {
if (query || userid) {
return _.filter(array, row => {
if(onlyMyProjects){
return (row.label.toLowerCase().indexOf(query.toLowerCase()) > -1) && (row.creationUser.id==userid);
}
else{
return row.label.toLowerCase().indexOf(query.toLowerCase()) > -1;
}
});
}
return array;
}
}

View File

@ -1,31 +0,0 @@
import { Pipe, PipeTransform } from '@angular/core';
@Pipe({
name: "statusToString"
})
export class StatusToString implements PipeTransform {
transform(input: any) : any {
if(input < 0) {
return "Deleted";
}
else if(input == 0) {
return "Active";
}
else if(input == 1) {
return "Inactive";
}
else if(input == 2) {
return "Submitted";
}
else if(input == 3) {
return "Cancel";
}
else {
return input.toString();
}
}
}

View File

@ -1,61 +0,0 @@
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);
}
}

View File

@ -1,61 +0,0 @@
import { Injectable } from '@angular/core';
import { FormControl, FormGroup, Validators } from '@angular/forms';
@Injectable()
export class FieldControlService {
constructor(){ }
toFormGroup(fields: any, groups:any){
let form: any = {};
groups.forEach(group => {
let subgroup: any = {};
let subgroupFieldset: any = {};
let fieldset: boolean = false;
group.groupFields.forEach(field => {
//if(field.attributes.validation != undefined)
// field.attributes.validation.forEach(val => {
// if (val.ruleStyle.toString()=="existence"){
// field.required = true;
// }
// if (val.ruleStyle.toString()=="regex"){
// field.regex = val.regex;
// }
// });
subgroup[field.key] = field.required ? new FormControl(field.value || '', Validators.required) : new FormControl(field.value || '')
if (group.compositeFields!=undefined){
fieldset = true;
group.compositeFields.groupFields.forEach(field => {
//subgroupFieldset[field.key] = field.required ? new FormControl(field.value || '', Validators.required) : new FormControl(field.value || '')
subgroup[field.key] = field.required ? new FormControl(field.value || '', Validators.required) : new FormControl(field.value || '');
});
}
});
//PLEASE CHANGE THE group.key TO BE SAME AS THE ONE ON THE DYNAMIC-FORM-GROUP-COMPONENT.html
if (fieldset){
//subgroup["FieldSet"+ group.key] = form[group.key] = new FormGroup(subgroupFieldset);
form[group.key] = new FormGroup(subgroup);
}
else
form[group.key] = new FormGroup(subgroup);
//console.log("FORM_GROUP_GROUP: ");
//console.log(form);
});
//add also the spare fields into the form
fields.forEach(field => {
form[field.key] = field.required ? new FormControl(field.value || '', Validators.required) : new FormControl(field.value || '')
});
//console.log("FORM_GROUP: ");
//console.log(form);
return new FormGroup(form);
}
}

View File

@ -1,29 +0,0 @@
import { Injectable, Inject} from '@angular/core';
import { Observable } from 'rxjs';
import {LocalStorageService} from 'ngx-webstorage';
import 'rxjs/add/operator/map';
import { DOCUMENT } from '@angular/platform-browser';
@Injectable()
export class GlobalVariables {
constructor (private storage : LocalStorageService, @Inject(DOCUMENT) private document) {
}
getFormHasPaging() : boolean{
return this.storage.retrieve('form-paging-flag');
}
setFormHasPaging(formHasPaging : boolean){
this.storage.store('form-paging-flag',formHasPaging);
}
}

View File

@ -1,89 +0,0 @@
import { HttpClient , HttpHeaders, HttpParams } from '@angular/common/http';
import 'rxjs/Rx';
declare var X2JS: any;
export class RestBase {
xml2jsonOBJ: any;
static get parameters() { return [HttpClient] }
constructor(public http : HttpClient) {
}
protocol: string = "http";
hostname: string ="192.168.32.171"
port: number = 8080;
/*
protocol: string = "http";
hostname: string ="dl010.madgik.di.uoa.gr"
port: number = 8080;
webappname: string = "dmp-backend";
*/
proxyPath : string = this.protocol+"://"+this.hostname+":"+this.port+"/proxy/";
loginPath : string = this.protocol+"://"+this.hostname+":"+this.port+"/login/";
restPath: string = this.protocol+"://"+this.hostname+":"+this.port;
public proxy_get(path : string, params? : any){
var options = this.createOptions(params);
return this.http.get<any>(this.proxyPath +"proxy?url="+ path, options);
}
public proxy_get_wQuery(path : string, query: string, params? : any){
var options = this.createOptions(params);
var queryPart = (query) ? "?search="+query : "";
return this.http.get<any>(this.proxyPath +"proxy?url=" + path + queryPart, 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, params? : any){
var options = this.createOptions(params);
return this.http.get<any>(this.restPath + path, options);
}
public post(path : string, data : any, params? : any){
var options = this.createOptions(params);
return this.http.post<any>(this.restPath + path, JSON.stringify(data), options);
}
private createOptions(parameters : any){
/* var token = this.tokenService.getToken();
var provider: TokenProvider = this.tokenService.getProvider();
var params = new HttpParams();
if(parameters != null){
Object.entries(parameters).forEach( entry => {
params = params.set(entry[0], entry[1]);
});
}
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 null;
}
}

View File

@ -1,193 +0,0 @@
import { Injectable, ReflectiveInjector, Injector } from '@angular/core';
import { JsonObjest } from '../../app/entities/JsonObject.class';
import { DatasetProfile } from '../entities/datasetprofile';
import { Project } from '../entities/model/project';
import { RestBase } from './rest-base';
import 'rxjs/Rx';
import './../../assets/xml2json.min.js';
declare var X2JS: any;
@Injectable()
export class ServerService {
constructor(private restBase: RestBase) {
}
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 getDatasetByID(datasetId: string) {
return this.restBase.get("datasets/" + datasetId);
}
public setDataset(dataset) {
return this.restBase.post("dataset/update", dataset);
}
public getAllDmps() {
return this.restBase.get("dmp/getAll");
}
public listDmpsLabelID() {
return this.restBase.get("dmp/listDMPLabelID");
}
public getDmp(dmpid: string, eager?: boolean) {
if (eager)
return this.restBase.get("dmps/" + dmpid, { "eager": true });
else
return this.restBase.get("dmps/" + dmpid, { "eager": true });
}
public getDmpHistory(dmpid: string) {
return this.restBase.get("dmp/history/" + 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, eager?: boolean) {
if (eager)
return this.restBase.get("projects/" + projectID, { "eager": true });
else
return this.restBase.get("projects/" + projectID, { "eager": false });
}
public listProjectsLabelID() {
return this.restBase.get("project/listAllLabelIDs");
}
public listDmpsUser() {
return this.restBase.get("dmp/listDMPLabelID");
}
public getProjectsOfUser() {
return this.restBase.get("project/getofuser");
}
public createProject(data: any) {
return this.restBase.post("project/createofuser", data);
}
public updateProject(data: any) {
return this.restBase.post("project/update", data);
}
public getDmpsOfProject(projectID: string) {
return this.restBase.get("project/dmps", { "id": projectID });
}
public getAllDataSet() {
return this.restBase.get("dataset/getAll");
}
public getDmpOfUser() {
return this.restBase.get("dmp/getofuser");
}
public createDmpForCurrentUser(data: any) {
return this.restBase.post("dmp/createofuser", data);
}
public updateDmp(data: any) {
return this.restBase.post("dmp/update", data);
}
public cloneDmp(data: any) {
return this.restBase.post("dmp/cloneforuser", data);
}
public deleteDmp(dmp: any) {
return this.restBase.post("dmp/softdelete", dmp);
}
public getDatasetForDmp(data: any) {
return this.restBase.post("dmp/getdatasets", data);
}
public createDatasetForDmp(data: any) {
return this.restBase.post("dataset/create", data);
}
public getAllDatsetsProfile() {
return this.restBase.get("datasetprofile/getAll");
}
public getDatasetProfileByID(id) {
return this.restBase.get("datasetprofiles/" + id);
}
public updateDatsetsProfile(data: any) {
return this.restBase.post("dataset/update", data);
}
public deleteDataset(dataset: any) {
return this.restBase.post("dataset/softdelete", dataset);
}
public getUserByID(id: string) {
return this.restBase.get("users/" + id);
}
public whoami() {
return this.restBase.get("user/whoami");
}
public updateDataset(id: string, properties: any) {
return this.restBase.post("datasetprofile/save/" + id, properties);
}
public getSingleDataset(id) {
return this.restBase.get("datasetprofile/get/" + id);
}
getThroughProxy(url: string, query: string) {
return this.restBase.proxy_get_wQuery(url, query);
}
public searchDatasetRegistry(like: string) {
return this.restBase.get("external/registries" + "?query=" + like);
}
public searchDatasetRepository(like: string) {
return this.restBase.get("external/datarepos" + "?query=" + like);
}
public searchDatasetService(like: string) {
return this.restBase.get("external/services" + "?query=" + like);
}
public searchDMPResearchers(like: string) {
return this.restBase.get("external/researchers" + "?query=" + like);
}
public searchDMPOrganizations(like: string) {
return this.restBase.get("external/organisations" + "?query=" + like);
}
}

View File

@ -1,32 +0,0 @@
import {Injectable} from '@angular/core';
// declare var $ :any;
// import * as jsPDF from '../../../../node_modules/jspdf/dist/jspdf.min';
@Injectable()
export class PDFService {
constructor() {
}
toPDF(elementID : string, filename : string){
// var pdf = new jsPDF();
// pdf.fromHTML($('#'+elementID).html(), 15, 15, {
// 'width': 270
// //,'elementHandlers': specialElementHandlers
// });
// pdf.save(filename);
}
}

View File

@ -1,22 +0,0 @@
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 { TabComponent } from './tabs.component';
import { TabRoutingModule } from './tabs-routing.module';
@NgModule({
imports: [
CommonModule,
FormsModule,
TabRoutingModule,
//DataTableModule
],
declarations: [
TabComponent
],
providers: [ ]
})
export class TabModule {}

View File

@ -1,35 +0,0 @@
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { TabComponent } from './tabs.component';
import { AuthGuard } from '../guards/auth.guard';
import { ProjectListingComponent } from '../projects/project-listing.component';
import { DataManagementPlanListingComponent } from '../dmps/dmp-listing.component';
const tabsRoutes: Routes = [
{
path: 'tabs', component: TabComponent, canActivate: [AuthGuard],
children: [
{
path: 'projects',
component: ProjectListingComponent
},
{
path: 'dmps',
component: DataManagementPlanListingComponent
}
]
},
// { path: 'tabs/projects', component: ProjectListingComponent }, // canActivate: [AuthGuard]
// { path: 'tabs/dmps', component: DataManagementPlanListingComponent }
];
@NgModule({
imports: [
RouterModule.forChild(tabsRoutes)
],
exports: [
RouterModule
]
})
export class TabRoutingModule { }

View File

@ -1,26 +0,0 @@
import { Component } from '@angular/core';
@Component({
selector: 'my-app',
template: `
<ul class="nav nav-tabs">
<li class="nav-item">
<a class="nav-link" routerLink="dmps" routerLinkActive="active">DMPs</a>
</li>
<li class="nav-item">
<a class="nav-link active" routerLink="projects" routerLinkActive="active">Projects</a>
</li>
</ul>
`
})
export class TabComponent {
}
// <nav>
// <a routerLink="projects" routerLinkActive="active">Projects</a>
// <a routerLink="dmps" routerLinkActive="active">My Dmps</a>
// </nav>

View File

@ -1,562 +0,0 @@
export const TestModel = {
"rules": [
{
"sourceField": "dataSummary",
"targetField": "metadataStandarsA211",
"requiredValue": "true",
"type": "visibility",
},
{
"sourceField": "radioChoices",
"targetField": "notlistedUrlA211",
"requiredValue": "between15and18",
"type": "visibility",
},
{
"sourceField": "dataSummary",
"targetField": "freeOfChargeGroupCommentA213",
"requiredValue": "true",
"type": "visibility",
},
{
"sourceField": "useMetadataQ211",
"targetField": "noMetadata",
"requiredValue": "true",
"type": "visibility",
},
{
"sourceField": "FindDataMetadataGroup",
"targetField": "notlistedCommentA211",
"requiredValue": "true",
"type": "visibility",
},
{
"sourceField": "dataSummary",
"targetField": "standardisedVocabulariesA212",
"requiredValue": "true",
"type": "visibility",
},
{
"sourceField": "useVocabulariesQ212",
"targetField": "notlistedVocabularyA212",
"requiredValue": "true",
"type": "visibility",
},
{
"sourceField": "useVocabulariesQ212",
"targetField": "noMetadataVocabularyA212",
"requiredValue": "false",
"type": "visibility",
},
{
"sourceField": "notlistedVocabularyA212",
"targetField": "notlistedVocUrlA212",
"requiredValue": "true",
"type": "visibility",
},
{
"sourceField": "notlistedVocabularyA212",
"targetField": "notlistedVocCommentA212",
"requiredValue": "true",
"type": "visibility",
}
],
"sections": [
{
"id": "sumData",
"defaultVisibility": "true",
"page": "1",
"title": "1 Data Summary",
"description": " Fill in the fields to describe your data model ",
"ordinal": "1",
"extendedDescription": "",
"sections": [],
"fieldGroups":
[
{
"id": "dataSummaryGroup",
"defaultVisibility": "true",
"page": "1",
"title": "Data Summary",
"description": "",
"extendedDescription": "",
"compositeFields": [
{
"fields":
[
{
"id": "dataSummary",
"defaultVisibility": "true",
"title": "",
"description": "",
"extendedDescription": "",
"viewStyle": {
"renderStyle": "checkBox",
"cssClass": ""
},
"defaultValue":{
"type":"any",
"value":""
},
"multiplicity":{
"min":"1",
"max":"1"
},
"data": {
}
},
{
"id": "radioChoices",
"defaultVisibility": "true",
"title": "",
"description": "",
"extendedDescription": "",
"viewStyle": {
"renderStyle": "radiobox",
"cssClass": ""
},
"defaultValue":{
"type":"any",
"value":""
},
"multiplicity":{
"min":"1",
"max":"1"
},
"data": {
"options": [
{ "label": "Over 18", "value": "over18" },
{ "label": "Under 15", "value": "under15" },
{ "label": "Between 15 - 18", "value": "between15and18" }
]
}
}
]
}
]
}
]
},
{
"id": "fairData",
"ordinal": "2",
"defaultVisibility": "true",
"page": "1",
"extendedDescription": "",
"title": "2 Fair Data",
"sections": [
{
"id": "dataMetadata",
"defaultVisibility": "true",
"page": "1",
"ordinal": 1,
"title": "2.1 Making data findable, including provisions for metadata",
"sections": [],
"fieldGroups": [
{
"id": "FindDataMetadataGroup",
"section": "dataMetadata",
"defaultVisibility": "true",
"page": "1",
"title": "Making data findable, including provisions for metadata",
"description": "Making data findable, including provisions for metadata",
"extendedDescription": "FieldGroup Description",
"compositeFields": [
{
"fields":
[
{
"id": "useMetadataQ211",
"defaultVisibility": "true",
"title": "Q2.1.1 Will you use metadata to describe the data?",
"description": "User can select from a list of metadata standards. If they cannot find the standard in the list provided then they should choose \"not listed\". Selecting this will result in a field in which the user can insert the URL to the description of the metadata scheme used. A \"comments\" box should exist to allow users to add comments. They may select more than one metadata standard. They may specify more than one URL when selecting \"not listed\". They are also presented with a field in which to specify the location of the metadata service. Users can select the \"no metadata\" button to specify no metadata will be used to describe the data.",
"extendedDescription": "FieldGroup Description",
"viewStyle": {
"renderStyle": "booleanDecision",
"cssClass": ""
},
"defaultValue":{
"type":"any",
"value":""
},
"multiplicity":{
"min":"1",
"max":"1"
},
"data": {
}
}
]
},
{
"fields":
[
{
"id": "metadataStandarsA211",
"defaultVisibility": "true",
"title": "Metadata standards",
"description": "The data will be described by metadata that follows the metadata standards described in <url1>, <url2>, ? The data will be described by metadata that follows the metadata schema described in <not-listed-url1>, <not-listed-url2>. The metadata will be stored in the service located at <metadata-repo-url>",
"extendedDescription": "",
"viewStyle": {
"renderStyle": "combobox",
"cssClass": ""
},
"defaultValue":{
"type":"any",
"value":""
},
"multiplicity":{
"min":"1",
"max":"1"
},
"data": {
"type": "autocomplete",
"url": "http://dionysus.di.uoa.gr:8080/dmp-backend/rest/external/datarepos?query=gree"
}
}]
},
{
"fields":
[
{
"id": "notlistedA211",
"defaultVisibility": "false",
"title": "Not listed",
"description": "",
"extendedDescription": "",
"viewStyle": {
"renderStyle": "checkBox",
"cssClass": ""
},
"defaultValue":{
"type":"any",
"value":""
},
"multiplicity":{
"min":"1",
"max":"1"
},
"data": {
}
}
]
},
{
"fields":
[
{
"id": "notlistedUrlA211",
"defaultVisibility": "false",
"title": "Url",
"description": "URL to the description of the metadata scheme used",
"extendedDescription": "",
"viewStyle": {
"renderStyle": "freetext",
"cssClass": ""
},
"defaultValue":{
"type":"any",
"value":""
},
"multiplicity":{
"min":"1",
"max":"1"
},
"data": {
}
}]
},
{
"fields":
[
{
"id": "notlistedCommentA211",
"defaultVisibility": "false",
"title": "Comments",
"description": "",
"extendedDescription": "",
"viewStyle": {
"renderStyle": "freetext",
"cssClass": ""
},
"defaultValue":{
"type":"any",
"value":""
},
"multiplicity":{
"min":"1",
"max":"1"
},
"data": {
}
}]
},
{
"fields":
[
{
"id": "noMetadata",
"defaultVisibility": "false",
"title": "The data will not be described by any metadata.",
"description": "",
"extendedDescription": "",
"viewStyle": {
"renderStyle": "checkBox",
"cssClass": ""
},
"defaultValue":{
"type":"any",
"value":""
},
"multiplicity":{
"min":"1",
"max":"1"
},
"data": {
}
}
]
}
]
},
{
"id": "VocabulariesGroup",
"defaultVisibility": "true",
"page": "1",
"ordinal": 1,
"title": "Vocabularies",
"description": "Vocabularies",
"extendedDescription": "FieldGroup Description",
"compositeFields": [
{
"fields": [
{
"id": "useVocabulariesQ212",
"defaultVisibility": "true",
"title": "Q2.1.2 Will your metadata use standardised vocabularies?",
"description": "User selects from a drop-down list of existing standardised vocabularies or \"not listed\" or \"none\". There should be a \"comments\" fields for additional information. If \"not listed\" is selected the user is presented with two additional fields in which the user can put the URL to the new vocabulary along with a short description. The user should be allowed to select more than one option.",
"extendedDescription": "FieldGroup Description",
"viewStyle": {
"renderStyle": "booleanDesicion",
"cssClass": ""
},
"defaultValue":{
"type":"any",
"value":""
},
"multiplicity":{
"min":"1",
"max":"1"
},
"data": {
}
}]
},
{
"fields": [
{
"id": "standardisedVocabulariesA212",
"defaultVisibility": "false",
"title": "Existing standardised vocabularies",
"description": "The metadata will make use of the standardised vocabulary <url>",
"extendedDescription": "",
"viewStyle": {
"renderStyle": "combobox",
"cssClass": ""
},
"defaultValue":{
"type":"any",
"value":""
},
"multiplicity":{
"min":"1",
"max":"1"
},
"data": {
"type": "wordlist",
"values": [
{ "label": "Mitsos", "value": "mitsakos" },
{ "label": "Kitsos", "value": "kitsakos" },
{ "label": "Panagiotis", "value": "mpotis" }
]
}
}]
},
{
"fields": [
{
"id": "notlistedVocabularyA212",
"defaultVisibility": "false",
"title": "Not listed vocabulary",
"description": "",
"extendedDescription": "",
"viewStyle": {
"renderStyle": "checkBox",
"cssClass": ""
},
"defaultValue":{
"type":"any",
"value":""
},
"multiplicity":{
"min":"1",
"max":"1"
},
"data": {
}
}]
},
{
"fields": [
{
"id": "notlistedVocUrlA212",
"defaultVisibility": "false",
"title": "Vocabulary Url",
"description": "The user can put the URL to the new vocabulary",
"extendedDescription": "",
"viewStyle": {
"renderStyle": "freetext",
"cssClass": ""
},
"defaultValue":{
"type":"any",
"value":""
},
"multiplicity":{
"min":"1",
"max":"1"
},
"data": {
}
}]
},
{
"fields": [
{
"id": "notlistedVocCommentA212",
"defaultVisibility": "false",
"title": "Comments",
"description": "Vocabulary short description",
"extendedDescription": "",
"viewStyle": {
"renderStyle": "freetext",
"cssClass": ""
},
"defaultValue":{
"type":"any",
"value":""
},
"multiplicity":{
"min":"1",
"max":"1"
},
"data": {
}
}]
},
{
"fields": [
{
"id": "noMetadataVocabularyA212",
"defaultVisibility": "false",
"title": "The metadata will not make use of any vocabulary",
"description": "",
"extendedDescription": "",
"viewStyle": {
"renderStyle": "checkBox",
"cssClass": ""
},
"defaultValue":{
"type":"any",
"value":""
},
"multiplicity":{
"min":"1",
"max":"1"
},
"data": {
}
}
]
}
]
},
{
"id": "FreeOfChargeGroup",
"defaultVisibility": "true",
"page": "1",
"ordinal": 1,
"title": "Metadata Available",
"description": "Metadata Available",
"extendedDescription": "FieldGroup Description",
"compositeFields": [
{
"fields": [
{
"id": "freeOfChargeGroupQ213",
"defaultVisibility": "true",
"title": "Q2.1.3 Will you use standardised formats for some or all of your data.",
"description": "User is presented with a choice of ?yes?, ?no?. There should be a ?comments? field for additional information.",
"extendedDescription": "Field Description",
"viewStyle": {
"renderStyle": "booleanDesicion",
"cssClass": ""
},
"defaultValue":{
"type":"any",
"value":""
},
"multiplicity":{
"min":"1",
"max":"1"
},
"data": {
}
}]
},
{
"fields": [
{
"id": "freeOfChargeGroupCommentA213",
"defaultVisibility": "true",
"title": "Comments",
"description": "",
"extendedDescription": "",
"viewStyle": {
"renderStyle": "freetext",
"cssClass": ""
},
"defaultValue":{
"type":"any",
"value":""
},
"multiplicity":{
"min":"1",
"max":"1"
},
"data": {
}
}
]
}
]
}
]
}
]
}
]
}

View File

@ -1,62 +0,0 @@
.row {
padding-top:30px;
padding-bottom:30px;
}
/* START - FOR DETAILS MODALS */
.modal-content {
overflow-y: scroll;
}
.modal.modal-fullscreen .modal-dialog,
.modal.modal-fullscreen .modal-content {
position: absolute;
left: 15%;
right: 15%;
top: 5%;
bottom: 5%;
}
.modal.modal-fullscreen .modal-dialog {
margin: 0;
width: 70%;
animation-duration:0.5s;
}
.modal.modal-fullscreen .modal-content {
-moz-border-radius: 20px;
border-radius: 20px;
/*
border: none;
-moz-border-radius: 0;
border-radius: 0;
-webkit-box-shadow: inherit;
-moz-box-shadow: inherit;
-o-box-shadow: inherit;
box-shadow: inherit;
*/
/* change bg color below */
/* background:#1abc9c; */
}
.modal.modal-fullscreen.force-fullscreen {
/* Remove the padding inside the body */
}
.modal.modal-fullscreen.force-fullscreen .modal-body {
padding: 0;
}
.modal.modal-fullscreen.force-fullscreen .modal-header,
.modal.modal-fullscreen.force-fullscreen .modal-footer {
left: 0;
position: absolute;
right: 0;
}
.modal.modal-fullscreen.force-fullscreen .modal-header {
top: 0;
}
.modal.modal-fullscreen.force-fullscreen .modal-footer {
bottom: 0;
}
/* END - FOR DETAILS MODALS */

View File

@ -1,76 +0,0 @@
<div class="modal fade modal-fullscreen footer-to-bottom" id="dmp-details-modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog animated zoomInLeft">
<div class="modal-content" id="dmp-modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true"><i class="fa fa-times" aria-hidden="true"></i></button>
<h4 style="text-align:center;" class="modal-title"><b>{{dmp?.label}}</b></h4>
</div>
<div class="modal-body">
<!--
{{dmp | json}}
-->
<div class="container-fluid">
<div class="row">
<!--<div class="col-md-6 row-cell"><b>Digital Management Plan: </b>{{dmp?.label}}</div>-->
<div class="col-md-12 row-cell"><b>Belongs to Project: </b>{{dmp?.project?.label}}</div>
</div>
<div class="row">
<div class="col-md-6 row-cell"><b>Current version:</b><span class="badge">{{dmp?.version}}</span></div>
<div class="col-md-6 row-cell"><b>Previous DMPs:</b>
<ul>
<li *ngFor="let previous of previousDMPs">{{ previous?.label }}</li>
</ul>
</div>
</div>
<div class="row">
<div class="col-md-6 row-cell">
<b>Creator:</b> {{dmp?.creator?.name}}
</div>
<div class="col-md-6 row-cell"><b>Users associated:</b>
<ul>
<li *ngFor="let user of dmp?.users">{{ user?.name }}</li>
</ul>
</div>
</div>
<div class="row">
<div class="col-md-6 row-cell"><b>Researchers:</b>
<div *ngIf="dmp?.researchers?.length==0" style="opacity: 0.5;">None</div>
<ul *ngIf="dmp?.researchers?.length>1">
<li *ngFor="let researcher of dmp?.researchers">{{ researcher?.name }}</li>
</ul>
</div>
<div class="col-md-6 row-cell"><b>Organisations:</b>
<div *ngIf="dmp?.organizations?.length==0" style="opacity: 0.5;">None</div>
<ul *ngIf="dmp?.organizations?.length>1">
<li *ngFor="let organisation of dmp?.organizations">{{ organisation?.name }}</li>
</ul>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<!--
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary">Save changes</button>
-->
</div>
</div>
</div>
</div>

View File

@ -1,80 +0,0 @@
import { Component, OnInit } from '@angular/core';
import { Router, ActivatedRoute, ParamMap, Params } from '@angular/router';
import {Location} from '@angular/common';
import { ServerService } from '../../../app/services/server.service';
import '../../../assets/perfect-scrollbar/perfect-scrollbar.js';
declare var PerfectScrollbar : any;
declare var $ :any;
@Component({
selector: 'dmp-detailed',
templateUrl: './dmp-detailed.component.html',
styleUrls: [
'../../../assets/perfect-scrollbar/perfect-scrollbar.css',
'./dmp-detailed.component.css'
]
})
export class DmpDetailedComponent implements OnInit {
constructor(private serverService: ServerService, private router: Router, private _location: Location, private route: ActivatedRoute) {
}
dmp : any;
previousDMPs : any [] = new Array<any>();
ngOnInit() {
let sub = this.route.queryParams.subscribe(params => {
let dmpid = params.dmpid;
this.serverService.getDmp(dmpid,true).subscribe(
response => {
this.dmp = response;
//get also the labels of all previous dmps (not eagerly, just fetch the dmp tuple)
if(this.dmp.previous != null && this.dmp.previous != ""){
this.serverService.getDmpHistory(this.dmp.id).subscribe(
response => {
//this.previousDMPs = response;
},
error => {
console.log("Could not get previous DMPs (history)");
}
)
}
//fill-in also the creator
this.serverService.getUserByID(this.dmp.creator.id).subscribe(
response => {
this.dmp.creator = response;
},
error => {
console.log("Could not fetch creator details...");
}
)
$('#dmp-details-modal').modal('show');
},
error => {
console.log("Could not load dmp");
}
)
});
var dmpDetailsModalScroller = new PerfectScrollbar("#dmp-modal-content");
}
}

View File

@ -1,249 +0,0 @@
.row {
padding-top:30px;
padding-bottom:30px;
}
.grayed{
opacity: 50%;
}
/* START - FOR DETAILS MODALS */
.modal-content {
overflow-y: scroll;
}
.modal.modal-fullscreen .modal-dialog,
.modal.modal-fullscreen .modal-content {
position: absolute;
left: 15%;
right: 15%;
top: 5%;
bottom: 5%;
}
.modal.modal-fullscreen .modal-dialog {
margin: 0;
width: 70%;
animation-duration:0.5s;
}
.modal.modal-fullscreen .modal-content {
-moz-border-radius: 20px;
border-radius: 20px;
/*
border: none;
-moz-border-radius: 0;
border-radius: 0;
-webkit-box-shadow: inherit;
-moz-box-shadow: inherit;
-o-box-shadow: inherit;
box-shadow: inherit;
*/
/* change bg color below */
/* background:#1abc9c; */
}
.modal.modal-fullscreen.force-fullscreen {
/* Remove the padding inside the body */
}
.modal.modal-fullscreen.force-fullscreen .modal-body {
padding: 0;
}
.modal.modal-fullscreen.force-fullscreen .modal-header,
.modal.modal-fullscreen.force-fullscreen .modal-footer {
left: 0;
position: absolute;
right: 0;
}
.modal.modal-fullscreen.force-fullscreen .modal-header {
top: 0;
}
.modal.modal-fullscreen.force-fullscreen .modal-footer {
bottom: 0;
}
/* END - FOR DETAILS MODALS */
/* START - DATE CALENDAR VISUALISATION */
@import url(https://fonts.googleapis.com/css?family=Source+Code+Pro|Oswald);
/****************************************/
/* Styling rules, such as font and colors */
.date-as-calendar {
font-variant: normal;
font-style: normal;
font-weight: normal;
font-family: "Helvetica", "Arial", sans-serif;
/* It seems vertical-align: baseline does not work correctly with display: inline-flex. */
vertical-align: top;
/* margin: 1ex; */
color: black;
background: white;
background : linear-gradient(to bottom right, #FFF 0%, #EEE 100%);
border: 1px solid #888;
border-radius: 3px;
overflow: hidden;
box-shadow: 2px 2px 2px -2px black;
}
.date-as-calendar .weekday,
.date-as-calendar .day,
.date-as-calendar .month,
.date-as-calendar .year {
text-align: center;
line-height: 1.0;
}
.date-as-calendar .month {
font-family: "Oswald", sans-serif;
text-transform: uppercase;
background: #B11;
background : linear-gradient(to bottom right, #D66 0%, #A00 100%);
color: white;
}
/****************************************/
/* Layout rules using position: absolute and pixels. */
.position-pixels.date-as-calendar {
display: inline-block;
position: relative;
width: 64px;
height: 64px;
}
.position-pixels.date-as-calendar .weekday,
.position-pixels.date-as-calendar .day,
.position-pixels.date-as-calendar .month,
.position-pixels.date-as-calendar .year {
display: block;
position: absolute;
left: 0;
right: 0;
width: 100%;
height: 1em;
}
.position-pixels.date-as-calendar .month {
top: 0px;
font-size: 12px;
padding: 2px 0;
}
.position-pixels.date-as-calendar .weekday {
top: 16px;
font-size: 10px;
}
.position-pixels.date-as-calendar .day {
top: 26px;
font-size: 24px;
}
.position-pixels.date-as-calendar .year {
top: 50px;
font-size: 14px;
}
/****************************************/
/* Layout rules using position: absolute and relative dimensions using em. */
.position-em.date-as-calendar {
display: inline-block;
position: relative;
width: 4em;
height: 4em;
}
.position-em.date-as-calendar .weekday,
.position-em.date-as-calendar .day,
.position-em.date-as-calendar .month,
.position-em.date-as-calendar .year {
display: block;
position: absolute;
left: 0;
right: 0;
width: 100%;
height: 1em;
}
.position-em.date-as-calendar .month {
top: 0px;
font-size: 0.75em;
padding: 0.1em 0;
}
.position-em.date-as-calendar .weekday {
top: 1.6em;
font-size: 0.6125em;
}
.position-em.date-as-calendar .day {
top: 1.1em;
font-size: 1.5em
}
.position-em.date-as-calendar .year {
bottom: 0px;
font-size: 0.87750em;
}
/****************************************/
/* Layout rules using display: inline-flex and relative dimensions using em. */
.inline-flex.date-as-calendar {
display: inline-flex;
flex-direction: column;
flex-wrap: nowrap;
justify-content: space-between;
width: 4em;
height: 4em;
}
.inline-flex.date-as-calendar .weekday,
.inline-flex.date-as-calendar .day,
.inline-flex.date-as-calendar .month,
.inline-flex.date-as-calendar .year {
display: block;
flex: 1 1 auto;
}
.inline-flex.date-as-calendar .month {
order: 1;
font-size: 0.75em;
padding: 0.1em 0;
}
.inline-flex.date-as-calendar .weekday {
order: 2;
font-size: 0.6125em;
}
.inline-flex.date-as-calendar .day {
order: 3;
font-size: 1.5em;
}
.inline-flex.date-as-calendar .year {
order: 4;
font-size: 0.87750em;
}
/****************************************/
/* Multiple sizes. */
.date-as-calendar.size0_5x {
font-size: 8px;
}
.date-as-calendar.size0_75x {
font-size: 12px;
}
.date-as-calendar.size1x {
font-size: 16px;
}
.date-as-calendar.size1_25x {
font-size: 20px;
}
.date-as-calendar.size1_5x {
font-size: 24px;
}
.date-as-calendar.size1_75x {
font-size: 28px;
}
.date-as-calendar.size2x {
font-size: 32px;
}
.date-as-calendar.size3x {
font-size: 48px;
}
/* END - DATE CALENDAR VISUALISATION */

View File

@ -1,97 +0,0 @@
<div class="modal fade modal-fullscreen footer-to-bottom" id="project-details-modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog animated zoomInLeft">
<div class="modal-content" id="project-modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true"><i class="fa fa-times" aria-hidden="true"></i></button>
<h4 class="modal-title" style="text-align:center;"><b>{{project?.label}}</b></h4>
</div>
<div class="modal-body">
<!--
{{project | json}}
-->
<div class="container-fluid">
<!--
<div class="row">
<div class="col-md-12 row-cell"><b>Project name: </b>{{project?.label}}</div>
</div>
-->
<div class="row">
<div class="col-md-6 row-cell"><b>Abbreviation: </b>{{project?.abbreviation}}</div>
<div class="col-md-6 row-cell"><b>URI : </b><a href="{{project?.uri}}">{{project?.uri}}</a></div>
</div>
<div class="row">
<div class="col-md-3 row-cell"><b>Short description: </b></div>
<div class="col-md-9 row-cell">{{project?.description}}</div>
</div>
<div class="row">
<div class="col-md-1">
<b>Begins:</b>
</div>
<div class="col-md-2">
<time class="date-as-calendar position-pixels">
<span class="weekday">{{project?.startdate | date:'EEEE' }}</span>
<span class="day">{{project?.startdate | date:'dd' }}</span>
<span class="month">{{project?.startdate | date:'MMMM' }}</span>
<span class="year">{{project?.startdate | date:'y' }}</span>
</time>
</div>
<div class="col-md-1">
<b>Ends:</b>
</div>
<div class="col-md-2">
<time class="date-as-calendar position-pixels">
<span class="weekday">{{project?.enddate | date:'EEEE' }}</span>
<span class="day">{{project?.enddate | date:'dd' }}</span>
<span class="month">{{project?.enddate | date:'MMMM' }}</span>
<span class="year">{{project?.enddate | date:'y' }}</span>
</time>
</div>
</div>
<div class="row">
<div class="col-md-4">
<b>Created by: </b> {{project?.creationUser?.name}}
</div>
<div class="col-md-4">
<b>at: </b> {{project?.created | date:'medium' }}
</div>
</div>
<div class="row">
<div class="col-md-6 row-cell"><b>Associated DMPs:</b>
<ul>
<li *ngFor="let dmp of project?.dmps">
{{ dmp?.label }}
<span style="opacity:0.6;">(owner: {{ users.get(dmp?.creator) }}) </span>
</li>
</ul>
</div>
</div>
<!--
STUFF NOT USED:
status
-->
</div>
<!--
<p class=""></p>
-->
</div>
<!--
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary">Save changes</button>
</div>
-->
</div>
</div>
</div>

View File

@ -1,92 +0,0 @@
import { Component, OnInit } from '@angular/core';
import { Router, ActivatedRoute, ParamMap, Params } from '@angular/router';
import {Location} from '@angular/common';
import { ServerService } from '../../../app/services/server.service';
import '../../../assets/perfect-scrollbar/perfect-scrollbar.js';
declare var PerfectScrollbar : any;
declare var $ :any;
@Component({
selector: 'project-detailed',
templateUrl: './project-detailed.component.html',
styleUrls: [
'../../../assets/perfect-scrollbar/perfect-scrollbar.css',
'./project-detailed.component.css'
]
})
export class ProjectDetailedComponent implements OnInit {
constructor(private serverService: ServerService, private router: Router, private _location: Location, private route: ActivatedRoute) {
}
users : Map<string, string> = new Map<string, string>();
project : any;
ngOnInit() {
let sub = this.route.queryParams.subscribe(params => {
let projectid = params.projectid;
this.serverService.getProject(projectid).subscribe(
(response:any) => {
this.project = response;
$('#project-details-modal').modal('show');
//get also projects of dmp (there's a problem with the List<> serialization on server - side)
this.serverService.getDmpsOfProject(projectid).subscribe(
response => {
this.project.dmps = response;
this.populateUsersMap(this.project);
//this.get
},
error => {
console.log("Could not fetch project's dmps");
}
)
},
error => {
console.log("Could not load project");
}
)
});
var projectDetailsModalScroller = new PerfectScrollbar("#project-modal-content");
}
getUserByID(userid: string){
return this.serverService.getUserByID(userid); //Notice: returns Observable !
}
async populateUsersMap1(project){
this.users.clear();
for(var i=0;i<project.dmps.length;i++){
debugger;
const user:any = await this.serverService.getUserByID(project.dmps[i].creator).toPromise();
this.users.set(project.dmps[i].creator, user.name);
}
}
private populateUsersMap(project){
this.users.clear();
project.dmps.forEach(dmp => {
if(!this.users.has(dmp.creator)){
this.serverService.getUserByID(dmp.creator).subscribe(
(user:any) => {
this.users.set(dmp.creator, user.name);
},
error => {
}
)
console.log("USERS: "+JSON.stringify(this.users))
}
});
}
}

View File

@ -1,2 +0,0 @@
<!-- breadcrumb bar -->
<p-breadcrumb *ngIf="breadcrumbData?.length != 0" [model]="breadcrumbData" [home]="breadcrumbHome"></p-breadcrumb>

View File

@ -1,25 +0,0 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { BreadcrumbComponent } from './breadcrumb.component';
describe('BreadcrumbComponent', () => {
let component: BreadcrumbComponent;
let fixture: ComponentFixture<BreadcrumbComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ BreadcrumbComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(BreadcrumbComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should be created', () => {
expect(component).toBeTruthy();
});
});

View File

@ -1,110 +0,0 @@
import { Component, OnInit } from '@angular/core';
import { Router, CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot, ActivatedRoute, NavigationEnd } from '@angular/router';
import {BreadcrumbModule,MenuItem} from 'primeng/primeng';
@Component({
selector: 'breadcrumb',
templateUrl: './breadcrumb.component.html',
styleUrls: ['./breadcrumb.component.css']
})
export class BreadcrumbComponent implements OnInit {
breadcrumbHome: MenuItem = {icon: 'fa fa-home', routerLink: "/welcome"};
breadcrumbData: MenuItem[] = new Array<MenuItem>();
ngOnInit() {
}
constructor(private router: Router, private route: ActivatedRoute) {
router.events.subscribe(
event =>{
console.log("Router event captured")
console.log(event)
if(event instanceof NavigationEnd){
console.log(event.urlAfterRedirects);
console.log(this.route);
this.route.children.forEach( child => {
let menuItem = this.guessMenuItemFromActivatedRoute(child, event);
this.adaptBreadcrumbByMenuItem(menuItem);
})
}
});
}
guessMenuItemFromActivatedRoute(activatedRoute : any, event : NavigationEnd) { //it's important to leave it as "any"
let menuItem : MenuItem = null;
let isBaseComponent : boolean = false;
let componentName = activatedRoute.component.name;
let params = activatedRoute.queryParams.getValue();
let url = activatedRoute.url.getValue()[0].path;
//let url = event.urlAfterRedirects.split("?")[0].split("(")[0];
let label = null;
if(componentName == "ProjectsComponent") {
label = "Projects";
this.breadcrumbData.length = 0;
}
if(componentName == "DmpComponent"){
label = "My Data Management Plans";
this.breadcrumbData.length = 0;
}
if(componentName == "DatasetsComponent"){
label = "Datasets of DMP '"+params["label"]+"'";
}
if(componentName == "DynamicFormComponent"){
label = "Form of dataset '"+params["label"]+"'";
}
if(componentName == "DmpDetailedComponent"){
label = "Details of DMP '"+params["label"]+"'";
}
if(componentName == "ProjectDetailedComponent"){
label = "Details of Project '"+params["label"]+"'";
}
if(label != null)
menuItem = {"label": label, "routerLink": url, "queryParams" : params };
console.log("COMPONENT NAME="+componentName);
return menuItem;
}
adaptBreadcrumbByMenuItem(menuItem : MenuItem){
if(menuItem==null){
this.breadcrumbData.length = 0;
return;
}
let breadcrumbDataNew: MenuItem[] = new Array<MenuItem>();
for(var i=0; i<this.breadcrumbData.length;i++){
if(this.breadcrumbData[i].label == menuItem.label)
break;
else
breadcrumbDataNew.push(this.breadcrumbData[i]);
}
this.breadcrumbData = breadcrumbDataNew;
this.breadcrumbData.push(menuItem);
}
}

View File

@ -1,11 +0,0 @@
.modal-header {
padding:9px 15px;
border-bottom:1px solid #eee;
background-color: #0480be;
-webkit-border-top-left-radius: 5px;
-webkit-border-top-right-radius: 5px;
-moz-border-radius-topleft: 5px;
-moz-border-radius-topright: 5px;
border-top-left-radius: 5px;
border-top-right-radius: 5px;
}

View File

@ -1,21 +0,0 @@
<!-- Modal -->
<div class="modal fade" id="{{confirmationID}}" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h4 class="modal-title">{{confirmationTitle}}</h4>
</div>
<div class="modal-body">
<p>{{confirmationDescr}}</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default btn-success" data-dismiss="modal" (click)=saidYes()>Yes</button>
<button type="button" class="btn btn-default btn-danger" data-dismiss="modal" (click)=saidNo()>NO</button>
</div>
</div>
</div>
</div>

View File

@ -1,25 +0,0 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ConfirmationComponent } from './confirmation.component';
describe('ConfirmationComponent', () => {
let component: ConfirmationComponent;
let fixture: ComponentFixture<ConfirmationComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ ConfirmationComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(ConfirmationComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should be created', () => {
expect(component).toBeTruthy();
});
});

View File

@ -1,35 +0,0 @@
import { Component, OnInit, Input,Output,EventEmitter } from '@angular/core';
@Component({
selector: 'confirmation',
templateUrl: './confirmation.component.html',
styleUrls: ['./confirmation.component.css']
})
export class ConfirmationComponent implements OnInit {
@Input() confirmationID : string;
@Input() confirmationTitle : string;
@Input() confirmationDescr : string;
@Input() subjectObj : any;
@Output() responseSender: EventEmitter<any> = new EventEmitter<any>();
constructor() {
}
ngOnInit() {
}
saidNo(){
this.responseSender.emit(false);
}
saidYes(){
this.responseSender.emit(true);
}
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
<svg width="2443" height="2500" viewBox="0 0 256 262" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid"><path d="M255.878 133.451c0-10.734-.871-18.567-2.756-26.69H130.55v48.448h71.947c-1.45 12.04-9.283 30.172-26.69 42.356l-.244 1.622 38.755 30.023 2.685.268c24.659-22.774 38.875-56.282 38.875-96.027" fill="#4285F4"/><path d="M130.55 261.1c35.248 0 64.839-11.605 86.453-31.622l-41.196-31.913c-11.024 7.688-25.82 13.055-45.257 13.055-34.523 0-63.824-22.773-74.269-54.25l-1.531.13-40.298 31.187-.527 1.465C35.393 231.798 79.49 261.1 130.55 261.1" fill="#34A853"/><path d="M56.281 156.37c-2.756-8.123-4.351-16.827-4.351-25.82 0-8.994 1.595-17.697 4.206-25.82l-.073-1.73L15.26 71.312l-1.335.635C5.077 89.644 0 109.517 0 130.55s5.077 40.905 13.925 58.602l42.356-32.782" fill="#FBBC05"/><path d="M130.55 50.479c24.514 0 41.05 10.589 50.479 19.438l36.844-35.974C195.245 12.91 165.798 0 130.55 0 79.49 0 35.393 29.301 13.925 71.947l42.211 32.783c10.59-31.477 39.891-54.251 74.414-54.251" fill="#EB4335"/></svg>

Before

Width:  |  Height:  |  Size: 1018 B

View File

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="2500" height="857" viewBox="0.512 0.511 748.99 256.61"><g transform="translate(4636.413 -2865.209)"><linearGradient id="a" gradientUnits="userSpaceOnUse" x1="-11445.563" y1="603.918" x2="-11445.563" y2="465.768" gradientTransform="matrix(1.3509 0 0 -1.3509 10917.478 3681.026)"><stop offset="0" stop-color="#196eef"/><stop offset=".5" stop-color="#186dee"/><stop offset="1" stop-color="#1065e7"/></linearGradient><path d="M-4520.08 2990.41h32.21v45.24c-10.05 3.229-22.74 5-35.931 5-53.46 0-84.88-45.78-84.88-90.49 0-43.851 28.42-74.61 68.07-74.61 25.09 0 39.689 8.5 52.75 20.34v14.76l24.49-24.49c-15.49-10.48-37.92-20.44-69.98-20.44-70.38 0-102.55 50.351-102.55 91.73 0 58.899 42.9 94.38 96.811 94.38 26.14 0 49.35-3.99 76.16-11.45v-46.74c0-2.39 1.05-4.03 2.62-5.47l8.46-8.46h-57.45l-10.78 10.7z" fill="url(#a)"/><linearGradient id="b" gradientUnits="userSpaceOnUse" x1="-11323.519" y1="556.948" x2="-11323.519" y2="467.618" gradientTransform="matrix(1.3509 0 0 -1.3509 10917.478 3681.026)"><stop offset="0" stop-color="#de5744"/><stop offset=".5" stop-color="#db4632"/><stop offset="1" stop-color="#d13d29"/></linearGradient><path d="M-4375.79 2928.93c-40.51 0-65.61 29.601-65.61 61.021 0 27.12 20.221 59.319 61.19 59.319 39.41 0 63.59-29.659 63.59-61.629 0-29.78-23.63-58.7-59.17-58.7v-.011zm-6.721 8.63c28.561 0 41.28 37.21 41.28 63.75 0 39.47-29.61 40.25-33.15 40.25-13.55 0-23.02-8.189-30.109-18.93-6.24-9.899-12.34-28.29-12.34-46.26 0-17.9 5.859-26.64 15.08-33.07 7.54-4.82 14.6-5.74 19.229-5.74h.01z" fill="url(#b)"/><linearGradient id="c" gradientUnits="userSpaceOnUse" x1="-11130.575" y1="556.948" x2="-11130.575" y2="413.518" gradientTransform="matrix(1.3509 0 0 -1.3509 10917.478 3681.026)"><stop offset="0" stop-color="#1a6fef"/><stop offset=".25" stop-color="#1e72ef"/><stop offset=".5" stop-color="#166bec"/><stop offset=".75" stop-color="#1267e9"/><stop offset="1" stop-color="#1063e5" stop-opacity=".87"/></linearGradient><path d="M-4110.979 2928.92c-35.381 0-54.521 22.4-54.521 47.41 0 19.04 13.64 40.52 41.78 40.52h7.119s-1.939 4.71-1.949 9.26c0 6.711 2.41 10.48 7.529 16.28-48.42 2.95-67.88 22.48-67.88 43.47 0 18.381 17.601 36.471 54.59 36.471 43.79 0 66.47-24.311 66.47-48.17 0-16.82-8.38-26.04-29.6-41.94-6.24-4.85-7.45-7.939-7.45-11.569 0-5.2 3.11-8.641 4.25-9.94 2.01-2.12 5.49-4.54 6.79-5.7 7.13-6.04 17.2-14.979 17.2-32.82 0-12.24-5.091-22.77-16.69-32.63h14.16l10.64-10.64h-52.438zm-9.76 7.96c6.42 0 11.779 2.27 17.439 6.98 6.279 5.66 16.311 20.87 16.311 39.69 0 20.31-15.78 25.87-24.32 25.87-4.18 0-9.189-1.17-13.43-4.07-9.42-6.109-18.771-22.37-18.771-41.72 0-17.46 10.4-26.75 22.771-26.75zm14.01 113.22c2.699 0 4.64.221 4.64.221s6.37 4.55 10.82 7.949c10.36 8.19 16.819 14.45 16.819 25.601 0 15.33-14.22 27.35-37.25 27.35-25.279 0-44.6-11.77-44.6-30.989 0-15.921 13.24-29.623 49.571-30.132z" fill="url(#c)"/><linearGradient id="d" gradientUnits="userSpaceOnUse" x1="-11061.771" y1="601.408" x2="-11061.771" y2="470.128" gradientTransform="matrix(1.3509 0 0 -1.3509 10917.478 3681.026)"><stop offset="0" stop-color="#0aa561"/><stop offset=".5" stop-color="#009b58"/><stop offset="1" stop-color="#00914b"/></linearGradient><path d="M-4050.88 3045.76h48.57l7.399-7.399-13.93-1.74c-3.75-.46-5.979-3.7-5.979-6.84v-146.71c0-2.89 1.34-4.37 2.319-5.311l8.761-8.76h-41.42l-10.78 10.78h16.1v151.97c0 2.16-.68 3.63-2.14 5.14l-8.9 8.87z" fill="url(#d)"/><linearGradient id="e" gradientUnits="userSpaceOnUse" x1="-10998.289" y1="556.948" x2="-10998.289" y2="467.864" gradientTransform="matrix(1.3509 0 0 -1.3509 10917.478 3681.026)"><stop offset="0" stop-color="#de5644"/><stop offset=".5" stop-color="#da4531"/><stop offset="1" stop-color="#ce3a28"/></linearGradient><path d="M-3936.5 2928.93c-27.12 0-55.93 20.67-55.93 57.78 0 30.649 20.67 62.56 59.29 62.56 9.63 0 17.56-1.239 24.99-4.649 7.97-3.67 15.64-9.63 21.239-17.12-10.569 5.33-19.189 8.83-30.64 8.83-21.76 0-42.74-15.7-50.08-44.56l76.87-31.07c-4.44-15.83-16.96-31.771-45.729-31.771h-.01zm-5.021 8.49c14.551 0 25.07 11.97 25.07 21.34 0 3.03-1.899 4.63-5.66 6.11l-47.25 19.11s-1.279-5.95-1.279-12.38c0-26.97 19.5-34.18 29.119-34.18z" fill="url(#e)"/><linearGradient id="f" gradientUnits="userSpaceOnUse" x1="-11221.762" y1="556.754" x2="-11221.762" y2="467.795" gradientTransform="matrix(1.3509 0 0 -1.3509 10917.478 3681.026)"><stop offset="0" stop-color="#ffc01a"/><stop offset=".5" stop-color="#ffba03"/><stop offset="1" stop-color="#ffb300"/></linearGradient><path d="M-4238.33 2928.93c-40.51 0-65.61 29.601-65.61 61.021 0 27.12 20.221 59.319 61.19 59.319 39.41 0 63.59-29.659 63.59-61.629 0-29.78-23.63-58.7-59.17-58.7v-.011zm-6.721 8.63c28.561 0 41.28 37.21 41.28 63.75 0 39.47-29.61 40.25-33.15 40.25-13.55 0-23.02-8.189-30.109-18.93-6.24-9.899-12.34-28.29-12.34-46.26 0-17.9 5.859-26.64 15.08-33.07 7.54-4.82 14.6-5.74 19.229-5.74h.01z" fill="url(#f)"/></g></svg>

Before

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

View File

@ -1,3 +0,0 @@
<svg class="lds-gears" width="80px" height="80px" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid"><g transform="translate(50 50)"> <g transform="translate(-19 -19) scale(0.6)"> <g transform="rotate(90)">
<animateTransform attributeName="transform" type="rotate" values="0;360" keyTimes="0;1" dur="2s" begin="0s" repeatCount="indefinite"></animateTransform><path d="M37.3496987939662 -7 L47.3496987939662 -7 L47.3496987939662 7 L37.3496987939662 7 A38 38 0 0 1 31.359972760794346 21.46047782418268 L31.359972760794346 21.46047782418268 L38.431040572659825 28.531545636048154 L28.531545636048154 38.431040572659825 L21.46047782418268 31.359972760794346 A38 38 0 0 1 7.0000000000000036 37.3496987939662 L7.0000000000000036 37.3496987939662 L7.000000000000004 47.3496987939662 L-6.999999999999999 47.3496987939662 L-7 37.3496987939662 A38 38 0 0 1 -21.46047782418268 31.35997276079435 L-21.46047782418268 31.35997276079435 L-28.531545636048154 38.431040572659825 L-38.43104057265982 28.531545636048158 L-31.359972760794346 21.460477824182682 A38 38 0 0 1 -37.3496987939662 7.000000000000007 L-37.3496987939662 7.000000000000007 L-47.3496987939662 7.000000000000008 L-47.3496987939662 -6.9999999999999964 L-37.3496987939662 -6.999999999999997 A38 38 0 0 1 -31.35997276079435 -21.460477824182675 L-31.35997276079435 -21.460477824182675 L-38.431040572659825 -28.531545636048147 L-28.53154563604818 -38.4310405726598 L-21.4604778241827 -31.35997276079433 A38 38 0 0 1 -6.999999999999992 -37.3496987939662 L-6.999999999999992 -37.3496987939662 L-6.999999999999994 -47.3496987939662 L6.999999999999977 -47.3496987939662 L6.999999999999979 -37.3496987939662 A38 38 0 0 1 21.460477824182686 -31.359972760794342 L21.460477824182686 -31.359972760794342 L28.531545636048158 -38.43104057265982 L38.4310405726598 -28.53154563604818 L31.35997276079433 -21.4604778241827 A38 38 0 0 1 37.3496987939662 -6.999999999999995 M0 -23A23 23 0 1 0 0 23 A23 23 0 1 0 0 -23" fill="#9b8b69"></path></g></g> <g transform="translate(19 19) scale(0.6)"> <g transform="rotate(247.5)">
<animateTransform attributeName="transform" type="rotate" values="360;0" keyTimes="0;1" dur="2s" begin="-0.125s" repeatCount="indefinite"></animateTransform><path d="M37.3496987939662 -7 L47.3496987939662 -7 L47.3496987939662 7 L37.3496987939662 7 A38 38 0 0 1 31.359972760794346 21.46047782418268 L31.359972760794346 21.46047782418268 L38.431040572659825 28.531545636048154 L28.531545636048154 38.431040572659825 L21.46047782418268 31.359972760794346 A38 38 0 0 1 7.0000000000000036 37.3496987939662 L7.0000000000000036 37.3496987939662 L7.000000000000004 47.3496987939662 L-6.999999999999999 47.3496987939662 L-7 37.3496987939662 A38 38 0 0 1 -21.46047782418268 31.35997276079435 L-21.46047782418268 31.35997276079435 L-28.531545636048154 38.431040572659825 L-38.43104057265982 28.531545636048158 L-31.359972760794346 21.460477824182682 A38 38 0 0 1 -37.3496987939662 7.000000000000007 L-37.3496987939662 7.000000000000007 L-47.3496987939662 7.000000000000008 L-47.3496987939662 -6.9999999999999964 L-37.3496987939662 -6.999999999999997 A38 38 0 0 1 -31.35997276079435 -21.460477824182675 L-31.35997276079435 -21.460477824182675 L-38.431040572659825 -28.531545636048147 L-28.53154563604818 -38.4310405726598 L-21.4604778241827 -31.35997276079433 A38 38 0 0 1 -6.999999999999992 -37.3496987939662 L-6.999999999999992 -37.3496987939662 L-6.999999999999994 -47.3496987939662 L6.999999999999977 -47.3496987939662 L6.999999999999979 -37.3496987939662 A38 38 0 0 1 21.460477824182686 -31.359972760794342 L21.460477824182686 -31.359972760794342 L28.531545636048158 -38.43104057265982 L38.4310405726598 -28.53154563604818 L31.35997276079433 -21.4604778241827 A38 38 0 0 1 37.3496987939662 -6.999999999999995 M0 -23A23 23 0 1 0 0 23 A23 23 0 1 0 0 -23" fill="#a1a6a8"></path></g></g></g></svg>

Before

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.9 KiB

View File

@ -1,47 +0,0 @@
/* Syntax highlighting for JSON objects */
ul.json-dict, ol.json-array {
list-style-type: none;
margin: 0 0 0 1px;
border-left: 1px dotted #ccc;
padding-left: 2em;
}
.json-string {
color: #0B7500;
}
.json-literal {
color: #1A01CC;
font-weight: bold;
}
/* Toggle button */
a.json-toggle {
position: relative;
color: inherit;
text-decoration: none;
}
a.json-toggle:focus {
outline: none;
}
a.json-toggle:before {
color: #aaa;
content: "\25BC"; /* down arrow */
position: absolute;
display: inline-block;
width: 1em;
left: -1em;
}
a.json-toggle.collapsed:before {
transform: rotate(-90deg); /* Use rotated down arrow, prevents right arrow appearing smaller than down arrow in some browsers */
-ms-transform: rotate(-90deg);
-webkit-transform: rotate(-90deg);
}
/* Collapsable placeholder links */
a.json-placeholder {
color: #aaa;
padding: 0 1em;
text-decoration: none;
}
a.json-placeholder:hover {
text-decoration: underline;
}

View File

@ -1,148 +0,0 @@
/**
* jQuery json-viewer
* @author: Alexandre Bodelot <alexandre.bodelot@gmail.com>
*/
(function($){
/**
* Check if arg is either an array with at least 1 element, or a dict with at least 1 key
* @return boolean
*/
function isCollapsable(arg) {
return arg instanceof Object && Object.keys(arg).length > 0;
}
/**
* Check if a string represents a valid url
* @return boolean
*/
function isUrl(string) {
var regexp = /^(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;
return regexp.test(string);
}
/**
* Transform a json object into html representation
* @return string
*/
function json2html(json, options) {
var html = '';
if (typeof json === 'string') {
/* Escape tags */
json = json.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;');
if (isUrl(json))
html += '<a href="' + json + '" class="json-string">' + json + '</a>';
else
html += '<span class="json-string">"' + json + '"</span>';
}
else if (typeof json === 'number') {
html += '<span class="json-literal">' + json + '</span>';
}
else if (typeof json === 'boolean') {
html += '<span class="json-literal">' + json + '</span>';
}
else if (json === null) {
html += '<span class="json-literal">null</span>';
}
else if (json instanceof Array) {
if (json.length > 0) {
html += '[<ol class="json-array">';
for (var i = 0; i < json.length; ++i) {
html += '<li>';
/* Add toggle button if item is collapsable */
if (isCollapsable(json[i])) {
html += '<a href class="json-toggle"></a>';
}
html += json2html(json[i], options);
/* Add comma if item is not last */
if (i < json.length - 1) {
html += ',';
}
html += '</li>';
}
html += '</ol>]';
}
else {
html += '[]';
}
}
else if (typeof json === 'object') {
var key_count = Object.keys(json).length;
if (key_count > 0) {
html += '{<ul class="json-dict">';
for (var key in json) {
if (json.hasOwnProperty(key)) {
html += '<li>';
var keyRepr = options.withQuotes ?
'<span class="json-string">"' + key + '"</span>' : key;
/* Add toggle button if item is collapsable */
if (isCollapsable(json[key])) {
html += '<a href class="json-toggle">' + keyRepr + '</a>';
}
else {
html += keyRepr;
}
html += ': ' + json2html(json[key], options);
/* Add comma if item is not last */
if (--key_count > 0)
html += ',';
html += '</li>';
}
}
html += '</ul>}';
}
else {
html += '{}';
}
}
return html;
}
/**
* jQuery plugin method
* @param json: a javascript object
* @param options: an optional options hash
*/
$.fn.jsonViewer = function(json, options) {
options = options || {};
/* jQuery chaining */
return this.each(function() {
/* Transform to HTML */
var html = json2html(json, options);
if (isCollapsable(json))
html = '<a href class="json-toggle"></a>' + html;
/* Insert HTML in target DOM element */
$(this).html(html);
/* Bind click on toggle buttons */
$(this).off('click');
$(this).on('click', 'a.json-toggle', function() {
var target = $(this).toggleClass('collapsed').siblings('ul.json-dict, ol.json-array');
target.toggle();
if (target.is(':visible')) {
target.siblings('.json-placeholder').remove();
}
else {
var count = target.children('li').length;
var placeholder = count + (count > 1 ? ' items' : ' item');
target.after('<a href class="json-placeholder">' + placeholder + '</a>');
}
return false;
});
/* Simulate click on toggle button when placeholder is clicked */
$(this).on('click', 'a.json-placeholder', function() {
$(this).siblings('a.json-toggle').click();
return false;
});
if (options.collapsed == true) {
/* Trigger click to collapse all nodes */
$(this).find('a.json-toggle').click();
}
});
};
})(jQuery);

View File

@ -1,7 +0,0 @@
/**
* Copyright (c) 2007-2015 Ariel Flesler - aflesler<a>gmail<d>com | http://flesler.blogspot.com
* Licensed under MIT
* @author Ariel Flesler
* @version 2.1.2
*/
;(function(f){"use strict";"function"===typeof define&&define.amd?define(["jquery"],f):"undefined"!==typeof module&&module.exports?module.exports=f(require("jquery")):f(jQuery)})(function($){"use strict";function n(a){return!a.nodeName||-1!==$.inArray(a.nodeName.toLowerCase(),["iframe","#document","html","body"])}function h(a){return $.isFunction(a)||$.isPlainObject(a)?a:{top:a,left:a}}var p=$.scrollTo=function(a,d,b){return $(window).scrollTo(a,d,b)};p.defaults={axis:"xy",duration:0,limit:!0};$.fn.scrollTo=function(a,d,b){"object"=== typeof d&&(b=d,d=0);"function"===typeof b&&(b={onAfter:b});"max"===a&&(a=9E9);b=$.extend({},p.defaults,b);d=d||b.duration;var u=b.queue&&1<b.axis.length;u&&(d/=2);b.offset=h(b.offset);b.over=h(b.over);return this.each(function(){function k(a){var k=$.extend({},b,{queue:!0,duration:d,complete:a&&function(){a.call(q,e,b)}});r.animate(f,k)}if(null!==a){var l=n(this),q=l?this.contentWindow||window:this,r=$(q),e=a,f={},t;switch(typeof e){case "number":case "string":if(/^([+-]=?)?\d+(\.\d+)?(px|%)?$/.test(e)){e= h(e);break}e=l?$(e):$(e,q);case "object":if(e.length===0)return;if(e.is||e.style)t=(e=$(e)).offset()}var v=$.isFunction(b.offset)&&b.offset(q,e)||b.offset;$.each(b.axis.split(""),function(a,c){var d="x"===c?"Left":"Top",m=d.toLowerCase(),g="scroll"+d,h=r[g](),n=p.max(q,c);t?(f[g]=t[m]+(l?0:h-r.offset()[m]),b.margin&&(f[g]-=parseInt(e.css("margin"+d),10)||0,f[g]-=parseInt(e.css("border"+d+"Width"),10)||0),f[g]+=v[m]||0,b.over[m]&&(f[g]+=e["x"===c?"width":"height"]()*b.over[m])):(d=e[m],f[g]=d.slice&& "%"===d.slice(-1)?parseFloat(d)/100*n:d);b.limit&&/^\d+$/.test(f[g])&&(f[g]=0>=f[g]?0:Math.min(f[g],n));!a&&1<b.axis.length&&(h===f[g]?f={}:u&&(k(b.onAfterFirst),f={}))});k(b.onAfter)}})};p.max=function(a,d){var b="x"===d?"Width":"Height",h="scroll"+b;if(!n(a))return a[h]-$(a)[b.toLowerCase()]();var b="client"+b,k=a.ownerDocument||a.document,l=k.documentElement,k=k.body;return Math.max(l[h],k[h])-Math.min(l[b],k[b])};$.Tween.propHooks.scrollLeft=$.Tween.propHooks.scrollTop={get:function(a){return $(a.elem)[a.prop]()}, set:function(a){var d=this.get(a);if(a.options.interrupt&&a._last&&a._last!==d)return $(a.elem).stop();var b=Math.round(a.now);d!==b&&($(a.elem)[a.prop](b),a._last=this.get(a))}};return p});

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,112 +0,0 @@
/*
* Container style
*/
.ps {
overflow: hidden !important;
overflow-anchor: none;
-ms-overflow-style: none;
touch-action: auto;
-ms-touch-action: auto;
}
/*
* Scrollbar rail styles
*/
.ps__rail-x {
display: none;
opacity: 0;
transition: background-color .2s linear, opacity .2s linear;
-webkit-transition: background-color .2s linear, opacity .2s linear;
height: 15px;
/* there must be 'bottom' or 'top' for ps__rail-x */
bottom: 0px;
/* please don't change 'position' */
position: absolute;
}
.ps__rail-y {
display: none;
opacity: 0;
transition: background-color .2s linear, opacity .2s linear;
-webkit-transition: background-color .2s linear, opacity .2s linear;
width: 15px;
/* there must be 'right' or 'left' for ps__rail-y */
right: 0;
/* please don't change 'position' */
position: absolute;
}
.ps--active-x > .ps__rail-x,
.ps--active-y > .ps__rail-y {
display: block;
background-color: transparent;
}
.ps:hover > .ps__rail-x,
.ps:hover > .ps__rail-y,
.ps--focus > .ps__rail-x,
.ps--focus > .ps__rail-y,
.ps--scrolling-x > .ps__rail-x,
.ps--scrolling-y > .ps__rail-y {
opacity: 0.6;
}
.ps__rail-x:hover,
.ps__rail-y:hover,
.ps__rail-x:focus,
.ps__rail-y:focus {
background-color: #eee;
opacity: 0.9;
}
/*
* Scrollbar thumb styles
*/
.ps__thumb-x {
background-color: #aaa;
border-radius: 6px;
transition: background-color .2s linear, height .2s ease-in-out;
-webkit-transition: background-color .2s linear, height .2s ease-in-out;
height: 6px;
/* there must be 'bottom' for ps__thumb-x */
bottom: 2px;
/* please don't change 'position' */
position: absolute;
}
.ps__thumb-y {
background-color: #aaa;
border-radius: 6px;
transition: background-color .2s linear, width .2s ease-in-out;
-webkit-transition: background-color .2s linear, width .2s ease-in-out;
width: 6px;
/* there must be 'right' for ps__thumb-y */
right: 2px;
/* please don't change 'position' */
position: absolute;
}
.ps__rail-x:hover > .ps__thumb-x,
.ps__rail-x:focus > .ps__thumb-x {
background-color: #999;
height: 11px;
}
.ps__rail-y:hover > .ps__thumb-y,
.ps__rail-y:focus > .ps__thumb-y {
background-color: #999;
width: 11px;
}
/* MS supports */
@supports (-ms-overflow-style: none) {
.ps {
overflow: auto !important;
}
}
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
.ps {
overflow: auto !important;
}
}

File diff suppressed because it is too large Load Diff

View File

@ -1,122 +0,0 @@
/*!
* Start Bootstrap - Simple Sidebar (https://startbootstrap.com/template-overviews/simple-sidebar)
* Copyright 2013-2017 Start Bootstrap
* Licensed under MIT (https://github.com/BlackrockDigital/startbootstrap-simple-sidebar/blob/master/LICENSE)
*/
body {
overflow-x: hidden;
}
#wrapper {
padding-left: 0;
-webkit-transition: all 0.5s ease;
-moz-transition: all 0.5s ease;
-o-transition: all 0.5s ease;
transition: all 0.5s ease;
}
#wrapper.toggled {
padding-left: 250px;
}
#sidebar-wrapper {
z-index: 1000;
position: fixed;
left: 250px;
width: 0;
height: 100%;
margin-left: -250px;
overflow-y: auto;
background: #000;
-webkit-transition: all 0.5s ease;
-moz-transition: all 0.5s ease;
-o-transition: all 0.5s ease;
transition: all 0.5s ease;
}
#wrapper.toggled #sidebar-wrapper {
width: 250px;
}
#page-content-wrapper {
width: 100%;
position: absolute;
padding: 15px;
}
#wrapper.toggled #page-content-wrapper {
position: absolute;
margin-right: -250px;
}
/* Sidebar Styles */
.sidebar-nav {
position: absolute;
top: 0;
width: 250px;
margin: 0;
padding: 0;
list-style: none;
}
.sidebar-nav li {
text-indent: 20px;
line-height: 40px;
}
.sidebar-nav li a {
display: block;
text-decoration: none;
color: #999999;
}
.sidebar-nav li a:hover {
text-decoration: none;
color: #fff;
background: rgba(255, 255, 255, 0.2);
}
.sidebar-nav li a:active, .sidebar-nav li a:focus {
text-decoration: none;
}
.sidebar-nav>.sidebar-brand {
height: 65px;
font-size: 18px;
line-height: 60px;
}
.sidebar-nav>.sidebar-brand a {
color: #999999;
}
.sidebar-nav>.sidebar-brand a:hover {
color: #fff;
background: none;
}
@media(min-width:768px) {
#wrapper {
padding-left: 0;
}
#wrapper.toggled {
padding-left: 250px;
}
#sidebar-wrapper {
width: 0;
}
#wrapper.toggled #sidebar-wrapper {
width: 250px;
}
#page-content-wrapper {
padding: 20px;
position: relative;
}
#wrapper.toggled #page-content-wrapper {
position: relative;
margin-right: 0;
}
}

View File

@ -1,358 +0,0 @@
/**
* vkBeautify - javascript plugin to pretty-print or minify text in XML, JSON, CSS and SQL formats.
*
* Version - 0.99.00.beta
* Copyright (c) 2012 Vadim Kiryukhin
* vkiryukhin @ gmail.com
* http://www.eslinstructor.net/vkbeautify/
*
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*
* Pretty print
*
* vkbeautify.xml(text [,indent_pattern]);
* vkbeautify.json(text [,indent_pattern]);
* vkbeautify.css(text [,indent_pattern]);
* vkbeautify.sql(text [,indent_pattern]);
*
* @text - String; text to beatufy;
* @indent_pattern - Integer | String;
* Integer: number of white spaces;
* String: character string to visualize indentation ( can also be a set of white spaces )
* Minify
*
* vkbeautify.xmlmin(text [,preserve_comments]);
* vkbeautify.jsonmin(text);
* vkbeautify.cssmin(text [,preserve_comments]);
* vkbeautify.sqlmin(text);
*
* @text - String; text to minify;
* @preserve_comments - Bool; [optional];
* Set this flag to true to prevent removing comments from @text ( minxml and mincss functions only. )
*
* Examples:
* vkbeautify.xml(text); // pretty print XML
* vkbeautify.json(text, 4 ); // pretty print JSON
* vkbeautify.css(text, '. . . .'); // pretty print CSS
* vkbeautify.sql(text, '----'); // pretty print SQL
*
* vkbeautify.xmlmin(text, true);// minify XML, preserve comments
* vkbeautify.jsonmin(text);// minify JSON
* vkbeautify.cssmin(text);// minify CSS, remove comments ( default )
* vkbeautify.sqlmin(text);// minify SQL
*
*/
(function() {
function createShiftArr(step) {
var space = ' ';
if ( isNaN(parseInt(step)) ) { // argument is string
space = step;
} else { // argument is integer
switch(step) {
case 1: space = ' '; break;
case 2: space = ' '; break;
case 3: space = ' '; break;
case 4: space = ' '; break;
case 5: space = ' '; break;
case 6: space = ' '; break;
case 7: space = ' '; break;
case 8: space = ' '; break;
case 9: space = ' '; break;
case 10: space = ' '; break;
case 11: space = ' '; break;
case 12: space = ' '; break;
}
}
var shift = ['\n']; // array of shifts
for(ix=0;ix<100;ix++){
shift.push(shift[ix]+space);
}
return shift;
}
function vkbeautify(){
this.step = ' '; // 4 spaces
this.shift = createShiftArr(this.step);
};
vkbeautify.prototype.xml = function(text,step) {
var ar = text.replace(/>\s{0,}</g,"><")
.replace(/</g,"~::~<")
.replace(/\s*xmlns\:/g,"~::~xmlns:")
.replace(/\s*xmlns\=/g,"~::~xmlns=")
.split('~::~'),
len = ar.length,
inComment = false,
deep = 0,
str = '',
ix = 0,
shift = step ? createShiftArr(step) : this.shift;
for(ix=0;ix<len;ix++) {
// start comment or <![CDATA[...]]> or <!DOCTYPE //
if(ar[ix].search(/<!/) > -1) {
str += shift[deep]+ar[ix];
inComment = true;
// end comment or <![CDATA[...]]> //
if(ar[ix].search(/-->/) > -1 || ar[ix].search(/\]>/) > -1 || ar[ix].search(/!DOCTYPE/) > -1 ) {
inComment = false;
}
} else
// end comment or <![CDATA[...]]> //
if(ar[ix].search(/-->/) > -1 || ar[ix].search(/\]>/) > -1) {
str += ar[ix];
inComment = false;
} else
// <elm></elm> //
if( /^<\w/.exec(ar[ix-1]) && /^<\/\w/.exec(ar[ix]) &&
/^<[\w:\-\.\,]+/.exec(ar[ix-1]) == /^<\/[\w:\-\.\,]+/.exec(ar[ix])[0].replace('/','')) {
str += ar[ix];
if(!inComment) deep--;
} else
// <elm> //
if(ar[ix].search(/<\w/) > -1 && ar[ix].search(/<\//) == -1 && ar[ix].search(/\/>/) == -1 ) {
str = !inComment ? str += shift[deep++]+ar[ix] : str += ar[ix];
} else
// <elm>...</elm> //
if(ar[ix].search(/<\w/) > -1 && ar[ix].search(/<\//) > -1) {
str = !inComment ? str += shift[deep]+ar[ix] : str += ar[ix];
} else
// </elm> //
if(ar[ix].search(/<\//) > -1) {
str = !inComment ? str += shift[--deep]+ar[ix] : str += ar[ix];
} else
// <elm/> //
if(ar[ix].search(/\/>/) > -1 ) {
str = !inComment ? str += shift[deep]+ar[ix] : str += ar[ix];
} else
// <? xml ... ?> //
if(ar[ix].search(/<\?/) > -1) {
str += shift[deep]+ar[ix];
} else
// xmlns //
if( ar[ix].search(/xmlns\:/) > -1 || ar[ix].search(/xmlns\=/) > -1) {
str += shift[deep]+ar[ix];
}
else {
str += ar[ix];
}
}
return (str[0] == '\n') ? str.slice(1) : str;
}
vkbeautify.prototype.json = function(text,step) {
var step = step ? step : this.step;
if (typeof JSON === 'undefined' ) return text;
if ( typeof text === "string" ) return JSON.stringify(JSON.parse(text), null, step);
if ( typeof text === "object" ) return JSON.stringify(text, null, step);
return text; // text is not string nor object
}
vkbeautify.prototype.css = function(text, step) {
var ar = text.replace(/\s{1,}/g,' ')
.replace(/\{/g,"{~::~")
.replace(/\}/g,"~::~}~::~")
.replace(/\;/g,";~::~")
.replace(/\/\*/g,"~::~/*")
.replace(/\*\//g,"*/~::~")
.replace(/~::~\s{0,}~::~/g,"~::~")
.split('~::~'),
len = ar.length,
deep = 0,
str = '',
ix = 0,
shift = step ? createShiftArr(step) : this.shift;
for(ix=0;ix<len;ix++) {
if( /\{/.exec(ar[ix])) {
str += shift[deep++]+ar[ix];
} else
if( /\}/.exec(ar[ix])) {
str += shift[--deep]+ar[ix];
} else
if( /\*\\/.exec(ar[ix])) {
str += shift[deep]+ar[ix];
}
else {
str += shift[deep]+ar[ix];
}
}
return str.replace(/^\n{1,}/,'');
}
//----------------------------------------------------------------------------
function isSubquery(str, parenthesisLevel) {
return parenthesisLevel - (str.replace(/\(/g,'').length - str.replace(/\)/g,'').length )
}
function split_sql(str, tab) {
return str.replace(/\s{1,}/g," ")
.replace(/ AND /ig,"~::~"+tab+tab+"AND ")
.replace(/ BETWEEN /ig,"~::~"+tab+"BETWEEN ")
.replace(/ CASE /ig,"~::~"+tab+"CASE ")
.replace(/ ELSE /ig,"~::~"+tab+"ELSE ")
.replace(/ END /ig,"~::~"+tab+"END ")
.replace(/ FROM /ig,"~::~FROM ")
.replace(/ GROUP\s{1,}BY/ig,"~::~GROUP BY ")
.replace(/ HAVING /ig,"~::~HAVING ")
//.replace(/ SET /ig," SET~::~")
.replace(/ IN /ig," IN ")
.replace(/ JOIN /ig,"~::~JOIN ")
.replace(/ CROSS~::~{1,}JOIN /ig,"~::~CROSS JOIN ")
.replace(/ INNER~::~{1,}JOIN /ig,"~::~INNER JOIN ")
.replace(/ LEFT~::~{1,}JOIN /ig,"~::~LEFT JOIN ")
.replace(/ RIGHT~::~{1,}JOIN /ig,"~::~RIGHT JOIN ")
.replace(/ ON /ig,"~::~"+tab+"ON ")
.replace(/ OR /ig,"~::~"+tab+tab+"OR ")
.replace(/ ORDER\s{1,}BY/ig,"~::~ORDER BY ")
.replace(/ OVER /ig,"~::~"+tab+"OVER ")
.replace(/\(\s{0,}SELECT /ig,"~::~(SELECT ")
.replace(/\)\s{0,}SELECT /ig,")~::~SELECT ")
.replace(/ THEN /ig," THEN~::~"+tab+"")
.replace(/ UNION /ig,"~::~UNION~::~")
.replace(/ USING /ig,"~::~USING ")
.replace(/ WHEN /ig,"~::~"+tab+"WHEN ")
.replace(/ WHERE /ig,"~::~WHERE ")
.replace(/ WITH /ig,"~::~WITH ")
//.replace(/\,\s{0,}\(/ig,",~::~( ")
//.replace(/\,/ig,",~::~"+tab+tab+"")
.replace(/ ALL /ig," ALL ")
.replace(/ AS /ig," AS ")
.replace(/ ASC /ig," ASC ")
.replace(/ DESC /ig," DESC ")
.replace(/ DISTINCT /ig," DISTINCT ")
.replace(/ EXISTS /ig," EXISTS ")
.replace(/ NOT /ig," NOT ")
.replace(/ NULL /ig," NULL ")
.replace(/ LIKE /ig," LIKE ")
.replace(/\s{0,}SELECT /ig,"SELECT ")
.replace(/\s{0,}UPDATE /ig,"UPDATE ")
.replace(/ SET /ig," SET ")
.replace(/~::~{1,}/g,"~::~")
.split('~::~');
}
vkbeautify.prototype.sql = function(text,step) {
var ar_by_quote = text.replace(/\s{1,}/g," ")
.replace(/\'/ig,"~::~\'")
.split('~::~'),
len = ar_by_quote.length,
ar = [],
deep = 0,
tab = this.step,//+this.step,
inComment = true,
inQuote = false,
parenthesisLevel = 0,
str = '',
ix = 0,
shift = step ? createShiftArr(step) : this.shift;;
for(ix=0;ix<len;ix++) {
if(ix%2) {
ar = ar.concat(ar_by_quote[ix]);
} else {
ar = ar.concat(split_sql(ar_by_quote[ix], tab) );
}
}
len = ar.length;
for(ix=0;ix<len;ix++) {
parenthesisLevel = isSubquery(ar[ix], parenthesisLevel);
if( /\s{0,}\s{0,}SELECT\s{0,}/.exec(ar[ix])) {
ar[ix] = ar[ix].replace(/\,/g,",\n"+tab+tab+"")
}
if( /\s{0,}\s{0,}SET\s{0,}/.exec(ar[ix])) {
ar[ix] = ar[ix].replace(/\,/g,",\n"+tab+tab+"")
}
if( /\s{0,}\(\s{0,}SELECT\s{0,}/.exec(ar[ix])) {
deep++;
str += shift[deep]+ar[ix];
} else
if( /\'/.exec(ar[ix]) ) {
if(parenthesisLevel<1 && deep) {
deep--;
}
str += ar[ix];
}
else {
str += shift[deep]+ar[ix];
if(parenthesisLevel<1 && deep) {
deep--;
}
}
var junk = 0;
}
str = str.replace(/^\n{1,}/,'').replace(/\n{1,}/g,"\n");
return str;
}
vkbeautify.prototype.xmlmin = function(text, preserveComments) {
var str = preserveComments ? text
: text.replace(/\<![ \r\n\t]*(--([^\-]|[\r\n]|-[^\-])*--[ \r\n\t]*)\>/g,"")
.replace(/[ \r\n\t]{1,}xmlns/g, ' xmlns');
return str.replace(/>\s{0,}</g,"><");
}
vkbeautify.prototype.jsonmin = function(text) {
if (typeof JSON === 'undefined' ) return text;
return JSON.stringify(JSON.parse(text), null, 0);
}
vkbeautify.prototype.cssmin = function(text, preserveComments) {
var str = preserveComments ? text
: text.replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*+\//g,"") ;
return str.replace(/\s{1,}/g,' ')
.replace(/\{\s{1,}/g,"{")
.replace(/\}\s{1,}/g,"}")
.replace(/\;\s{1,}/g,";")
.replace(/\/\*\s{1,}/g,"/*")
.replace(/\*\/\s{1,}/g,"*/");
}
vkbeautify.prototype.sqlmin = function(text) {
return text.replace(/\s{1,}/g," ").replace(/\s{1,}\(/,"(").replace(/\s{1,}\)/,")");
}
window.vkbeautify = new vkbeautify();
})();

File diff suppressed because one or more lines are too long

View File

@ -1,65 +1,24 @@
<!doctype html>
<html itemscope itemtype="http://schema.org/Article">
<head>
<html>
<meta charset="utf-8">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Data Management Plans Creator</title>
<base href="/">
<meta name="csrf-token" content="2c64def7de30197c40276fe1a7ea874ca8871f70be7d7dc3305465a4d5c565e4">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- <meta name="viewport" content="width=device-width, initial-scale=1"> -->
<link rel="icon" type="image/x-icon" href="favicon.ico">
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
<!--
<script src="https://apis.google.com/js/platform.js" ></script>
-->
<link rel="stylesheet" href="https://cdn.rawgit.com/afeld/bootstrap-toc/v0.4.1/dist/bootstrap-toc.min.css">
<!--bootstrap plugin for ToC-->
<script src="https://cdn.rawgit.com/afeld/bootstrap-toc/v0.4.1/dist/bootstrap-toc.min.js"></script>
<!-- XML to json and vice versa lib -->
<script src="assets/xml2json.min.js"></script>
<!-- Json formatter lib -->
<link rel="stylesheet" type="text/css" href="assets/jquery.json-viewer.css">
<script src="assets/jquery.json-viewer.js"></script>
<!-- lib 4 pretty-printing xml and json -->
<script src="assets/vkbeautify.0.99.00.js"></script>
<!-- Nice BS notifications -->
<script src="assets/bootstrap-notify.min.js"></script>
<script src="https://apis.google.com/js/platform.js" async defer></script>
<!-- font-awesome css -->
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<!-- Customized scrollbars source: https://github.com/utatti/perfect-scrollbar -->
<link rel="stylesheet" type="text/css" href="assets/perfect-scrollbar/perfect-scrollbar.css">
<script src="assets/perfect-scrollbar/perfect-scrollbar.js"></script>
<!-- my custom global code and css -->
<link rel="stylesheet" type="text/css" href="assets/custom.css">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
</head>
<script>
var auth2;
function start() {
gapi.load('auth2', function() {
auth2 = gapi.auth2.init({
client_id: "524432312250-sc9qsmtmbvlv05r44onl6l93ia3k9deo.apps.googleusercontent.com",
scope: "email"
});
});
}
</script>
<body>
<app-root></app-root>
</body>

Some files were not shown because too many files have changed in this diff Show More