_renderImageRow: function()

in cloud-vmware-server/src/main/resources/buildServerResources/vmware-settings.js [598:624]


        _renderImageRow: function (props, id) {
            var $row = this.templates.imagesTableRow.clone().attr('data-image-id', id),
                behaviourTexts = {};

            this._dataKeys.forEach(function (className) {
                $row.find('.' + className).text(props[className]);
            });

            behaviourTexts[START_STOP] = 'Start/Stop';
            behaviourTexts[ON_DEMAND_CLONE] = 'Clone';
            behaviourTexts[FRESH_CLONE] = 'Clone; Delete';

            if (props.snapshot === CURRENT_STATE) {
                $row.find('.snapshot').text('"Current state"');
            } else if (props.snapshot == LATEST_SNAPSHOT){
                $row.find('.snapshot').text('"Latest snapshot"');
            }

            if (props.nickname && props.nickname != ''){
                $row.find('.sourceVmName').text(' (' +props.sourceVmName + ")");
            }

            $row.find('.behaviour').text(behaviourTexts[props.behaviour]);
            $row.find(this.selectors.rmImageLink).data('image-id', id);
            $row.find(this.selectors.editImageLink).data('image-id', id);
            this.$imagesTable.append($row);
        },