@model WebApiExplorer.Models.ControlsClass.Function

<div class="settings-panel-content">
    <div style="float:left;width:100%">
        <div style="float:left"><h4>Parameters</h4></div>
        <div style="float:right">
            <button style="margin-top:3px;padding: 4px;" class="btn btn-primary"
                    onclick="generateExcelGet_@(Model.FunctionName)('@Model.FunctionName', '@(System.Configuration.ConfigurationManager.AppSettings["WebAPIService"] + Model.FunctionUrl.Substring(1))');">
                Generate Excel
            </button>
        </div>
    </div>
    <div>
        <div class="settings-panel">
            <div class="param-item">
                <label class="param-lable parameter"><b>Parameter</b></label>
                <label class="param-lable value"><b>Value</b></label>
                <label class="param-lable description"><b>Description</b></label>
            </div>
            <div class="param-item">
                <label class="param-lable parameter">FileName</label>
                <input class="param-value value" type="text" name="FileName" value="excel" />
                <label class="param-lable description">The exported file name.</label>
            </div>
            <div class="param-item">
                <label class="param-lable parameter">Type</label>
                <select class="param-value value" name="type">
                    <option value="json">json</option>
                    <option selected="selected" value="xlsx">xlsx</option>
                    <option value="xls">xls</option>
                    <option value="csv">csv</option>
                    <option value="xml">xml</option>
                </select>
                <label class="param-lable description">The file format of the excel</label>
            </div>
            <div class="param-item">
                <label class="param-lable parameter">WorkBookFileName</label>
                <select class="param-value value" name="workbookfilename">
                    <option value="none" selected="selected">Select a Excel file name</option>
                    <option value="ExcelRoot/align.xls">align.xls</option>
                    <option value="ExcelRoot/FlexGrid.xlsx">FlexGrid.xlsx</option>
                    <option value="ExcelRoot/GAS.xls">GAS.xls</option>
                    <option value="ExcelRoot/Grouping.xlsx">Grouping.xlsx</option>
                    <option value="ExcelRoot/Hierarchical.xlsx">Hierarchical.xlsx</option>
                    <option value="ExcelRoot/Houston.xlsx">Houston.xlsx</option>
                    <option value="ExcelRoot/Palette.xls">Palette.xls</option>
                    <option value="ExcelRoot/ExcelWithFormula.xls">ExcelWithFormula.xls</option>
                    <option value="OneDrive/Documents/align.xls">OneDrive/Documents/align.xls</option>
                    <option value="OneDrive/Documents/FlexGrid.xlsx">OneDrive/Documents/FlexGrid.xlsx</option>
                    <option value="OneDrive/Documents/GAS.xls">OneDrive/Documents/GAS.xls</option>
                    <option value="OneDrive/Documents/Grouping.xlsx">OneDrive/Documents/Grouping.xlsx</option>
                    <option value="OneDrive/Documents/Hierarchical.xlsx">OneDrive/Documents/Hierarchical.xlsx</option>
                    <option value="OneDrive/Documents/Houston.xlsx">OneDrive/Documents/Houston.xlsx</option>
                    <option value="OneDrive/Documents/Palette.xls">OneDrive/Documents/Palette.xls</option>
                    <option value="OneDrive/Documents/ExcelWithFormula.xls">OneDrive/Documents/ExcelWithFormula.xls</option>
                </select>
                <label class="param-lable description">
                    The excel file name that storage manager can recognize.
                </label>
            </div>
        </div>
    </div>
</div>
<div id="@(Model.FunctionName)result" class="content-panel-result content-panel-result-grid">
    <h4>Request Url</h4>
    <div id="@(Model.FunctionName)url" class="content-panel-result-url">
        <pre>
        </pre>
    </div>
    <h4 class="content-json-data">Show Json Data by FlexGrid</h4>
    <div id="@(Model.FunctionName)showdata" class="result-content-data">
    </div>
    <h4 class="content-json-xml">Show XML Data</h4>
    <pre class="result-content-xml">
    </pre>
</div>

<script>
    function generateExcelGet_@(Model.FunctionName)(id, url) {
        var fullUrl = showResult(id, url);
        formGet(id, fullUrl);
    }
</script>
