Skip to content

Commit 0753b10

Browse files
committed
CS-13091: Remove enable/disable physical network actions
Due to limitations in the API, for now the enable/disable functionality for physical networks will be removed.
1 parent 66c6d1c commit 0753b10

1 file changed

Lines changed: 4 additions & 80 deletions

File tree

‎ui/scripts/system.js‎

Lines changed: 4 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -1827,81 +1827,7 @@
18271827
notification: {
18281828
poll: pollAsyncJobResult
18291829
}
1830-
},
1831-
enable: {
1832-
label: 'label.action.enable.physical.network',
1833-
messages: {
1834-
confirm: function(args) {
1835-
return 'message.action.enable.physical.network';
1836-
},
1837-
notification: function(args) {
1838-
return 'label.action.enable.physical.network';
1839-
}
1840-
},
1841-
action: function(args) {
1842-
$.ajax({
1843-
url: createURL('updatePhysicalNetwork'),
1844-
data: {
1845-
id: args.context.physicalNetworks[0].id,
1846-
state: 'Enabled'
1847-
},
1848-
success: function(json) {
1849-
args.response.success({
1850-
_custom: {
1851-
jobId: json.updatephysicalnetworkresponse.jobid,
1852-
getUpdatedItem: function(json) {
1853-
return {
1854-
state: 'Enabled'
1855-
};
1856-
},
1857-
getActionFilter: function() {
1858-
return cloudStack.actionFilter.physicalNetwork;
1859-
}
1860-
}
1861-
});
1862-
},
1863-
error: function(json) { args.response.error(parseXMLHttpResponse(json)); }
1864-
});
1865-
},
1866-
notification: { poll: pollAsyncJobResult }
1867-
},
1868-
disable: {
1869-
label: 'label.action.disable.physical.network',
1870-
messages: {
1871-
confirm: function(args) {
1872-
return 'message.action.disable.physical.network';
1873-
},
1874-
notification: function(args) {
1875-
return 'label.action.disable.physical.network';
1876-
}
1877-
},
1878-
action: function(args) {
1879-
$.ajax({
1880-
url: createURL('updatePhysicalNetwork'),
1881-
data: {
1882-
id: args.context.physicalNetworks[0].id,
1883-
state: 'Disabled'
1884-
},
1885-
success: function(json) {
1886-
args.response.success({
1887-
_custom: {
1888-
jobId: json.updatephysicalnetworkresponse.jobid,
1889-
getUpdatedItem: function(json) {
1890-
return {
1891-
state: 'Disabled'
1892-
};
1893-
},
1894-
getActionFilter: function() {
1895-
return cloudStack.actionFilter.physicalNetwork;
1896-
}
1897-
}
1898-
});
1899-
},
1900-
error: function(json) { args.response.error(parseXMLHttpResponse(json)); }
1901-
});
1902-
},
1903-
notification: { poll: pollAsyncJobResult }
1904-
}
1830+
}
19051831
}
19061832
},
19071833
dataProvider: function(args) {
@@ -9311,12 +9237,10 @@
93119237
cloudStack.actionFilter.physicalNetwork = function(args) {
93129238
var state = args.context.item.state;
93139239

9314-
if (state == 'Enabled') {
9315-
return ['disable', 'remove'];
9316-
} else if (state == 'Disabled') {
9317-
return ['enable', 'remove'];
9240+
if (state != 'Destroyed') {
9241+
return ['remove'];
93189242
}
9319-
9243+
93209244
return [];
93219245
};
93229246
})($, cloudStack);

0 commit comments

Comments
 (0)