This repository has been archived by the owner on Nov 9, 2017. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/master' into mazz/683
Conflicts: pom.xml
- Loading branch information
Showing
32 changed files
with
562 additions
and
323 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
4 changes: 2 additions & 2 deletions
4
console/src/main/scripts/plugins/accounts/html/organization-memberships.html
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
18 changes: 18 additions & 0 deletions
18
console/src/main/scripts/plugins/accounts/html/organization-remove-modal.html
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,18 @@ | ||
<div class="modal-header"> | ||
<button type="button" class="close" ng-click="cancel()"> | ||
<span class="pficon pficon-close"></span> | ||
</button> | ||
<h4 class="modal-title">Delete Organization</h4> | ||
</div> | ||
<div class="modal-body"> | ||
<div class="form-group"> | ||
<p class="primary-message"> | ||
Are you sure you want to delete the organization <strong>{{organization.name}}</strong>? | ||
</p> | ||
<p>This action can't be undone.</p> | ||
</div> | ||
</div> | ||
<div class="modal-footer"> | ||
<button type="button" class="btn btn-default" ng-click="cancel()">Cancel</button> | ||
<button type="button" class="btn btn-danger" ng-click="delete()">Delete</button> | ||
</div> |
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
50 changes: 50 additions & 0 deletions
50
console/src/main/scripts/plugins/accounts/html/user-settings.html
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,50 @@ | ||
<div class="hk-user-settings" ng-controller="HawkularAccounts.UserSettingsController as controller"> | ||
|
||
<div class="text-center hk-spinner-container-alone" ng-show="controller.loading"> | ||
<div class="spinner spinner-lg"></div> | ||
<p class="hk-spinner-legend-below">Loading...</p> | ||
</div> | ||
|
||
<h1 class="text-center" ng-show="!controller.loading">User Settings</h1> | ||
<form name="form" class="form-horizontal" ng-show="!controller.loading" novalidate> | ||
<fieldset> | ||
<legend>Alert Notifications</legend> | ||
<p>Receive alert notifications on the following email. | ||
<div class="form-group" ng-class="{'has-error': form.email.$error.emails}"> | ||
<label class="col-sm-3 control-label" for="email">Email | ||
<a class="hk-btn-icon" | ||
tabindex="0" | ||
role="button" | ||
tooltip-trigger | ||
tooltip-placement="top" | ||
tooltip="For multiple emails, separate by comma."> | ||
<i class="fa fa-info-circle"></i> | ||
</a> | ||
</label> | ||
<div class="col-sm-6"> | ||
<input | ||
type="text" | ||
name="email" | ||
id="email" | ||
class="form-control" | ||
hawkular-emails | ||
ng-model="controller.settings['hawkular.settings.emails']"> | ||
<span class="help-block" ng-show="form.email.$error.emails"> | ||
Please enter valid email addresses. | ||
</span> | ||
|
||
<span class="help-block" ng-show="!form.email.$error.emails"> | ||
Emails are valid. | ||
</span> | ||
</div> | ||
</div> | ||
</fieldset> | ||
<div class="form-actions text-right" ng-show="!controller.loading"> | ||
<button type="button" class="btn btn-default">Cancel</button> | ||
<button type="button" class="btn btn-primary" ng-disabled="!form.$valid" ng-click="controller.save()"> | ||
Save | ||
</button> | ||
</div> | ||
</form> | ||
</div> | ||
<!-- /col --> |
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
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
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
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,67 @@ | ||
/// | ||
/// Copyright 2015 Red Hat, Inc. and/or its affiliates | ||
/// and other contributors as indicated by the @author tags. | ||
/// | ||
/// Licensed 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. | ||
/// | ||
|
||
/// <reference path='accountsPlugin.ts'/> | ||
|
||
module HawkularAccounts { | ||
export class UserSettingsController { | ||
public static $inject = ['$log', | ||
'HawkularAccount', | ||
'NotificationsService' | ||
]; | ||
|
||
// backend data related to this controller | ||
public settings:IUserSettings; | ||
|
||
// state control, for easier UI consumption | ||
public loading:boolean; | ||
|
||
constructor(private $log:ng.ILogService, | ||
private HawkularAccount:any, | ||
private NotificationsService:INotificationsService) { | ||
|
||
this.loadData(); | ||
} | ||
public loadData():void { | ||
this.loading = true; | ||
this.loadSettings(); | ||
} | ||
|
||
public loadSettings():void { | ||
this.settings = this.HawkularAccount.Settings.get({}, | ||
(settings:IUserSettings) => { | ||
this.loading = false; | ||
}, | ||
(error:IErrorPayload) => { | ||
this.NotificationsService.warning('User settings could not be loaded.'); | ||
this.$log.warn(`Error while loading the organization: ${error.data.message}`); | ||
this.loading = false; | ||
} | ||
); | ||
} | ||
|
||
public save():void { | ||
this.settings.$update({}, (settings:IUserSettings) => { | ||
this.NotificationsService.success('User settings successfully updated.'); | ||
}, (error:IErrorPayload) => { | ||
this.NotificationsService.error('User settings could not be updated.'); | ||
}); | ||
} | ||
} | ||
|
||
_module.controller('HawkularAccounts.UserSettingsController', UserSettingsController); | ||
} |
Oops, something went wrong.