Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update pod details page to new design. #968

Merged
merged 1 commit into from
Apr 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions legacy/src/app/controllers/pod_details.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ function PodDetailsController(
FabricsManager,
SpacesManager,
ValidationService,
$log,
$document
$log
) {
// Checks if on RSD page
$scope.onRSDSection = PodsManager.onRSDSection;
Expand Down Expand Up @@ -426,12 +425,12 @@ function PodDetailsController(
$scope.copyToClipboard = function($event) {
var clipboardParent = $event.currentTarget.previousSibling;
var clipboardValue = clipboardParent.previousSibling.value;
var el = $document.createElement("textarea");
var el = document.createElement("textarea");
el.value = clipboardValue;
$document.body.appendChild(el);
document.body.appendChild(el);
el.select();
$document.execCommand("copy");
$document.body.removeChild(el);
document.execCommand("copy");
document.body.removeChild(el);
};

// Called to cancel composition.
Expand Down
8 changes: 4 additions & 4 deletions legacy/src/app/partials/pod-details.html
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,8 @@ <h3 class="p-heading--four">Compose machine</h3>
<div class="col-6">
<maas-obj-field type="options" key="architecture" label="Architecture" subtle="false" placeholder="Any architecture" placeholder-enabled="true"
options="arch for arch in pod.architectures" data-ng-if="pod.architectures.length > 1" label-width="2" label-width-tablet="2" input-width="3" input-width-tablet="4"></maas-obj-field>
<maas-obj-field type="text" key="cores" label="Minimum Cores" subtle="false" placeholder="Number of cores (optional)" subtle-text="{$ availableWithOvercommit(pod.total.cores, pod.used.cores, pod.cpu_over_commit_ratio, 1) $} cores available" label-width="2" label-width-tablet="2" input-width="3" input-width-tablet="4"></maas-obj-field>
<maas-obj-field type="text" key="cpu_speed" label="Minimum Speed (MHz)" subtle="false" placeholder="CPU speed (optional)" subtle-text="{$ pod.hints.cpu_speed $}MHz maximum" label-width="2" label-width-tablet="2" input-width="3" input-width-tablet="4"></maas-obj-field>
<maas-obj-field type="text" key="memory" label="Minimum RAM (MB)" subtle="false" placeholder="Memory amount (optional)" subtle-text="{$ availableWithOvercommit(pod.total.memory_gb, pod.used.memory_gb, pod.memory_over_commit_ratio, 1) $}GB available" label-width="2" label-width-tablet="2" input-width="3" input-width-tablet="4"></maas-obj-field>
<maas-obj-field type="text" key="cores" label="Cores" subtle="false" placeholder="Number of cores (optional)" subtle-text="{$ availableWithOvercommit(pod.total.cores, pod.used.cores, pod.cpu_over_commit_ratio, 1) $} cores available" label-width="2" label-width-tablet="2" input-width="3" input-width-tablet="4"></maas-obj-field>
<maas-obj-field type="text" key="memory" label="RAM (MB)" subtle="false" placeholder="Memory amount (optional)" subtle-text="{$ availableWithOvercommit(pod.total.memory_gb, pod.used.memory_gb, pod.memory_over_commit_ratio, 1) $}GB available" label-width="2" label-width-tablet="2" input-width="3" input-width-tablet="4"></maas-obj-field>
</div>
</div>
<div class="p-strip">
Expand Down Expand Up @@ -434,7 +433,8 @@ <h3 class="p-heading--four">Storage configuration</h3>
<div class="p-strip is-shallow" ng-if="canEdit()">
<div class="row">
<div class="p-pod-edit">
<label class="p-pod-edit__label" for="virsh">Virsh:</label>
<label class="p-pod-edit__label" ng-if="pod.type === 'lxd'">LXD URL:</label>
<label class="p-pod-edit__label" ng-if="pod.type === 'virsh'">Virsh:</label>
<div class="p-code-copyable-wrapper">
<div class="p-code-copyable">
<input class="p-code-copyable__input" value="{$ pod.power_address $}" readonly="readonly">
Expand Down