olgabrani / synnefo Goto Github PK
View Code? Open in Web Editor NEWThis project forked from grnet/synnefo
Synnefo is open source cloud software, used to create massively scalable IaaS clouds.
License: GNU General Public License v3.0
This project forked from grnet/synnefo
Synnefo is open source cloud software, used to create massively scalable IaaS clouds.
License: GNU General Public License v3.0
ui-web/adapters/group.js:40: Uncaught TypeError: Cannot read property 'forEach' of null
The addon has been tested and is easily installed:
$ npm install ember-cli-lightbox --save-dev
$ ember g ember-cli-lightbox
When the action is called from the controller, this.store.createRecord
creates the record client side.
Then, the model is saved to the backend when the method save()
is invoked.
The createRecord
is a Store's method that calls the adapter's createRecord
method, which in turns is overwritten by the restAdatpter's createRecord
that is last and not least overwritten by our custom ContainerRestAdapter createRecord
method.
(All these are mainly speculations
However, I cannot assign a project to the newly created container.
The project id is set in the headers as shown here, that are sent to the PUT API call...
Note that the API, in this case returns an empty array.
The download link for a normal object is an object's controller property that joins the pithos view url for the api settings and the full path of the object.
However, I cannot do the same for object's previous versions.
Inside the object/versions.hbs
, I have no access to view_src
controller's property inside {{#each v in versions}}
loop.
The whole thing seems trivial, but somehow I can't seem to be able to figure it out.
Some of the things I have tried include:
itemController='version'
for each v in versions and calculate through this controller each v's view_src attribute.{{#with}}
to access view_src from inside the loop.Currently, when visiting, the container's initial view, its objects are not shown.
A transitionTo
on container's route, causes all container_id/path urls to be redirected to container_id/ when you refresh the browser, so it had to be abandoned.
I wonder if this is the ember way to handle events on project selection change.
ContainerController has a watchProject method that observes changes in selectedProject
property in the selected projects < select >.
This is used for containers view where one can reassign each individual container.
However, when we navigate to single container view, there is no selectedProject property (at least not yet), and thus throwing a javascript error of cannot get property of undefined
.
It seems to me, that the solution I came up with is a little dirty.
It works however.
When you visit https://pithos.synnefo.live/ui/containers/
and then visit
https://pithos.synnefo.live/ui/containers/pithos
, pithos' objects are not loaded.
However, when you visit directly the page https://pithos.synnefo.live/ui/containers/pithos
all objects are visible
If you click multiple times a button that triggers the rendering of a dialog may have as a result the dialog to not be visible any more.
Is renaming containers action desired and if yes is it supported by the API?
At the moment, when the projects are fetched in containers view, the only information available is their project capacity for each resource.
Additionally, we need to have access to how much is the available resources left.
We could be calculating this form the containers' size or fetch this by an API call to the user's quotas.
createTag action found in tag controller should create a new tag with name and color and assign it to a VM.
Name is saved whereas color gets always the default _defaultNewTagColor value instead of the value of the input[id="color"] found in add-bar.hbs.
Current router has the following layout:
Router.map(function() {
this.resource('projects');
this.resource('project', { path: '/projects/:project_id' });
this.resource('containers');
this.resource('container', { path: '/containers/:container_id'}, function(){
this.resource('objects', { path: '/*current_path'}, function(){
this.resource('object', function(){
this.route('versions');
});
});
});
this.resource('quotas');
this.route('groups');
});
The problem with the current approach is that schematically, containers and groups are not under the account level, as the should according to the official API docs
Maybe we should use user account as a top level url, like this:
This way '/' (account) will be returning groups and containers.
When an object is moved to trash, the parent folders are to be created through separate API calls?
Currently, in Pithos, the img src for an image, has the format:
https://pithos.okeanos.grnet.gr/ui/view/<user_id>/<container_id>/<object_path>
What is the proper way to handle this?
Where does /ui/view/ come from?
Currently, ember does not recognise the above url scheme.
But should it?
Finally, <container_id>
is a parameter that in only passed though the route to the model query.
How will it be transmitted to the ObjectController?
Latest implementation: 1d270ae
When transitioning from ContainersRoute to ContainerRoute, in order to force model reloading, we used in routes/container.js
:
setupController: function(controller, model) {
model.reload();
this._super(controller, model); t
},
This however causes two problems:
path
is not taken upon consideration, thus resulting in empty object set.Moreover, when transitioning form /containers// to /containers//, the model is still not queried. Why?
When navigating to vm// url, the call is
https://cyclades.staging.okeanos.grnet.gr/compute/v2.0/servers/details/<server-id>
and it should be
https://cyclades.staging.okeanos.grnet.gr/compute/v2.0/servers/<server-id>
In old pithos, when we create a group, share a folder with this group, and then delete the group, the folder remains shared with the deleted group.
I guess this behaviour is erroneous, but just in case, we have to look into whether this is a feature or a bug.
I've noticed that you cannot create a directory after you have deleted another object.
Something goes wrong...
Throughout pithos, timestamp is calculated always on seconds?
To reproduce the bug, visit VMs grid view and click on the project icon.
Then, reassign the VM to another project.
You will notice that the list of the available projects is not updated.
Adapter's deleteRecord is not called.
For now, 404 page appears when the user tries to access a non-existing route.
For example: /containers/nonexisting_container
or /something_nonexisting
We probably should do the same when the user tries to access a non-existing object.
Which means that if the user types the url: /containers/container_name/folder-1/nonexisting_object
should 404 be rendered.
When the user tries to edit the name of the 'image' model in details view, the error
Uncaught Error: Assertion Failed: Unable to find transform for 'raw'
is returned.
I can't find the pattern under which the project's reassignment fails in containers view.
It seems to fail every third reassignment for each container
The following information is available:
Which usage numbers are we going to show to the user and how are we going to present this info?
At the moment, there is a call that fetches all projects and then filters them for each container in containers view.
Obviously this is redundant.
Add sections that will include the objects (files, directories) that are shared with the user or by the user.
Make the appropriate controls to allow users to execute only the permitted actions (by disable or hide the forbidden).
Permitted actions depend on the properties of each record and on the current route.
When the users tries to copy/paste an object, and it already exists in the destination folder, a dialog modal appears.
The dialog uses the 'objects' controller and sets as its model an array containing the object that will be pasted.
This causes the objects view to have as model only this object instead of its normal objects, while the dialog is open.
Check the type of each object and set the fitted icon.
In order to categorize the objects by type, should consider mimeType and the extension of the file.
Perform "empty Container" action
In order to empty a container, the same ajax call is to be sent as when it is deleted, but with the option delimiter=/
as data to the DELETE request.
One way to do this is to implement a custom adapter method, called emptyContainer
and then call it in an analogous way as in deleteRecord:
actions: {
deleteContainer: function(){
var container = this.get('model');
container.deleteRecord();
container.save();
}
}
The problem is that deleteRecord is a store's method, while I want to call an adapter's method.
Is this the correct way to handle this?
If yes, how do I access the adapter from the controller?
When one first visits VM details page, VMs list in left sidebar section is visible.
However, when one refreshes the page, VMs list is not populated by VMs.
I am starting a discussion on how to list objects.
Object could be a folder or a file.
We could use this in router.js
:
this.resource('container', { path: '/containers/:container_id'}, function((
this.resource('object', { path: ':object'});
});
One other approach would be to have this:
this.resource('container', { path: '/containers/:container_id/:path'});
In that case, if is not provided then container's only first level objects are shown.
If if provided, then probably we should do something like that:
When a new directory object is created, it has no id and consequently, does not appear immediately upon creation in the template.
The problem is that the id is assigned to the object, after it has been created and I don't know how to make the store aware of it.
When you cut/copy an object and you want to paste it to its current path, there is no option to do this.
When you cut/copy an object and you want to paste it to another path, where there is already another object with the same name, then the object is pasted and the previous object in the new path is overwritten (or to be more accurate, a new version of this object is created).
When you cut/copy an object whose name already exists, a new object by the name name(1) is created.
Is the current behaviour the desired one?
The truth is that current behaviour is a more bash-like and favors versioning.
The alternative approach would be more user friendly thought.
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.