alchemy-chimera 0.5.4 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +39 -4
- package/assets/scripts/chimera/chimera.js +13 -288
- package/assets/stylesheets/chimera/chimera.scss +451 -0
- package/bootstrap.js +6 -302
- package/config/routes.js +53 -5
- package/controller/00-chimera_controller.js +16 -0
- package/controller/chimera_editor_controller.js +159 -614
- package/controller/chimera_static_controller.js +102 -9
- package/lib/chimera_config.js +138 -163
- package/model/model.js +1 -1
- package/package.json +8 -12
- package/view/chimera/dashboard.hwk +8 -0
- package/view/chimera/editor/index.hwk +20 -0
- package/view/chimera/sidebar.hwk +4 -0
- package/view/chimera/widgets.hwk +8 -0
- package/view/layouts/chimera_base.hwk +15 -0
- package/view/layouts/chimera_basics.hwk +15 -0
- package/view/layouts/chimera_body.hwk +24 -0
- package/assets/scripts/chimera/assoc_field.js +0 -311
- package/assets/scripts/chimera/boolean_field.js +0 -53
- package/assets/scripts/chimera/chimera_field.js +0 -622
- package/assets/scripts/chimera/chimera_field_wrapper.js +0 -558
- package/assets/scripts/chimera/date_field.js +0 -170
- package/assets/scripts/chimera/geopoint_field.js +0 -147
- package/assets/scripts/chimera/medium-button.js +0 -6
- package/assets/scripts/chimera/object_field.js +0 -51
- package/assets/scripts/chimera/page-editor.js +0 -3
- package/assets/scripts/chimera/password_field.js +0 -73
- package/assets/scripts/chimera/schema_field.js +0 -300
- package/assets/scripts/chimera/text_field.js +0 -119
- package/assets/scripts/rome/rome.js +0 -4978
- package/assets/scripts/vex/vex.dialog.js +0 -151
- package/assets/scripts/vex/vex.js +0 -193
- package/assets/stylesheets/chimera/chimera.less +0 -1075
- package/assets/stylesheets/chimera_old/chimera.less +0 -351
- package/assets/stylesheets/chimera_old/core.less +0 -315
- package/assets/stylesheets/chimera_old/font.less +0 -38
- package/assets/stylesheets/chimera_old/mixins.less +0 -35
- package/assets/stylesheets/chimera_old/page-editor.less +0 -23
- package/assets/stylesheets/rome/rome.less +0 -130
- package/assets/stylesheets/vex/vex-theme-bottom-right-corner.less +0 -613
- package/assets/stylesheets/vex/vex.default.less +0 -501
- package/assets/stylesheets/vex/vex.flat.less +0 -443
- package/assets/stylesheets/vex/vex.less +0 -320
- package/controller/chimera_page_controller.js +0 -14
- package/controller/chimera_settings_controller.js +0 -129
- package/controller/tasks_chimera_controller.js +0 -106
- package/helper/chimera_helper.js +0 -202
- package/lib/chimera_action_fields.js +0 -292
- package/lib/chimera_field/belongsto_chimera_field.js +0 -160
- package/lib/chimera_field/boolean_chimera_field.js +0 -19
- package/lib/chimera_field/date_chimera_field.js +0 -20
- package/lib/chimera_field/datetime_chimera_field.js +0 -20
- package/lib/chimera_field/enum_chimera_field.js +0 -131
- package/lib/chimera_field/geopoint_chimera_field.js +0 -20
- package/lib/chimera_field/habtm_chimera_field.js +0 -55
- package/lib/chimera_field/hasoneparent_chimera_field.js +0 -18
- package/lib/chimera_field/html_chimera_field.js +0 -20
- package/lib/chimera_field/object_chimera_field.js +0 -18
- package/lib/chimera_field/password_chimera_field.js +0 -18
- package/lib/chimera_field/schema_chimera_field.js +0 -149
- package/lib/chimera_field/text_chimera_field.js +0 -20
- package/lib/chimera_field/time_chimera_field.js +0 -18
- package/lib/chimera_field.js +0 -208
- package/model/setting_model.js +0 -51
- package/public/chimera/codedor.svg +0 -28
- package/view/chimera/dashboard.ejs +0 -5
- package/view/chimera/editor/add.ejs +0 -32
- package/view/chimera/editor/edit.ejs +0 -33
- package/view/chimera/editor/index.ejs +0 -87
- package/view/chimera/editor/remove.ejs +0 -23
- package/view/chimera/editor/view.ejs +0 -54
- package/view/chimera/elements/editor_actions.ejs +0 -4
- package/view/chimera/elements/empty +0 -0
- package/view/chimera/field_wrappers/_entries.ejs +0 -91
- package/view/chimera/field_wrappers/_wrapper.ejs +0 -82
- package/view/chimera/field_wrappers/date_edit.ejs +0 -23
- package/view/chimera/field_wrappers/date_list.ejs +0 -3
- package/view/chimera/field_wrappers/date_view.ejs +0 -16
- package/view/chimera/field_wrappers/default_edit.ejs +0 -22
- package/view/chimera/field_wrappers/default_list.ejs +0 -3
- package/view/chimera/field_wrappers/default_peek.ejs +0 -3
- package/view/chimera/field_wrappers/default_view.ejs +0 -14
- package/view/chimera/field_wrappers/geopoint_edit.ejs +0 -25
- package/view/chimera/field_wrappers/geopoint_list.ejs +0 -5
- package/view/chimera/field_wrappers/geopoint_view.ejs +0 -18
- package/view/chimera/field_wrappers/schema_edit.ejs +0 -19
- package/view/chimera/field_wrappers/text_edit.ejs +0 -22
- package/view/chimera/field_wrappers/text_list.ejs +0 -1
- package/view/chimera/fields/belongsto_edit.ejs +0 -4
- package/view/chimera/fields/belongsto_list.ejs +0 -1
- package/view/chimera/fields/belongsto_peek.ejs +0 -1
- package/view/chimera/fields/boolean_edit.ejs +0 -17
- package/view/chimera/fields/boolean_list.ejs +0 -3
- package/view/chimera/fields/boolean_view.ejs +0 -3
- package/view/chimera/fields/date_edit.ejs +0 -14
- package/view/chimera/fields/date_list.ejs +0 -9
- package/view/chimera/fields/date_peek.ejs +0 -9
- package/view/chimera/fields/date_view.ejs +0 -9
- package/view/chimera/fields/datetime_edit.ejs +0 -24
- package/view/chimera/fields/datetime_list.ejs +0 -9
- package/view/chimera/fields/datetime_view.ejs +0 -10
- package/view/chimera/fields/default_edit.ejs +0 -10
- package/view/chimera/fields/default_list.ejs +0 -15
- package/view/chimera/fields/default_view.ejs +0 -1
- package/view/chimera/fields/enum_edit.ejs +0 -10
- package/view/chimera/fields/geopoint_edit.ejs +0 -10
- package/view/chimera/fields/geopoint_list.ejs +0 -9
- package/view/chimera/fields/geopoint_view.ejs +0 -9
- package/view/chimera/fields/habtm_edit.ejs +0 -5
- package/view/chimera/fields/hasoneparent_edit.ejs +0 -6
- package/view/chimera/fields/hasoneparent_list.ejs +0 -1
- package/view/chimera/fields/object_edit.ejs +0 -8
- package/view/chimera/fields/password_edit.ejs +0 -12
- package/view/chimera/fields/schema_edit.ejs +0 -14
- package/view/chimera/fields/text_edit.ejs +0 -5
- package/view/chimera/fields/text_list.ejs +0 -9
- package/view/chimera/fields/text_view.ejs +0 -3
- package/view/chimera/fields/time_edit.ejs +0 -15
- package/view/chimera/fields/time_list.ejs +0 -9
- package/view/chimera/fields/time_view.ejs +0 -9
- package/view/chimera/page/edit.ejs +0 -18
- package/view/chimera/page_editor.ejs +0 -5
- package/view/chimera/sidebar.ejs +0 -40
- package/view/chimera/tasks/index.ejs +0 -114
- package/view/layouts/chimera.ejs +0 -12
- package/view/layouts/chimera_base.ejs +0 -11
- package/view/layouts/chimera_body.ejs +0 -43
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
<%
|
|
2
|
-
script('/public/ckeditor/4.4/ckeditor');
|
|
3
|
-
%>
|
|
4
|
-
<div class="chimeraEditor-fieldGroup">
|
|
5
|
-
<div class="chimeraField-left">
|
|
6
|
-
<label
|
|
7
|
-
class="chimeraEditor-fieldLabel"
|
|
8
|
-
for="field-<%= data.field.path %>"
|
|
9
|
-
>
|
|
10
|
-
<% assign('title') %>
|
|
11
|
-
<span class="field-title"><% print(field_title) %></span>
|
|
12
|
-
|
|
13
|
-
<% if (field_description) { %>
|
|
14
|
-
<small class="field-description"><%= field_description %></small>
|
|
15
|
-
<% } %>
|
|
16
|
-
<% assign_end('title') %>
|
|
17
|
-
</label>
|
|
18
|
-
</div>
|
|
19
|
-
<div class="chimeraEditor-fieldWrap">
|
|
20
|
-
<% assign('entries') %>
|
|
21
|
-
</div>
|
|
22
|
-
</div>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<% assign('entries') %>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<%= data.value.display_value %>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<%= data.value.display_value %>
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
<label class="chimeraEditor-boolean">
|
|
2
|
-
<input
|
|
3
|
-
class="chimeraEditor-input chimeraEditor-edit-boolean"
|
|
4
|
-
type="checkbox"
|
|
5
|
-
name="data.<%= data.field.path %>"
|
|
6
|
-
id="field-<%= data.field.path %>"
|
|
7
|
-
<%= data.value ? 'checked': '' %>
|
|
8
|
-
>
|
|
9
|
-
<div class="chimeraEditor-boolean-text">
|
|
10
|
-
<span class="u-yes">Yes</span>
|
|
11
|
-
<span class="u-no">No</span>
|
|
12
|
-
</div>
|
|
13
|
-
</label>
|
|
14
|
-
|
|
15
|
-
<% if (data.field.fieldType.isArray) { %>
|
|
16
|
-
<button class="btn chimeraField-remove-entry" type="button">x</button>
|
|
17
|
-
<% } %>
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
<%
|
|
2
|
-
value = data.value;
|
|
3
|
-
|
|
4
|
-
if (data.value && typeof data.value.format == 'function') {
|
|
5
|
-
value = data.value.format('Y-m-d');
|
|
6
|
-
}
|
|
7
|
-
%>
|
|
8
|
-
<input
|
|
9
|
-
type="date"
|
|
10
|
-
class="chimeraField-prime"
|
|
11
|
-
name="data.<%= data.field.path %>"
|
|
12
|
-
value="<%= value || '' %>"
|
|
13
|
-
id="field-<%= data.field.path %>"
|
|
14
|
-
>
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
<%
|
|
2
|
-
value = data.value;
|
|
3
|
-
|
|
4
|
-
if (data.value && typeof data.value.format == 'function') {
|
|
5
|
-
value = data.value.format('Y-m-d\\TH:i:s');
|
|
6
|
-
|
|
7
|
-
if (data.field.fieldType.options.show_ms) {
|
|
8
|
-
ms = data.value.getMilliseconds();
|
|
9
|
-
|
|
10
|
-
if (ms) {
|
|
11
|
-
value += '.' + ms;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
%>
|
|
16
|
-
|
|
17
|
-
<input
|
|
18
|
-
type="datetime-local"
|
|
19
|
-
class="chimeraField-prime"
|
|
20
|
-
name="data.<%= data.field.path %>"
|
|
21
|
-
value="<%= value || '' %>"
|
|
22
|
-
step="1"
|
|
23
|
-
id="field-<%= data.field.path %>"
|
|
24
|
-
>
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
<%
|
|
2
|
-
dateval = data.value == null ? '' : data.value;
|
|
3
|
-
|
|
4
|
-
if (dateval) {
|
|
5
|
-
print('<time datetime="' + dateval.toISOString() + '">');
|
|
6
|
-
print(dateval.toDateString() + ' - ');
|
|
7
|
-
print(dateval.getHours(true).toPaddedString(2) + ':' + dateval.getMinutes().toPaddedString(2));
|
|
8
|
-
print('</time>');
|
|
9
|
-
}
|
|
10
|
-
%>
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
<input
|
|
2
|
-
class="chimeraField-prime chimeraField-string"
|
|
3
|
-
value="<%= String(data.value || '').encodeHTML() %>"
|
|
4
|
-
type="text"
|
|
5
|
-
id="field-<%= data.field.path %>"
|
|
6
|
-
>
|
|
7
|
-
|
|
8
|
-
<% if (data.field.fieldType.isArray) { %>
|
|
9
|
-
<button class="btn chimeraField-remove-entry" type="button">x</button>
|
|
10
|
-
<% } %>
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
<%
|
|
2
|
-
text_value = data.value == null ? '' : data.value;
|
|
3
|
-
|
|
4
|
-
if (typeof text_value != 'string') {
|
|
5
|
-
text_value = String(text_value);
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
if (!text_value) {
|
|
9
|
-
text_value = '<i>' + __('chimera', 'empty') + '</i>';
|
|
10
|
-
} else {
|
|
11
|
-
text_value = text_value.stripTags().truncate(100);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
%>
|
|
15
|
-
<%= text_value %>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<input name="data.<%= data.field.path %>" class="chimeraEditor-input" value="<%= data.value || '' %>" id="field-<%= data.field.path %>" type="text" disabled>
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
<select
|
|
2
|
-
class="chimeraField-prime"
|
|
3
|
-
value="<%= (data.value || '') %>"
|
|
4
|
-
id="field-<%= data.field.path %>"
|
|
5
|
-
type="text"
|
|
6
|
-
></select>
|
|
7
|
-
|
|
8
|
-
<% if (data.field.fieldType.isArray) { %>
|
|
9
|
-
<button class="btn chimeraField-remove-entry" type="button">x</button>
|
|
10
|
-
<% } %>
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
<%
|
|
2
|
-
if (data.value && data.value.coordinates) {
|
|
3
|
-
lat = data.value.coordinates[0];
|
|
4
|
-
lng = data.value.coordinates[1];
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
id = 'map-' + Date.now() + '-' + Number.random(0,100);
|
|
8
|
-
%>
|
|
9
|
-
<input type="hidden" name="data.<%= data.field.path %>">
|
|
10
|
-
<div id="<%= id %>" class="chimeraField-prime geopoint-div geopoint-edit"></div>
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
<%
|
|
2
|
-
if (data.value && data.value.coordinates) {
|
|
3
|
-
lat = data.value.coordinates[0];
|
|
4
|
-
lng = data.value.coordinates[1];
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
id = 'map-' + Date.now() + '-' + Number.random(0,100);
|
|
8
|
-
%>
|
|
9
|
-
<div id="<%= id %>" class="geopoint-div geopoint-list" data-lat="<%= lat %>" data-lng="<%= lng %>"></div>
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
<%
|
|
2
|
-
if (data.value && data.value.coordinates) {
|
|
3
|
-
lat = data.value.coordinates[0];
|
|
4
|
-
lng = data.value.coordinates[1];
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
id = 'map-' + Date.now() + '-' + Number.random(0,100);
|
|
8
|
-
%>
|
|
9
|
-
<div id="<%= id %>" class="geopoint-div geopoint-view" data-lat="<%= lat %>" data-lng="<%= lng %>"></div>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<%= data.value.display_value %>
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
<textarea
|
|
2
|
-
class="chimeraField-prime chimeraField-string"
|
|
3
|
-
rows=7
|
|
4
|
-
id="field-<%= data.field.path %>"
|
|
5
|
-
><%= JSON.stringify(data.value) %></textarea>
|
|
6
|
-
<% if (data.field.fieldType.isArray) { %>
|
|
7
|
-
<button class="btn chimeraField-remove-entry" type="button">x</button>
|
|
8
|
-
<% } %>
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
<input
|
|
2
|
-
class="chimeraField-prime chimeraField-string chimeraPassword-first"
|
|
3
|
-
type="password"
|
|
4
|
-
placeholder="Enter a new password"
|
|
5
|
-
id="field-<%= data.field.path %>"
|
|
6
|
-
>
|
|
7
|
-
<input
|
|
8
|
-
class="chimeraField-string chimeraPassword-second"
|
|
9
|
-
type="password"
|
|
10
|
-
placeholder="Repeat the same password"
|
|
11
|
-
>
|
|
12
|
-
<div class="validation"></div>
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
<div class="chimeraEditor-subschema-fields">
|
|
2
|
-
<%
|
|
3
|
-
if (data.value != null) {
|
|
4
|
-
for (i = 0; i < data.value.fields.length; i++) {
|
|
5
|
-
Chimera.printField(data.value.fields[i], {is_nested: true, nested_id: parent_entries_id});
|
|
6
|
-
}
|
|
7
|
-
} else {
|
|
8
|
-
%> No subschema was set <%
|
|
9
|
-
}
|
|
10
|
-
%>
|
|
11
|
-
<% if (data.field.fieldType.isArray) { %>
|
|
12
|
-
<button class="btn chimeraField-remove-entry" type="button">x</button>
|
|
13
|
-
<% } %>
|
|
14
|
-
</div>
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
<%
|
|
2
|
-
value = data.value;
|
|
3
|
-
|
|
4
|
-
if (data.value && typeof data.value.format == 'function') {
|
|
5
|
-
value = data.value.format('H:i:s');
|
|
6
|
-
}
|
|
7
|
-
%>
|
|
8
|
-
|
|
9
|
-
<input
|
|
10
|
-
type="time"
|
|
11
|
-
class="chimeraField-prime"
|
|
12
|
-
name="data.<%= data.field.path %>"
|
|
13
|
-
value="<%= value || '' %>"
|
|
14
|
-
id="field-<%= data.field.path %>"
|
|
15
|
-
>
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
<%
|
|
2
|
-
dateval = data.value == null ? '' : data.value;
|
|
3
|
-
|
|
4
|
-
if (dateval) {
|
|
5
|
-
print('<time datetime="' + dateval.stripTime().toISOString() + '">');
|
|
6
|
-
print(dateval.getHours(true).toPaddedString(2) + ':' + dateval.getMinutes().toPaddedString(2));
|
|
7
|
-
print('</time>');
|
|
8
|
-
}
|
|
9
|
-
%>
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
<%
|
|
2
|
-
dateval = data.value == null ? '' : data.value;
|
|
3
|
-
|
|
4
|
-
if (dateval) {
|
|
5
|
-
print('<time datetime="' + dateval.stripTime().toISOString() + '">');
|
|
6
|
-
print(dateval.getHours(true).toPaddedString(2) + ':' + dateval.getMinutes().toPaddedString(2));
|
|
7
|
-
print('</time>');
|
|
8
|
-
}
|
|
9
|
-
%>
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
<% expands('layouts/chimera') %>
|
|
2
|
-
<% script('chimera/page-editor') %>
|
|
3
|
-
|
|
4
|
-
<% start('pageCentral') %>
|
|
5
|
-
<div class="pageEditor">
|
|
6
|
-
<div class="pageEditor-main">
|
|
7
|
-
<div class="pageEditor-toptools">
|
|
8
|
-
|
|
9
|
-
</div>
|
|
10
|
-
<div class="pageEditor-blocks">
|
|
11
|
-
|
|
12
|
-
</div>
|
|
13
|
-
</div>
|
|
14
|
-
<div class="pageEditor-sidebar">
|
|
15
|
-
|
|
16
|
-
</div>
|
|
17
|
-
</div>
|
|
18
|
-
<% end('pageCentral') %>
|
package/view/chimera/sidebar.ejs
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
<nav class="side-nav">
|
|
2
|
-
<ul class="side-nav-collection">
|
|
3
|
-
<% chimera_menu.forEach(function eachEntry(entry, index) { %>
|
|
4
|
-
<li class="side-nav-entry <% if (!Object.isEmpty(entry.children)) { print('is-parent') } %>">
|
|
5
|
-
|
|
6
|
-
<a class="js-he-link side-nav-link section"
|
|
7
|
-
href="<%
|
|
8
|
-
if (entry.route) {
|
|
9
|
-
print(Router.routeUrl(entry.route, entry.parameters));
|
|
10
|
-
} else if (entry.href) {
|
|
11
|
-
print(entry.href);
|
|
12
|
-
} else {
|
|
13
|
-
print('#');
|
|
14
|
-
}
|
|
15
|
-
%>">
|
|
16
|
-
<span class="link-icon">
|
|
17
|
-
<% if (entry.icon) {
|
|
18
|
-
if (entry.icon.svg) {
|
|
19
|
-
print(Media.svg(entry.icon.svg));
|
|
20
|
-
} else if (entry.icon.html) {
|
|
21
|
-
print(entry.icon.html);
|
|
22
|
-
} else {
|
|
23
|
-
print('•');
|
|
24
|
-
}
|
|
25
|
-
} else {
|
|
26
|
-
print('•');
|
|
27
|
-
} %>
|
|
28
|
-
</span>
|
|
29
|
-
<span class="link-title"><%= entry.title %></span>
|
|
30
|
-
</a>
|
|
31
|
-
|
|
32
|
-
<% if (!Object.isEmpty(entry.children)) { %>
|
|
33
|
-
<ul class="side-nav-collection is-child">
|
|
34
|
-
<% entry.children.forEach(eachEntry) %>
|
|
35
|
-
</ul>
|
|
36
|
-
<% } %>
|
|
37
|
-
</li>
|
|
38
|
-
<% }) %>
|
|
39
|
-
</ul>
|
|
40
|
-
</nav>
|
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
<% implement('layouts/chimera') %>
|
|
2
|
-
|
|
3
|
-
<% start('chimera-status') %>
|
|
4
|
-
<% end('chimera-status') %>
|
|
5
|
-
|
|
6
|
-
<% start('chimera-cage') %>
|
|
7
|
-
<x-panel class="devices table-panel">
|
|
8
|
-
<x-panel-body>
|
|
9
|
-
<table class="table table-hover">
|
|
10
|
-
<thead>
|
|
11
|
-
<tr>
|
|
12
|
-
<th>Description</th>
|
|
13
|
-
<th>Started</th>
|
|
14
|
-
<th>Stopped</th>
|
|
15
|
-
<th>Percentage</th>
|
|
16
|
-
<th>Status</th>
|
|
17
|
-
<th>Actions</th>
|
|
18
|
-
</tr>
|
|
19
|
-
</thead>
|
|
20
|
-
<tbody class="running">
|
|
21
|
-
<% for (i = 0; i < running.length; i++) {
|
|
22
|
-
record = running[i]; %>
|
|
23
|
-
<tr>
|
|
24
|
-
<td><%= record.description || record.title || record.name %></td>
|
|
25
|
-
<td><%= Date.create(record.started).format('Y-m-d H:i:s') %></td>
|
|
26
|
-
<td>
|
|
27
|
-
<%
|
|
28
|
-
live('record.stopped', function gotStopped(stopped) {
|
|
29
|
-
if (stopped) {
|
|
30
|
-
print(Date.create(stopped).format('H:i:s'));
|
|
31
|
-
}
|
|
32
|
-
});
|
|
33
|
-
%>
|
|
34
|
-
</td>
|
|
35
|
-
<td>
|
|
36
|
-
<%
|
|
37
|
-
live('record.percentage', function gotPercentage(percentage) {
|
|
38
|
-
print(percentage);
|
|
39
|
-
});
|
|
40
|
-
%> %
|
|
41
|
-
</td>
|
|
42
|
-
<td>
|
|
43
|
-
<%
|
|
44
|
-
live('record.reports', function gotReports(reports) {
|
|
45
|
-
print((reports.last()||{}).type);
|
|
46
|
-
});
|
|
47
|
-
%>
|
|
48
|
-
</td>
|
|
49
|
-
<td>
|
|
50
|
-
<%
|
|
51
|
-
live('record.stopped', function gotStopped(stopped) {
|
|
52
|
-
|
|
53
|
-
if (stopped) {
|
|
54
|
-
return;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
%>
|
|
58
|
-
<button
|
|
59
|
-
class="btn btn-success"
|
|
60
|
-
data-server-event="al-rcommand-action | <%= record.id %> | stop"
|
|
61
|
-
title="Stop"
|
|
62
|
-
>
|
|
63
|
-
Stop
|
|
64
|
-
</button>
|
|
65
|
-
<% });
|
|
66
|
-
|
|
67
|
-
live('record.paused', function gotPaused(paused) {
|
|
68
|
-
|
|
69
|
-
if (record.stopped) {
|
|
70
|
-
return;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
if (paused) { %>
|
|
74
|
-
<button
|
|
75
|
-
class="btn btn-success"
|
|
76
|
-
data-server-event="al-rcommand-action | <%= record.id %> | resume"
|
|
77
|
-
title="Resume"
|
|
78
|
-
>
|
|
79
|
-
Resume
|
|
80
|
-
</button>
|
|
81
|
-
<% } else { %>
|
|
82
|
-
<button
|
|
83
|
-
class="btn btn-success"
|
|
84
|
-
data-server-event="al-rcommand-action | <%= record.id %> | pause"
|
|
85
|
-
title="Pause"
|
|
86
|
-
>
|
|
87
|
-
Pause
|
|
88
|
-
</button>
|
|
89
|
-
<% } %>
|
|
90
|
-
<% });
|
|
91
|
-
%>
|
|
92
|
-
</td>
|
|
93
|
-
</tr>
|
|
94
|
-
<% } %>
|
|
95
|
-
</tbody>
|
|
96
|
-
<tbody class="stopped">
|
|
97
|
-
<% for (i = 0; i < finished.length; i++) {
|
|
98
|
-
record = finished[i]; %>
|
|
99
|
-
<tr>
|
|
100
|
-
<td><%= record.title || record.name %></td>
|
|
101
|
-
<td><%= Date.create(record.started).format('Y-m-d H:i:s') %></td>
|
|
102
|
-
<td><%= Date.create(record.stopped).format('H:i:s') %></td>
|
|
103
|
-
<td><%= record.percentage || 0 %> %</td>
|
|
104
|
-
<td><%= (record.reports.last()||{}).type %></td>
|
|
105
|
-
<td>
|
|
106
|
-
|
|
107
|
-
</td>
|
|
108
|
-
</tr>
|
|
109
|
-
<% } %>
|
|
110
|
-
</tbody>
|
|
111
|
-
</table>
|
|
112
|
-
</x-panel-body>
|
|
113
|
-
</x-panel>
|
|
114
|
-
<% end('chimera-cage') %>
|
package/view/layouts/chimera.ejs
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
<%
|
|
2
|
-
// Expand into the chimera body
|
|
3
|
-
expands('layouts/chimera_body');
|
|
4
|
-
|
|
5
|
-
// Require jquery
|
|
6
|
-
script([{name: 'jquery', path: '//code.jquery.com/jquery-1.11.3.min.js'}, 'selectize/0.11/selectize']);
|
|
7
|
-
|
|
8
|
-
if (pagetitle) {
|
|
9
|
-
start('chimera-title');
|
|
10
|
-
print(pagetitle);
|
|
11
|
-
end('chimera-title');
|
|
12
|
-
}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
<%
|
|
2
|
-
// Expand using chimera_base, but settle for base if it's available
|
|
3
|
-
expands(['layouts/chimera_base', 'layouts/base']);
|
|
4
|
-
|
|
5
|
-
// Load the chimera stylesheet
|
|
6
|
-
style('chimera/chimera');
|
|
7
|
-
|
|
8
|
-
// Enable the svg webcomponent
|
|
9
|
-
WebComponent.load('svg');
|
|
10
|
-
WebComponent.load('panel');
|
|
11
|
-
WebComponent.load('switch');
|
|
12
|
-
WebComponent.load('button-group');
|
|
13
|
-
|
|
14
|
-
// Load the chimera script
|
|
15
|
-
/*script('chimera/chimera');*/
|
|
16
|
-
|
|
17
|
-
// Start the body block
|
|
18
|
-
start('body', {className: chimera_options.extra_class}) %>
|
|
19
|
-
<div class="enclosure">
|
|
20
|
-
<div class="page-topbar">
|
|
21
|
-
<%
|
|
22
|
-
assign('chimera-brand', {className: true});
|
|
23
|
-
brand_opts = {
|
|
24
|
-
content: '<h1>' + (project_title || 'Chimera') + '</h1>',
|
|
25
|
-
className: 'chimera-brand-anchor'
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
Router.printRoute('chimera@Dashboard', null, brand_opts);
|
|
29
|
-
assign_end('chimera-brand')
|
|
30
|
-
%>
|
|
31
|
-
<% assign('chimera-title', {className: true}) %>
|
|
32
|
-
<% assign('chimera-status', {className: true}) %>
|
|
33
|
-
</div>
|
|
34
|
-
<div class="page-container">
|
|
35
|
-
<%
|
|
36
|
-
assign('chimera-sidenav', {className: true});
|
|
37
|
-
print_element('chimera/sidebar');
|
|
38
|
-
assign_end('chimera-sidenav');
|
|
39
|
-
%>
|
|
40
|
-
<% assign('chimera-cage', {className: true}) %>
|
|
41
|
-
</div>
|
|
42
|
-
</div>
|
|
43
|
-
<% end('body') %>
|