Skip to content

Commit 268dc52

Browse files
Merge branch 'master' into SAN-6097
* master: (56 commits) 5.19.17 add events for all settings tabs add events for all settings buttons fix button width in safari fix PR bot button alignment add event for private registry "back" button add events for accounts popover buttons add events for settings modal tabs update adding private registry event add ssh key events add private registry events add documentation link add orgs to key names update authed modal fix creating state fix indentation remove negative margins + fix recently added state remove loading state fix border color on recently added state title case ... # Conflicts: # client/directives/components/mirrorDockerfile/addDockerfileView.jade # client/directives/components/newContainer/forms/configureNewServiceView.jade Also had to manually edit setupMethodView.jade since it was where the conflict for configureNewServiceView.jade had been moved too.
2 parents 4801dfe + 34a8793 commit 268dc52

22 files changed

Lines changed: 390 additions & 60 deletions

File tree

client/assets/styles/scss/index.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@
152152
@import "modals/modals-repository-details";
153153
@import "modals/modals-server-select";
154154
@import "modals/modals-settings";
155+
@import "modals/modals-ssh-auth";
155156

156157
// popovers
157158
@import "popover/popover";

client/assets/styles/scss/modals/modals-empty.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@
6464

6565
// submit buttons (like for api token)
6666
.green {
67-
display: table;
6867
margin-left: auto;
6968
margin-right: auto;
7069
}

client/assets/styles/scss/modals/modals-settings.scss

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,3 +138,100 @@
138138
}
139139
}
140140
}
141+
142+
.form-ssh {
143+
144+
.list-item {
145+
font-size: 13px;
146+
min-height: 90px;
147+
padding: $sm;
148+
149+
@include media(xxs) {
150+
align-items: flex-start;
151+
flex-direction: column;
152+
min-height: 0;
153+
}
154+
155+
&.recently-added {
156+
background-color: $blue-lighter;
157+
border-color: transparent;
158+
box-shadow: inset 0 0 0 $input-border-lg $blue-light;
159+
margin: -$input-border;
160+
min-height: 90px + $input-border * 2;
161+
padding: $sm + $input-border;
162+
z-index: 1;
163+
164+
@include media(xxs) {
165+
.icons-key {
166+
bottom: $sm + $input-border;
167+
right: $sm + $input-border;
168+
}
169+
}
170+
}
171+
172+
> .icons-key,
173+
> .spinner-wrapper {
174+
height: 24px;
175+
padding: 3px;
176+
width: 24px;
177+
178+
@include media(xxs) {
179+
bottom: $sm;
180+
position: absolute;
181+
right: $sm;
182+
}
183+
}
184+
}
185+
186+
.p {
187+
padding: 0 $sm;
188+
189+
@include media(xxs) {
190+
max-width: 100%;
191+
padding: 0;
192+
}
193+
}
194+
195+
.btn-xs:not(.btn-create-key) {
196+
flex: 0 0 114px;
197+
198+
@include media(xxs) {
199+
flex: 0 0 auto;
200+
margin-top: 9px;
201+
}
202+
}
203+
204+
// a.btn.gray
205+
.gray {
206+
color: $gray-dark;
207+
208+
.spinner-wrapper {
209+
height: 12px;
210+
margin-right: 3px;
211+
width: 12px;
212+
}
213+
}
214+
215+
.btn-authorized {
216+
background-color: transparent;
217+
border-color: transparent;
218+
color: $gray;
219+
pointer-events: none;
220+
221+
@include media(xxs) {
222+
padding: 0;
223+
}
224+
}
225+
226+
.icons-check,
227+
.icons-octicons-github {
228+
flex: 0 0 18px;
229+
margin-right: 2px;
230+
}
231+
232+
.icons-link-external-alt {
233+
height: 9px;
234+
margin-left: 4px;
235+
width: 9px;
236+
}
237+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
.modal-ssh-auth {
2+
3+
.padding-md {
4+
@include media(xxs) {
5+
padding: $sm;
6+
}
7+
}
8+
9+
.runnabear {
10+
left: 0;
11+
margin: 0 auto;
12+
position: absolute;
13+
right: 0;
14+
top: -119px;
15+
z-index: 1;
16+
}
17+
}

client/directives/accountsSelect/popoverAccountMenu/viewPopoverAccountMenu.jade

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,9 @@
2323
)
2424
li.list-item.popover-list-item.small.disabled {{data.currentOrg.github.oauthName()}} Settings
2525
li.list-item.popover-list-item(
26-
ng-if = "data.currentOrg.isBillingVisible()"
26+
data-event-name = "Clicked to Open Billing Settings"
2727
ng-click = "actions.openSettingsModal('billing')"
28+
ng-if = "data.currentOrg.isBillingVisible()"
2829
)
2930
svg.iconnables
3031
use(
@@ -37,6 +38,7 @@
3738
)
3839
| {{data.currentOrg.poppa.trialDaysRemaining() + ' days left'}}
3940
li.list-item.popover-list-item(
41+
data-event-name = "Clicked to Open PR Bot Settings"
4042
ng-click = "actions.openSettingsModal('githubIntegration')"
4143
)
4244
svg.iconnables
@@ -45,6 +47,7 @@
4547
)
4648
| PR Bot
4749
li.list-item.popover-list-item(
50+
data-event-name = "Clicked to Open Private Registry Settings"
4851
ng-click = "actions.openSettingsModal('privateRegistry')"
4952
ng-if = "$root.featureFlags.privateRegistry"
5053
)
@@ -54,6 +57,7 @@
5457
)
5558
| Private Registry
5659
li.list-item.popover-list-item(
60+
data-event-name = "Clicked to Open Slack Integration Settings"
5761
ng-click = "actions.openSettingsModal('slackIntegration')"
5862
)
5963
img.iconnables(
@@ -63,6 +67,17 @@
6367
)
6468
| Slack Integration
6569
li.list-item.popover-list-item(
70+
data-event-name = "Clicked to Open SSH Keys Settings"
71+
ng-click = "actions.openSettingsModal('SSHKeys')"
72+
ng-if = "$root.featureFlags.composeSSHKeys"
73+
)
74+
svg.iconnables
75+
use(
76+
xlink:href = "#icons-key"
77+
)
78+
| SSH Keys
79+
li.list-item.popover-list-item(
80+
data-event-name = "Clicked to Open Teammates Settings"
6681
ng-click = "actions.openSettingsModal('teamManagement')"
6782
)
6883
svg.iconnables
@@ -162,3 +177,8 @@
162177
ng-if = "flag === 'gitHubScope'"
163178
style = "position: absolute; right: 9px; top: 6px;"
164179
) Go
180+
button.btn.btn-xs.gray(
181+
internal-modal-helper = "composeSSHAuthView"
182+
ng-if = "flag === 'composeSSHAuthView'"
183+
style = "position: absolute; right: 9px; top: 6px;"
184+
) Go

client/directives/components/mirrorDockerfile/addDockerfileView.jade

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ form(
1515
dockerfile-exists-validator = "{{fileType}}"
1616
full-repo = "fullRepo"
1717
id = "add-dockerfile-input"
18-
ng-disabled = "state.dockerFileAdded || MDC.isSaving()"
18+
ng-disabled = "state.dockerFileAdded || $root.featureFlags.composeEditing || MDC.isSaving()"
1919
ng-model = "newDockerfile"
2020
ng-model-options = "{ debounce: { 'default': 100, 'blur': 0 } }"
2121
placeholder = "{{ fileName }}"

client/directives/components/newContainer/forms/compose/composeFilePathView.jade

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
.padding-left-xxs.small.label-sm {{type === 'stage' ? 'Compose for Staging' : 'Compose for Testing'}}
44
.toggle-wrapper
55
input.toggle-input(
6+
ng-disabled = "$root.featureFlags.composeEditing"
67
ng-model = "pathEnabled"
78
type = "checkbox"
89
ng-disabled = "MDC.isSaving()"
Lines changed: 49 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,54 @@
1-
section.grid-block.vertical.modal-body
2-
1+
header.grid-block.vertical.align-center.modal-header(
2+
ng-if = "$root.featureFlags.composeEditing"
3+
ng-init = "state.selectedTab = 'compose'"
4+
)
5+
.container-title-wrapper
6+
.server-status-card-pop-over.no-touching
7+
.container-title {{NCC.state.instanceName}}
38
svg.iconnables.icons-close(
49
ng-click = "NCC.close()"
510
)
611
use(
712
xlink:href = "#icons-close"
813
)
914

10-
.grid-block.vertical.modal-form.no-border
11-
.label-tabs.grid-block
12-
label.grid-block.align-center.btn.btn-radio(
13-
ng-class = "{'active': NCC.state.dockerFileTab === 'kubernetes'}"
14-
ng-click = "\
15-
NCC.state.dockerFileTab = 'kubernetes';\
16-
NCC.state.configurationMethod = 'dockerComposeFile'\
17-
"
18-
ng-if = "$root.featureFlags.kubernetes"
19-
)
20-
svg.grid-block.shrink.btn.btn-xs.btn-icon.btn-add.iconnables.icons-check
21-
use(
22-
xlink:href = "#icons-check"
23-
)
24-
.grid-block.vertical.text-left
25-
p.p.weight-strong Use Kubernetes
26-
small.small Set up from Kubernetes files in your repo.
15+
.row.modal-tabs.tabs-all.grid-block.clearfix(
16+
ng-init = "tabs = [\
17+
{name: 'compose', iconName: 'icons-compose', label: 'Compose Files'},\
18+
{name: 'env', iconName: 'icons-environment-variable', label: 'Environment Variables'}\
19+
];"
20+
)
21+
button.btn.btn-radio.grid-block.vertical(
22+
ng-class = "{'active': state.selectedTab === '{{tab.name}}'}"
23+
ng-click = "state.selectedTab = tab.name"
24+
ng-repeat = "tab in tabs"
25+
)
26+
svg.iconnables.grid-content
27+
use(
28+
ng-attr-xlink:href = "{{'#' + $sce.trustAs($sce.HTML, tab.iconName)}}"
29+
xlink:href = ""
30+
)
31+
.btn-text.grid-content {{tab.label}}
32+
33+
section.grid-block.vertical.modal-body(
34+
ng-init = "state.selectedTab = 'compose'"
35+
)
2736

28-
label.grid-block.align-center.btn.btn-radio(
29-
data-event-name = "Selected Compose Setup"
30-
ng-class = "{'active': NCC.state.dockerFileTab === 'compose'}"
31-
ng-click = "NCC.isSaving() || ((NCC.state.dockerFileTab = 'compose') && (NCC.state.configurationMethod = 'dockerComposeFile'))"
32-
)
33-
svg.grid-block.shrink.btn.btn-xs.btn-icon.btn-add.iconnables.icons-check
34-
use(
35-
xlink:href = "#icons-check"
36-
)
37-
.grid-block.vertical.text-left
38-
p.p.weight-strong Use a Compose File
39-
small.small Set up from a Compose file in your repo.
37+
svg.iconnables.icons-close(
38+
ng-click = "NCC.close()"
39+
ng-if = "!$root.featureFlags.composeEditing"
40+
)
41+
use(
42+
xlink:href = "#icons-close"
43+
)
4044

41-
label.grid-block.align-center.btn.btn-radio(
42-
data-event-name = "Selected Dockerfile Setup"
43-
ng-class = "{'active': NCC.state.dockerFileTab === 'dockerfile'}"
44-
ng-click = "NCC.isSaving() || ((NCC.state.dockerFileTab = 'dockerfile') && (NCC.state.configurationMethod = 'dockerfile'))"
45-
ng-if = "!$root.featureFlags.kubernetes"
46-
)
47-
svg.grid-block.shrink.btn.btn-xs.btn-icon.btn-add.iconnables.icons-check
48-
use(
49-
xlink:href = "#icons-check"
50-
)
51-
.grid-block.vertical.text-left
52-
p.p.weight-strong No Compose File
53-
small.small Set up from scratch or from a Dockerfile.
45+
.grid-block.vertical.modal-form.no-border(
46+
ng-if = "state.selectedTab === 'compose'"
47+
)
48+
.label-tabs.grid-block(
49+
ng-if = "!$root.featureFlags.composeEditing"
50+
ng-include = "'setupMethodView'"
51+
)
5452

5553
//- form for naming the environment
5654
form.grid-block.vertical.label(
@@ -82,6 +80,12 @@ section.grid-block.vertical.modal-body
8280
state = "NCC.state"
8381
)
8482

83+
.modal-form(
84+
ng-form = "envVarForm"
85+
ng-include = "'viewFormEnvironmentVariables'"
86+
ng-if = "state.selectedTab === 'env'"
87+
)
88+
8589
footer.modal-footer.clearfix
8690
button.btn.btn-md.gray.btn-cancel.float-left(
8791
ng-click = "NCC.close()"
@@ -97,7 +101,7 @@ footer.modal-footer.clearfix
97101
)
98102
span(
99103
ng-if = "$root.featureFlags.composeNewService && NCC.state.repo"
100-
) {{ NCC.getNextStepText() }}
104+
) {{$root.featureFlags.composeEditing ? 'Save Changes' : 'NCC.getNextStepText()'}}
101105
span(
102106
ng-if = "NCC.state.templateSource"
103107
) Add Service

client/directives/components/newContainer/forms/nameNewServiceView.jade

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ label
66
maxlength = "19"
77
name = "instanceName"
88
no-double-dash-validator
9+
ng-disabled = "$root.featureFlags.composeEditing"
910
ng-model = "NCC.state.instanceName"
1011
ng-pattern = "/^[a-zA-Z0-9-]*$/"
1112
ng-placeholder = "{{NCC.state.instanceName}}"
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
label.grid-block.align-center.btn.btn-radio(
2+
ng-class = "{'active': NCC.state.dockerFileTab === 'kubernetes'}"
3+
ng-click = "\
4+
NCC.state.dockerFileTab = 'kubernetes';\
5+
NCC.state.configurationMethod = 'dockerComposeFile'\
6+
"
7+
ng-if = "$root.featureFlags.kubernetes"
8+
)
9+
svg.grid-block.shrink.btn.btn-xs.btn-icon.btn-add.iconnables.icons-check
10+
use(
11+
xlink:href = "#icons-check"
12+
)
13+
.grid-block.vertical.text-left
14+
p.p.weight-strong Use Kubernetes
15+
small.small Set up from Kubernetes files in your repo.
16+
17+
label.grid-block.align-center.btn.btn-radio(
18+
data-event-name = "Selected Compose Setup"
19+
ng-class = "{'active': NCC.state.dockerFileTab === 'compose'}"
20+
ng-click = "NCC.state.dockerFileTab = 'compose'; NCC.state.configurationMethod = 'dockerComposeFile'"
21+
)
22+
svg.grid-block.shrink.btn.btn-xs.btn-icon.btn-add.iconnables.icons-check
23+
use(
24+
xlink:href = "#icons-check"
25+
)
26+
.grid-block.vertical.text-left
27+
p.p.weight-strong Use a Compose File
28+
small.small Set up from a Compose file in your repo.
29+
30+
label.grid-block.align-center.btn.btn-radio(
31+
data-event-name = "Selected Dockerfile Setup"
32+
ng-class = "{'active': NCC.state.dockerFileTab === 'dockerfile'}"
33+
ng-click = "NCC.state.dockerFileTab = 'dockerfile'; NCC.state.configurationMethod = 'dockerfile'"
34+
ng-if = "!$root.featureFlags.kubernetes"
35+
)
36+
svg.grid-block.shrink.btn.btn-xs.btn-icon.btn-add.iconnables.icons-check
37+
use(
38+
xlink:href = "#icons-check"
39+
)
40+
.grid-block.vertical.text-left
41+
p.p.weight-strong No Compose File
42+
small.small Set up from scratch or from a Dockerfile.

0 commit comments

Comments
 (0)