Commit e57edcd0 authored by Moises Sacal's avatar Moises Sacal

updating link with no permissions for issue #21

parent 1afe3e5e
......@@ -20,10 +20,11 @@
"testTsconfig": "tsconfig.spec.json",
"prefix": "app",
"styles": [
"../node_modules/bootstrap/dist/css/bootstrap.min.css",
"styles.css"
],
"scripts": [],
"scripts": [
"../node_modules/jquery/dist/jquery.min.js"
],
"environmentSource": "environments/environment.ts",
"environments": {
"dev": "environments/environment.ts",
......
......@@ -23,53 +23,6 @@ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
cache-loader@1.2.5
MIT
Copyright JS Foundation and other contributors
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@angular-devkit/build-optimizer@0.3.2
MIT
The MIT License
Copyright (c) 2017 Google, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
lodash@4.17.11
MIT
Copyright JS Foundation and other contributors <https://js.foundation/>
......@@ -1267,6 +1220,30 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
@types/leaflet@1.2.6
MIT
MIT License
Copyright (c) Microsoft Corporation. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE
mobx-angular@2.1.1
MIT
The MIT License (MIT)
......@@ -1341,44 +1318,29 @@ maintained libraries used by this software which have their own
licenses; we recommend you read them, as their terms may differ from the
terms above.
jquery@3.3.1
@types/jquery@3.3.4
MIT
Copyright JS Foundation and other contributors, https://js.foundation/
This software consists of voluntary contributions made by many
individuals. For exact contribution history, see the revision history
available at https://github.com/jquery/jquery
The following license applies to all parts of this software except as
documented below:
====
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
MIT License
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
Copyright (c) Microsoft Corporation. All rights reserved.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
====
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
All files located in the node_modules and external directories are
externally maintained libraries used by this software which have their
own licenses; we recommend you read them, as their terms may differ from
the terms above.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE
angular2-markdown@1.6.0
MIT
......@@ -2171,35 +2133,11 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
zone.js@0.8.26
zone.js@0.8.14
MIT
The MIT License
Copyright (c) 2016-2018 Google, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
bootstrap@3.3.7
MIT
The MIT License (MIT)
Copyright (c) 2011-2016 Twitter, Inc.
Copyright (c) 2016 Google, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
......
<!doctype html><html lang="en"><head><meta charset="utf-8"><title>Labarchives</title><base href="/"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" type="image/x-icon" href="favicon.ico"><link href="styles.bundle.css" rel="stylesheet"/></head><body><labarchives></labarchives><script type="text/javascript" src="inline.bundle.js"></script><script type="text/javascript" src="polyfills.bundle.js"></script><script type="text/javascript" src="main.bundle.js"></script></body></html>
\ No newline at end of file
<!doctype html><html lang="en"><head><meta charset="utf-8"><title>Labarchives</title><base href="/"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" type="image/x-icon" href="favicon.ico"><link href="styles.bundle.css" rel="stylesheet"/></head><body><labarchives></labarchives><script type="text/javascript" src="inline.bundle.js"></script><script type="text/javascript" src="polyfills.bundle.js"></script><script type="text/javascript" src="scripts.bundle.js"></script><script type="text/javascript" src="main.bundle.js"></script></body></html>
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -12,20 +12,20 @@
},
"private": true,
"dependencies": {
"@angular/animations": "^5.2.0",
"@angular/common": "^5.2.0",
"@angular/compiler": "^5.2.0",
"@angular/core": "^5.2.0",
"@angular/forms": "^5.2.0",
"@angular/http": "^5.2.0",
"@angular/platform-browser": "^5.2.0",
"@angular/platform-browser-dynamic": "^5.2.0",
"@angular/router": "^5.2.0",
"angular-tree-component": "7.2.0",
"angular2-markdown": "1.6.0",
"@angular/animations": "5.2.11",
"@angular/common": "5.2.11",
"@angular/compiler": "5.2.11",
"@angular/core": "5.2.11",
"@angular/forms": "5.2.11",
"@angular/http": "5.2.11",
"@angular/platform-browser": "5.2.11",
"@angular/platform-browser-dynamic": "5.2.11",
"@angular/router": "5.2.11",
"@asymmetrik/ngx-leaflet": "2.5.3",
"@asymmetrik/ngx-leaflet-draw": "2.6.1",
"bootstrap": "^3.3.7",
"angular-tree-component": "7.2.0",
"angular2-markdown": "1.6.0",
"bootstrap": "3.3.7",
"classlist.js": "1.1.20150312",
"core-js": "2.4.1",
"jquery": "3.3.1",
......@@ -38,29 +38,32 @@
"ng2-datetime": "git+https://github.com/madwebs/ng2-datetime.git",
"ngx-bootstrap": "2.0.3",
"ngx-i18next": "1.1.8",
"rxjs": "^5.5.6",
"zone.js": "^0.8.19",
"rxjs": "5.5.12",
"ts-smart-logger": "0.0.4",
"uppy": "0.23.3"
"uppy": "0.23.3",
"zone.js": "0.8.14"
},
"devDependencies": {
"@angular/cli": "1.7.4",
"@angular/compiler-cli": "5.2.11",
"@angular/language-service": "5.2.11",
"@types/jasmine": "~2.8.9",
"@types/jasminewd2": "~2.0.2",
"@types/node": "~6.0.60",
"codelyzer": "^4.0.1",
"jasmine-core": "~2.8.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~2.0.0",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "^1.2.1",
"karma-jasmine": "~1.1.0",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "~5.1.2",
"ts-node": "~4.1.0",
"tslint": "~5.9.1",
"typescript": "~2.5.3"
"@types/jasmine": "2.5.53",
"@types/jasminewd2": "2.0.2",
"@types/jquery": "3.3.4",
"@types/leaflet": "1.2.6",
"@types/leaflet-draw": "0.4.11",
"@types/node": "6.0.60",
"codelyzer": "3.0.1",
"jasmine-core": "2.6.2",
"jasmine-spec-reporter": "4.1.0",
"karma": "1.7.0",
"karma-chrome-launcher": "2.1.1",
"karma-cli": "1.0.1",
"karma-jasmine": "1.1.0",
"karma-jasmine-html-reporter": "0.2.2",
"protractor": "5.1.2",
"ts-node": "3.0.4",
"tslint": "5.3.2",
"typescript": ">=2.4.2 <2.7.0"
}
}
......@@ -28,6 +28,7 @@ export class LabarchivesLinkField extends FieldBase<any> {
processingSuccess: string;
processingFail: string;
processingStatus: string;
processingNoPermission: string;
checks: Checks;
rdmp: string;
......@@ -41,15 +42,16 @@ export class LabarchivesLinkField extends FieldBase<any> {
this.labarchivesService = this.getFromInjector(LabarchivesService);
this.closeLabel = 'Close';
this.processing = false;
this.workspaceDetailsTitle = 'Workspace Title';
this.workspaceDetailsTitle = 'Workspace';
this.workspaceDefinition = '';
this.currentWorkspace = {};
this.processingLabel = 'Processing...';
this.processingMessage = 'processing message';
this.processingLabel = options['processingLabel'] || 'Processing...';
this.processingMessage = '';
this.checks = new Checks();
this.processingSuccess = 'Success';
this.processingFail = 'Failed';
this.processingSuccess = options['processingSuccess'] || 'Success';
this.processingFail = options['processingFail'] || 'There was a problem linking your workspace, please try again later';
this.processingStatus = '';
this.processingNoPermission = options['processingNoPermission'] || 'You are not allowed to modify this item'
}
init() {
......@@ -97,12 +99,13 @@ export class LabarchivesLinkField extends FieldBase<any> {
this.checks.linkCreated = true;
this.checks.master = true;
this.processingFail = undefined;
} else {
} else if(link.message === 'cannot insert node'){
this.processingFail = this.processingNoPermission;
this.checks.linkWithOther = true
}
} catch (e) {
this.processing = false;
this.checks.linkWithOther = true
this.checks.linkWithOther = true;
}
}
}
......@@ -123,8 +126,8 @@ export class LabarchivesLinkField extends FieldBase<any> {
<h5>{{ field.workspaceDetailsTitle }}</h5>
<p *ngFor="let item of field.workspaceDefinition">{{ item.label }} :
{{ field.currentWorkspace[item.name]}}</p>
<h5>{{ field.processingLabel }}</h5>
<p>{{ field.processingMessage }}&nbsp;</p>
<h5 *ngIf="field.processing">{{ field.processingLabel }}</h5>
<p *ngIf="field.processing">{{ field.processingMessage }}&nbsp;</p>
<p class="alert alert-success" *ngIf="field.checks.linkCreated">{{ field.processingSuccess }}</p>
<p class="alert alert-danger" *ngIf="field.processingStatus === 'done' && field.processingFail">
{{ field.processingFail }}</p>
......
......@@ -19,26 +19,26 @@
*/
/** IE9, IE10 and IE11 requires all of the following polyfills. **/
// import 'core-js/es6/symbol';
// import 'core-js/es6/object';
// import 'core-js/es6/function';
// import 'core-js/es6/parse-int';
// import 'core-js/es6/parse-float';
// import 'core-js/es6/number';
// import 'core-js/es6/math';
// import 'core-js/es6/string';
// import 'core-js/es6/date';
// import 'core-js/es6/array';
// import 'core-js/es6/regexp';
// import 'core-js/es6/map';
// import 'core-js/es6/weak-map';
// import 'core-js/es6/set';
import 'core-js/es6/symbol';
import 'core-js/es6/object';
import 'core-js/es6/function';
import 'core-js/es6/parse-int';
import 'core-js/es6/parse-float';
import 'core-js/es6/number';
import 'core-js/es6/math';
import 'core-js/es6/string';
import 'core-js/es6/date';
import 'core-js/es6/array';
import 'core-js/es6/regexp';
import 'core-js/es6/map';
import 'core-js/es6/weak-map';
import 'core-js/es6/set';
/** IE10 and IE11 requires the following for NgClass support on SVG elements */
// import 'classlist.js'; // Run `npm install --save classlist.js`.
import 'classlist.js'; // Run `npm install --save classlist.js`.
/** IE10 and IE11 requires the following for the Reflect API. */
// import 'core-js/es6/reflect';
import 'core-js/es6/reflect';
/** Evergreen browsers require these. **/
......@@ -57,15 +57,18 @@ import 'core-js/es7/reflect';
* user can disable parts of macroTask/DomEvents patch by setting following flags
*/
// (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame
// (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick
// (window as any).__zone_symbol__BLACK_LISTED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames
// (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame
// (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick
// (window as any).__zone_symbol__BLACK_LISTED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames
/*
* in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js
* with the following flag, it will bypass `zone.js` patch for IE/Edge
*/
// (window as any).__Zone_enable_cross_context_check = true;
/*
* in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js
* with the following flag, it will bypass `zone.js` patch for IE/Edge
*/
//(window as any).__Zone_enable_cross_context_check = true;
if (document['documentMode'] || /Edge/.test(navigator.userAgent)) {
(window as any).__Zone_enable_cross_context_check = true;
}
/***************************************************************************************************
* Zone JS is required by default for Angular itself.
......
......@@ -27,5 +27,6 @@
"exclude": [
"node_modules",
"**/*.spec.ts"
]
],
"allowSyntheticDefaultImports": true
}
This diff is collapsed.
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const Rx_1 = require("rxjs/Rx");
const rxjs_1 = require("rxjs");
require("rxjs/add/operator/map");
const controller = require("../core/CoreController");
const Config_1 = require("../Config");
......@@ -27,7 +27,7 @@ var Controllers;
const userId = req.user.id;
this.config.brandingAndPortalUrl = BrandingService.getFullPath(req);
const userInfo = LabarchivesService.login(this.config.key, user.username, user.password);
Rx_1.Observable.fromPromise(userInfo).flatMap(response => {
rxjs_1.Observable.fromPromise(userInfo).flatMap(response => {
const userInfo = response['users'];
if (userInfo) {
info = new UserInfo_1.UserInfo(userInfo['id'], userInfo['orcid'], userInfo['fullname'], userInfo['notebooks']);
......@@ -70,10 +70,10 @@ var Controllers;
const user = response['users'] || null;
if (user) {
const userInfo = LabarchivesService.userInfo(this.config.key, user['id']);
return Rx_1.Observable.fromPromise(userInfo);
return rxjs_1.Observable.fromPromise(userInfo);
}
else {
return Rx_1.Observable.throw('');
return rxjs_1.Observable.throw('');
}
})
.subscribe(response => {
......@@ -131,14 +131,15 @@ var Controllers;
.flatMap(response => {
workspace = response;
const insertNode = LabarchivesService.insertNode(this.config.key, info['id'], nbId, 'stash.workspace', false);
return Rx_1.Observable.fromPromise(insertNode);
return rxjs_1.Observable.fromPromise(insertNode);
})
.flatMap(response => {
sails.log.debug('insertNode');
sails.log.debug(response);
const tree = response['tree-tools'];
const node = tree['node'];
metadataContent = `
if (response && response['tree-tools']) {
const tree = response['tree-tools'];
const node = tree['node'];
metadataContent = `
<div id="${workspace.oid}">
<h1>UTS</h1>
<h3>Workspace <strong>${nbName}</strong> is linked to:</h3>
......@@ -146,9 +147,12 @@ var Controllers;
<p>Stash Id: ${workspace.oid}</p>
</div>
`;
const partType = 'text entry';
const insertNode = LabarchivesService.addEntry(this.config.key, info['id'], nbId, node['tree-id'], partType, metadataContent);
return Rx_1.Observable.fromPromise(insertNode);
const partType = 'text entry';
const insertNode = LabarchivesService.addEntry(this.config.key, info['id'], nbId, node['tree-id'], partType, metadataContent);
return rxjs_1.Observable.fromPromise(insertNode);
}
else
return rxjs_1.Observable.throwError(new Error('cannot insert node'));
})
.flatMap(response => {
if (recordMetadata.workspaces) {
......@@ -184,7 +188,7 @@ var Controllers;
.flatMap(response => {
info = response.info;
const nbTree = LabarchivesService.getNotebookTree(this.config.key, info['id'], nbId, 0);
return Rx_1.Observable.fromPromise(nbTree);
return rxjs_1.Observable.fromPromise(nbTree);
})
.subscribe(response => {
if (response['tree-tools'] && response['tree-tools']['level-nodes']) {
......
......@@ -55,14 +55,20 @@ module.exports = {
class: 'LabarchivesListField',
viewOnly: false,
definition: {
name: 'List'
name: 'List',
linkedLabel: 'Linked with Stash'
}
},
{
class: 'LabarchivesLinkField',
viewOnly: false,
definition: {
name: 'Link'
name: 'Link',
processingLabel: 'Processing...',
processingSuccess: 'Your workspace was linked successfully',
processingFail: 'There was a problem linking your workspace, please try again later',
processingNoPermission: 'You do not have rights to modify this item',
closeLabel: 'Close',
}
},
{
......
......@@ -2,7 +2,7 @@ declare var module;
declare var sails, Model;
declare var _;
import {Observable} from 'rxjs/Rx';
import {Observable} from 'rxjs';
import 'rxjs/add/operator/map';
declare var BrandingService, WorkspaceService, LabarchivesService;
......@@ -161,9 +161,10 @@ export module Controllers {
.flatMap(response => {
sails.log.debug('insertNode');
sails.log.debug(response);
const tree = response['tree-tools'];
const node = tree['node'];
metadataContent = `
if (response && response['tree-tools']) {
const tree = response['tree-tools'];
const node = tree['node'];
metadataContent = `
<div id="${workspace.oid}">
<h1>UTS</h1>
<h3>Workspace <strong>${nbName}</strong> is linked to:</h3>
......@@ -171,11 +172,12 @@ export module Controllers {
<p>Stash Id: ${workspace.oid}</p>
</div>
`;
const partType = 'text entry';
const insertNode = LabarchivesService.addEntry(
this.config.key, info['id'], nbId, node['tree-id'], partType, metadataContent
);
return Observable.fromPromise(insertNode);
const partType = 'text entry';
const insertNode = LabarchivesService.addEntry(
this.config.key, info['id'], nbId, node['tree-id'], partType, metadataContent
);
return Observable.fromPromise(insertNode);
} else return Observable.throwError(new Error('cannot insert node'));
})
.flatMap(response => {
if (recordMetadata.workspaces) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment