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
4 changes: 3 additions & 1 deletion packages/composer-playground-api/routes/npm.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,12 @@ module.exports = (app) => {
name : metadata.name,
description : metadata.description,
version : metadata.version,
//TODO update this after release
networkImage : 'https://hyperledger.github.io/composer-sample-networks/packages/' + metadata.name + '/networkimage.svg',
networkImageanimated: 'https://hyperledger.github.io/composer-sample-networks/packages/' + metadata.name + '/networkimageanimated.svg',
tarball : metadata.dist.tarball
});
}

});

LOG.exit(method, options);
Expand Down
21 changes: 13 additions & 8 deletions packages/composer-playground-api/test/npm.js
Original file line number Diff line number Diff line change
Expand Up @@ -248,8 +248,8 @@ describe('npm routes', () => {
beforeEach(() => {

mock = {
'composer-common/package.json': {
version: composerVersion
'composer-common/package.json' : {
version : composerVersion
},
'npm-registry-client' : RegClient
};
Expand All @@ -276,6 +276,8 @@ describe('npm routes', () => {
name : 'bob',
description : 'bob package',
version : '1.0',
networkImage : 'https://hyperledger.github.io/composer-sample-networks/packages/bob/networkimage.svg',
networkImageanimated: 'https://hyperledger.github.io/composer-sample-networks/packages/bob/networkimageanimated.svg',
tarball : 'my tar'
}]);
});
Expand All @@ -293,17 +295,23 @@ describe('npm routes', () => {
name : 'ant',
description : 'ant package',
version : '1.0',
tarball : 'my tar'
tarball : 'my tar',
networkImage : 'https://hyperledger.github.io/composer-sample-networks/packages/ant/networkimage.svg',
networkImageanimated: 'https://hyperledger.github.io/composer-sample-networks/packages/ant/networkimageanimated.svg',
}, {
name : 'bat',
description : 'bat package',
version : '1.0',
tarball : 'my tar'
tarball : 'my tar',
networkImage : 'https://hyperledger.github.io/composer-sample-networks/packages/bat/networkimage.svg',
networkImageanimated: 'https://hyperledger.github.io/composer-sample-networks/packages/bat/networkimageanimated.svg',
}, {
name : 'cat',
description : 'cat package',
version : '1.0',
tarball : 'my tar'
tarball : 'my tar',
networkImage : 'https://hyperledger.github.io/composer-sample-networks/packages/cat/networkimage.svg',
networkImageanimated: 'https://hyperledger.github.io/composer-sample-networks/packages/cat/networkimageanimated.svg',
}]);
});
});
Expand Down Expand Up @@ -362,9 +370,6 @@ describe('npm routes', () => {
});
});
});

});

});

});
2 changes: 1 addition & 1 deletion packages/composer-playground/src/app/app.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
<button id="footer" class="dropdown-item action" (click)="logout()">
<div class="flex-container flex" style="justify-content:center">
<div style="margin-right:20px"><svg class="ibm-icon" aria-hidden="true">
<use xlink:href="#icon-chevron-left"></use>
<use xlink:href="#icon-chevron-left"></use>§
</svg></div>
<div>Log Out</div>
</div>
Expand Down
3 changes: 2 additions & 1 deletion packages/composer-playground/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ import { BasicModalsModule } from './basic-modals/basic-models.module';
import { WelcomeComponent } from './welcome';
import { NoContentComponent } from './no-content';
import { VersionCheckComponent } from './version-check';
import { FooterComponent } from './footer';
import { ServicesModule } from './services/services.module';
import { DrawerModule } from './common/drawer';
import { ImportModule } from './import/import.module';

let actionBasedIcons = require.context('../assets/svg/action-based', false, /.*\.svg$/);
actionBasedIcons.keys().forEach(actionBasedIcons);
Expand Down Expand Up @@ -66,6 +66,7 @@ type StoreType = {
imports: [ // import Angular's modules
AppRoutingModule,
BasicModalsModule,
ImportModule,
BrowserAnimationsModule,
BrowserModule,
HttpModule,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,30 @@
@import '../../../assets/styles/base/_variables.scss';

body.drawer-open {
overflow: hidden;
overflow: hidden;
}

drawer {
bottom: 0;
outline: none;
box-shadow: -2px 0 5px -1px $black;
overflow: hidden;
padding: 0;
position: fixed;
right: 0;
top: 0;
transform: translateX(438px);
width: 438px;
z-index: 99999;

.drawer-container {
background: $white;
height: 100%;
position: absolute;
width: 438px;
bottom: 0;
outline: none;
box-shadow: -2px 0 5px -1px $black;
overflow: hidden;
padding: 0;
position: fixed;
right: 0;
top: 0;
transform: translateX(438px);
width: 575px;
z-index: 9999;
}

.drawer-container {
background: $white;
height: 100%;
position: absolute;
width: 575px;
z-index: 9999;
}
.drawer-content {
height: 100%;
}
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
<div class="fileUpload">
<input id="file-importer_input" type="file" (change)="onFileChange($event)">
<div *ngIf="!expandInput">
<svg class="ibm-icon" aria-hidden="true">
<use xlink:href="#icon-upload_32"></use>
<use xlink:href="#icon-upload"></use>
</svg>
Drop here to upload or <span class="underline">browse</span>
<span>Drop here to upload or <span class="underline">browse</span></span>
</div>
<div *ngIf="expandInput">
<svg class="ibm-icon" aria-hidden="true">
Expand All @@ -13,4 +12,4 @@
<div class="centre-text">Drop here to upload</div>
<div class="max-file-size centre-text">Max file size {{(maxFileSize/1024)/1024}}mb</div>
</div>
</div>

Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,9 @@
@import '../../../assets/styles/base/_variables.scss';

file-importer {
display: flex;
flex-direction: column;

&.expandFile {
flex: 1;
padding: $space-medium;

.fileUpload {
border: 1px dashed $first-highlight;
flex: 1;

svg {
width: 131px;
height: 150px;
margin-right: 0;
}

.centre-text {
text-align: center;
}
.max-file-size {
color: $secondary-text;
}
}
}
display: flex;
flex-direction: column;

.fileUpload {
border: 1px solid $fourth-highlight;
border-radius: 0.25em;
margin-bottom: 1em;
Expand All @@ -43,33 +19,54 @@ file-importer {
align-items: center;

svg {
margin-right: $space-smedium;
width: 16px;
height: 16px;
margin-right: $space-smedium;
width: 16px;
height: 16px;
}

.underline {
text-decoration: underline;
text-decoration: underline;
}

@include transition(all);

input[type=file] {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
width: 100%;
opacity: 0;
cursor: pointer;
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
width: 100%;
opacity: 0;
cursor: pointer;
}

&:hover,
&:focus {
border: 1px dashed $first-highlight;
border: 1px dashed $first-highlight;
}
}

&.expandFile {
flex: 1;
padding: $space-medium;

border: 1px dashed $first-highlight;
flex: 1;

svg {
width: 131px;
height: 150px;
margin-right: 0;
}

.centre-text {
text-align: center;
}
.max-file-size {
color: $secondary-text;
}
}

}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,28 +172,28 @@
(click)="openAddCertificateModal(i,'orderers');">
<svg class="standard-icon" aria-hidden="true">
<use xlink:href="#icon-data-quality_16"></use>
</svg>
</svg>
</button>
</div>
</div>
</div>
</div>


<div *ngIf="v1FormErrors.orderers.cert" class="error-message">
{{ v1FormErrors.orderers.cert }}
</div>
</div>
</div>

<div class="profile-buttons">
<button type="button" class="secondary" (click)="addOrderer()">+ Add another</button>
<button type="button" class="secondary" *ngIf="v1Form.controls.orderers.controls.length > 1"
(click)="removeOrderer((v1Form.controls.orderers.controls.length - 1))">Remove orderer
</button>
</div>
</div>
</button>
</div>
</div>
<div class="profile-row">
<div class="profile-property">
Channel*
</div>
</div>
<div class="profile-value">
<input [ngClass]="{'error-underline': v1FormErrors.channel}" type="text"
formControlName="channel">
Expand Down Expand Up @@ -266,26 +266,26 @@
(click)="openAddCertificateModal(i,'peers');">
<svg class="standard-icon" aria-hidden="true">
<use xlink:href="#icon-data-quality_16"></use>
</svg>
</svg>
</button>

</div>
</div>
<div class="nested-row">
<div class="nested-property">
Peer Event URL*
</div>
</div>
<div class="nested-value">
<input [ngClass]="{'error-underline': v1FormErrors.peers.eventURL}"
class="margin-right" type="text" formControlName="eventURL">
<div *ngIf="v1FormErrors.peers.eventURL" class="error-message">
{{ v1FormErrors.peers.eventURL }}
</div>
</div>

<input hidden type="text" formControlName="cert">
</div>
</div>

</div>
</div>
</div>
</div>
</div>

</div>
Expand All @@ -310,8 +310,7 @@
</div>
</div>
</div>

</section>
</section>
<section>
<div class="section-title">Advanced</div>
<div class="profile-row">
Expand Down
Loading