Skip to content

Commit

Permalink
reorganization of headers, streamlining of adapters and interface pag…
Browse files Browse the repository at this point in the history
…es, fixes for configs and multicolumn layouts
  • Loading branch information
datomo committed Mar 25, 2024
1 parent 5ff4d0d commit 74dd63e
Show file tree
Hide file tree
Showing 7 changed files with 46 additions and 62 deletions.
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
<ng-container *ngIf="data">
<c-row *ngIf="data.name || data.description">
<ng-container *ngIf="$data()">
<c-row *ngIf="$data().name || $data().description">
<c-col class="col-md-12">
<h1 *ngIf="data.name">{{data.name}}</h1>
<p *ngIf="data.description">{{data.description}}</p>
<br *ngIf="!data.description">
<app-reload-button [loading]="refreshingPage" [condition]="data.refreshable" [action]="refreshPage"></app-reload-button>
<h1 *ngIf="$data().name">{{ $data().name }}</h1>
<p *ngIf="$data().description">{{ $data().description }}</p>
<br *ngIf="!$data().description">
<app-reload-button [loading]="refreshingPage" [condition]="$data().refreshable"
[action]="refreshPage"></app-reload-button>
</c-col>
</c-row>
<c-row [gutter]="4">
<ng-container *ngFor="let item of data.groups | keyvalue : order">
<ng-container *ngFor="let item of $data().groups | keyvalue : order">
<c-col [md]="zoom()">
<c-card [className]="getCardClass(item.value.color)">
<c-card-header>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,20 @@ import {InformationService} from '../../services/information.service';
})
export class InformationManagerComponent implements OnInit {

@Input() data: InformationPage;
$data = signal(null);

@Input() set data(data: InformationPage) {
this.$data.set(data);
}

refreshingPage = false;
refreshingGroup = [];
width = signal(1080);
zoom = computed(() => {
if (this.width() < 1200 || this.data.fullWidth) {
if (this.width() < 1200 || this.$data().fullWidth) {
return 12;
} else {
return 4;
return 6;
}
});

Expand Down Expand Up @@ -76,7 +81,7 @@ export class InformationManagerComponent implements OnInit {

refreshPage() {
this.refreshingPage = true;
this._information.refreshPage(this.data.id).subscribe().add(() => this.refreshingPage = false);
this._information.refreshPage(this.$data().id).subscribe().add(() => this.refreshingPage = false);
}

refreshGroup(id: string) {
Expand Down
25 changes: 13 additions & 12 deletions src/app/containers/default-layout/default-layout.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,6 @@
<span class="ms-1">Monitoring</span>
</a>
</c-nav-item>
<c-nav-item>
<a cNavLink [routerLink]="['/views/config']" routerLinkActive="active">
<i class="icon-settings"></i>
<span class="ms-1">Config</span>
</a>
</c-nav-item>

<c-nav-item>
<a cNavLink [routerLink]="['/views/schema-editing']" routerLinkActive="active"
Expand Down Expand Up @@ -75,16 +69,16 @@
</c-dropdown>

<c-nav-item>
<a cNavLink [routerLink]="['/views/adapters']" routerLinkActive="active">
<i class="fa fa-database"></i>
<span class="ms-1">Adapters</span>
<a cNavLink [routerLink]="['/views/notebooks']" routerLinkActive="active">
<i class="fa fa-book"></i>
<span class="ms-1">Notebooks</span>
</a>
</c-nav-item>

<c-nav-item>
<a cNavLink [routerLink]="['/views/notebooks']" routerLinkActive="active">
<i class="fa fa-book"></i>
<span class="ms-1">Notebooks</span>
<a cNavLink [routerLink]="['/views/adapters']" routerLinkActive="active">
<i class="fa fa-database"></i>
<span class="ms-1">Adapters</span>
</a>
</c-nav-item>

Expand All @@ -95,6 +89,13 @@
</a>
</c-nav-item>

<c-nav-item>
<a cNavLink [routerLink]="['/views/config']" routerLinkActive="active">
<i class="icon-settings"></i>
<span class="ms-1">Config</span>
</a>
</c-nav-item>

</c-navbar-nav>

</div>
Expand Down
4 changes: 2 additions & 2 deletions src/app/views/adapters/adapters.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ <h2>Adapters</h2>

<!-- template for current stores and sources, it is called below -->
<ng-template #adapterTemplate let-adapters="adapters" let-type="type">
<c-col xs="4" class="fixed-width" *ngFor="let adapter of adapters">
<c-col [lg]="6" class="fixed-width" *ngFor="let adapter of adapters">
<c-card class="fixed-height">
<c-card-header class="card-header-adapter">
<p>{{ adapter.name }}</p>
Expand Down Expand Up @@ -82,7 +82,7 @@ <h2>Adapters</h2>
</c-card>

</c-col>
<c-col size="6" class="col-lg-6 fixed-height add-adapter-wrapper">
<c-col size="1" [lg]="6" class="fixed-height fixed-width add-adapter-wrapper">
<button cButton color="primary" *ngIf="type === 'source'" class="add-adapter"
[routerLink]="['./addSource']">
<i class="fa fa-plus"></i>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
<form (ngSubmit)="onSubmit(form.value, $event)" [formGroup]="form" #formElement cForm>
<c-row id="form-generator-main">
<c-col md="12">
<button *ngIf="form.dirty" type="submit" class="btn btn-circle btn-primary save-configs"><i
<button *ngIf="form.dirty" type="submit" cButton color="primary" class="btn-circle mt-2 save-configs"><i
class="fa fa-save"></i></button>
<button #submitButton type="submit" class="btn btn-circle btn-primary save-configs d-none"><i
<button #submitButton type="submit" cButton color="primary"
class="btn-primary mt-2 save-configs d-none"><i
class="fa fa-save"></i></button>
<h1 *ngIf="formObj.title">{{ formObj.title }}</h1>
<p *ngIf="formObj.description">{{ formObj.description }}</p>
Expand All @@ -24,7 +25,6 @@ <h1 *ngIf="formObj.title">{{ formObj.title }}</h1>
</ng-container>
</div>
</c-header>
<!--<p>{{group.value.description}}</p>-->
<c-card-body>
<ng-container
*ngFor="let config of group.value.configs | keyvalue: orderConfigs; let nth = index">
Expand Down
19 changes: 1 addition & 18 deletions src/app/views/monitoring/monitoring.component.html
Original file line number Diff line number Diff line change
@@ -1,21 +1,4 @@

<app-information-manager *ngIf="data" [data]="data" [zoom]="_breadcrumb.getMasonryZoom()"></app-information-manager>
<app-information-manager *ngIf="data" [data]="data"></app-information-manager>

<app-dashboard *ngIf="_breadcrumb.breadcrumbs && _breadcrumb.breadcrumbs.getValue().length === 1 && _breadcrumb.breadcrumbs.getValue()[0].name === 'Dashboard'"></app-dashboard>


<!--
<ng-container *ngIf="pageNotFound">
<p class="text-danger">This page does not exist or could not be loaded.</p>
</ng-container>
<ng-container *ngIf="!data && pageList">
Choose a page to display information:<br><br>
<button *ngFor="let page of pageList | keyvalue" class="btn btn-light pageLink" [routerLink]="'/views/monitoring/'+page.value.id">{{page.value.name}}</button>
</ng-container>
<ng-container *ngIf="serverError">
<p class="text-danger">
Server not responding:<br>
{{serverError.name}}: {{serverError.message}}
</p>
</ng-container>
-->
26 changes: 10 additions & 16 deletions src/app/views/query-interfaces/query-interfaces.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,37 +40,25 @@ <h2>Query Interfaces</h2>
<br>
</c-col>
</c-row>
<c-row *ngSwitchDefault id="queryInterfaces" [gutter]="2">
<button cButton color="primary" class="btn-circle topRight" [routerLink]="['./add']">
<i class="fa fa-plus"></i>
</button>
<c-col class="col-lg-6 fixed-width" *ngFor="let queryInterface of queryInterfaces">
<c-row *ngSwitchDefault id="queryInterfaces" [gutter]="4">
<c-col [lg]="6" class="fixed-width" *ngFor="let queryInterface of queryInterfaces">
<c-card class="fixed-height">
<c-card-header>
{{queryInterface.uniqueName}}
</c-card-header>
<c-card-body>

<span class="mb-2">Type: {{queryInterface.interfaceType}}</span>
<span class="mb-0" *ngIf="queryInterface.supportsDdl">
<span class="fa fa-cubes"></span>
Supports schema changes<!--DDL-->
</span>
<!--<span class="mb-0" *ngIf="!queryInterface.supportsDdl">
<span class="fa fa-lock"></span>
schema-read-only
</span>-->

<span class="mb-0" *ngIf="queryInterface.supportsDml">
<span class="icon-pencil"></span>
Supports data manipulation<!--DML-->
</span>
<!--<span class="mb-0" *ngIf="!queryInterface.supportsDml">
<span class="fa fa-eye"></span>
data-read-only
</span>-->

</c-card-body>
<c-card-footer class=" bg-transparent">
<c-card-footer class="bg-transparent">
<button cButton color="danger" (click)="removeQueryInterface(queryInterface)"
(mouseleave)="deletingQI = undefined">
<i class="cil-trash text-white"
Expand All @@ -81,8 +69,14 @@ <h2>Query Interfaces</h2>
</button>
</c-card-footer>
</c-card>
</c-col>

<c-col size="1" class="fixed-height">
<button cButton color="primary" style="margin-top: 90px" [routerLink]="['./add']">
<i class="fa fa-plus"></i>
</button>
</c-col>

</c-row>

</ng-container>
Expand Down

0 comments on commit 74dd63e

Please sign in to comment.