Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
netvs-core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
scc-net
netvs
netvs-core
Commits
869808eb
Commit
869808eb
authored
3 months ago
by
Alexander Kaschta
Browse files
Options
Downloads
Patches
Plain Diff
UPD: Finish BCDRequestForm UI
parent
cb2b67ab
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/components/BCDRequestForm.vue
+32
-26
32 additions, 26 deletions
src/components/BCDRequestForm.vue
src/locales/de.json
+3
-1
3 additions, 1 deletion
src/locales/de.json
src/locales/en.json
+3
-1
3 additions, 1 deletion
src/locales/en.json
with
38 additions
and
28 deletions
src/components/BCDRequestForm.vue
+
32
−
26
View file @
869808eb
...
...
@@ -182,14 +182,18 @@
{{ $t('components.bcd_request_form.dhcp_pool_wish') }}
</b-form-checkbox>
</b-form-group>
<b-form-group
:label=
"$t('components.bcd_request_form.dhcp_pool_size')"
>
<b-form-select
v-model=
"dhcp_pool_size_select"
:options=
"translated_dhcp_pool_size"
>
<
template
#first
>
<b-form-select-option
:value=
"null"
disabled
>
{{
$t
(
'
system.please_select
'
)
}}
</b-form-select-option>
</
template
>
</b-form-select>
<b-form-group
:label=
"$t('components.bcd_request_form.dhcp_pool_size')"
:disabled=
"!dhcp_pool_wish_value || loading_edit_action"
:description=
"$t('components.bcd_request_form.dhcp_pool_size_note')"
>
<b-form-input
v-model=
"dhcp_pool_size_value"
type=
"number"
min=
"2"
step=
"1"
:state=
"checkDHCPPoolSize"
:max=
"getSubnetSize(this.subnet_size_select ?? 29) - 5"
/>
<b-form-invalid-feedback>
{{ $t('components.bcd_request_form.dhcp_pool_size_error') }}
</b-form-invalid-feedback>
</b-form-group>
<b-form-group
:label=
"$t('components.bcd_request_form.device_location')"
>
<b-form-group
:label=
"$t('components.bcd_request_form.device_location')"
:disabled=
"!types_of_subnets_select || loading_edit_action"
>
<b-form-checkbox>
{{ $t('components.bcd_request_form.device_locations.cs') }}
</b-form-checkbox>
<b-form-checkbox>
{{ $t('components.bcd_request_form.device_locations.cn') }}
</b-form-checkbox>
<b-form-checkbox>
{{ $t('components.bcd_request_form.device_locations.vm_cluster_unknown') }}
</b-form-checkbox>
...
...
@@ -199,7 +203,8 @@
<b-form-checkbox>
{{ $t('components.bcd_request_form.device_locations.scc_server_room_cn') }}
</b-form-checkbox>
<b-form-checkbox>
{{ $t('components.bcd_request_form.device_locations.vpn_wifi_to_vlan') }}
</b-form-checkbox>
</b-form-group>
<b-form-group
:label=
"$t('components.bcd_request_form.realized_services')"
>
<b-form-group
:label=
"$t('components.bcd_request_form.realized_services')"
:disabled=
"!types_of_subnets_select || loading_edit_action"
>
<b-form-checkbox>
{{ $t('components.bcd_request_form.realizable_services.vpn2vlan') }}
<a
href=
"https://www.scc.kit.edu/ts-vpn2vlan"
target=
"_blank"
>
<netvs-icon
icon=
"external_link"
></netvs-icon>
...
...
@@ -214,6 +219,16 @@
</b-form-group>
</b-form>
</b-overlay>
<
template
#modal-footer=
"{ ok, cancel }"
>
<b-button
variant=
"secondary"
@
click=
"cancel()"
>
{{
$t
(
'
components.patch_request_form.cancel
'
)
}}
</b-button>
<b-button
variant=
"primary"
:disabled=
"!types_of_subnets_select"
@
click=
"ok()"
>
{{
$t
(
'
components.patch_request_form.send
'
)
}}
<b-spinner
small
v-show=
"sending"
/>
<netvs-icon
v-show=
"status_icon !== null"
:icon=
"status_icon"
></netvs-icon>
</b-button>
</
template
>
</b-modal>
</template>
...
...
@@ -242,7 +257,7 @@ export default {
access_from_internet_value
:
null
,
access_from_internet_explanation_value
:
null
,
dhcp_pool_wish_value
:
null
,
dhcp_pool_size_
select
:
null
,
dhcp_pool_size_
value
:
'
2
'
,
dhcp_own_server_value
:
null
,
dhcp_wish_value
:
null
,
protection_requirements_select
:
null
,
...
...
@@ -275,26 +290,14 @@ export default {
{
value
:
26
,
translation_key
:
'
components.bcd_request_form.ipv4_subnet_sizes.size_26
'
},
{
value
:
25
,
translation_key
:
'
components.bcd_request_form.ipv4_subnet_sizes.size_25
'
},
{
value
:
24
,
translation_key
:
'
components.bcd_request_form.ipv4_subnet_sizes.size_24
'
}
]
],
sending
:
false
,
status_icon
:
null
}
},
computed
:
{
translated_dhcp_pool_size
()
{
// Calculate the number of ipv4 addresses
const
subnet_size
=
ipaddress
.
ipv4_subnet_size
(
this
.
subnet_size_select
??
29
)
const
dhcp_pool_size_options
=
[]
for
(
let
dhcp_pool_size
=
2
;
dhcp_pool_size
<=
subnet_size
-
5
;
dhcp_pool_size
++
)
{
// Generate the entries dynamically
dhcp_pool_size_options
.
push
({
value
:
dhcp_pool_size
,
translation_key
:
'
components.bcd_request_form.dhcp_pool_address_count
'
,
translation_args
:
{
number
:
dhcp_pool_size
}
})
}
return
this
.
translateOptions
(
dhcp_pool_size_options
)
checkDHCPPoolSize
()
{
return
parseInt
(
this
.
dhcp_pool_size_value
)
>=
2
&&
parseInt
(
this
.
dhcp_pool_size_value
)
<=
(
this
.
getSubnetSize
(
this
.
subnet_size_select
??
29
)
-
5
)
},
translated_protection_requirements
()
{
return
this
.
translateOptions
(
this
.
protection_requirements_options
)
...
...
@@ -316,6 +319,9 @@ export default {
}
},
methods
:
{
getSubnetSize
(
value
)
{
return
ipaddress
.
ipv4_subnet_size
(
value
)
},
async
update
()
{
await
this
.
updateOEs
()
},
...
...
This diff is collapsed.
Click to expand it.
src/locales/de.json
+
3
−
1
View file @
869808eb
...
...
@@ -37,7 +37,9 @@
"dhcp_own"
:
"Eigener DHCP-Server"
,
"dhcp_own_question"
:
"Wird ein eigener DHCP-Server betrieben?"
,
"dhcp_pool"
:
"DHCP-Pool"
,
"dhcp_pool_size"
:
"Wie groß soll der DHCP-Pool sein?"
,
"dhcp_pool_size"
:
"Wie viele Adressen soll der DHCP-Pool haben?"
,
"dhcp_pool_size_note"
:
"Der DHCP-Pool kann zwischen zwei und der Subnetzgröße minus fünf Adressen groß sein."
,
"dhcp_pool_size_error"
:
"Der angegebene Wert liegt nicht außerhalb der erlaubten Grenzen."
,
"dhcp_pool_address_count"
:
"{number} Adressen"
,
"dhcp_pool_wish"
:
"Wird zusätzlich ein DHCP-Pool gewünscht?"
,
"dhcp_wish"
:
"Wird DHCP gewünscht?"
,
...
...
This diff is collapsed.
Click to expand it.
src/locales/en.json
+
3
−
1
View file @
869808eb
...
...
@@ -37,7 +37,9 @@
"dhcp_own"
:
"Own DHCP Server"
,
"dhcp_own_question"
:
"Do you operate your own DHCP server?"
,
"dhcp_pool"
:
"DHCP-Pool"
,
"dhcp_pool_size"
:
"How large should the DHCP pool be?"
,
"dhcp_pool_size"
:
"How many addresses should the DHCP pool contain?"
,
"dhcp_pool_size_note"
:
"The DHCP pool can have between two and the subnet size minus five addresses."
,
"dhcp_pool_size_error"
:
"The given value is not within the specified boundaries."
,
"dhcp_pool_address_count"
:
"{number} addresses"
,
"dhcp_pool_wish"
:
"Is a DHCP pool also desired?"
,
"dhcp_wish"
:
"Is DHCP wished?"
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment