blob: c9a692f44e8ea600bc5f0bfa8237c6fc5f5425c1 [file] [log] [blame]
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you 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.
-->
<div class="modal-header" ng-switch="vm.state">
<br-svg type="close" class="pull-right" ng-click="$dismiss('Close modal')"></br-svg>
<h3 class="modal-title" ng-switch-when="STARTING">Server starting up&hellip;</h3>
<h3 class="modal-title" ng-switch-when="STOPPING">Server shutting down&hellip;</h3>
<h3 class="modal-title" ng-switch-when="NOT-HA-MASTER">This server is not the high availability master</h3>
<h3 class="modal-title" ng-switch-when="NO-CONNECTION|OTHER_ERROR" ng-switch-when-separator="|">Connecting to server&hellip;</h3>
<h3 class="modal-title" ng-switch-when="SESSION_INVALIDATED|SESSION_AGE_EXCEEDED" ng-switch-when-separator="|">Session invalid</h3>
<h3 class="modal-title" ng-switch-when="USER_NOT_AUTHORIZED">User not authorized</h3>
<h3 class="modal-title" ng-switch-when="OK">Server up and running</h3>
<h3 class="modal-title" ng-switch-default>This server has errors</h3>
</div>
<div class="modal-body server-status-body" ng-switch="vm.state">
<div ng-switch-when="STARTING">
<p>
The server is starting.
It is recommended to wait before proceeding.
This dialog will disappear when the server is ready.
</p>
</div>
<div ng-switch-when="STOPPING">
<p>
The server is shutting down.
This dialog will disappear if and when the server is restarted at this address.
If in doubt, contact your system administrator.
</p>
</div>
<div ng-switch-when="NOT-HA-MASTER">
<p>It is recommended not to use this server directly.</p>
<p ng-if="vm.masterUri">Master server located at <a ng-href="vm.masterUri">{{vm.masterUri}}</a></p>
<p ng-if="!vm.masterUri">The address of the master API server is not currently known.</p>
<table class="table">
<thead>
<tr>
<th class="server-status-node-id">Node ID</th>
<th>Status</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="node in vm.nodes | orderBy:'isMasterNode' | orderBy:'state':true track by node.nodeId"
ng-class="{success: node.state === 'online', danger: node.state === 'offline'}">
<td>
{{node.nodeId}}
<span ng-if="node.isCurrentNode" class="label label-info">current</span>
<span ng-if="node.isMasterNode" class="label label-success">master</span>
</td>
<td>{{node.status | lowercase}}</td>
<td>
<a ng-if="node.state === 'online'" class="btn btn-xs btn-success pull-right" ng-class="{disabled: node.nodeUri === null}">Open</a>
</td>
</tr>
</tbody>
</table>
</div>
<div ng-switch-when="NO-CONNECTION">
<p>Cannot connect to API server. Please check your network connection. Try closing and re-opening the window and login again in the app. If the problem persists, please contact your administrator.</p>
</div>
<div ng-switch-when="UNHEALTHY">
<p>Your server has errors and is not healthy.</p>
<p>Please check with your system administrator.</p>
</div>
<div ng-switch-when="USER_NOT_AUTHORIZED">
<p>The current user is not authorized.</p>
<form action="/brooklyn-ui-logout" method="post">
<button type="submit" class="btn btn-success"><i class="fa fa-sign-out fa-fw"></i> Logout</button>
</form>
</div>
</div>
<div ng-switch-when="SESSION_INVALIDATED|SESSION_AGE_EXCEEDED" ng-switch-when-separator="|">
<p>Your last session has expired.</p>
<p>Please login again.</p>
<form action="/brooklyn-ui-logout" method="post">
<button type="submit" class="btn btn-success"><i class="fa fa-sign-out fa-fw"></i> Logout</button>
</form>
</div>
<div ng-switch-when="OTHER_ERROR">
<p>An unexpected error has occurred.</p>
<p>Please try to login again and if the problem persists, please check with your system administrator.</p>
<form action="/brooklyn-ui-logout" method="post">
<button type="submit" class="btn btn-success"><i class="fa fa-sign-out fa-fw"></i> Logout</button>
</form>
</div>
<div ng-switch-when="OK">
<p>The server is now ready to use.</p>
</div>
<div ng-switch-default>
<p>Please check with your system administrator.</p>
</div>
</div>
<div class="modal-footer" ng-switch="vm.state">
<div ng-switch-when="OK">
<button class="btn btn-success" type="button" ng-click="vm.close('OK')">Continue</button>
</div>
<div style="display: flex; flex-wrap: nowrap;" ng-switch-default>
<span class="text-muted" style="flex-grow: 2; font-size: 12px; font-style: italic; margin-right: 15px;">
Click below if you understand the risks, that information may be unavailable and operations may fail, and
wish to proceed regardless.
</span>
<button class="btn btn-danger" type="button" ng-click="vm.close()" style="flew-shrink: 0;">I understand the risk</button>
</div>
</div>