updated to work with changes for rel/5.2
This commit is contained in:
parent
b18d5b5805
commit
38ddec1ed9
3 changed files with 144 additions and 200 deletions
|
@ -78,12 +78,20 @@ class CoreRest {
|
|||
return await $.getJSON(`/sessions/${this.currentSession}/emane/models`);
|
||||
}
|
||||
|
||||
async getConfig(config) {
|
||||
return await $.getJSON(`/sessions/${this.currentSession}/config`, config);
|
||||
async getEmaneConfig(config) {
|
||||
return await $.getJSON(`/sessions/${this.currentSession}/emane/config`, config);
|
||||
}
|
||||
|
||||
async setConfig(config) {
|
||||
return await putJson(`/sessions/${this.currentSession}/config`, config);
|
||||
async getEmaneModelConfig(config) {
|
||||
return await $.getJSON(`/sessions/${this.currentSession}/emane/model/config`, config);
|
||||
}
|
||||
|
||||
async setEmaneConfig(config) {
|
||||
return await putJson(`/sessions/${this.currentSession}/emane/config`, config);
|
||||
}
|
||||
|
||||
async setEmaneModelConfig(config) {
|
||||
return await putJson(`/sessions/${this.currentSession}/emane/model/config`, config);
|
||||
}
|
||||
|
||||
async getNode(nodeId) {
|
||||
|
|
|
@ -83,11 +83,18 @@ class ConfigModel {
|
|||
configs.push({name, value, type: dataType});
|
||||
}
|
||||
console.log('config data: ', configs);
|
||||
await this.coreRest.setConfig({
|
||||
name: configType,
|
||||
node: nodeId,
|
||||
values: configs
|
||||
});
|
||||
if (configType === "emane") {
|
||||
await this.coreRest.setEmaneConfig({
|
||||
node: nodeId,
|
||||
values: configs
|
||||
});
|
||||
} else {
|
||||
await this.coreRest.setEmaneModelConfig({
|
||||
node: nodeId,
|
||||
name: configType,
|
||||
values: configs
|
||||
});
|
||||
}
|
||||
this.$modal.modal('hide');
|
||||
}
|
||||
|
||||
|
@ -124,7 +131,7 @@ class ConfigModel {
|
|||
const configName = 'emane';
|
||||
this.$modal.data('type', configName);
|
||||
this.$title.text('EMANE Options');
|
||||
const config = await this.coreRest.getConfig({node: nodeId, name: configName});
|
||||
const config = await this.coreRest.getEmaneConfig({node: nodeId});
|
||||
console.log('emane options clicked: ', config);
|
||||
this.showConfig(config);
|
||||
return false;
|
||||
|
@ -137,7 +144,7 @@ class ConfigModel {
|
|||
this.$modal.data('type', configName);
|
||||
this.$title.text('EMANE Model Options');
|
||||
console.log('emane model clicked: ', configName);
|
||||
const config = await this.coreRest.getConfig({node: nodeId, name: configName});
|
||||
const config = await this.coreRest.getEmaneModelConfig({node: nodeId, name: configName});
|
||||
console.log('emane model options clicked: ', config);
|
||||
this.showConfig(config);
|
||||
return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue