This repository has been archived by the owner on Nov 22, 2019. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changed dataservice list detail to match connection list detail. Also…
… refactored dataservice detail from basic content.
- Loading branch information
Showing
11 changed files
with
86 additions
and
56 deletions.
There are no files selected for viewing
1 change: 0 additions & 1 deletion
1
ngapp/src/app/connections/connections-list/connection-details.component.html
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 |
---|---|---|
@@ -1,4 +1,3 @@ | ||
<div class="object-card-body-title">Properties</div> | ||
<pfng-list | ||
class="properties-group" | ||
[config]="listConfig" | ||
|
16 changes: 0 additions & 16 deletions
16
ngapp/src/app/dataservices/dataservices-list/basic-content.component.html
This file was deleted.
Oops, something went wrong.
32 changes: 0 additions & 32 deletions
32
ngapp/src/app/dataservices/dataservices-list/basic-content.component.ts
This file was deleted.
Oops, something went wrong.
12 changes: 12 additions & 0 deletions
12
ngapp/src/app/dataservices/dataservices-list/dataservices-details.component.html
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,12 @@ | ||
<pfng-list | ||
class="properties-group" | ||
[config]="listConfig" | ||
[itemTemplate]="itemTemplate" | ||
[items]="properties"> | ||
<ng-template #itemTemplate let-item="item"> | ||
<div class="dataservices-details-properties"> | ||
<div class="property-name">{{ item[ 0 ] }}</div> | ||
<div class="property-value">{{ item[ 1 ] }}</div> | ||
</div> | ||
</ng-template> | ||
</pfng-list> |
59 changes: 59 additions & 0 deletions
59
ngapp/src/app/dataservices/dataservices-list/dataservices-details.component.ts
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,59 @@ | ||
/** | ||
* @license | ||
* Copyright 2017 JBoss Inc | ||
* | ||
* 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, Input, OnInit, ViewEncapsulation } from "@angular/core"; | ||
import { Dataservice } from "@dataservices/shared/dataservice.model"; | ||
import { ListConfig } from "patternfly-ng"; | ||
import { DataservicesConstants } from "../shared/dataservices-constants"; | ||
|
||
@Component({ | ||
encapsulation: ViewEncapsulation.None, | ||
selector: "app-dataservices-details", | ||
templateUrl: "dataservices-details.component.html" | ||
}) | ||
export class DataservicesDetailsComponent implements OnInit { | ||
@Input() public item: Dataservice; | ||
|
||
public listConfig: ListConfig; | ||
|
||
constructor() { | ||
// nothing to do | ||
} | ||
|
||
public ngOnInit(): void { | ||
this.listConfig = { | ||
dblClick: false, | ||
multiSelect: false, | ||
selectItems: false, | ||
showCheckbox: false, | ||
useExpandItems: false | ||
}; | ||
} | ||
|
||
/** | ||
* @returns {string[][]} the properties of a dataservice | ||
*/ | ||
public get properties(): string[][] { | ||
const props = [ | ||
[ DataservicesConstants.dataserviceNameLabel, this.item.getId() ], | ||
[ DataservicesConstants.descriptionLabel, this.item.getDescription() ] | ||
]; | ||
|
||
return props; | ||
} | ||
|
||
} |
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
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