Skip to content

Commit

Permalink
Merge branch 'master' into handle-batch-requests
Browse files Browse the repository at this point in the history
  • Loading branch information
squidsoup authored Apr 8, 2020
2 parents 1106467 + 2aa9765 commit 079ffa1
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 18 deletions.
3 changes: 2 additions & 1 deletion legacy/src/app/directives/call_to_action.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ export function maasCta() {
scope: {
maasCta: "=",
ngModel: "=",
selectedItems: "="
selectedItems: "=",
disabled: "<"
},
template: ctaTmpl,
link: link,
Expand Down
1 change: 1 addition & 0 deletions legacy/src/app/partials/directives/cta.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
aria-haspopup="true"
data-ng-click="shown=!shown"
data-ng-class="{'p-button--positive': getTitle() === 'Take action', 'is-selected': shown}"
data-ng-disabled="disabled"
>
{$ getTitle() $}
</button>
Expand Down
39 changes: 25 additions & 14 deletions legacy/src/app/partials/pods-list.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,29 @@ <h1 class="page-header__title">{$ getPageHeading() $}</h1>
</div>
<div class="col-small-2 col-medium-2 col-4 u-align--right">
<div class="page-header__controls">
<div data-ng-if="pods.length > 0 && !selectedItems.length && !action.option.isSingle">
<button class="p-button--neutral" data-ng-click="addPod()" data-ng-if="!add.open && canAddPod()">Add {$ getPageHeading() $}</button>
</div>
<ul class="p-inline-list u-no-margin--top" data-ng-if="showActions() && selectedItems.length">
<li class="p-inline-list__item">{$ selectedItems.length $} Selected</li>
<li class="p-inline-list__item">
<div
data-selected-items="selectedItems.length"
data-ng-click="updateAvailableActions('pods')"
data-maas-cta="action.options"
data-ng-model="action.option">
</div>
<ul class="p-inline-list u-no-margin--bottom">
<li class="p-inline-list__item" ng-if="selectedItems.length">{$ selectedItems.length $} selected</li>
<li class="p-inline-list__item" ng-if="canAddPod()">
<button
class="p-button--neutral u-no-margin--bottom"
ng-click="addPod()"
ng-disabled="add.open || selectedItems.length"
ng-if="canAddPod()"
>
Add {$ getPageHeading() $}
</button>
</li>
<li class="p-inline-list__item" ng-if="showActions()">
<span class="p-tooltip--left">
<div
disabled="!selectedItems.length"
maas-cta="action.options"
ng-click="updateAvailableActions('pods')"
ng-model="action.option"
selected-items="selectedItems.length"
></div>
<span class="p-tooltip__message" ng-if="!selectedItems.length">Select a KVM host to take action</span>
</span>
</li>
</div>
</div>
Expand Down Expand Up @@ -107,8 +118,8 @@ <h3 class="page-header__dropdown-title p-heading--five">Add {$ getPageHeading()
<p maas-obj-hide-saving class="u-no-margin--bottom"><maas-obj-errors></maas-obj-errors></p>
<p maas-obj-show-saving class="u-no-margin--bottom"><maas-obj-saving>Trying to connect and discover {$ getPageHeading() $}</maas-obj-saving></p>
<div class="page-header__controls u-no-margin--top" maas-obj-hide-saving>
<button class="p-button--base is-inline" type="button" data-ng-click="cancelAddPod()">Cancel</button>
<button class="p-button--positive is-inline u-no-margin--top" maas-obj-save>Save {$ getPageHeading() $}</button>
<button class="p-button--base is-inline u-no-margin--bottom" type="button" data-ng-click="cancelAddPod()">Cancel</button>
<button class="p-button--positive is-inline u-no-margin--bottom" maas-obj-save>Save {$ getPageHeading() $}</button>
</div>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@
"yup": "0.28.3"
},
"scripts": {
"start": "react-scripts start",
"start": "REACT_APP_GIT_SHA=`git rev-parse --short HEAD` react-scripts start",
"serve": "yarn run start",
"build": "react-scripts build",
"build": "REACT_APP_GIT_SHA=`git rev-parse --short HEAD` react-scripts build",
"release": "yarn clean && yarn install && CI=true yarn test && yarn build && yarn version --new-version",
"postbuild": "mkdir -p dist && tar -C build -czvf dist/maas-ui-v$npm_package_version.tar.gz .",
"test": "react-scripts test",
Expand Down
2 changes: 1 addition & 1 deletion ui/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ ReactDOM.render(

serviceWorker.unregister();

console.info(`${appName} ${appVersion}.`);
console.info(`${appName} ${appVersion} (${process.env.REACT_APP_GIT_SHA}).`);

0 comments on commit 079ffa1

Please sign in to comment.