Mini Shell

Direktori : /usr/share/l.v.e-manager/cpanel/lveversion/
Upload File :
Current File : //usr/share/l.v.e-manager/cpanel/lveversion/ruby-selector.tmpl

[%
    USE Api2;
    SET Interpreters = Api2.exec('LVEInfo', 'getRubyInterpreters', {});
%]

[% IF return_.size == 0  || Interpreters.size == 0 %]
    <div class="header">Existing applications (<span id="app-count">None</span>)</div>
[% ELSE %]
    <div class="header">Existing applications (<span id="app-count">[% return_.size %]</span>)</div>
    [% FOREACH item IN return_ %]
        <div class="app-container" class="app-item" style="border: 1px solid rgb(155, 155, 155); border-radius: 0.2em; margin: 0.4em 1em;">
            <div style="margin: 0.2em">
                <table style="border-spacing: 0px; width: 100%;">
                    <tbody>
                        <tr class="app-pathsection">
                            <td style="border-right: 1px solid #9b9b9b; border-bottom: 1px solid #9b9b9b; width: 20%; text-align: right; font-size: 0.92em; padding: 0.1em 0.6em; height: 2em;">App Directory</td>
                            <td style="border-bottom: 1px solid #9b9b9b; width: 73%; font-size: 0.92em; padding: 0.1em 0.6em; height: 2em;"><span>[% item.name %]</span></td>
                            <td style="border-bottom: 1px solid #9b9b9b; width: 7%; font-size: 0.92em; padding: 0.1em 0.6em; height: 2em;"><span class="app-pathedit" style="cursor:pointer;text-decoration:underline;">Edit</span></td>
                        </tr>
                        <tr class="app-urisection">
                            <td style="border-right: 1px solid #9b9b9b; border-bottom: 1px solid #9b9b9b; width: 20%; text-align: right; font-size: 0.92em; padding: 0.1em 0.6em; height: 2em;">App URI</td>
                            <td style="border-bottom: 1px solid #9b9b9b; width: 73%; font-size: 0.92em; padding: 0.1em 0.6em; height: 2em;"><a href="[% 'http://' _ item.data.domain _ '/' _ item.data.alias %]" target="_blank">[% item.data.domain _ '/' _ item.data.alias %]</a></td>
                            <td style="border-bottom: 1px solid #9b9b9b; width: 7%; font-size: 0.92em; padding: 0.1em 0.6em; height: 2em;"><span class="app-uriedit" style="cursor:pointer;text-decoration:underline;">Edit</span></td>
                        </tr>
                        <tr class="app-domainssection"[% IF ! item.data.domains.size %] style="display:none;"[% END %]>
                            <td style="border-right: 1px solid #9b9b9b; border-bottom: 1px solid #9b9b9b; width: 20%; text-align: right; font-size: 0.92em; padding: 0.1em 0.6em; height: 2em;">Additional domains</td>
                            <td style="border-bottom: 1px solid #9b9b9b; width: 73%; font-size: 0.92em; padding: 0.1em 0.6em; height: 2em;" class="app-additionaldomains-list">
                                [% IF item.data.domains %]
                                [% FOREACH domain IN item.data.domains %]
                                [% IF domain != item.data.domain %]
                                <div><a href="[% 'http://' _ domain _ '/' _ item.data.alias %]" target="_blank">[% domain _ '/' _ item.data.alias %]</a></div>
                                [% END %]
                                [% END %]
                                [% END %]
                            </td>
                            <td style="border-bottom: 1px solid #9b9b9b; width: 7%; font-size: 0.92em; padding: 0.1em 0.6em; height: 2em;"></td>
                        </tr>
                        <tr class="app-versionsection">
                            <td style="border-right: 1px solid #9b9b9b; border-bottom: 1px solid #9b9b9b; width: 20%; text-align: right; font-size: 0.92em; padding: 0.1em 0.6em; height: 2em;">Ruby version</td>
                            <td style="border-bottom: 1px solid #9b9b9b; width: 73%; font-size: 0.92em; padding: 0.1em 0.6em; height: 2em;">
                                <select class="app-versionselector" autocomplete="off">
                                    [% FOREACH v IN item.versions %]
                                            <option [% v.version == item.data.interpreter.version ? 'selected="selected"' : '' %]>[% v.version %]</option>
                                    [% END %]
                                </select><span style="display:none">[% item.data.interpreter.version %]</span>
                            </td>
                            <td style="border-bottom: 1px solid #9b9b9b; width: 7%; font-size: 0.92em; padding: 0.1em 0.6em; height: 2em;">&nbsp;</td>
                        </tr>
                        <tr class="app-modsection">
                            <td style="border-right: 1px solid #9b9b9b; border-bottom: 1px solid #9b9b9b; width:20%; text-align: right; font-size: 0.92em; padding: 0.1em 0.6em; height: 2em;">
                                modules
                            </td>
                            <td style="border-bottom: 1px solid #9b9b9b; width: 73%; font-size: 0.92em; padding: 0.1em 0.6em; height: 2em;">
                                <div>
                                    <div class="app-modexpand" style="text-align: left; padding: 0.2em; cursor: pointer; text-decoration: underline;">
                                        show
                                    </div>
                                    <div style="display: none;">
                                        <table style="border-collapse: collapse;">
                                            <tbody>
                                                <tr>
                                                    <td colspan="2">
                                                        <input class="app-modaddfield" type="text">
                                                    </td>
                                                    <td class="app-modadd" style="text-align: left; padding: 0.2em; cursor: pointer; text-decoration: underline;">
                                                        Add
                                                    </td>
                                                </tr>
                                                [% FOREACH module IN item.data.extensions.keys.sort %]
                                                <tr class="app-modentry" style="border-bottom: 1px solid #9b9b9b;">
                                                    <td style="min-width: 6em; padding: 0.2em;">[% module %]</td>
                                                    <td style="min-width: 6em; padding: 0.2em;">[% item.data.extensions.$module.version %]</td>
                                                    <td class="app-modremove" style="text-align:right;padding: 0.2em; cursor: pointer;">[x]</td>
                                                </tr>
                                                [% END %]
                                            </tbody>
                                        </table>
                                    </div>
                                    <div class="app-modcollapse" style="text-align: left; padding: 0.2em; cursor: pointer; text-decoration: underline; display: none;">
                                        hide
                                    </div>
                                </div>
                            </td>
                            <td style="border-bottom: 1px solid #9b9b9b; width: 7%; font-size: 0.92em; padding: 0.1em 0.6em; height: 2em;">&nbsp;</td>
                        </tr>
                        <tr class="app-execute">
                            <td style="border-right: 1px solid #9b9b9b; border-bottom: 1px solid #9b9b9b; width: 20%; text-align: right; font-size: 0.92em; padding: 0.1em 0.6em; height: 2em;">Execute command</td>
                            <td style="border-bottom: 1px solid #9b9b9b; width: 73%; font-size: 0.92em; padding: 0.1em 0.6em; height: 2em;"><input style="padding:.3em 0; float:left; width: 50%;" placeholder='0-9a-zA-Z /_-.,"~>< symbols are allowed' class="app-executecmd form-control" type="text"><button class="app-execute btn btn-default" style="min-width:5.2em;">Run</button></td>
                            <td style="border-bottom: 1px solid #9b9b9b; width: 7%; font-size: 0.92em; padding: 0.1em 0.6em; height: 2em;">&nbsp;</td>
                        </tr>
                        <tr>
                            <td style="border-right: 1px solid #9b9b9b; border-bottom: 1px solid #9b9b9b; width: 20%; text-align: right; font-size: 0.92em; padding: 0.1em 0.6em; height: 2em;">Command for entering to virtual environment</td>
                            <td style="border-bottom: 1px solid #9b9b9b; width: 73%; font-size: 0.92em; padding: 0.1em 0.6em; height: 2em;"><span class="enter-virtualenv-cmd">source [% item.data.interpreter.prefix %]/bin/activate</span></td>
                            <td style="border-bottom: 1px solid #9b9b9b; width: 7%; font-size: 0.92em; padding: 0.1em 0.6em; height: 2em;">&nbsp;</td>
                        </tr>
                    </tbody>
                </table>
            </div>
            <div style="height:2.32em;padding-left:1em;">
                <div style="float:left;">
                    <button class="app-update btn btn-default" style="min-width:5.2em;" disabled="disabled">
                        Update
                    </button>
                </div>
                <div style="float:left;">
                    <button class="app-reset btn btn-default" style="min-width:5.2em;" disabled="disabled">
                        Reset
                    </button>
                </div>
                <div style="float:left;">
                    <button class="app-restart btn btn-default" style="min-width:5.2em;">
                        Restart
                    </button>
                </div>
                <div style="float:left;margin-left:2em">
                    <button class="app-remove btn btn-default" style="min-width:5.2em;">
                        Remove
                    </button>
                </div>
            </div>
        </div>
    [% END %]
[% END %]

Zerion Mini Shell 1.0