Coder Social home page Coder Social logo

olgabrani / synnefo Goto Github PK

View Code? Open in Web Editor NEW

This project forked from grnet/synnefo

1.0 1.0 1.0 38.78 MB

Synnefo is open source cloud software, used to create massively scalable IaaS clouds.

License: GNU General Public License v3.0

Python 64.89% Makefile 0.21% Shell 0.21% Ruby 0.01% CSS 8.85% JavaScript 22.54% HTML 3.29% Mako 0.01% DIGITAL Command Language 0.01%

synnefo's People

Contributors

athinab avatar bkarak avatar chazapis avatar cnanakos avatar cstavr avatar d-mo avatar dimara avatar erethon avatar ergonomicon avatar gdtsouk avatar gkorf avatar gousiosg avatar iliastsi avatar jbd avatar johngian avatar loverdos avatar marioskogias avatar olgabrani avatar papagian avatar pgerakios avatar philipgian avatar psomas avatar saxtouri avatar skalkoto avatar verigak avatar vgerak avatar vinilios avatar vkoukis avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

athinab

synnefo's Issues

Cannot assign project when creating new container

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...

Download link for object's previous versions

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:

  • Assign an itemController='version' for each v in versions and calculate through this controller each v's view_src attribute.
  • Use {{#with}} to access view_src from inside the loop.

998702a

Show objects when visiting container's route

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.

Observes() observes property that is not present

be94754

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.

Implement all object's actions

The following actions apply to all container's objects:

  • Cut & Paste
  • Copy & Paste
  • Move to trash
  • Show properties
  • Add metadata
  • Share
  • Delete
  • Rename
  • Restore from trash

File objects only

  • Restore version
  • Download version
  • Download
  • Show versions
  • Upload file(s)
  • Abort uploading
  • Remove objects from uploading queue

Folder objects only

  • Refresh
  • Create directory

Renaming containers

Is renaming containers action desired and if yes is it supported by the API?

Quotas and reassign project

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 in tag controller does not store tag color

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.

Router.js updated schema

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:

  • Account
    • Groups
    • Containers
      • Objects

This way '/' (account) will be returning groups and containers.

@vinilios

How to handle img src for objects in containers

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

Bug when container model is loading

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:

  • The model's API call is executed twice when you visit directly the container's url.
  • The second time it is executed, the parameter 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?

Wrong API Request URL

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>

Pithos deleted group bug

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.

Timestamp

Throughout pithos, timestamp is calculated always on seconds?

Container delete bug

Adapter's deleteRecord is not called.

Working case

  • Create a container
  • Verify that it has been created running 'kamaki container list'
  • Refresh the page
  • Delete the container
  • Verify from console logs that a "DELETE" call has been send

How to reproduce this bug

  • Create a container
  • Verify that it has been created running 'kamaki container list'
  • Delete this container without refreshing the page
  • Check that no "DELETE" call has been send

Error handling: Not valid url of object

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.

Reassign container to another project bug

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 ๐Ÿ˜ฃ

Containers usage

The following information is available:

  • Diskspace used by the current user per project.
  • Total diskspace used by all members of a project per project.
  • Max allowed diskspace usage for the current user per project.
  • Really available diskspace for the current user per project.

Which usage numbers are we going to show to the user and how are we going to present this info?

Available actions

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.

Dialog overlay changes view's controller

fc78f7b

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.

Files/folders icons

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.

Empty container

Goal

Perform "empty Container" action

Considerations

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?

Implement container's objects page

I am starting a discussion on how to list objects.

Object could be a folder or a file.

URLs

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:

Missing newly created object id

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.

Handling copy paste of object with the same name

Currently

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).

Alternative approach

When you cut/copy an object whose name already exists, a new object by the name name(1) is created.

Discussion

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.

@vinilios

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.