CLOUDSTACK-2340: Display service state for health-checked VMs

This commit is contained in:
Brian Federle 2013-08-05 11:42:25 -07:00
parent 1e4ff7f453
commit 554c8b7ac1
4 changed files with 15 additions and 3 deletions

View File

@ -14,6 +14,7 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
label.service.state=Service State
label.egress.default.policy=Egress Default Policy
label.routing=Routing
label.about=About

View File

@ -25,6 +25,7 @@ under the License.
<% long now = System.currentTimeMillis(); %>
<script language="javascript">
dictionary = {
'label.service.state': '<fmt:message key="label.service.state" />',
'label.egress.default.policy': '<fmt:message key="label.egress.default.policy" />',
'label.routing': '<fmt:message key="label.routing" />',
'message.validate.invalid.characters': '<fmt:message key="message.validate.invalid.characters" />',

View File

@ -3672,6 +3672,11 @@
$(lbInstances).each(function() {
if (this.displayname.indexOf('AutoScale-LB-') > -1) //autoscale VM is not allowed to be deleted manually. So, hide destroy button
this._hideActions = ['destroy'];
if (this.servicestate) {
this._itemStateLabel = 'label.service.state';
this._itemState = this.servicestate;
}
});
},
error: function(data) {

View File

@ -708,9 +708,14 @@
});
});
var itemState = multiRule._itemState ? item[multiRule._itemState] : item.state;
var $itemState = $('<span>').html(_s(itemState));
$tr.append($('<td>').addClass('state').appendTo($tr).append("Application State - ").append($itemState));
var itemState = item._itemState ? item._itemState : item.state;
$tr.append($('<td>').addClass('state').appendTo($tr).append(
$('<span>').text(
item._itemStateLabel ? _l(item._itemStateLabel) + ' - ' + itemState :
_l('label.state') + ' - ' + itemState
)
));
if (itemActions) {