<!--
  Licensed to the Apache Software Foundation (ASF) under one
  or more contributor license agreements.  See the NOTICE file
  distributed with this work for additional information
  regarding copyright ownership.  The ASF licenses this file
  to you under the Apache License, Version 2.0 (the
  "License"); you may not use this file except in compliance
  with the License.  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing,
  software distributed under the License is distributed on an
  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  KIND, either express or implied.  See the License for the
  specific language governing permissions and limitations
  under the License.
-->
<div class="groovy-card">
    <p class="groovy-title">Instructions</p>
    <p class="groovy-description">Enter Groovy/Java code to run on the server.</p>
    <ul>
            <li><code>mgmt</code> is the management context</li>
            <li><code>last</code> is the result of your last successful script</li>
            <li><code>data</code> is user-session map for storing your data</li>
    </ul>
            <a class="groovy-link" ng-click="loadExample()">Click to load an example.</a>
    <div class="groovy-text"><groovy-editor value="codeToRun" ng-click="hideResults = true;"></groovy-editor></div>
    <br-button class="btn-primary groovy-button" on-click="submitCode()" ng-disabled="disableSubmit">Submit</br-button>
</div>
<div class="groovy-card" ng-hide="hideResults">
    <p class="groovy-description">Error:</p>
    <textarea class="groovy-text" readonly="readonly" placeholder="no details available">{{problemText}}</textarea>

    <p class="groovy-description">Result:</p>
    <textarea class="groovy-text" readonly="readonly" placeholder="no details available">{{resultText}}</textarea>

    <p class="groovy-description">Output (stdout):</p>
    <textarea class="groovy-text" readonly="readonly" placeholder="no output available">{{stdout}}</textarea>

    <p class="groovy-description">Output (stderr):</p>
    <textarea class="groovy-text" readonly="readonly" placeholder="no output available">{{stderr}}</textarea>
</div>
