Skip to content
This repository was archived by the owner on Mar 8, 2020. It is now read-only.
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
Original file line number Diff line number Diff line change
@@ -1,46 +1,48 @@
<div class="resource-modal">
<div class="modal-header">
<h1>{{resourceAction}} {{resourceType}}</h1>
<button class="icon modal-exit" (click)="activeModal.close()">
<svg class="ibm-icon" aria-hidden="true">
<use xlink:href="#icon-close_new"></use>
</svg>
</button>
</div>
<section class="modal-body">
<h2>In registry: <b>{{registryID}}</b></h2>
<section class="resource-container">
<section class="resource-component">
<div>
<p class="resource-preview-text">JSON Data Preview</p>
</div>
<div class="resource-bound">
<codemirror name="codeMirror" [(ngModel)]="resourceDefinition" [config]="codeConfig" (ngModelChange)="onDefinitionChanged()"
width="100%" height="100%" ngDefaultControl>
</codemirror>
<div class="resource-error-text" ng-if="definitionError!=null">
<p>{{definitionError}}</p>
</div>
</div>
</section>
<div class="modal-header">
<h1>{{resourceAction}} {{resourceType}}</h1>
<button class="icon modal-exit" (click)="activeModal.close()">
<svg class="ibm-icon" aria-hidden="true">
<use xlink:href="#icon-close_new"></use>
</svg>
</button>
</div>
<section class="modal-body">
<h2>In registry: <b>{{registryID}}</b></h2>
<section class="resource-container">
<section class="resource-component">
<div>
<p class="resource-preview-text">JSON Data Preview</p>
</div>
<codemirror name="codeMirror" [(ngModel)]="resourceDefinition" [config]="codeConfig"
(ngModelChange)="onDefinitionChanged()"
width="100%" height="100%" ngDefaultControl>
</codemirror>
<div class="resource-error-text" ng-if="definitionError!=null">
<p>{{definitionError}}</p>
</div>
</section>
</section>
</section>
</section>
<footer>
<p class="footer-text" *ngIf="!editMode()">Just need quick test data? <button type="button" class="icon" (click)="generateResource(true)"><u>Generate Random Data</u></button></p>
<button type="button" class="secondary" (click)="activeModal.close();">
<span>Cancel</span>
</button>
<button id="createResourceButton" type="button" class="primary" (click)="addOrUpdateResource()" [disabled]="definitionError!=null || actionInProgress ">
<div *ngIf="!actionInProgress">
<span>{{resourceAction}}</span>
</div>
<div *ngIf="actionInProgress" class="ibm-spinner-indeterminate small loop">
<div class="loader">
<svg class="circular" viewBox="25 25 50 50">
<circle class="circle-path" cx="50" cy="50" r="20"/>
</svg>
</div>
</div>
</button>
</footer>
<footer>
<p class="footer-text" *ngIf="!editMode()">Just need quick test data?
<button type="button" class="icon" (click)="generateResource(true)"><u>Generate Random Data</u></button>
</p>
<button type="button" class="secondary" (click)="activeModal.close();">
<span>Cancel</span>
</button>
<button id="createResourceButton" type="button" class="primary" (click)="addOrUpdateResource()"
[disabled]="definitionError!=null || actionInProgress ">
<div *ngIf="!actionInProgress">
<span>{{resourceAction}}</span>
</div>
<div *ngIf="actionInProgress" class="ibm-spinner-indeterminate small loop">
<div class="loader">
<svg class="circular" viewBox="25 25 50 50">
<circle class="circle-path" cx="50" cy="50" r="20"/>
</svg>
</div>
</div>
</button>
</footer>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -2,54 +2,47 @@
@import '../../assets/styles/base/_variables.scss';

resource-modal {

.resource-container {
position: relative;
flex: 1 1 auto;
padding: $space-small;
display: flex;
flex-direction: row;
justify-content: space-around;
min-height: 415px;
}

.resource-component {

padding: $space-medium;

.resource-bound {
max-height: 40px;
min-width: 100%;
// min-width: 410px;
// max-width: 410px;
margin-top: $space-medium;
.resource-container {
position: relative;
flex: 1 1 auto;
display: flex;
flex-direction: row;
justify-content: space-around;
height: 450px;
}

.resource-preview-text{
color:$secondary-text;
.resource-component {
.resource-preview-text {
color: $secondary-text;
}

.resource-error-text {
min-height: 30px;
color: $error-colour-1;
max-width: 625px;
margin: 0 auto;
word-wrap: break-word;
}
}

.resource-error-text{
min-height: 30px;
color: $error-colour-1;
max-width: 600px;
footer {
justify-content: flex-start;

.footer-text {
flex: 1;
}
}
}

footer {
justify-content: flex-start;
.CodeMirror {
font-family: Source Code Pro

.footer-text{
flex:1;
}
}

.CodeMirror,
.CodeMirror-scroll {
min-height: 250px;
max-height: 450px;
min-width: 600px;
max-width: 600px;
}

.CodeMirror, .CodeMirror-scroll {
min-height: 40vh;
max-height: 40vh;
// needed to get rid of the duplicate scroll bars, not sure why this works????
min-width: 640px;
max-width: 650px;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export class ResourceComponent implements OnInit {

private codeConfig = {
lineNumbers: true,
lineWrapping: false,
lineWrapping: true,
readOnly: false,
mode: 'javascript',
autofocus: true,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,65 +1,67 @@
<div class="transaction-modal">
<div class="modal-header">
<h1>Submit Transaction</h1>
<button class="icon modal-exit" (click)="activeModal.dismiss()">
<svg class="ibm-icon" aria-hidden="true">
<use xlink:href="#icon-close_new"></use>
</svg>
</button>
</div>
<section class="modal-body">
<div class="transaction-select">
<div class="transaction-select-item">
<p>Transaction Type</p>
</div>
<div class="transaction-select-item">
<div ngbDropdown class="d-inline-block">
<button type="button" class="action" id="dropdownMenu1" ngbDropdownToggle><span title="{{selectedTransactionName}}">{{selectedTransactionName}}</span></button>
<div class="dropdown-menu" aria-labelledby="dropdownMenu1">
<button class="dropdown-item action " *ngFor="let transaction of transactionTypes"
(click)="onTransactionSelect(transaction)">{{transaction.getName()}}
</button>
</div>
</div>
</div>
<div class="modal-header">
<h1>Submit Transaction</h1>
<button class="icon modal-exit" (click)="activeModal.dismiss()">
<svg class="ibm-icon" aria-hidden="true">
<use xlink:href="#icon-close_new"></use>
</svg>
</button>
</div>
<section class="resource-container">
<section class="resource-component">
<div>
<p class="resource-preview-text">JSON Data Preview</p>
<section class="modal-body">
<div class="transaction-select">
<div class="transaction-select-item">
<p>Transaction Type</p>
</div>
<div class="transaction-select-item">
<div ngbDropdown class="d-inline-block">
<button type="button" class="action" id="dropdownMenu1" ngbDropdownToggle><span
title="{{selectedTransactionName}}">{{selectedTransactionName}}</span></button>
<div class="dropdown-menu" aria-labelledby="dropdownMenu1">
<button class="dropdown-item action " *ngFor="let transaction of transactionTypes"
(click)="onTransactionSelect(transaction)">{{transaction.getName()}}
</button>
</div>
</div>
</div>
</div>
<div class="resource-bound">
<codemirror name="codeMirror" [(ngModel)]="resourceDefinition" [config]="codeConfig" (ngModelChange)="onDefinitionChanged()"
width="100%" height="100%" ngDefaultControl>
</codemirror>
<div class="resource-error-text" ng-if="definitionError!=null">
<p>{{definitionError}}</p>
</div>
</div>
</section>
<section class="resource-container">
<section class="resource-component">
<div>
<p class="resource-preview-text">JSON Data Preview</p>
</div>
<codemirror name="codeMirror" [(ngModel)]="resourceDefinition" [config]="codeConfig"
(ngModelChange)="onDefinitionChanged()"
width="100%" height="100%" ngDefaultControl>
</codemirror>
<div class="resource-error-text" ng-if="definitionError!=null">
<p>{{definitionError}}</p>
</div>
</section>
</section>
</section>
</section>
<footer>
<p class="footer-text">Just need quick test data?
<button type="button" class="icon" (click)="generateTransactionDeclaration(true)"><u>Generate Random Data</u></button>
</p>
<div class="transaction-footer-cta">
<button type="button" class="secondary" (click)="activeModal.dismiss();">
<span>Cancel</span>
</button>
<button name="submitButton" id="submitTransactionButton" type="button" class="primary" (click)="submitTransaction()"
[disabled]="definitionError!=null || submitInProgress" ngDefaultControl>
<div *ngIf="!submitInProgress" ngDefaultControl>
<span>Submit</span>
</div>
<div *ngIf="submitInProgress" class="ibm-spinner-indeterminate small loop" ngDefaultControl>
<div class="loader">
<svg class="circular" viewBox="25 25 50 50">
<circle class="circle-path" cx="50" cy="50" r="20"/>
</svg>
</div>
<footer>
<p class="footer-text">Just need quick test data?
<button type="button" class="icon" (click)="generateTransactionDeclaration(true)"><u>Generate Random
Data</u></button>
</p>
<div class="transaction-footer-cta">
<button type="button" class="secondary" (click)="activeModal.dismiss();">
<span>Cancel</span>
</button>
<button name="submitButton" id="submitTransactionButton" type="button" class="primary"
(click)="submitTransaction()"
[disabled]="definitionError!=null || submitInProgress" ngDefaultControl>
<div *ngIf="!submitInProgress" ngDefaultControl>
<span>Submit</span>
</div>
<div *ngIf="submitInProgress" class="ibm-spinner-indeterminate small loop" ngDefaultControl>
<div class="loader">
<svg class="circular" viewBox="25 25 50 50">
<circle class="circle-path" cx="50" cy="50" r="20"/>
</svg>
</div>
</div>
</button>
</div>
</button>
</div>
</footer>
</footer>
</div>