@@ -14,7 +14,7 @@ <h1>Docker Build Images</h1>
1414 < i class ="ionicon ion-ios-paper-outline "> </ i >
1515 Images
1616 </ button >
17- < button class ="group-button " name ="tab-build-image " [ngClass] ="{ 'is-active': tab === 'build' } " (click) ="tab = 'build'; resetForm(); ">
17+ < button class ="group-button " name ="tab-build-image " [ngClass] ="{ 'is-active': tab === 'build' } " (click) ="tab = 'build'; resetForm(!!baseImages.length ); ">
1818 < i class ="ionicon ion-hammer "> </ i >
1919 Build Image
2020 </ button >
@@ -36,29 +36,16 @@ <h1>Docker Build Images</h1>
3636
3737 < div *ngIf ="tab === 'images' ">
3838 < div class ="content-box image-builder-box ">
39- < div class ="columns is-multiline " *ngIf ="images?.length ">
40- < div class ="column is-4 " *ngFor ="let i of images; let index = index; ">
41- < div class ="image-item ">
42- < h2 > {{ i.name }}</ h2 >
43- < span class ="version "> {{ i.version }}</ span >
44- < img src ="/images/logos/docker.svg " class ="docker-img ">
45- < span class ="time "> {{ i.created }}</ span >
46- < span class ="time "> Created {{ i.createdAgo }} ago</ span >
47- < span class ="size "> Size {{ i.size }}</ span >
48- < button type ="button " class ="button is-fullwidth " (click) ="editImage(index) "> Edit Image</ button >
49- </ div >
50- </ div >
51- </ div >
5239
53- < div class ="columns " *ngIf ="!images ?.length ">
40+ < div class ="columns " *ngIf ="!baseImages ?.length ">
5441 < div class ="column is-12 ">
5542 < div class ="message ">
5643 < div class ="columns ">
5744 < div class ="column is-1 ">
5845 < i class ="ion ion-information "> </ i >
5946 </ div >
6047 < div class ="column is-11 ">
61- < p > < strong > No Docker images built with Abstruse found.</ strong > </ p >
48+ < p > < strong > No Base Images found.</ strong > </ p >
6249 < p > It is important to build images using < a (click) ="tab = 'build' "> this</ a > form so files needed for Abstruse to work are included.</ p >
6350 < p > Images built using Abstruse form are later easily upgradeable as config files are stored with the application.</ p >
6451 </ div >
@@ -67,21 +54,99 @@ <h2>{{ i.name }}</h2>
6754 </ div >
6855 </ div >
6956
57+ < div class ="content-box " *ngIf ="baseImages?.length ">
58+ < div class ="content-box-header ">
59+ < h1 > Base Images</ h1 >
60+ </ div >
61+ < div class ="columns is-multiline ">
62+ < div class ="column is-3 " *ngFor ="let i of baseImages; let index = index; ">
63+ < div class ="base-image-item ">
64+ < h2 > {{ i.name }}</ h2 >
65+ < span class ="version "> {{ i.version }}</ span >
66+ < img src ="/images/logos/docker.svg " class ="docker-img ">
67+ < span class ="time "> {{ i.created }}</ span >
68+ < span class ="size "> Size {{ i.size }}</ span >
69+ < button type ="button " class ="button is-small " (click) ="editImage(index, true) "> Edit Image</ button >
70+ </ div >
71+ </ div >
72+ </ div >
73+ </ div >
74+
75+ < div class ="content-box " *ngIf ="customImages?.length ">
76+ < div class ="content-box-header ">
77+ < h1 > Custom Images</ h1 >
78+ </ div >
79+ < div class ="columns is-multiline ">
80+ < div class ="column is-4 " *ngFor ="let i of customImages; let index = index; ">
81+ < div class ="image-item ">
82+ < h2 > {{ i.name }}</ h2 >
83+ < span class ="version "> {{ i.version }}</ span >
84+ < img src ="/images/logos/docker.svg " class ="docker-img ">
85+ < span class ="time "> {{ i.created }}</ span >
86+ < span class ="time "> Created {{ i.createdAgo }} ago</ span >
87+ < span class ="size "> Size {{ i.size }}</ span >
88+ < button type ="button " class ="button is-fullwidth " (click) ="editImage(index, false) "> Edit Image</ button >
89+ </ div >
90+ </ div >
91+ </ div >
92+ </ div >
93+
7094 </ div >
7195 </ div >
7296
7397 < div *ngIf ="tab === 'build' ">
7498 < div class ="content-box image-builder-box " *ngIf ="!building ">
7599 < div class ="columns is-multiline ">
76100 < div class ="column is-12 ">
101+ < div class ="content-box approve " *ngIf ="approve ">
102+ < div class ="columns is-multiline ">
103+ < div class ="column is-12 ">
104+ < h1 > Warning:</ h1 >
105+ </ div >
106+ < div class ="column is-12 ">
107+ < div class ="column is-12 ">
108+ Your docker file contains commands that can cause Abstruse to work incorrectly ({{dangerousCommands}}).
109+ </ div >
110+ < div class ="column is-12 ">
111+ Are you sure, you want to build that image?
112+ </ div >
113+ </ div >
114+ < div class ="column is-6 ">
115+ < button class ="button is-fullwidth " name ="btn-build " type ="button " (click) ="startBuild() ">
116+ < i class ="ionicon ion-checkmark "> </ i >
117+ < span > Build</ span >
118+ </ button >
119+ </ div >
120+ < div class ="column is-6 ">
121+ < button class ="button is-fullwidth " name ="btn-cancel " type ="button " (click) ="approve = false ">
122+ < i class ="ionicon ion-close "> </ i >
123+ < span > Cancel</ span >
124+ </ button >
125+ </ div >
126+ </ div >
127+ </ div >
77128 < h2 > Image name</ h2 >
78129 < input type ="text " class ="image-name-input " [(ngModel)] ="form.name " placeholder ="Image Name ">
130+ < div class ="columns is-multiline " *ngIf ="baseImages?.length && !editingImage ">
131+ < div class ="column is-6 ">
132+ < h2 > Image Type</ h2 >
133+ < app-selectbox [data] ="imageTypeOptions " (ngModelChange) ="changeImageTypeSelect($event) " name ="imageType " [(ngModel)] ="form.base " [disabled] ="baseImages?.length "> </ app-selectbox >
134+ </ div >
135+ < div class ="column is-6 ">
136+ < div *ngIf ="!form.base ">
137+ < h2 > Base Image</ h2 >
138+ < app-selectbox [data] ="baseImageOptions " (ngModelChange) ="changeBaseImageSelect($event) " name ="baseImageOptions " [(ngModel)] ="baseImage "> </ app-selectbox >
139+ </ div >
140+ </ div >
141+ </ div >
79142 < h2 > Dockerfile</ h2 >
80143 < app-editor [options] ="editorOptions " [(ngModel)] ="form.dockerfile " class ="editor-large "> </ app-editor >
81- < h2 > init.sh</ h2 >
82- < app-editor [options] ="initEditorOptions " [(ngModel)] ="form.initsh " class ="editor-small "> </ app-editor >
144+ < div *ngIf ="!form.base ">
145+ < h2 > init.sh</ h2 >
146+ < app-editor [options] ="initEditorOptions " [(ngModel)] ="form.initsh " class ="editor-small "> </ app-editor >
147+ </ div >
83148 < div class ="images-buttons-container ">
84- < button type ="button " class ="button w300 green " (click) ="buildImage() " name ="build-image-btn "> Build Image</ button >
149+ < button type ="button " class ="button w300 green " (click) ="buildImage() " name ="build-image-btn " [disabled] =" approve " > Build Image</ button >
85150 </ div >
86151 </ div >
87152 </ div >
@@ -91,7 +156,7 @@ <h2>init.sh</h2>
91156 < p class ="has-text-centered ">
92157 Building image < strong > {{ form.name }}</ strong > < span *ngIf ="imageBuildsText "> ({{ imageBuildsText }} layers)</ span > ...
93158 </ p >
94- < pre class =" image-build-log " [innerHTML ] ="imageBuildLog | safeHtml " *ngIf =" imageBuildLog " slimScroll [options] ="scrollOptions " [scrollEvents] =" scrollEvents " > </ pre >
159+ < app-terminal [data ] ="terminalInput " [options] ="terminalOptions " > </ app-terminal >
95160 </ div >
96161 </ div >
97162
0 commit comments