summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJannik Schönartz2018-12-11 15:51:58 +0100
committerJannik Schönartz2018-12-11 15:51:58 +0100
commit92e2d90dd65dd9b68b6e779c41993d73be5d6e94 (patch)
tree257ead3922b89512deef8a6dd56e86fd77729933
parent[registration/idoit] TPM upload functionality + improve hw specs (diff)
downloadbas-92e2d90dd65dd9b68b6e779c41993d73be5d6e94.tar.gz
bas-92e2d90dd65dd9b68b6e779c41993d73be5d6e94.tar.xz
bas-92e2d90dd65dd9b68b6e779c41993d73be5d6e94.zip
Rename registrations in registration.
-rw-r--r--server/api/registration.js (renamed from server/api/registrations.js)8
-rw-r--r--server/ipxe/grepSystemInfo.sh6
-rw-r--r--server/ipxe/registration.ipxe8
-rw-r--r--webapp/src/components/RegistrationModuleDelete.vue2
-rw-r--r--webapp/src/components/RegistrationModuleEdit.vue2
-rw-r--r--webapp/src/store/registration.js4
6 files changed, 15 insertions, 15 deletions
diff --git a/server/api/registrations.js b/server/api/registration.js
index 9192619..29e47bd 100644
--- a/server/api/registrations.js
+++ b/server/api/registration.js
@@ -400,14 +400,14 @@ function buildIpxeMenu (id, name, groups, parents) {
// Back button
script += 'item --key b back ' + spacer + '..\r\n'
menuscript += ':back\r\nparams\r\nparam id ' + parentId + '\r\nparam parents ' + JSON.stringify(oldParents) + '\r\n'
- menuscript += 'chain --replace ' + basUrl + '/api/registrations/group##params\r\n\r\n'
+ menuscript += 'chain --replace ' + basUrl + '/api/registration/group##params\r\n\r\n'
// Group menu entries. First 1-9 are pressable via key?
var counter = '1'
groups.forEach(group => {
script += 'item --key ' + counter + ' ' + counter + ' ' + spacer + '[' + group.id + '] ' + toAscii(group.name) + '\r\n'
menuscript += ':' + counter + '\r\n' + 'params\r\nparam id ' + group.id + `\r\nparam parents \${parents}\r\n`
- menuscript += 'chain --replace ' + basUrl + '/api/registrations/group##params\r\n\r\n'
+ menuscript += 'chain --replace ' + basUrl + '/api/registration/group##params\r\n\r\n'
counter++
})
@@ -418,12 +418,12 @@ function buildIpxeMenu (id, name, groups, parents) {
script += 'item select Add client to ' + toAscii(name) + '\r\n'
menuscript += `:select\r\necho Enter client name\r\nread clientname\r\nparams\r\nparam name \${clientname}\r\n`
menuscript += 'param id ' + id + `\r\nparam mac \${net0/mac}\r\nparam uuid \${uuid}\r\nparam ip \${net0/ip}\r\n`
- menuscript += 'chain --replace ' + basUrl + '/api/registrations/add##params\r\n\r\n'
+ menuscript += 'chain --replace ' + basUrl + '/api/registration/add##params\r\n\r\n'
// Goto start menu
if (id !== '0') {
script += 'item reset Go to start\r\n'
- menuscript += ':reset\r\nparams\r\nparam id ' + 0 + '\r\nchain --replace ' + basUrl + '/api/registrations/group##params\r\n\r\n'
+ menuscript += ':reset\r\nparams\r\nparam id ' + 0 + '\r\nchain --replace ' + basUrl + '/api/registration/group##params\r\n\r\n'
}
// Exit menu
diff --git a/server/ipxe/grepSystemInfo.sh b/server/ipxe/grepSystemInfo.sh
index a0810be..386f3b2 100644
--- a/server/ipxe/grepSystemInfo.sh
+++ b/server/ipxe/grepSystemInfo.sh
@@ -29,7 +29,7 @@ CPU_TYPE=$(dmidecode -q -s processor-family)
CPU_CORES=$(cat /sys/devices/system/cpu/cpu*/topology/thread_siblings_list | sort -u | wc -l)
#CPUMODEL=$(grep -m1 '^model name\s*:' /proc/cpuinfo | sed 's/^model name\s*:\s*//;s/\s\s*/ /g;s/^ //;s/ $//')
#echo "$CPUMODEL"
-CPU_FREQUENCY=$(dmidecode -q -s processor-frequency)
+CPU_FREQUENCY=$(dmidecode -q -s processor-frequency)registrations
CPU_FREQUENCY=${CPU_FREQUENCY%" MHz"}
# RAM
@@ -63,5 +63,5 @@ done
# Curl
-#curl --data "state=6" --insecure https://bas.stfu-kthx.net:8888/api/registrations/$UUID/state
-curl -d "name=Client_$UUID&sys_manufacturer=$MANUFACTURER&sys_model=$MODEL&sys_serial=$SERIAL&cpu_model=$CPU_MODEL&cpu_manufacturer=$CPU_MANUFACTURER&cpu_type=$CPU_TYPE&cpu_cores=$CPU_CORES&cpu_frequency=$CPU_FREQUENCY&ram_size=$RAM_SIZE&ram_manufacturer=$RAM_MANUFACTURER&ram_type=$RAM_TYPE&ram_isecc=$RAM_ISECC&ram_formfactor=$RAM_FORMFACTOR" -H "Content-Type: application/x-www-form-urlencoded" -X POST --insecure https://bas.intra.uni-freiburg.de/api/registrations/$UUID/update
+#curl --data "state=6" --insecure https://bas.stfu-kthx.net:8888/api/registration/$UUID/state
+curl -d "name=Client_$UUID&sys_manufacturer=$MANUFACTURER&sys_model=$MODEL&sys_serial=$SERIAL&cpu_model=$CPU_MODEL&cpu_manufacturer=$CPU_MANUFACTURER&cpu_type=$CPU_TYPE&cpu_cores=$CPU_CORES&cpu_frequency=$CPU_FREQUENCY&ram_size=$RAM_SIZE&ram_manufacturer=$RAM_MANUFACTURER&ram_type=$RAM_TYPE&ram_isecc=$RAM_ISECC&ram_formfactor=$RAM_FORMFACTOR" -H "Content-Type: application/x-www-form-urlencoded" -X POST --insecure https://bas.intra.uni-freiburg.de/api/registration/$UUID/update
diff --git a/server/ipxe/registration.ipxe b/server/ipxe/registration.ipxe
index c7fa24c..66e34e2 100644
--- a/server/ipxe/registration.ipxe
+++ b/server/ipxe/registration.ipxe
@@ -4,8 +4,8 @@
set crosscert http://ca.ipxe.org/auto/
#set img https://ife-server.com/b4db0y/ipxeWallpaper4.png || shell
#set img tftp://bas.stfu-kthx.net/ipxeWallpaper4.png || shell
-set img tftp://10.8.102.124/ipxeWallpaper3_scale.png || shell
-console --picture ${img} --x 800 --y 600 || shell
+#set img tftp://10.8.102.124/ipxeWallpaper3_scale.png || shell
+#console --picture ${img} --x 800 --y 600 || shell
:start
menu Initializing client registration
@@ -28,12 +28,12 @@ param mac ${net0/mac}
param uuid ${uuid}
param ip ${net0/ip}
param purpose Pool PC
-chain https://bas.intra.uni-freiburg.de/api/registrations/add##params
+chain https://bas.intra.uni-freiburg.de/api/registration/add##params
:manual
params
param id 0
-chain https://bas.intra.uni-freiburg.de/api/registrations/group##params ||
+chain https://bas.intra.uni-freiburg.de/api/registration/group##params ||
goto start
:reboot
diff --git a/webapp/src/components/RegistrationModuleDelete.vue b/webapp/src/components/RegistrationModuleDelete.vue
index 002e629..aaf8d57 100644
--- a/webapp/src/components/RegistrationModuleDelete.vue
+++ b/webapp/src/components/RegistrationModuleDelete.vue
@@ -44,7 +44,7 @@ export default {
this.$store.commit('registration/setDialog', data)
},
async deleteItems () {
- await axios.delete('/api/registrations/hooks/' + this.dialog.info.id)
+ await axios.delete('/api/registration/hooks/' + this.dialog.info.id)
this.$store.dispatch('registration/loadHooks')
this.setDialog({ show: false })
}
diff --git a/webapp/src/components/RegistrationModuleEdit.vue b/webapp/src/components/RegistrationModuleEdit.vue
index 7adee37..b9ab52e 100644
--- a/webapp/src/components/RegistrationModuleEdit.vue
+++ b/webapp/src/components/RegistrationModuleEdit.vue
@@ -105,7 +105,7 @@ export default {
this.$store.commit('registration/setDialog', data)
},
async saveHook () {
- await axios.post('/api/registrations/hooks/' + this.dialog.info.id, {
+ await axios.post('/api/registration/hooks/' + this.dialog.info.id, {
name: this.name,
description: this.description,
type: this.type,
diff --git a/webapp/src/store/registration.js b/webapp/src/store/registration.js
index 8d1882f..244d98e 100644
--- a/webapp/src/store/registration.js
+++ b/webapp/src/store/registration.js
@@ -22,7 +22,7 @@ export default {
},
actions: {
loadHooks (context) {
- axios.get('/api/registrations/hooks').then(result => {
+ axios.get('/api/registration/hooks').then(result => {
context.commit('setHooks', result.data)
})
},
@@ -32,7 +32,7 @@ export default {
})
},
setHooks (context, hooks) {
- axios.post('/api/registrations/hookorder', { ids: hooks.map(x => x.id) }).then(result => {
+ axios.post('/api/registration/hookorder', { ids: hooks.map(x => x.id) }).then(result => {
context.commit('setHooks', hooks)
})
}