-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
UI for node allocation from Intel Rackscale systems
- Lists available systems from Rackscale Simulator - Allows selection of specific systems for allocation - Creates a node object and allocates the same as a crowbar node - Also refined the controller to obtain system-specific info - UI contains only a list of check-boxes and one Allocate button
- Loading branch information
1 parent
0385ea5
commit afb3a36
Showing
9 changed files
with
327 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
- @chassisUnits.each do |chassis| | ||
.panel-heading | ||
.pull-right | ||
= icon_tag "collapse-down" | ||
|
||
%h2.panel-title | ||
%a{ :href => "##{chassis.attributes["dn"].parameterize}", "data-toggle" => "collapse", "data-parent" => "#accordion" } | ||
DN: | ||
= chassis.attributes["dn"] | ||
|
||
.panel-body.panel-collapse.collapse{ :id => chassis.attributes["dn"].parameterize } | ||
- @blades.each do |blade| | ||
- if blade.attributes["chassisId"] == chassis.attributes["id"] | ||
.col-md-4.col-xs-6 | ||
%h3.panel-title | ||
= check_box_tag(blade.attributes["dn"]) | ||
DN: | ||
= blade.attributes["dn"] | ||
|
||
%dl.dl-horizontal | ||
%dt | ||
= t("rsd.edit.profile") | ||
%dd | ||
- if blade.attributes["assignedToDn"].empty? | ||
— | ||
- else | ||
= blade.attributes["assignedToDn"] | ||
%dt | ||
= t("rsd.edit.label") | ||
%dd | ||
- if blade.attributes["usrLbl"].empty? | ||
— | ||
- else | ||
= blade.attributes["usrLbl"] | ||
%dt | ||
= t("rsd.edit.model") | ||
%dd | ||
= blade.attributes["model"] | ||
|
||
%dt | ||
= t("rsd.edit.memory") | ||
%dd | ||
= number_to_human_size(blade.attributes["availableMemory"].to_i * 1024 * 1024) | ||
\/ | ||
= number_to_human_size(blade.attributes["totalMemory"].to_i * 1024 * 1024) | ||
%dt | ||
= t("rsd.edit.cpus") | ||
%dd | ||
= blade.attributes["numOfCpus"] | ||
\/ | ||
= blade.attributes["numOfCores"] | ||
%dt | ||
= t("rsd.edit.interfaces") | ||
%dd | ||
= blade.attributes["numOfEthHostIfs"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
- @rackUnits.each do |rackUnit| | ||
.panel-heading | ||
%h2.panel-title | ||
= check_box_tag(rackUnit.attributes["dn"]) | ||
DN: | ||
= rackUnit.attributes["dn"] | ||
|
||
.panel-body | ||
.col-md-4.col-xs-6 | ||
%dl.dl-horizontal | ||
%dt | ||
= t("rsd.edit.profile") | ||
%dd | ||
- if rackUnit.attributes["assignedToDn"].empty? | ||
— | ||
- else | ||
= rackUnit.attributes["assignedToDn"] | ||
%dt | ||
= t("rsd.edit.label") | ||
%dd | ||
- if rackUnit.attributes["usrLbl"].empty? | ||
— | ||
- else | ||
= rackUnit.attributes["usrLbl"] | ||
%dt | ||
= t("rsd.edit.model") | ||
%dd | ||
= rackUnit.attributes["model"] | ||
%dt | ||
= t("rsd.edit.memory") | ||
%dd | ||
= number_to_human_size(rackUnit.attributes["availableMemory"].to_i * 1024 * 1024) | ||
\/ | ||
= number_to_human_size(rackUnit.attributes["totalMemory"].to_i * 1024 * 1024) | ||
%dt | ||
= t("rsd.edit.cpus") | ||
%dd | ||
= rackUnit.attributes["numOfCpus"] | ||
\/ | ||
= rackUnit.attributes["numOfCores"] | ||
%dt | ||
= t("rsd.edit.interfaces") | ||
%dd | ||
= rackUnit.attributes["numOfEthHostIfs"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
.row | ||
.col-xs-12 | ||
%h1.page-header | ||
= t(".title") | ||
|
||
.btn-group.pull-right | ||
= link_to t(".show"), rsd_show_path, :class => "btn btn-default" | ||
|
||
= form_tag(rsd_update_path) do | ||
.panel.panel-default#accordion | ||
= render "chassis" | ||
= render "rack" | ||
|
||
.panel-footer.text-right | ||
- if @compute == true | ||
%label.radio-inline | ||
= radio_button_tag :updateAction, "compute" | ||
= t(".compute_node") | ||
- else | ||
%label.radio-inline{ :title => t(".missing_profile", :profile => @compute_service_profile) } | ||
= radio_button_tag :updateAction, "compute", false, :disabled => true | ||
= t(".compute_node") | ||
|
||
- if @storage == true | ||
%label.radio-inline | ||
= radio_button_tag :updateAction, "storage" | ||
= t(".storage_node") | ||
- else | ||
%label.radio-inline{ :title => t(".missing_profile", :profile => @storage_service_profile) } | ||
= radio_button_tag :updateAction, "storage", false, :disabled => true | ||
= t(".storage_node") | ||
|
||
%label.radio-inline | ||
= radio_button_tag(:updateAction, "reboot") | ||
= t(".reboot") | ||
|
||
%label.radio-inline | ||
= radio_button_tag(:updateAction, "up") | ||
= t(".powerup") | ||
|
||
%label.radio-inline | ||
= radio_button_tag(:updateAction, "down") | ||
= t(".powerdown") | ||
|
||
| ||
|
||
.btn-group | ||
%input.btn.btn-default{ :type => "submit", :name => "submit", :value => t(".apply") } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
.row | ||
.col-xs-12 | ||
%h1.page-header | ||
= t(".title") | ||
|
||
.row | ||
.col-xs-12 | ||
.panel.panel-default | ||
.panel-body | ||
.alert.alert-info | ||
= t(".rsd_header") | ||
|
||
= form_for :node, :url => rsd_allocate_path, :html => { :role => "form" } do |f| | ||
= hidden_field_tag "return", @allocated | ||
.panel.panel-default#accordion | ||
%h2 | ||
= t(".sys_header") | ||
.panel-panel-body | ||
%table.table.table-hover.table-middle{:style => "border: 1px; width: 100%"} | ||
%thead | ||
%tr | ||
%th | ||
= t(".rsd_selection") | ||
%th | ||
= t(".system_id") | ||
%tbody | ||
- @rsd_systems.each do | rsd_system | | ||
%tr | ||
%td= check_box_tag "#{rsd_system['SystemId']}" | ||
%td= link_to("System-#{rsd_system['SystemId']}") | ||
.btn-group.pull-right | ||
%input.btn.btn-default{ :type => "submit", :name => "allocate", :value => t(".allocate_switch") } |
Oops, something went wrong.