centerforopenscience / ember-osf Goto Github PK
View Code? Open in Web Editor NEWEmber Addon for interacting with the Open Science Framework
Home Page: http://centerforopenscience.github.io/ember-osf/
License: Apache License 2.0
Ember Addon for interacting with the Open Science Framework
Home Page: http://centerforopenscience.github.io/ember-osf/
License: Apache License 2.0
See discussion here: #4 (comment)
So whatever was updated most recently has broke our ability to develop further on our own app. I followed your README.md file and I am assuming that you want me to run the configuration within my own app root folder. I have created a .yml file in my config directory that has the same name as my computer name "my_computer.yml". When I try to run the ember server using BACKEND=stage ember s
, I get a error: WARNING: No configurations found in configuration directory:/home/username/Documents/Projects//osf-ember-app/ember-osf/config
and a lot of WARNING: you have specified a backend 'stage' that you have not configured in your config/<hostname>.yml
The server starts, but when it sends me to the OSF login, I get undefined for client id and the token in the URL, and an error from OSF stating that the client id is a invalid or missing parameter.
If I run ember g ember-osf-settings echo $HOSTNAME
, I get an error about ENOENT: no such file or directory
and the directory in question is node_modules/node-sass/vendor having , and everything instantly breaks. No configuration file is even created. So now in my ember-osf directory I cannot even get the dummy app to run. In my own app, I can't get past OSF authentication because of the client ID.
Sorry for the lack of useful information on this one. At the moment, the problem seemingly occurs at random when issuing a batch of requests. I'm seeing an error that looks like this:
XMLHttpRequest cannot load https://staging-api.osf.io/v2/nodes/<node_id>/.
No 'Access-Control-Allow-Origin' header is present on the requested resource.
Origin 'http://localhost:4200' is therefore not allowed access.
The only info I have is this:
/v2/nodes/
, node relationship links, and /v2/users/
The nodes route is trying to fetch the current user (loaded in the application route's model hook--
this.modelFor('application')
). Unfortunately the application route's model hook is only run once (when the SPA is first loaded) and there is a slight timing issue between the dummy app's login route (which parses the OAuth token from the query string and "logs in" the user) and when the application route runs. Basically on redirect from the OSF CAS:ApplicationRoute.model returns null -> LoginRoute parses token and authenticates user -> redirected to index page -> you click "My Nodes", but the ApplicationRoute's model is still null
So when you refresh the page or visit the nodes page directly, the ApplicationRoute is able to correctly fetch the current user.
I noticed that the date created and modified are both wrong. After investigating the issue, I found that they are sent in the json, but end up blank. Looking at this ember-moment code inside helper-compute.js, I discovered this:
if (isBlank(datetime)) { if (allowEmpty) { return; } else { Ember.Logger.warn('ember-moment: an empty value (null, undefined, or "") was passed to moment-format'); } }
The warning is logged which implies that it is coming back as blank.Title and category work fine and even setting the attr type of dateCreated and dateModified to string didn't do anything either. It still came in empty.
This maybe more of a feature request, but I think that all Bootstrap dependencies should be removed. We are using Semantic-UI in our project and of course they conflict. There are Bootstrap dependencies in the ember-cli-build.js file and bower.json. The dummy app really does not need Bootstrap.
Hi,
I had a problem calling node.save();
which resulted in this error:
TypeError: Cannot read property 'get' of undefined
at node.js:140
at Array.filter (<anonymous>)
at Class.save (node.js:139)
at Class.superWrapper [as save] (ember.debug.js:45374)
I found the culprit in addons/models/node.js
Within the line
contributors.members.list.filter(m => !m.record.get('isNew') ...
Where record
was not found in m
. However, I did find that m
contained _record
.
So my solution was to just change all references of m.record
to m._record
and this fixed the issue for me. Not entirely sure if this is a correct solution though.
Two things to look into:
Node.comments
relationship is not filtering correctly. We may need to double check the that this uses the URL provided in the relationships link on the Node's payload.Comment.replies
relationships also is not filtering correctly.For example, when requesting a list of comments for a project ...
Request: GET /v2/nodes/<project_id>/comments/?filter[target]=<project_id>
I get this response:
...
"replies": {
"links": {
"related": {
"href" : "https://staging-api.osf.io/v2/nodes/<project>/comments/?filter=%5Btarget%5D=ug69r64m5asn"
where the query params are ?filter=[target]=ug69r64m5asn
there is an extra '=' that should be removed.
the link should look like this ?filter[target]=ug69r64m5asn
I believe this is causing complications for our application when trying to retrieve comments' replies.
This may also be related to similar problems reported in #95
We shouldn't have an explicit trailing slash here: https://github.com/CenterForOpenScience/ember-osf/blob/develop/addon/mixins/osf-login-controller.js#L9
This is something that should be configured on a per-app basis in local.yml.
This should be accompanied by documentation updates.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.