2 Copyright 2019 EveryUP srl
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
8 http://www.apache.org/licenses/LICENSE-2.0
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
17 {% extends
"base.html" %}
19 {% load staticfiles %}
21 {% block head_block %}
25 <!-- Codemirror core CSS -->
26 <link rel=
"stylesheet" href=
"/static/node_modules/codemirror/lib/codemirror.css" >
27 <link rel=
"stylesheet" href=
"/static/node_modules/codemirror/addon/fold/foldgutter.css" />
28 <link rel=
"stylesheet" href=
"/static/node_modules/codemirror/theme/neat.css" >
29 <link rel=
"stylesheet" href=
"/static/node_modules/codemirror/addon/dialog/dialog.css" >
30 <link rel=
"stylesheet" href=
"/static/node_modules/codemirror/addon/display/fullscreen.css" >
37 {% block content_body %}
40 <div class=
"col-md-12">
41 <div class=
"nav-tabs-custom" style=
"position: relative;">
42 <ul class=
"nav nav-tabs" >
43 {% block tab_pane_button_list %}
47 {% block nav_buttons_list %}
52 <div class=
"alert alert-success" id=
"success-alert" style=
"position: absolute; z-index: 100; top: 44px; left: 0;
55 background-color: rgba(0, 166, 90, 0.8) !important;
57 border-color: rgba(0, 141, 76, 0.4);" hidden
>
58 <button type=
"button" class=
"close" onclick=
"$('#success-alert').toggle()">x
</button>
59 <strong>Success!
</strong>
62 <div class=
"tab-content">
63 {% block tab_pane_list %}
67 <!-- /.tab-content -->
78 {% block resource_block %}
82 <script src=
"/static/node_modules/codemirror/lib/codemirror.js" ></script>
83 <script src=
"/static/node_modules/codemirror/addon/fold/foldcode.js" ></script>
84 <script src=
"/static/node_modules/codemirror/addon/fold/foldgutter.js" ></script>
85 <script src=
"/static/node_modules/codemirror/addon/fold/brace-fold.js" ></script>
86 <script src=
"/static/node_modules/codemirror/mode/javascript/javascript.js" ></script>
87 <script src=
"/static/node_modules/codemirror/mode/yaml/yaml.js" ></script>
88 <script src=
"/static/node_modules/codemirror/mode/markdown/markdown.js" ></script>
89 <script src=
"/static/node_modules/codemirror/addon/search/searchcursor.js" ></script>
90 <script src=
"/static/node_modules/codemirror/addon/search/search.js" ></script>
91 <script src=
"/static/node_modules/codemirror/addon/dialog/dialog.js" ></script>
92 <script src=
"/static/node_modules/codemirror/addon/display/autorefresh.js" ></script>
93 <script src=
"/static/node_modules/codemirror/addon/edit/matchbrackets.js" ></script>
94 <script src=
"/static/node_modules/codemirror/addon/edit/closebrackets.js" ></script>
95 <script src=
"/static/node_modules/codemirror/addon/display/fullscreen.js" ></script>
96 <script src=
"/static/node_modules/codemirror/keymap/sublime.js" ></script>
101 var json_editor_settings = {
103 showCursorWhenSelecting: true,
108 gutters: [
"CodeMirror-linenumbers",
"CodeMirror-foldgutter"],
109 autoCloseBrackets: true,
112 "F11": function (cm) {
113 cm.setOption(
"fullScreen", !cm.getOption(
"fullScreen"));
115 "Esc": function (cm) {
116 if (cm.getOption(
"fullScreen")) cm.setOption(
"fullScreen", false);
118 "Ctrl-Q": function (cm) {
119 cm.foldCode(cm.getCursor());
126 var yaml_editor_settings = {
128 showCursorWhenSelecting: true,
134 gutters: [
"CodeMirror-linenumbers",
"CodeMirror-foldgutter"],
135 autoCloseBrackets: true,
138 "F11": function (cm) {
139 cm.setOption(
"fullScreen", !cm.getOption(
"fullScreen"));
141 "Esc": function (cm) {
142 if (cm.getOption(
"fullScreen")) cm.setOption(
"fullScreen", false);
144 "Ctrl-Q": function (cm) {
145 cm.foldCode(cm.getCursor());
153 function goToGraph() {
154 window.location.href = '/projects/descriptors/composer?type={{descriptor_type}}&id={{descriptor_id}}'