From: Michal Fojtik <[email protected]>
Signed-off-by: Michal fojtik <[email protected]> --- server/lib/sinatra.rb | 21 +++++++++++++++++++++ server/views/storage_snapshots/show.xml.haml | 4 +--- 2 files changed, 22 insertions(+), 3 deletions(-) create mode 100644 server/lib/sinatra.rb diff --git a/server/lib/sinatra.rb b/server/lib/sinatra.rb new file mode 100644 index 0000000..6179d55 --- /dev/null +++ b/server/lib/sinatra.rb @@ -0,0 +1,21 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. The +# ASF licenses this file to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance with the +# License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + +require_relative 'sinatra/rack_date' +require_relative 'sinatra/rack_etag' +require_relative 'sinatra/rack_matrix_params' +require_relative 'sinatra/rack_driver_select' +require_relative 'sinatra/accept_media_types' +require_relative 'sinatra/rack_accept' diff --git a/server/views/storage_snapshots/show.xml.haml b/server/views/storage_snapshots/show.xml.haml index c151c1e..a47a652 100644 --- a/server/views/storage_snapshots/show.xml.haml +++ b/server/views/storage_snapshots/show.xml.haml @@ -1,9 +1,7 @@ - unless defined?(partial) !!! XML %storage_snapshot{:href => storage_snapshot_url(@storage_snapshot.id), :id => @storage_snapshot.id } + %name=@storage_snapshot.id %created< =@storage_snapshot.created %storage_volume{:href => storage_volume_url(@storage_snapshot.storage_volume_id), :id => @storage_snapshot.storage_volume_id} - %actions - - if driver.respond_to? :destroy_storage_snapshot - %link{:rel => :destroy, :method => :delete, :href => destroy_storage_snapshot_url(@storage_snapshot.id)} -- 1.7.10
