Browse Source

Edge instructions added license headers

pull/7878/head
Artem Babak 4 years ago
parent
commit
6b8afa04dd
  1. 4
      ui-ngx/src/app/core/http/edge.service.ts
  2. 17
      ui-ngx/src/app/modules/home/pages/edge/edge-instructions-dialog.component.html
  3. 15
      ui-ngx/src/app/modules/home/pages/edge/edge-instructions-dialog.component.scss
  4. 16
      ui-ngx/src/app/modules/home/pages/edge/edge-instructions-dialog.component.ts
  5. 2
      ui-ngx/src/app/modules/home/pages/edge/edge.component.html
  6. 2
      ui-ngx/src/app/modules/home/pages/edge/edges-table-config.resolver.ts

4
ui-ngx/src/app/core/http/edge.service.ts

@ -114,7 +114,7 @@ export class EdgeService {
return this.http.post<BulkImportResult>('/api/edge/bulk_import', entitiesData, defaultHttpOptionsFromConfig(config)); return this.http.post<BulkImportResult>('/api/edge/bulk_import', entitiesData, defaultHttpOptionsFromConfig(config));
} }
public getEdgeInstructions(edgeId: string, config?: RequestConfig): Observable<string> { public getEdgeDockerInstallInstructions(edgeId: string, config?: RequestConfig): Observable<any> {
return this.http.get<string>(`/api/edge/instructions/${edgeId}`, defaultHttpOptionsFromConfig(config)); return this.http.get<any>(`/api/edge/instructions/${edgeId}`, defaultHttpOptionsFromConfig(config));
} }
} }

17
ui-ngx/src/app/modules/home/pages/edge/edge-instructions-dialog.component.html

@ -1,3 +1,20 @@
<!--
Copyright © 2016-2022 The Thingsboard Authors
Licensed 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 style="min-width: 800px;"> <div style="min-width: 800px;">
<mat-toolbar color="primary"> <mat-toolbar color="primary">
<h2><mat-icon>info_outline</mat-icon> <h2><mat-icon>info_outline</mat-icon>

15
ui-ngx/src/app/modules/home/pages/edge/edge-instructions-dialog.component.scss

@ -1,3 +1,18 @@
/**
* Copyright © 2016-2022 The Thingsboard Authors
*
* Licensed 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.
*/
:host { :host {
} }

16
ui-ngx/src/app/modules/home/pages/edge/edge-instructions-dialog.component.ts

@ -1,3 +1,19 @@
///
/// Copyright © 2016-2022 The Thingsboard Authors
///
/// Licensed 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.
///
import { Component, Inject } from '@angular/core'; import { Component, Inject } from '@angular/core';
import { MAT_DIALOG_DATA, MatDialogRef } from "@angular/material/dialog"; import { MAT_DIALOG_DATA, MatDialogRef } from "@angular/material/dialog";
import { DialogComponent } from "@shared/components/dialog.component"; import { DialogComponent } from "@shared/components/dialog.component";

2
ui-ngx/src/app/modules/home/pages/edge/edge.component.html

@ -113,7 +113,7 @@
</button> </button>
</div> </div>
<div fxLayout="row" fxLayout.xs="column"> <div fxLayout="row" fxLayout.xs="column">
<button mat-button color="primary" <button mat-raised-button color="primary"
[disabled]="(isLoading$ | async)" [disabled]="(isLoading$ | async)"
(click)="onEntityAction($event, 'openInstructions')" (click)="onEntityAction($event, 'openInstructions')"
[fxShow]="!isEdit"> [fxShow]="!isEdit">

2
ui-ngx/src/app/modules/home/pages/edge/edges-table-config.resolver.ts

@ -534,7 +534,7 @@ export class EdgesTableConfigResolver implements Resolve<EntityTableConfig<EdgeI
if ($event) { if ($event) {
$event.stopPropagation(); $event.stopPropagation();
} }
this.edgeService.getEdgeInstructions(edge.id.id).subscribe( this.edgeService.getEdgeDockerInstallInstructions(edge.id.id).subscribe(
(edgeInstructionsTemplate: string) => { (edgeInstructionsTemplate: string) => {
this.dialog.open<EdgeInstructionsDialogComponent, EdgeInstructionsData>(EdgeInstructionsDialogComponent, { this.dialog.open<EdgeInstructionsDialogComponent, EdgeInstructionsData>(EdgeInstructionsDialogComponent, {
disableClose: false, disableClose: false,

Loading…
Cancel
Save