mirror of https://github.com/hashicorp/consul
ui: Explicitly remove properties that shouldn't be sent when saving (#6917)
parent
6827f05046
commit
5a88d4ebe1
|
@ -25,14 +25,26 @@ export default Adapter.extend({
|
||||||
return request`
|
return request`
|
||||||
PUT /v1/acl/role?${{ [API_DATACENTER_KEY]: data[DATACENTER_KEY] }}
|
PUT /v1/acl/role?${{ [API_DATACENTER_KEY]: data[DATACENTER_KEY] }}
|
||||||
|
|
||||||
${serialized}
|
${{
|
||||||
|
Name: serialized.Name,
|
||||||
|
Description: serialized.Description,
|
||||||
|
Namespace: serialized.Namespace,
|
||||||
|
Policies: serialized.Policies,
|
||||||
|
ServiceIdentities: serialized.ServiceIdentities,
|
||||||
|
}}
|
||||||
`;
|
`;
|
||||||
},
|
},
|
||||||
requestForUpdateRecord: function(request, serialized, data) {
|
requestForUpdateRecord: function(request, serialized, data) {
|
||||||
return request`
|
return request`
|
||||||
PUT /v1/acl/role/${data[SLUG_KEY]}?${{ [API_DATACENTER_KEY]: data[DATACENTER_KEY] }}
|
PUT /v1/acl/role/${data[SLUG_KEY]}?${{ [API_DATACENTER_KEY]: data[DATACENTER_KEY] }}
|
||||||
|
|
||||||
${serialized}
|
${{
|
||||||
|
Name: serialized.Name,
|
||||||
|
Description: serialized.Description,
|
||||||
|
Namespace: serialized.Namespace,
|
||||||
|
Policies: serialized.Policies,
|
||||||
|
ServiceIdentities: serialized.ServiceIdentities,
|
||||||
|
}}
|
||||||
`;
|
`;
|
||||||
},
|
},
|
||||||
requestForDeleteRecord: function(request, serialized, data) {
|
requestForDeleteRecord: function(request, serialized, data) {
|
||||||
|
|
|
@ -26,6 +26,14 @@ export default Adapter.extend({
|
||||||
requestForCreateRecord: function(request, serialized, data) {
|
requestForCreateRecord: function(request, serialized, data) {
|
||||||
return request`
|
return request`
|
||||||
PUT /v1/acl/token?${{ [API_DATACENTER_KEY]: data[DATACENTER_KEY] }}
|
PUT /v1/acl/token?${{ [API_DATACENTER_KEY]: data[DATACENTER_KEY] }}
|
||||||
|
|
||||||
|
${{
|
||||||
|
Description: serialized.Description,
|
||||||
|
Policies: serialized.Policies,
|
||||||
|
Roles: serialized.Roles,
|
||||||
|
ServiceIdentities: serialized.ServiceIdentities,
|
||||||
|
Local: serialized.Local,
|
||||||
|
}}
|
||||||
`;
|
`;
|
||||||
},
|
},
|
||||||
requestForUpdateRecord: function(request, serialized, data) {
|
requestForUpdateRecord: function(request, serialized, data) {
|
||||||
|
@ -45,7 +53,13 @@ export default Adapter.extend({
|
||||||
return request`
|
return request`
|
||||||
PUT /v1/acl/token/${data[SLUG_KEY]}?${{ [API_DATACENTER_KEY]: data[DATACENTER_KEY] }}
|
PUT /v1/acl/token/${data[SLUG_KEY]}?${{ [API_DATACENTER_KEY]: data[DATACENTER_KEY] }}
|
||||||
|
|
||||||
${serialized}
|
${{
|
||||||
|
Description: serialized.Description,
|
||||||
|
Policies: serialized.Policies,
|
||||||
|
Roles: serialized.Roles,
|
||||||
|
ServiceIdentities: serialized.ServiceIdentities,
|
||||||
|
Local: serialized.Local,
|
||||||
|
}}
|
||||||
`;
|
`;
|
||||||
},
|
},
|
||||||
requestForDeleteRecord: function(request, serialized, data) {
|
requestForDeleteRecord: function(request, serialized, data) {
|
||||||
|
|
Loading…
Reference in New Issue