Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI policy imports #1793

Merged
merged 6 commits into from
Nov 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions ui/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
<title>Eclipse Ditto™ explorer</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-icons/1.8.3/font/bootstrap-icons.min.css"
rel="stylesheet"
integrity="sha512-YzwGgFdO1NQw1CZkPoGyRkEnUTxPSbGWXvGiXrWk8IeSqdyci0dEDYdLLjMxq1zCoU0QBa4kHAFiRhUL3z2bow=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-icons/1.11.1/font/bootstrap-icons.min.css"
integrity="sha512-oAvZuuYVzkcTc2dH5z1ZJup5OmSQ000qlfRvuoTTiyTBjwX1faoyearj8KdMq0LgsBTHMrRuMek7s+CxF8yE+w=="
crossorigin="anonymous"
referrerpolicy="no-referrer" />
<link rel="icon" type="image/png"
href="https://raw.githubusercontent.com/eclipse/ditto/master/documentation/src/main/resources/images/favicon-16x16.png"
sizes="16x16">
Expand Down
9 changes: 9 additions & 0 deletions ui/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,15 @@
--bs-table-hover-color: white;
}

.table-active .bi {
color: white;
}

.table-action-column {
text-align: center;
width: 27.5px;
}

td {
text-overflow: ellipsis;
overflow: hidden;
Expand Down
10 changes: 10 additions & 0 deletions ui/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ import * as Operations from './modules/operations/servicesLogging.js';
import * as Piggyback from './modules/operations/piggyback.js';
import * as Templates from './modules/operations/templates.js';
import * as Policies from './modules/policies/policies.js';
import * as PoliciesJSON from './modules/policies/policiesJSON.js';
import * as PoliciesEntries from './modules/policies/policiesEntries.js';
import * as PoliciesImports from './modules/policies/policiesImports.js';
import * as PoliciesSubjects from './modules/policies/policiesSubjects';
import * as PoliciesResources from './modules/policies/policiesResources';
import * as Attributes from './modules/things/attributes.js';
import * as FeatureMessages from './modules/things/featureMessages.js';
import * as Features from './modules/things/features.js';
Expand Down Expand Up @@ -56,6 +61,11 @@ document.addEventListener('DOMContentLoaded', async function() {
Features.ready();
await FeatureMessages.ready();
Policies.ready();
PoliciesJSON.ready();
PoliciesImports.ready();
PoliciesEntries.ready();
PoliciesSubjects.ready();
PoliciesResources.ready();
Connections.ready();
ConnectionsCRUD.ready();
ConnectionsMonitor.ready();
Expand Down
2 changes: 1 addition & 1 deletion ui/modules/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ export function setAuthHeader(forDevOps) {
* @return {Object} result as json object
*/
export async function callDittoREST(method, path, body = null,
additionalHeaders = null, returnHeaders = false, devOps = false) {
additionalHeaders = null, returnHeaders = false, devOps = false): Promise<any> {
let response;
const contentType = method === 'PATCH' ? 'application/merge-patch+json' : 'application/json';
try {
Expand Down
6 changes: 3 additions & 3 deletions ui/modules/connections/connectionsMonitor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ function retrieveConnectionMetrics() {
if (response.connectionMetrics[direction]) {
Object.keys(response.connectionMetrics[direction]).forEach((type) => {
let entry = response.connectionMetrics[direction][type];
Utils.addTableRow(dom.tbodyConnectionMetrics, direction, false, false, type, 'success', entry.success.PT1M, entry.success.PT1H, entry.success.PT24H);
Utils.addTableRow(dom.tbodyConnectionMetrics, direction, false, false, type, 'failure', entry.failure.PT1M, entry.failure.PT1H, entry.failure.PT24H);
Utils.addTableRow(dom.tbodyConnectionMetrics, direction, false, null, type, 'success', entry.success.PT1M, entry.success.PT1H, entry.success.PT24H);
Utils.addTableRow(dom.tbodyConnectionMetrics, direction, false, null, type, 'failure', entry.failure.PT1M, entry.failure.PT1H, entry.failure.PT24H);
});
};
});
Expand Down Expand Up @@ -130,7 +130,7 @@ function fillConnectionLogsTable(entries) {

let filter = connectionLogsFilter ? connectionLogsFilter.match : (a => true);
entries.filter(filter).forEach((entry) => {
Utils.addTableRow(dom.tbodyConnectionLogs, Utils.formatDate(entry.timestamp, true), false, false, entry.type, entry.level);
Utils.addTableRow(dom.tbodyConnectionLogs, Utils.formatDate(entry.timestamp, true), false, null, entry.type, entry.level);
});
dom.tbodyConnectionLogs.scrollTop = dom.tbodyConnectionLogs.scrollHeight - dom.tbodyConnectionLogs.clientHeight;
}
Expand Down
6 changes: 3 additions & 3 deletions ui/modules/environments/environments.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@
<div class="col-md-8 resizable_flex_column">
<ul class="nav nav-tabs nav-fill">
<li class="nav-item">
<a class="nav-link active" data-bs-toggle="tab" data-bs-target="#tabEnvDetails">CRUD Environment</a>
<a class="nav-link active" data-bs-toggle="tab" data-bs-target="#tabEnvDetails">Manage</a>
</li>
<li class="nav-item">
<a class="nav-link" data-bs-toggle="tab" data-bs-target="#tabEnvJson">Environment JSON</a>
<a class="nav-link" data-bs-toggle="tab" data-bs-target="#tabEnvJson">JSON</a>
</li>
</ul>
<div class="tab-content" style="flex-grow: 1; overflow: hidden;">
Expand All @@ -47,7 +47,7 @@
<div class="input-group input-group-sm mt-1 mb-3">
<label class="input-group-text">Ditto Version</label>
<select class="form-select form-select-sm" id="selectDittoVersion" disabled>
<option selecte value="3">3</option>
<option selected value="3">3</option>
<option value="2">2</option>
</select>
</div>
Expand Down
Loading