forked from maricaantonacci/orchestrator-dashboard
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add hostname field validation * Add management of managed services * Add configurable upload path * Move high-level css and js files * Set max service description length * Change default upload folder
- Loading branch information
1 parent
e1d39c9
commit 8482164
Showing
19 changed files
with
897 additions
and
292 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
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 |
---|---|---|
|
@@ -28,6 +28,9 @@ | |
<!-- Toggle --> | ||
<link href="https://cdn.jsdelivr.net/gh/gitbrent/[email protected]/css/bootstrap4-toggle.min.css" rel="stylesheet"> | ||
<script src="https://cdn.jsdelivr.net/gh/gitbrent/[email protected]/js/bootstrap4-toggle.min.js"></script> | ||
<!-- include summernote css/js --> | ||
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/summernote-bs4.min.css" rel="stylesheet"> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/summernote-bs4.min.js"></script> | ||
<!-- Latest compiled and minified JavaScript --> | ||
<script src="https://unpkg.com/[email protected]/dist/bootstrap-show-password.min.js"></script> | ||
<!-- FontAwesome--> | ||
|
@@ -95,7 +98,7 @@ | |
<ul class="navbar-nav mr-auto"> | ||
{% if session['username'] %} | ||
<li class="nav-item dropdown"> | ||
<a class="nav-link dropdown-toggle" data-toggle="dropdown" href="#">Deployments</a> | ||
<a id="depMenuItem" class="nav-link dropdown-toggle" data-toggle="dropdown" href="#">Deployments</a> | ||
<div class="dropdown-menu"> | ||
<a class="dropdown-item" href="{{ url_for("deployments_bp.showdeploymentsoverview") }}">Overview</a> | ||
<a class="dropdown-item" href="{{ url_for("deployments_bp.showdeployments") }}">List</a> | ||
|
@@ -124,14 +127,20 @@ | |
</li> | ||
{% endif %} | ||
{% if session['userrole'] == 'admin' %} | ||
<li class="nav-item"><a class="nav-link" href="{{ url_for('users_bp.show_users') }}">Users</a></li> | ||
<li class="nav-item dropdown"> | ||
<a class="nav-link dropdown-toggle" data-toggle="dropdown" href="#">Admin</a> | ||
<div class="dropdown-menu"> | ||
<a class="dropdown-item" href="{{ url_for('users_bp.show_users') }}">Users</a> | ||
<a class="dropdown-item" href="{{ url_for('services_bp.list_as_admin') }}">Services</a> | ||
</div> | ||
</li> | ||
{% endif %} | ||
{% endif %} | ||
</ul> | ||
{% if session['username'] %} | ||
<ul class="navbar-nav ml-auto"> | ||
{% if session['active_usergroup'] != None and 'gets3creds' not in request.path and 'overview' not in request.path %} | ||
<li class="nav-item dropdown"> | ||
<li id="groupMenuItem" class="nav-item dropdown"> | ||
<a class="nav-link dropdown-toggle" data-toggle="dropdown" href="#"> | ||
{{ session['active_usergroup'] }}<span class="caret"></span> | ||
</a> | ||
|
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,57 @@ | ||
<p class="font-weight-bold" style="font-size:20px;font-variant:small-caps">Centralised Services: </p> | ||
{% for service in services %} | ||
{% if loop.index % 3 == 1 %} | ||
<!-- open card deck --> | ||
<div id="card-deck" class="card-deck"> | ||
{% endif %} | ||
<div class="card mb-4" style="max-width: 20rem; max-height: 25rem;"> | ||
<div class="card-body"> | ||
<h5 class="card-title text-center"> | ||
<strong>{{ service.name }}</strong> | ||
</h5> | ||
</div> | ||
<div class="wrapper"> | ||
{% if service.icon != "" %} | ||
<img class="card-img-bottom img-fluid" src="{{ url_for('services_bp.showimg', filename=service.icon) }}" alt="Card image cap"> | ||
{% else %} | ||
<img class="card-img-bottom img-fluid" src="{{ url_for('services_bp.static', filename='images/default_service.png') }}" alt="Card image cap"> | ||
{% endif %} | ||
</div> | ||
<div class="card-img-overlay text-center" style="z-index: 1;"> | ||
<h5> | ||
<strong>{{ service.name }}</strong> | ||
</h5> | ||
<div id="toscaDescription" class="card-text service-descr"> | ||
<small>{{ service.description | safe}}</small> | ||
</div> | ||
<div class="row justify-content-center mt-4"> | ||
<div class="col"> | ||
<a class="badge badge-pill badge-info text-left read_more" tabindex="0" data-toggle="popover" title="Full description" data-trigger="focus" data-html="true" data-content="{{ service.description }}">Read More</a> | ||
</div> | ||
{% if session['userrole'] == 'admin' and 'admin' in request.path %} | ||
<div class="col"> | ||
<a href="{{ url_for('services_bp.edit', id=service.id) }}" class="badge badge-pill badge-warning">Edit</a> | ||
</div> | ||
<div class="col"> | ||
<form action="{{ url_for('services_bp.delete', id=service.id) }}" method="post"> | ||
<button type="submit" class="badge badge-pill badge-danger" style="border-width:0 !important;">Delete</button> | ||
</form> | ||
</div> | ||
{% endif %} | ||
<div class="col"> | ||
<a href="{{ service.url }}" target="_blank" class="badge badge-pill badge-primary">Go to service</a> | ||
</div> | ||
</div> | ||
</div> | ||
{% if service.visibility | enum2str == 'private' %} | ||
<div class="card-footer" style="height: 40px;"> | ||
<small class="text-muted">Scope: {{ service.get_groups_list() | join(', ') }}</small> | ||
</div> {% endif %} | ||
</div> | ||
{% if loop.index % 3 == 0 %} <!-- close card deck if it contains 3 cards --> | ||
</div> | ||
{% endif %} | ||
{% endfor %} | ||
{% if services|count % 3 != 0 %} <!-- close card deck if last row contains less then 3 cards --> | ||
</div> | ||
{% endif %} |
Oops, something went wrong.