deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfoj...@apache.org
Subject [4/7] git commit: Removed obsoleted CIMI views
Date Tue, 26 Mar 2013 12:36:23 GMT
Removed obsoleted CIMI views


Project: http://git-wip-us.apache.org/repos/asf/deltacloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltacloud/commit/12954bae
Tree: http://git-wip-us.apache.org/repos/asf/deltacloud/tree/12954bae
Diff: http://git-wip-us.apache.org/repos/asf/deltacloud/diff/12954bae

Branch: refs/heads/master
Commit: 12954bae2df9d42ec8023abf4a809d4ee190833c
Parents: 37b80f9
Author: Michal Fojtik <mfojtik@redhat.com>
Authored: Tue Mar 26 10:48:06 2013 +0100
Committer: Michal fojtik <mfojtik@redhat.com>
Committed: Tue Mar 26 10:50:00 2013 +0100

----------------------------------------------------------------------
 server/views/cimi/cloudEntryPoint/index.html.haml  |    5 -
 server/views/cimi/cloudEntryPoint/index.xml.haml   |    9 -
 server/views/cimi/collection/index.html.haml       |   45 ----
 server/views/cimi/collection/response.xml.haml     |    3 -
 server/views/cimi/error.html.haml                  |   31 ---
 server/views/cimi/errors/400.xml.haml              |    3 -
 server/views/cimi/errors/401.xml.haml              |    2 -
 server/views/cimi/errors/403.xml.haml              |    2 -
 server/views/cimi/errors/404.xml.haml              |    2 -
 server/views/cimi/errors/405.xml.haml              |    5 -
 server/views/cimi/errors/500.xml.haml              |    6 -
 server/views/cimi/errors/502.xml.haml              |    7 -
 server/views/cimi/layout.html.haml                 |   32 ---
 .../cimi/machine_configurations/show.html.haml     |  159 -------------
 .../cimi/machine_configurations/show.xml.haml      |   27 ---
 server/views/cimi/machine_images/show.html.haml    |   79 -------
 server/views/cimi/machine_images/show.xml.haml     |   17 --
 server/views/cimi/machines/show.html.haml          |  177 ---------------
 server/views/cimi/machines/show.xml.haml           |   28 ---
 server/views/cimi/volumes/show.html.haml           |   68 ------
 server/views/cimi/volumes/show.xml.haml            |   17 --
 21 files changed, 0 insertions(+), 724 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltacloud/blob/12954bae/server/views/cimi/cloudEntryPoint/index.html.haml
----------------------------------------------------------------------
diff --git a/server/views/cimi/cloudEntryPoint/index.html.haml b/server/views/cimi/cloudEntryPoint/index.html.haml
deleted file mode 100644
index 76f147b..0000000
--- a/server/views/cimi/cloudEntryPoint/index.html.haml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-- @collections.each do |p|
-  - name, path = p
-  = link_to name.to_s.capitalize, path
-  %br/

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/12954bae/server/views/cimi/cloudEntryPoint/index.xml.haml
----------------------------------------------------------------------
diff --git a/server/views/cimi/cloudEntryPoint/index.xml.haml b/server/views/cimi/cloudEntryPoint/index.xml.haml
deleted file mode 100644
index cce651b..0000000
--- a/server/views/cimi/cloudEntryPoint/index.xml.haml
+++ /dev/null
@@ -1,9 +0,0 @@
-!!!XML
-%CloudEntryPoint{ :xmlns => CMWG_NAMESPACE }
-  %uri= url_for("/cloudEntryPoint")
-  %name cloud entry point
-  %description cloud entry point
-  %created= Time.new.getutc.to_s
-  - @collections.each do |api|
-    - res_name = api[0].to_s.camelize(:lower_case_first_letter)
-    = "<#{res_name} href=\"#{api[1]}\"/>"

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/12954bae/server/views/cimi/collection/index.html.haml
----------------------------------------------------------------------
diff --git a/server/views/cimi/collection/index.html.haml b/server/views/cimi/collection/index.html.haml
deleted file mode 100644
index 76ea9ba..0000000
--- a/server/views/cimi/collection/index.html.haml
+++ /dev/null
@@ -1,45 +0,0 @@
-- new_name = @dmtfitem["uri"] + " Collection"
-- new_name = new_name.gsub(/[A-Z]/, ' \0')
-%h1 #{new_name.capitalize}
-
-%form{ :action => url_for("/collection/" + @dmtfitem["uri"]) }
-  %input{ :name => :id, :type => :hidden, :value => @dmtfitem["uri"] }/
-  %input{ :name => :xmlRootNode, :type => :hidden, :value => @xml_root_node }/
-  %p
-    %label
-      Name:
-  %p
-    %input{ :name => :name, :size => 50, :value => @dmtfitem["name"], :style =>
"width:50%;" }
-    %input{ :name => :created, :type => :hidden, :size => 50, :value => @dmtfitem["created"]
}
-  %p
-  %br
-    %label
-      Description:
-  %p
-    %textarea{ :name => :description, :cols => 50, :rows => 4, :style => "width:50%;"
} #{@dmtfitem['description']}
-  %p
-    - if @dmtfitem["operation"]
-      - if @dmtfitem["operation"].kind_of? (Array)
-        - property_object = @dmtfitem["operation"]
-      - else
-        - property_object = [@dmtfitem["operation"]]
-      - iter = -1
-      - property_object.map do | operation|
-        - iter += 1
-        %br
-        %label
-          = operation["rel"].capitalize + ":&nbsp;" + url_for(operation["href"])
-          %input{ :name => "operation_"+iter.to_s, :oper_type => operation["rel"],
:type => :hidden, :value => operation["href"] }
-  %br
-%p
-%br
-- new_name = @dmtfitem["uri"]
-- new_name = new_name.gsub(/[A-Z]/, ' \0')
-- if @dmtf_col_items
-  %label
-    = new_name.capitalize.pluralize + ":"
-  %table{ :style => "width:52%;"}
-    - @dmtf_col_items.map do |template|
-      %tr
-        %td
-          %a{ :href => template["href"] }= template["name"]

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/12954bae/server/views/cimi/collection/response.xml.haml
----------------------------------------------------------------------
diff --git a/server/views/cimi/collection/response.xml.haml b/server/views/cimi/collection/response.xml.haml
deleted file mode 100644
index 0b8eb7a..0000000
--- a/server/views/cimi/collection/response.xml.haml
+++ /dev/null
@@ -1,3 +0,0 @@
-!!!XML
-%ReturnCode{ :xmlns => CMWG_NAMESPACE }
-  %Status= "Success"

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/12954bae/server/views/cimi/error.html.haml
----------------------------------------------------------------------
diff --git a/server/views/cimi/error.html.haml b/server/views/cimi/error.html.haml
deleted file mode 100644
index 942393c..0000000
--- a/server/views/cimi/error.html.haml
+++ /dev/null
@@ -1,31 +0,0 @@
-!!!
-!!! XML
-
-%html
-  %head
-    = stylesheet_link_tag '/stylesheets/compiled/screen.css', :media => 'screen, projection'
-    = stylesheet_link_tag '/stylesheets/compiled/print.css', :media => 'print'
-    /[if lt IE 8]
-      = stylesheet_link_tag '/stylesheets/compiled/ie.css', :media => 'screen, projection'
-    = stylesheet_link_tag '/stylesheets/compiled/application.css', :media => 'screen,
projection'
-    %script{:type => "text/javascript", :src => "/javascripts/jquery-1.4.2.min.js"
}
-    %script{:type => "text/javascript", :src => "/javascripts/application.js" }
-  %body
-    #wrapper
-      #header
-        = link_to image_tag( "/images/logo-wide.png" ), settings.root_url
-      = bread_crumb
-      #content{:class => :error}
-        = yield
-      #footer
-        #formats
-          Format:
-          =link_to_format(:xml)
-          |
-          =link_to_format(:json)
-        #driver_info
-          Driver: #{driver_symbol} | API version: #{settings.version}
-        #copyright
-          Copyright 2009-2011
-          %a{:href => 'http://incubator.apache.org/deltacloud/'} The Apache Software Foundation
-          and individual contributors.

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/12954bae/server/views/cimi/errors/400.xml.haml
----------------------------------------------------------------------
diff --git a/server/views/cimi/errors/400.xml.haml b/server/views/cimi/errors/400.xml.haml
deleted file mode 100644
index b7eed5b..0000000
--- a/server/views/cimi/errors/400.xml.haml
+++ /dev/null
@@ -1,3 +0,0 @@
-%error{:url => "#{request.env['REQUEST_URI']}", :status => "#{response.status}"}
-  %parameter #{@error.name}
-  %message< #{cdata @error.message}

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/12954bae/server/views/cimi/errors/401.xml.haml
----------------------------------------------------------------------
diff --git a/server/views/cimi/errors/401.xml.haml b/server/views/cimi/errors/401.xml.haml
deleted file mode 100644
index e835db5..0000000
--- a/server/views/cimi/errors/401.xml.haml
+++ /dev/null
@@ -1,2 +0,0 @@
-%error{:url => "#{request.env['REQUEST_URI']}", :status => "#{response.status}"}
-  %message Authentication required

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/12954bae/server/views/cimi/errors/403.xml.haml
----------------------------------------------------------------------
diff --git a/server/views/cimi/errors/403.xml.haml b/server/views/cimi/errors/403.xml.haml
deleted file mode 100644
index 3bad335..0000000
--- a/server/views/cimi/errors/403.xml.haml
+++ /dev/null
@@ -1,2 +0,0 @@
-%error{:url => "#{request.env['REQUEST_URI']}", :status => "#{response.status}"}
-  %message Method not allowed for this resource

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/12954bae/server/views/cimi/errors/404.xml.haml
----------------------------------------------------------------------
diff --git a/server/views/cimi/errors/404.xml.haml b/server/views/cimi/errors/404.xml.haml
deleted file mode 100644
index 47aede6..0000000
--- a/server/views/cimi/errors/404.xml.haml
+++ /dev/null
@@ -1,2 +0,0 @@
-%error{:url => "#{request.env['REQUEST_URI']}", :status => "#{response.status}"}
-  %message Resource not found

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/12954bae/server/views/cimi/errors/405.xml.haml
----------------------------------------------------------------------
diff --git a/server/views/cimi/errors/405.xml.haml b/server/views/cimi/errors/405.xml.haml
deleted file mode 100644
index e0198f5..0000000
--- a/server/views/cimi/errors/405.xml.haml
+++ /dev/null
@@ -1,5 +0,0 @@
-%error{:url => "#{request.env['REQUEST_URI']}", :status => "#{response.status}"}
-  %message
-    Requested method not allowed
-  %method
-    =request.env['REQUEST_METHOD']

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/12954bae/server/views/cimi/errors/500.xml.haml
----------------------------------------------------------------------
diff --git a/server/views/cimi/errors/500.xml.haml b/server/views/cimi/errors/500.xml.haml
deleted file mode 100644
index 831d8a4..0000000
--- a/server/views/cimi/errors/500.xml.haml
+++ /dev/null
@@ -1,6 +0,0 @@
-%error{:url => "#{request.env['REQUEST_URI']}", :status => "#{response.status}"}
-  %kind backend_error
-  %message< #{cdata @error.message}
-  %backend{ :driver => driver_symbol }
-    %code=response.status
-  %backtrace< #{h bt(@error.backtrace)}

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/12954bae/server/views/cimi/errors/502.xml.haml
----------------------------------------------------------------------
diff --git a/server/views/cimi/errors/502.xml.haml b/server/views/cimi/errors/502.xml.haml
deleted file mode 100644
index 6e7a7b8..0000000
--- a/server/views/cimi/errors/502.xml.haml
+++ /dev/null
@@ -1,7 +0,0 @@
-%error{:url => "#{request.env['REQUEST_URI']}", :status => "#{response.status}"}
-  %kind backend_error
-  %backend{ :driver => driver_symbol }
-    %code= @error.code
-    - if @error.respond_to?(:details) && @error.details
-      %details< #{cdata @error.details.join("\n")}
-  %message< #{cdata @error.message}

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/12954bae/server/views/cimi/layout.html.haml
----------------------------------------------------------------------
diff --git a/server/views/cimi/layout.html.haml b/server/views/cimi/layout.html.haml
deleted file mode 100644
index 7c3b754..0000000
--- a/server/views/cimi/layout.html.haml
+++ /dev/null
@@ -1,32 +0,0 @@
-!!!
-!!! XML
-
-%html
-  %head
-    = stylesheet_link_tag '/stylesheets/compiled/screen.css', :media => 'screen, projection'
-    = stylesheet_link_tag '/stylesheets/compiled/print.css', :media => 'print'
-    /[if lt IE 8]
-      = stylesheet_link_tag '/stylesheets/compiled/ie.css', :media => 'screen, projection'
-    = stylesheet_link_tag '/stylesheets/compiled/application.css', :media => 'screen,
projection'
-    %script{:type => "text/javascript", :src => "/javascripts/jquery-1.4.2.min.js"
}
-    %script{:type => "text/javascript", :src => "/javascripts/application.js" }
-    %script{:type => "text/javascript", :src => "/javascripts/cmwgapp.js" }
-  %body
-    #wrapper
-      #header
-        = link_to image_tag( "/images/logo-wide.png" ), settings.root_url
-      = bread_crumb_ext
-      #content
-        = yield
-      #footer
-        #formats
-          Format:
-          =link_to_format(:xml)
-          |
-          =link_to_format(:json)
-        #driver_info
-          Driver: #{driver_symbol} | API version: #{settings.version}
-        #copyright
-          Copyright 2009-2011
-          %a{:href => 'http://incubator.apache.org/deltacloud/'} The Apache Software Foundation
-          and individual contributors.

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/12954bae/server/views/cimi/machine_configurations/show.html.haml
----------------------------------------------------------------------
diff --git a/server/views/cimi/machine_configurations/show.html.haml b/server/views/cimi/machine_configurations/show.html.haml
deleted file mode 100644
index 0ab4971..0000000
--- a/server/views/cimi/machine_configurations/show.html.haml
+++ /dev/null
@@ -1,159 +0,0 @@
-%h1 View/Edit machine configuration
-
-%form{ :action => machine_configurations_url }
-  %input{ :name => :id, :type => :hidden, :value => @dmtfitem["uri"] }/
-  %input{ :name => :xmlRootNode, :type => :hidden, :value => @xml_root_node }/
-  %input{ :name => :refreshURI, :type => :hidden, :value => machine_configurations_url
}/
-  %p
-    %label
-      Name:
-  %p
-    %input{ :name => :name, :size => 50, :value => @dmtfitem["name"], :style =>
"width:50%;" }
-    %input{ :name => :created, :type => :hidden, :size => 50, :value => @dmtfitem["created"]
}
-  %p
-  %br
-    %label
-      Description:
-  %p
-    %textarea{ :name => :description, :cols => 50, :rows => 4, :style => "width:50%;"
} #{@dmtfitem['description']}
-  %p
-  %br
-    %label
-      Properties:
-  %p
-    %table{ :style => "width:50%;", :id => "propertyTable"}
-      - if @dmtfitem["property"]
-        - if @dmtfitem["property"]["name"] && @dmtfitem["property"]["content"]
-          - property_object = {"#{@dmtfitem['property']['name']}" => {"content" =>
@dmtfitem["property"]["content"]}}
-        - else
-          - property_object = @dmtfitem["property"]
-
-        - iter = -1
-        - property_object.each_pair do |key, value|
-          - iter += 1
-          %tr
-            %td
-              %input{ :name => "param_name_" + iter.to_s, :size => 30, :value =>
key }
-            %td
-              %input{ :name => "param_value_" + iter.to_s, :size => 30, :value =>
value["content"] }
-            %td
-              %input{ :type => :button, :value => "Remove", :onClick => "return
removeProperty(this)" }
-    %input{ :type => :button, :name => "commit", :value => "Add new property", :onClick
=> "return AddNewPproperty('propertyTable')" }
-  %p
-  %br
-    %label
-      Cpu:
-  %p
-    %input{ :name => :cpu, :size => 50, :value => @dmtfitem["cpu"], :style =>
"width:50%;" }
-  %br
-    %label
-      Memory:
-  %p
-    %input{ :name => :memory_quantity, :size => 20, :value => @dmtfitem["memory"]["quantity"],
:style => "width:10%;" } &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-    %input{ :name => :memory_units, :size => 20, :value => @dmtfitem["memory"]["units"],
:style => "width:10%;" }
-  %br
-    %label
-      Disk:
-  %p
-    %table{ :style => "width:50%;", :id => "diskTable"}
-      - if @dmtfitem["disk"]
-        - if @dmtfitem["disk"].kind_of?(Array)
-          - property_object = @dmtfitem["disk"]
-        - else
-          - property_object = [@dmtfitem["disk"]]
-
-        - iter = -1
-        %tr
-          %td
-            %label
-              Quantity
-          %td
-            %label
-              Units
-          %td
-            %label
-              GuestInterface
-          %td &nbsp;
-        - property_object.each do |disk|
-          - iter += 1
-          %tr
-            %td
-              %input{ :name => "disk_quantity_" + iter.to_s, :size => 10, :value =>
disk["capacity"]["quantity"] }
-            %td
-              %input{ :name => "disk_units_" + iter.to_s, :size => 10, :value =>
disk["capacity"]["units"] }
-            %td
-              %input{ :name => "disk_guestInterface_" + iter.to_s, :size => 30, :value
=> disk["guestInterface"] }
-            %td
-              %input{ :type => :button, :value => "Remove", :onClick => "return
removeProperty(this)" }
-    %input{ :type => :button, :name => "commit", :value => "Add new disk", :onClick
=> "return addDiskRow('diskTable')" }
-
-  %br
-  %label
-    EntityMetadata:
-  %br
-
-:javascript
-  function fixupXml(theNode) {
-    var xmlData = "<?xml version='1.0' encoding='utf-8' ?>";
-    xmlData += "<" + $(theNode.form).attr("xmlRootNode").value + " xmlns='http://schemas.dmtf.org/cimi/1'>";
-    xmlData += getStandardData(theNode);
-    xmlData += "<cpu>" + $(theNode.form).attr("cpu").value + "</cpu>";
-    xmlData += "<memory quantity='" + $(theNode.form).attr("memory_quantity").value +
"' units='";
-    xmlData += $(theNode.form).attr("memory_units").value + "' />"
-
-    var index=0;
-    subDisk = ""
-    while ($(theNode.form).attr("disk_quantity_" + index)) {
-      if ($(theNode.form).attr("disk_quantity_" + index).value != null &&
-          $(theNode.form).attr("disk_quantity_" + index).value.length > 0) {
-        subDisk += "<capacity quantity='" + $(theNode.form).attr("disk_quantity_" + index).value
+ "' units='" +
-                   $(theNode.form).attr("disk_units_" + index).value + "' />";
-        subDisk += "<guestInterface>" + $(theNode.form).attr("disk_guestInterface_"
+ index).value + "</guestInterface>";
-      }
-      index++;
-    }
-    if (subDisk.length > 0) {
-      xmlData += "<disk>" + subDisk +  "</disk>";
-    }
-
-    xmlData += "</" + $(theNode.form).attr("xmlRootNode").value + ">";
-
-    return xmlData;
-  }
-
-  function addDiskRow(tableId) {
-    var tbl = document.getElementById(tableId);
-    var lastRow = tbl.rows.length;
-    // if there's no header row in the table, then iteration = lastRow + 1
-    var iteration = lastRow - 1;
-    var row = tbl.insertRow(lastRow);
-
-    elNames = ['disk_quantity_', 'disk_units_', 'disk_guestInterface_'];
-    elSizes = [10, 10, 30]
-    elValues = ["200", "megabyte", ""]
-
-    for (var index=0; index<elNames.length; index++) {
-       var aCellTD = row.insertCell(index);
-       var aCell = document.createElement('input');
-       aCell.type = 'text';
-       aCell.name = elNames[index] + iteration;
-       aCell.id = aCell.name;
-       aCell.size = elSizes[index];
-       aCell.value = elValues[index];
-       aCellTD.appendChild(aCell);
-    }
-
-    // select cell
-    var cellRightBut = row.insertCell(elNames.length);
-    var er = document.createElement('input');
-    er.type = 'button';
-    er.name = 'param_remove' + iteration;
-    er.id = 'param_remove' + iteration;
-    er.value = "Remove";
-    er.tableRow = row
-    $(er).click(function() {
-     removeProperty(this);
-    })
-
-    cellRightBut.appendChild(er);
-  }

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/12954bae/server/views/cimi/machine_configurations/show.xml.haml
----------------------------------------------------------------------
diff --git a/server/views/cimi/machine_configurations/show.xml.haml b/server/views/cimi/machine_configurations/show.xml.haml
deleted file mode 100644
index dbcfe78..0000000
--- a/server/views/cimi/machine_configurations/show.xml.haml
+++ /dev/null
@@ -1,27 +0,0 @@
-- unless defined?(partial)
-  !!! XML
-%MachineConfiguration{ :xmlns => CMWG_NAMESPACE }
-  %uri=machine_configurations_url + "/" + @dmtfitem["uri"]
-  %name=@dmtfitem["name"]
-  %description=@dmtfitem["description"]
-  %created=@dmtfitem["created"]
-  - if @dmtfitem["property"]
-    - if @dmtfitem["property"]["name"] && @dmtfitem["property"]["content"]
-      - property_object = {"#{@dmtfitem['property']['name']}" => {"content" => @dmtfitem["property"]["content"]}}
-    - else
-      - property_object = @dmtfitem["property"]
-    - property_object.each_pair do |key, value|
-      %property{ :name => key}=value["content"]
-  %cpu=@dmtfitem["cpu"]
-  %memory{ :quantity => @dmtfitem["memory"]["quantity"], :units => @dmtfitem["memory"]["units"]
}
-  - if @dmtfitem["disk"]
-    - if @dmtfitem["disk"].kind_of?(Array)
-      - property_object = @dmtfitem["disk"]
-    - else
-      - property_object = [@dmtfitem["disk"]]
-    - property_object.each do |disk|
-      %disk
-        %capacity{ :quantity => disk["capacity"]["quantity"], :units => disk["capacity"]["units"]
}
-        %guestInterface= disk["guestInterface"]
-  %operation{ :rel => "edit", :href => machine_configurations_url + "/" + @dmtfitem["uri"]
}
-  %operation{ :rel => "delete", :href => machine_configurations_url + "/" + @dmtfitem["uri"]
}

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/12954bae/server/views/cimi/machine_images/show.html.haml
----------------------------------------------------------------------
diff --git a/server/views/cimi/machine_images/show.html.haml b/server/views/cimi/machine_images/show.html.haml
deleted file mode 100644
index 68cecc3..0000000
--- a/server/views/cimi/machine_images/show.html.haml
+++ /dev/null
@@ -1,79 +0,0 @@
-%h1 View/Edit machine image
-
-%form{ :action => machine_images_url }
-  %input{ :name => :id, :type => :hidden, :value => @dmtfitem["uri"] }/
-  %input{ :name => :xmlRootNode, :type => :hidden, :value => @xml_root_node }/
-  %input{ :name => :refreshURI, :type => :hidden, :value => machine_images_url }/
-  %p
-    %label
-      Name:
-  %p
-    %input{ :name => :name, :size => 50, :value => @dmtfitem["name"], :style =>
"width:50%;" }
-    %input{ :name => :created, :type => :hidden, :size => 50, :value => @dmtfitem["created"]
}
-  %p
-  %br
-    %label
-      Description:
-  %p
-    %textarea{ :name => :description, :cols => 50, :rows => 4, :style => "width:50%;"
} #{@dmtfitem['description']}
-  %p
-  %br
-    %label
-      Properties:
-  %p
-    %table{ :style => "width:50%;", :id => "propertyTable"}
-      - if @dmtfitem["property"]
-        - if @dmtfitem["property"]["name"] && @dmtfitem["property"]["content"]
-          - property_object = {"#{@dmtfitem['property']['name']}" => {"content" =>
@dmtfitem["property"]["content"]}}
-        - else
-          - property_object = @dmtfitem["property"]
-
-        - iter = -1
-        - property_object.each_pair do |key, value|
-          - iter += 1
-          %tr
-            %td
-              %input{ :name => "param_name_" + iter.to_s, :size => 30, :value =>
key }
-            %td
-              %input{ :name => "param_value_" + iter.to_s, :size => 30, :value =>
value["content"] }
-            %td
-              %input{ :type => :button, :value => "Remove", :onClick => "return
removeProperty(this)" }
-    %input{ :type => :button, :name => "commit", :value => "Add new property", :onClick
=> "return AddNewPproperty('propertyTable')" }
-  %p
-  %br
-    %label
-      Image Location:
-  %p
-    %input{ :name => :imageLocation, :size => 50, :value => @dmtfitem["imageLocation"],
:style => "width:50%;" }
-  %br
-    %label
-      Image Data:
-  %p
-    %textarea{:style=> "width:50%;height:100px;", :name => "imageData"}
-  %br
-  %label
-    EntityMetadata:
-  %br
-  %div{:style => "width:90%;"}
-    %pre
-      - if @metadata
-        = convert_xml_to_html @metadata
-  %br
-
-:javascript
-  function fixupXml(theNode) {
-    var xmlData = "<?xml version='1.0' encoding='utf-8' ?>";
-    xmlData += "<" + $(theNode.form).attr("xmlRootNode").value + " xmlns='http://schemas.dmtf.org/cimi/1'>";
-    xmlData += getStandardData(theNode);
-    xmlData += "<imageLocation href='" + $(theNode.form).attr("imageLocation").value +
"' />";
-    xmlData += "<imageData>" + $(theNode.form).attr("imageData").value + "</imageData>";
-
-    //we handle entityMetadata here
-    if ($(theNode.form).attr("entityMetadata") != null && $(theNode.form).attr("entityMetadata").value)
{
-      xmlData += $(theNode.form).attr("entityMetadata").value
-    }
-
-    xmlData += "</" + $(theNode.form).attr("xmlRootNode").value + ">";
-
-    return xmlData;
-  }

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/12954bae/server/views/cimi/machine_images/show.xml.haml
----------------------------------------------------------------------
diff --git a/server/views/cimi/machine_images/show.xml.haml b/server/views/cimi/machine_images/show.xml.haml
deleted file mode 100644
index 3d55ebf..0000000
--- a/server/views/cimi/machine_images/show.xml.haml
+++ /dev/null
@@ -1,17 +0,0 @@
-- unless defined?(partial)
-  !!! XML
-%MachineImage{ :xmlns => CMWG_NAMESPACE }
-  %uri=machine_images_url + "/" + @dmtfitem["uri"]
-  %name=@dmtfitem["name"]
-  %description=@dmtfitem["description"]
-  %created=@dmtfitem["created"]
-  - if @dmtfitem["property"]
-    - if @dmtfitem["property"]["name"] && @dmtfitem["property"]["content"]
-      - property_object = {"#{@dmtfitem['property']['name']}" => {"content" => @dmtfitem["property"]["content"]}}
-    - else
-      - property_object = @dmtfitem["property"]
-    - property_object.each_pair do |key, value|
-      %property{ :name => key}=value["content"]
-  %imageLocation{ :href => @dmtfitem["imageLocation"]}
-  %operation{ :rel => "edit", :href => machine_images_url + "/" + @dmtfitem["uri"]
}
-  %operation{ :rel => "delete", :href => machine_images_url + "/" + @dmtfitem["uri"]
}

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/12954bae/server/views/cimi/machines/show.html.haml
----------------------------------------------------------------------
diff --git a/server/views/cimi/machines/show.html.haml b/server/views/cimi/machines/show.html.haml
deleted file mode 100644
index 8ba662a..0000000
--- a/server/views/cimi/machines/show.html.haml
+++ /dev/null
@@ -1,177 +0,0 @@
-%h1 View/Edit machine
-
-%form{ :action => machines_url }
-  %input{ :name => :id, :type => :hidden, :value => @dmtfitem["uri"] }/
-  %input{ :name => :xmlRootNode, :type => :hidden, :value => @xml_root_node }/
-  %input{ :name => :refreshURI, :type => :hidden, :value => machines_url }/
-  %p
-    %label
-      Name:
-  %p
-    %input{ :name => :name, :size => 50, :value => @dmtfitem["name"], :style =>
"width:50%;" }
-    %input{ :name => :created, :type => :hidden, :size => 50, :value => @dmtfitem["created"]
}
-  %p
-  %br
-    %label
-      Description:
-  %p
-    %textarea{ :name => :description, :cols => 50, :rows => 4, :style => "width:50%;"
} #{@dmtfitem['description']}
-  %p
-  %br
-    %label
-      Properties:
-  %p
-    %table{ :style => "width:50%;", :id => "propertyTable"}
-      - if @dmtfitem["property"]
-        - if @dmtfitem["property"]["name"] && @dmtfitem["property"]["content"]
-          - property_object = {"#{@dmtfitem['property']['name']}" => {"content" =>
@dmtfitem["property"]["content"]}}
-        - else
-          - property_object = @dmtfitem["property"]
-
-        - iter = -1
-        - property_object.each_pair do |key, value|
-          - iter += 1
-          %tr
-            %td
-              %input{ :name => "param_name_" + iter.to_s, :size => 25, :value =>
key }
-            %td
-              %input{ :name => "param_value_" + iter.to_s, :size => 25, :value =>
value["content"] }
-            %td
-              %input{ :type => :button, :value => "Remove", :onClick => "return
removeProperty(this)" }
-    %input{ :type => :button, :name => "commit", :value => "Add new property", :onClick
=> "return AddNewPproperty('propertyTable')" }
-  %p
-  %br
-    %label
-      Status:
-  %p
-    %input{ :name => :status, :size => 50, :value => @dmtfitem["status"], :style
=> "width:50%;" }
-  %p
-  %br
-    %label
-      CPU:
-  %p
-    %input{ :name => :cpu, :size => 50, :value => @dmtfitem["cpu"], :style =>
"width:50%;" }
-  %br
-    %label
-      Memory:
-  %p
-    %input{ :name => :memory_quantity, :size => 20, :value => @dmtfitem["memory"]["quantity"],
:style => "width:10%;" } &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-    %input{ :name => :memory_units, :size => 20, :value => @dmtfitem["memory"]["units"],
:style => "width:10%;" }
-  %br
-    %label
-      Disk:
-  %p
-    %table{ :style => "width:50%;", :id => "diskTable"}
-      - if @dmtfitem["disk"]
-        - if @dmtfitem["disk"].kind_of?(Array)
-          - property_object = @dmtfitem["disk"]
-        - else
-          - property_object = [@dmtfitem["disk"]]
-
-        - iter = -1
-        %tr
-          %td
-            %label
-              Quantity
-          %td
-            %label
-              Units
-          %td
-            %label
-              GuestInterface
-          %td &nbsp;
-        - property_object.each do |disk|
-          - iter += 1
-          %tr
-            %td
-              %input{ :name => "disk_quantity_" + iter.to_s, :size => 10, :value =>
disk["capacity"]["quantity"] }
-            %td
-              %input{ :name => "disk_units_" + iter.to_s, :size => 10, :value =>
disk["capacity"]["units"] }
-            %td
-              %input{ :name => "disk_guestInterface_" + iter.to_s, :size => 20, :value
=> disk["guestInterface"] }
-            %td
-              %input{ :type => :button, :value => "Remove", :onClick => "return
removeProperty(this)" }
-    %input{ :type => :button, :name => "commit", :value => "Add new disk", :onClick
=> "return addDiskRow('diskTable')" }
-
-  %br
-  %label
-    EntityMetadata:
-  %br
-    %label
-      TODO Need to handle volumes:
-  %p
-  %br
-    %label
-      TODO Need to handle network interfaces:
-
-:javascript
-  function fixupXml(theNode) {
-    var xmlData = "<?xml version='1.0' encoding='utf-8' ?>";
-    xmlData += "<" + $(theNode.form).attr("xmlRootNode").value + " xmlns='http://schemas.dmtf.org/cimi/1'>";
-    xmlData += getStandardData(theNode);
-    xmlData += "<cpu>" + $(theNode.form).attr("cpu").value + "</cpu>";
-    xmlData += "<memory quantity='" + $(theNode.form).attr("memory_quantity").value +
"' units='";
-    xmlData += $(theNode.form).attr("memory_units").value + "' />"
-
-    var index=0;
-    subDisk = ""
-    while ($(theNode.form).attr("disk_quantity_" + index)) {
-      if ($(theNode.form).attr("disk_quantity_" + index).value != null &&
-          $(theNode.form).attr("disk_quantity_" + index).value.length > 0) {
-        subDisk += "<capacity quantity='" + $(theNode.form).attr("disk_quantity_" + index).value
+ "' units='" +
-                   $(theNode.form).attr("disk_units_" + index).value + "' />";
-        subDisk += "<guestInterface>" + $(theNode.form).attr("disk_guestInterface_"
+ index).value + "</guestInterface>";
-      }
-      index++;
-    }
-    if (subDisk.length > 0) {
-      xmlData += "<disk>" + subDisk +  "</disk>";
-    }
-
-    //we handle entityMetadata here
-    if ($(theNode.form).attr("entityMetadata").value) {
-      xmlData += $(theNode.form).attr("entityMetadata").value
-    }
-
-    xmlData += "</" + $(theNode.form).attr("xmlRootNode").value + ">";
-
-    return xmlData;
-  }
-
-  function addDiskRow(tableId) {
-    var tbl = document.getElementById(tableId);
-    var lastRow = tbl.rows.length;
-    // if there's no header row in the table, then iteration = lastRow + 1
-    var iteration = lastRow - 1;
-    var row = tbl.insertRow(lastRow);
-
-    elNames = ['disk_quantity_', 'disk_units_', 'disk_guestInterface_'];
-    elSizes = [10, 10, 20]
-    elValues = ["200", "megabyte", ""]
-
-    for (var index=0; index<elNames.length; index++) {
-       var aCellTD = row.insertCell(index);
-       var aCell = document.createElement('input');
-       aCell.type = 'text';
-       aCell.name = elNames[index] + iteration;
-       aCell.id = aCell.name;
-       aCell.size = elSizes[index];
-       aCell.value = elValues[index];
-       aCellTD.appendChild(aCell);
-    }
-
-    // select cell
-    var cellRightBut = row.insertCell(elNames.length);
-    var er = document.createElement('input');
-    er.type = 'button';
-    er.name = 'param_remove' + iteration;
-    er.id = 'param_remove' + iteration;
-    er.value = "Remove";
-    er.tableRow = row
-    $(er).click(function() {
-     removeProperty(this);
-    })
-
-    cellRightBut.appendChild(er);
-
-  }

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/12954bae/server/views/cimi/machines/show.xml.haml
----------------------------------------------------------------------
diff --git a/server/views/cimi/machines/show.xml.haml b/server/views/cimi/machines/show.xml.haml
deleted file mode 100644
index 653b51f..0000000
--- a/server/views/cimi/machines/show.xml.haml
+++ /dev/null
@@ -1,28 +0,0 @@
-- unless defined?(partial)
-  !!! XML
-%Machine{ :xmlns => CMWG_NAMESPACE }
-  %uri=machines_url + "/" + @dmtfitem["uri"]
-  %name=@dmtfitem["name"]
-  %description=@dmtfitem["description"]
-  %created=@dmtfitem["created"]
-  - if @dmtfitem["property"]
-    - if @dmtfitem["property"]["name"] && @dmtfitem["property"]["content"]
-      - property_object = {"#{@dmtfitem['property']['name']}" => {"content" => @dmtfitem["property"]["content"]}}
-    - else
-      - property_object = @dmtfitem["property"]
-    - property_object.each_pair do |key, value|
-      %property{ :name => key}=value["content"]
-  %status=@dmtfitem["status"]
-  %cpu=@dmtfitem["cpu"]
-  %memory{ :quantity => @dmtfitem["memory"]["quantity"], :units => @dmtfitem["memory"]["units"]
}
-  - if @dmtfitem["disk"]
-    - if @dmtfitem["disk"].kind_of?(Array)
-      - property_object = @dmtfitem["disk"]
-    - else
-      - property_object = [@dmtfitem["disk"]]
-    - property_object.each do |disk|
-      %disk
-        %capacity{ :quantity => disk["capacity"]["quantity"], :units => disk["capacity"]["units"]
}
-        %guestInterface= disk["guestInterface"]
-  %operation{ :rel => "edit", :href => machines_url + "/" + @dmtfitem["uri"] }
-  %operation{ :rel => "delete", :href => machines_url + "/" + @dmtfitem["uri"] }

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/12954bae/server/views/cimi/volumes/show.html.haml
----------------------------------------------------------------------
diff --git a/server/views/cimi/volumes/show.html.haml b/server/views/cimi/volumes/show.html.haml
deleted file mode 100644
index ba675eb..0000000
--- a/server/views/cimi/volumes/show.html.haml
+++ /dev/null
@@ -1,68 +0,0 @@
-%h1 View/Edit volume
-
-%form{ :action => volumes_url }
-  %input{ :name => :id, :type => :hidden, :value => @dmtfitem["uri"] }/
-  %input{ :name => :xmlRootNode, :type => :hidden, :value => @xml_root_node }/
-  %input{ :name => :refreshURI, :type => :hidden, :value => volumes_url }/
-  %p
-    %label
-      Name:
-  %p
-    %input{ :name => :name, :size => 50, :value => @dmtfitem["name"], :style =>
"width:50%;" }
-    %input{ :name => :created, :type => :hidden, :size => 50, :value => @dmtfitem["created"]
}
-  %p
-  %br
-    %label
-      Description:
-  %p
-    %textarea{ :name => :description, :cols => 50, :rows => 4, :style => "width:50%;"
} #{@dmtfitem['description']}
-  %p
-  %br
-    %label
-      Properties:
-  %p
-    %table{ :style => "width:50%;", :id => "propertyTable"}
-      - if @dmtfitem["property"]
-        - if @dmtfitem["property"]["name"] && @dmtfitem["property"]["content"]
-          - property_object = {"#{@dmtfitem['property']['name']}" => {"content" =>
@dmtfitem["property"]["content"]}}
-        - else
-          - property_object = @dmtfitem["property"]
-
-        - iter = -1
-        - property_object.each_pair do |key, value|
-          - iter += 1
-          %tr
-            %td
-              %input{ :name => "param_name_" + iter.to_s, :size => 30, :value =>
key }
-            %td
-              %input{ :name => "param_value_" + iter.to_s, :size => 30, :value =>
value["content"] }
-            %td
-              %input{ :type => :button, :value => "Remove", :onClick => "return
removeProperty(this)" }
-    %input{ :type => :button, :name => "commit", :value => "Add new property", :onClick
=> "return AddNewPproperty('propertyTable')" }
-  %p
-  %br
-    %label
-      Capacity:
-  %p
-    %input{ :name => :capacity_quantity, :size => 20, :value => @dmtfitem["capacity"]["quantity"],
:style => "width:10%;" } &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-    %input{ :name => :capacity_units, :size => 20, :value => @dmtfitem["capacity"]["units"],
:style => "width:10%;" }
-  %br
-  %label
-    EntityMetadata:
-  %br
-
-:javascript
-  function fixupXml(theNode) {
-    var xmlData = "<?xml version='1.0' encoding='utf-8' ?>";
-    xmlData += "<" + $(theNode.form).attr("xmlRootNode").value + " xmlns='http://schemas.dmtf.org/cimi/1'>";
-    xmlData += getStandardData(theNode);
-    xmlData += "<cpu>" + $(theNode.form).attr("cpu").value + "</cpu>";
-    xmlData += "<memory quantity='" + $(theNode.form).attr("memory_quantity").value +
"' units='";
-    xmlData += $(theNode.form).attr("memory_units").value + "' />"
-
-    var index=0;
-
-    xmlData += "</" + $(theNode.form).attr("xmlRootNode").value + ">";
-
-    return xmlData;
-  }

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/12954bae/server/views/cimi/volumes/show.xml.haml
----------------------------------------------------------------------
diff --git a/server/views/cimi/volumes/show.xml.haml b/server/views/cimi/volumes/show.xml.haml
deleted file mode 100644
index 32f48af..0000000
--- a/server/views/cimi/volumes/show.xml.haml
+++ /dev/null
@@ -1,17 +0,0 @@
-- unless defined?(partial)
-  !!! XML
-%Volume{ :xmlns => CMWG_NAMESPACE }
-  %uri=volumes_url + "/" + @dmtfitem["uri"]
-  %name=@dmtfitem["name"]
-  %description=@dmtfitem["description"]
-  %created=@dmtfitem["created"]
-  - if @dmtfitem["property"]
-    - if @dmtfitem["property"]["name"] && @dmtfitem["property"]["content"]
-      - property_object = {"#{@dmtfitem['property']['name']}" => {"content" => @dmtfitem["property"]["content"]}}
-    - else
-      - property_object = @dmtfitem["property"]
-    - property_object.each_pair do |key, value|
-      %property{ :name => key}=value["content"]
-  %capacity{ :quantity => @dmtfitem["capacity"]["quantity"], :units => @dmtfitem["capacity"]["units"]}
-  %operation{ :rel => "edit", :href => volumes_url + "/" + @dmtfitem["uri"] }
-  %operation{ :rel => "delete", :href => volumes_url + "/" + @dmtfitem["uri"] }


Mime
View raw message