Adding in an outline of a front-end for retrieving messages from the backend api.
This commit is contained in:
parent
df4e58f3e4
commit
1dbd27934f
3 changed files with 23 additions and 0 deletions
5
static/directives/quay-message-bar.html
Normal file
5
static/directives/quay-message-bar.html
Normal file
|
@ -0,0 +1,5 @@
|
|||
<div class="announcement inline" ng-show="messages.length">
|
||||
<div ng-repeat="message in messages">
|
||||
<a ng-href="" class="quay-service-status-description">{{ message.content }}</a>
|
||||
</div>
|
||||
</div>
|
17
static/js/directives/quay-message-bar.js
Normal file
17
static/js/directives/quay-message-bar.js
Normal file
|
@ -0,0 +1,17 @@
|
|||
/**
|
||||
* An element which displays a message for users to read.
|
||||
*/
|
||||
angular.module('quay').directive('quayMessageBar', function () {
|
||||
return {
|
||||
priority: 0,
|
||||
templateUrl: '/static/directives/quay-message-bar.html',
|
||||
replace: false,
|
||||
transclude: false,
|
||||
restrict: 'C',
|
||||
scope: {},
|
||||
controller: function ($scope, $element, ApiService) {
|
||||
$scope.messages = [];
|
||||
// ApiService.getMessages().then(function(data){ $scope.messages = data['messages'] || []; });
|
||||
}
|
||||
};
|
||||
});
|
|
@ -229,6 +229,7 @@ mixpanel.init("{{ mixpanel_key }}", { track_pageview : false, debug: {{ is_debug
|
|||
{% endif %}
|
||||
|
||||
<nav class="navbar navbar-default header-bar co-m-navbar co-fx-box-shadow" role="navigation"></nav>
|
||||
<div class="quay-message-bar"></div>
|
||||
<div class="quay-service-status-bar" quay-require="['BILLING']"></div>
|
||||
<div id="padding-container">
|
||||
<div id="co-l-view-container">
|
||||
|
|
Reference in a new issue