mirror of
https://gitlab.com/prpl-foundation/prplos/prpl-webui.git
synced 2025-12-20 02:18:40 +08:00
Replace vendor prefix
The correct vendor prefix to use is X_PRPLWARE-COM_. As the webui still uses the old prefix, this needs to be changed. Fixes: PPW-1120 References: PCF-1057 Signed-off-by: Toon Caeyers <toon.caeyers_ext@softathome.com> Signed-off-by: Petr Štetiar <petr.stetiar@prplfoundation.org> [fixes tag]
This commit is contained in:
committed by
Petr Štetiar
parent
c847c7fac8
commit
b46a7fd1e6
@@ -40,8 +40,8 @@ export default class ApplicationAdapter extends JSONAPIAdapter {
|
||||
let modelNamespace = this._getModelNamespace(modelName, snapshot);
|
||||
|
||||
if (id) {
|
||||
if (modelNamespace.match(/(?<=X_PRPL-COM_).+/)) {
|
||||
id = 'X_PRPL-COM_' + id;
|
||||
if (modelNamespace.match(/(?<=X_PRPLWARE-COM_).+/)) {
|
||||
id = 'X_PRPLWARE-COM_' + id;
|
||||
}
|
||||
modelNamespace = '';
|
||||
}
|
||||
|
||||
@@ -2,14 +2,14 @@ import ApplicationAdapter from './application';
|
||||
|
||||
export default class WanmanagerAdapter extends ApplicationAdapter {
|
||||
pathForType(type) {
|
||||
return 'X_PRPL-COM_WANManager.';
|
||||
return 'X_PRPLWARE-COM_WANManager.';
|
||||
}
|
||||
|
||||
urlForUpdateRecord(id, modelName, snapshot) {
|
||||
let url = super.urlForUpdateRecord(...arguments);
|
||||
let part = url.match(/^.+(?=WANManager.)/);
|
||||
//url = part[0] + 'X_PRPL-COM_WANManager.';
|
||||
url = part[0] + 'X_PRPL-COM_' + id;
|
||||
//url = part[0] + 'X_PRPLWARE-COM_WANManager.';
|
||||
url = part[0] + 'X_PRPLWARE-COM_' + id;
|
||||
return url;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,6 +6,6 @@ export default class WanManagerModel extends Model {
|
||||
@hasMany('wanmanager-wan') WAN;
|
||||
|
||||
@attr({
|
||||
defaultValue() { return 'X_PRPL-COM_WANManager.'; }
|
||||
defaultValue() { return 'X_PRPLWARE-COM_WANManager.'; }
|
||||
}) _namespace;
|
||||
}
|
||||
|
||||
@@ -48,8 +48,8 @@ export default class DeviceInfoSerializer extends JSONAPISerializer {
|
||||
record.path = testDevice[0];
|
||||
}
|
||||
|
||||
// remove "X_PRPL-COM_" prefix if present
|
||||
let testXPrpl = record.path.match(/(?<=X_PRPL-COM_).+/);
|
||||
// remove "X_PRPLWARE-COM_" prefix if present
|
||||
let testXPrpl = record.path.match(/(?<=X_PRPLWARE-COM_).+/);
|
||||
if (testXPrpl) {
|
||||
record.path = testXPrpl[0];
|
||||
}
|
||||
|
||||
@@ -110,7 +110,7 @@ export default function (config) {
|
||||
return dhcpv4;
|
||||
});
|
||||
|
||||
this.get('/serviceElements/Device.X_PRPL-COM_WANManager.', () => {
|
||||
this.get('/serviceElements/Device.X_PRPLWARE-COM_WANManager.', () => {
|
||||
return wanManager;
|
||||
});
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
export const data = [
|
||||
{
|
||||
parameters: { OperationMode: 'Manual', WANMode: 'demo_vlanmode' },
|
||||
path: 'X_PRPL-COM_WANManager.',
|
||||
path: 'X_PRPLWARE-COM_WANManager.',
|
||||
},
|
||||
{
|
||||
parameters: {
|
||||
@@ -9,7 +9,7 @@ export const data = [
|
||||
Alias: 'demo_wanmode',
|
||||
Status: 'Disabled',
|
||||
},
|
||||
path: 'X_PRPL-COM_WANManager.WAN.1.',
|
||||
path: 'X_PRPLWARE-COM_WANManager.WAN.1.',
|
||||
},
|
||||
{
|
||||
parameters: {
|
||||
@@ -26,7 +26,7 @@ export const data = [
|
||||
Type: 'untagged',
|
||||
VlanID: 100,
|
||||
},
|
||||
path: 'X_PRPL-COM_WANManager.WAN.1.Intf.1.',
|
||||
path: 'X_PRPLWARE-COM_WANManager.WAN.1.Intf.1.',
|
||||
},
|
||||
{
|
||||
parameters: {
|
||||
@@ -34,7 +34,7 @@ export const data = [
|
||||
Alias: 'demo_vlanmode',
|
||||
Status: 'Error',
|
||||
},
|
||||
path: 'X_PRPL-COM_WANManager.WAN.2.',
|
||||
path: 'X_PRPLWARE-COM_WANManager.WAN.2.',
|
||||
},
|
||||
{
|
||||
parameters: {
|
||||
@@ -50,6 +50,6 @@ export const data = [
|
||||
Type: 'vlan',
|
||||
VlanID: 201,
|
||||
},
|
||||
path: 'X_PRPL-COM_WANManager.WAN.2.Intf.1.',
|
||||
path: 'X_PRPLWARE-COM_WANManager.WAN.2.Intf.1.',
|
||||
},
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user