<?php
// Copyright 1999-2023. Plesk International GmbH. All rights reserved.
?>
<div id="issue-list">
</div>
<script type="text/javascript">
    //<![CDATA[
    Jsw.onReady(function() {

        new Jsw.Panel({
            cls: 'list-box',
            renderTo: 'issue-list',
            items: [
                new Jsw.List({
                    id: 'database-issue-list',
                    pageable: false,
                    sortable: false,
                    data: <?php echo Zend_Json::encode($this->issuesList->fetchData()); ?>,
                    columns: [
                        {
                            header: <?php echo $this->issuesList->jsLmsg('type'); ?>,
                            headerCls: 'icon',
                            sortable: false,
                            dataIndex: 'iconName',
                            cls: 'min',
                            renderer: function(item) {
                                var icon = item.iconName == 'warning'
                                    ? '<?php echo $this->skinUrl('/icons/16/plesk/warning.png') ?>'
                                    : '<?php echo $this->skinUrl('/icons/16/plesk/att.png') ?>';
                                return '<img width="16" height="16"' + ' title="' + item.iconTitle + '"' + ' src="' + icon + '"/>';
                            }
                        }, {
                        <?php if ($this->type == 'mssql') : ?>
                            header: <?php echo $this->issuesList->jsLmsg('code'); ?>,
                            sortable: false,
                            dataIndex: 'code'
                        },  {
                        <?php else: ?>
                            header: <?php echo $this->issuesList->jsLmsg('table'); ?>,
                            sortable: false,
                            dataIndex: 'table'
                        },  {
                        <?php endif; ?>
                            header: <?php echo $this->issuesList->jsLmsg('problem'); ?>,
                            sortable: false,
                            dataIndex: 'problem'
                        }
                        <?php if ($this->type == 'mysql' && $this->hasFurtherActions) : ?>
                        ,
                        Jsw.list.COLUMN_SELECTION
                        <?php endif; ?>
                    ]
                })
            ]
        });
    });
    //]]>
</script>



