Misc. template cleanup per oruga effort
This commit is contained in:
parent
ba32422059
commit
890ec64f3c
20 changed files with 125 additions and 91 deletions
|
@ -55,12 +55,16 @@
|
|||
% if form.auto_disable_save or form.auto_disable:
|
||||
<b-button type="is-primary"
|
||||
native-type="submit"
|
||||
:disabled="${form.component_studly}Submitting">
|
||||
:disabled="${form.component_studly}Submitting"
|
||||
icon-pack="fas"
|
||||
icon-left="save">
|
||||
{{ ${form.component_studly}ButtonText }}
|
||||
</b-button>
|
||||
% else:
|
||||
<b-button type="is-primary"
|
||||
native-type="submit">
|
||||
native-type="submit"
|
||||
icon-pack="fas"
|
||||
icon-left="save">
|
||||
${getattr(form, 'submit_label', getattr(form, 'save_label', "Submit"))}
|
||||
</b-button>
|
||||
% endif
|
||||
|
|
|
@ -87,7 +87,7 @@
|
|||
<div class="level-item">
|
||||
<b-button type="is-primary"
|
||||
icon-pack="fas"
|
||||
icon-left="fas fa-plus"
|
||||
icon-left="plus"
|
||||
@click="addColumn()">
|
||||
New Column
|
||||
</b-button>
|
||||
|
@ -97,7 +97,7 @@
|
|||
<div class="level-item">
|
||||
<b-button type="is-danger"
|
||||
icon-pack="fas"
|
||||
icon-left="fas fa-trash"
|
||||
icon-left="trash"
|
||||
@click="new_table.columns = []"
|
||||
:disabled="!new_table.columns.length">
|
||||
Delete All
|
||||
|
@ -164,11 +164,13 @@
|
|||
<section class="modal-card-body">
|
||||
|
||||
<b-field label="Name">
|
||||
<b-input v-model="editingColumnName"></b-input>
|
||||
<b-input v-model="editingColumnName"
|
||||
expanded />
|
||||
</b-field>
|
||||
|
||||
<b-field label="Data Type">
|
||||
<b-input v-model="editingColumnDataType"></b-input>
|
||||
<b-input v-model="editingColumnDataType"
|
||||
expanded />
|
||||
</b-field>
|
||||
|
||||
<b-field label="Nullable">
|
||||
|
@ -179,7 +181,8 @@
|
|||
</b-field>
|
||||
|
||||
<b-field label="Description">
|
||||
<b-input v-model="editingColumnDescription"></b-input>
|
||||
<b-input v-model="editingColumnDescription"
|
||||
expanded />
|
||||
</b-field>
|
||||
|
||||
</section>
|
||||
|
|
|
@ -8,7 +8,8 @@
|
|||
<%def name="page_content()">
|
||||
% if project_type:
|
||||
<b-field grouped>
|
||||
<b-field horizontal expanded label="Project Type">
|
||||
<b-field horizontal expanded label="Project Type"
|
||||
class="is-expanded">
|
||||
${project_type}
|
||||
</b-field>
|
||||
<once-button type="is-primary"
|
||||
|
|
|
@ -76,12 +76,12 @@
|
|||
</b-table-column>
|
||||
% endif
|
||||
|
||||
<template slot="empty">
|
||||
<template #empty>
|
||||
<div class="content has-text-grey has-text-centered">
|
||||
<p>
|
||||
<b-icon
|
||||
pack="fas"
|
||||
icon="fas fa-sad-tear"
|
||||
icon="sad-tear"
|
||||
size="is-large">
|
||||
</b-icon>
|
||||
</p>
|
||||
|
|
|
@ -199,7 +199,7 @@
|
|||
</span>
|
||||
<b-select v-model="perPage"
|
||||
size="is-small"
|
||||
@input="loadAsyncData()">
|
||||
@input="perPageUpdated">
|
||||
% for value in grid.get_pagesize_options():
|
||||
<option value="${value}">${value}</option>
|
||||
% endfor
|
||||
|
@ -459,9 +459,11 @@
|
|||
|
||||
if (params === undefined || params === null) {
|
||||
params = new URLSearchParams(this.getBasicParams())
|
||||
params.append('partial', true)
|
||||
params = params.toString()
|
||||
} else {
|
||||
params = new URLSearchParams(params)
|
||||
}
|
||||
params.append('partial', true)
|
||||
params = params.toString()
|
||||
|
||||
this.loading = true
|
||||
this.$http.get(`${'$'}{this.ajaxDataUrl}?${'$'}{params}`).then(({ data }) => {
|
||||
|
@ -520,6 +522,12 @@
|
|||
this.loadAsyncData()
|
||||
},
|
||||
|
||||
perPageUpdated(value) {
|
||||
this.loadAsyncData({
|
||||
pagesize: value,
|
||||
})
|
||||
},
|
||||
|
||||
onSort(field, order, event) {
|
||||
|
||||
if (event.ctrlKey) {
|
||||
|
|
|
@ -77,31 +77,31 @@
|
|||
<b-field label="Key"
|
||||
:type="overnightTaskKey ? null : 'is-danger'">
|
||||
<b-input v-model.trim="overnightTaskKey"
|
||||
ref="overnightTaskKey">
|
||||
</b-input>
|
||||
ref="overnightTaskKey"
|
||||
expanded />
|
||||
</b-field>
|
||||
<b-field label="Description"
|
||||
:type="overnightTaskDescription ? null : 'is-danger'">
|
||||
<b-input v-model.trim="overnightTaskDescription"
|
||||
ref="overnightTaskDescription">
|
||||
</b-input>
|
||||
ref="overnightTaskDescription"
|
||||
expanded />
|
||||
</b-field>
|
||||
<b-field label="Module">
|
||||
<b-input v-model.trim="overnightTaskModule">
|
||||
</b-input>
|
||||
<b-input v-model.trim="overnightTaskModule"
|
||||
expanded />
|
||||
</b-field>
|
||||
<b-field label="Class Name">
|
||||
<b-input v-model.trim="overnightTaskClass">
|
||||
</b-input>
|
||||
<b-input v-model.trim="overnightTaskClass"
|
||||
expanded />
|
||||
</b-field>
|
||||
<b-field label="Script">
|
||||
<b-input v-model.trim="overnightTaskScript">
|
||||
</b-input>
|
||||
<b-input v-model.trim="overnightTaskScript"
|
||||
expanded />
|
||||
</b-field>
|
||||
<b-field label="Notes">
|
||||
<b-input v-model.trim="overnightTaskNotes"
|
||||
type="textarea">
|
||||
</b-input>
|
||||
type="textarea"
|
||||
expanded />
|
||||
</b-field>
|
||||
</section>
|
||||
|
||||
|
@ -194,19 +194,19 @@
|
|||
<b-field label="Key"
|
||||
:type="backfillTaskKey ? null : 'is-danger'">
|
||||
<b-input v-model.trim="backfillTaskKey"
|
||||
ref="backfillTaskKey">
|
||||
</b-input>
|
||||
ref="backfillTaskKey"
|
||||
expanded />
|
||||
</b-field>
|
||||
<b-field label="Description"
|
||||
:type="backfillTaskDescription ? null : 'is-danger'">
|
||||
<b-input v-model.trim="backfillTaskDescription"
|
||||
ref="backfillTaskDescription">
|
||||
</b-input>
|
||||
ref="backfillTaskDescription"
|
||||
expanded />
|
||||
</b-field>
|
||||
<b-field label="Script"
|
||||
:type="backfillTaskScript ? null : 'is-danger'">
|
||||
<b-input v-model.trim="backfillTaskScript">
|
||||
</b-input>
|
||||
<b-input v-model.trim="backfillTaskScript"
|
||||
expanded />
|
||||
</b-field>
|
||||
<b-field grouped>
|
||||
<b-field label="Orientation">
|
||||
|
@ -222,8 +222,8 @@
|
|||
</b-field>
|
||||
<b-field label="Notes">
|
||||
<b-input v-model.trim="backfillTaskNotes"
|
||||
type="textarea">
|
||||
</b-input>
|
||||
type="textarea"
|
||||
expanded />
|
||||
</b-field>
|
||||
</section>
|
||||
|
||||
|
@ -252,7 +252,8 @@
|
|||
expanded>
|
||||
<b-input name="rattail.luigi.url"
|
||||
v-model="simpleSettings['rattail.luigi.url']"
|
||||
@input="settingsNeedSaved = true">
|
||||
@input="settingsNeedSaved = true"
|
||||
expanded>
|
||||
</b-input>
|
||||
</b-field>
|
||||
|
||||
|
@ -261,7 +262,8 @@
|
|||
expanded>
|
||||
<b-input name="rattail.luigi.scheduler.supervisor_process_name"
|
||||
v-model="simpleSettings['rattail.luigi.scheduler.supervisor_process_name']"
|
||||
@input="settingsNeedSaved = true">
|
||||
@input="settingsNeedSaved = true"
|
||||
expanded>
|
||||
</b-input>
|
||||
</b-field>
|
||||
|
||||
|
@ -270,7 +272,8 @@
|
|||
expanded>
|
||||
<b-input name="rattail.luigi.scheduler.restart_command"
|
||||
v-model="simpleSettings['rattail.luigi.scheduler.restart_command']"
|
||||
@input="settingsNeedSaved = true">
|
||||
@input="settingsNeedSaved = true"
|
||||
expanded>
|
||||
</b-input>
|
||||
</b-field>
|
||||
|
||||
|
|
|
@ -10,10 +10,9 @@
|
|||
<%def name="render_instance_header_title_extras()">
|
||||
% if master.touchable and master.has_perm('touch'):
|
||||
<b-button title=""Touch" this record to trigger sync"
|
||||
icon-pack="fas"
|
||||
icon-left="hand-pointer"
|
||||
@click="touchRecord()"
|
||||
:disabled="touchSubmitting">
|
||||
<span><i class="fa fa-hand-pointer"></i></span>
|
||||
</b-button>
|
||||
% endif
|
||||
% if expose_versions:
|
||||
|
@ -34,7 +33,7 @@
|
|||
% if xref_buttons or xref_links:
|
||||
<nav class="panel">
|
||||
<p class="panel-heading">Cross-Reference</p>
|
||||
<div class="panel-block buttons">
|
||||
<div class="panel-block">
|
||||
<div style="display: flex; flex-direction: column; gap: 0.5rem;">
|
||||
% for button in xref_buttons:
|
||||
${button}
|
||||
|
|
|
@ -19,48 +19,39 @@
|
|||
</%def>
|
||||
|
||||
<%def name="page_content()">
|
||||
## TODO: this was basically copied from Revel diff template..need to abstract
|
||||
|
||||
<div class="form-wrapper">
|
||||
<div class="form-wrapper" style="margin: 1rem; 0;">
|
||||
<div class="form">
|
||||
|
||||
<div class="form">
|
||||
<b-field label="Changed" horizontal>
|
||||
<span>${h.pretty_datetime(request.rattail_config, changed)}</span>
|
||||
</b-field>
|
||||
|
||||
<b-field label="Changed by" horizontal>
|
||||
<span>${transaction.user or ''}</span>
|
||||
</b-field>
|
||||
|
||||
<b-field label="IP Address" horizontal>
|
||||
<span>${transaction.remote_addr}</span>
|
||||
</b-field>
|
||||
|
||||
<b-field label="Comment" horizontal>
|
||||
<span>${transaction.meta.get('comment') or ''}</span>
|
||||
</b-field>
|
||||
|
||||
<b-field label="TXN ID" horizontal>
|
||||
<span>${transaction.id}</span>
|
||||
</b-field>
|
||||
|
||||
<div class="field-wrapper">
|
||||
<label>Changed</label>
|
||||
<div class="field">${h.pretty_datetime(request.rattail_config, changed)}</div>
|
||||
</div>
|
||||
|
||||
<div class="field-wrapper">
|
||||
<label>Changed by</label>
|
||||
<div class="field">${transaction.user or ''}</div>
|
||||
</div>
|
||||
|
||||
<div class="field-wrapper">
|
||||
<label>IP Address</label>
|
||||
<div class="field">${transaction.remote_addr}</div>
|
||||
</div>
|
||||
|
||||
<div class="field-wrapper">
|
||||
<label>Comment</label>
|
||||
<div class="field">${transaction.meta.get('comment') or ''}</div>
|
||||
</div>
|
||||
|
||||
<div class="field-wrapper">
|
||||
<label>TXN ID</label>
|
||||
<div class="field">${transaction.id}</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div><!-- form-wrapper -->
|
||||
|
||||
<div class="versions-wrapper">
|
||||
% for diff in version_diffs:
|
||||
<h4 class="is-size-4 block">${diff.title}</h4>
|
||||
${diff.render_html()}
|
||||
% endfor
|
||||
</div>
|
||||
|
||||
<div class="versions-wrapper">
|
||||
% for diff in version_diffs:
|
||||
<h4 class="is-size-4 block">${diff.title}</h4>
|
||||
${diff.render_html()}
|
||||
% endfor
|
||||
</div>
|
||||
</%def>
|
||||
|
||||
|
||||
|
|
|
@ -49,10 +49,16 @@
|
|||
let url = '${url('{}.toggle_hidden'.format(route_prefix))}'
|
||||
let params = {
|
||||
key: row.key,
|
||||
hidden: row.hidden == 'No'? true : false,
|
||||
hidden: row.hidden == 'No' ? true : false,
|
||||
}
|
||||
this.submitForm(url, params, response => {
|
||||
row.hidden = params.hidden ? 'Yes' : 'No'
|
||||
// must update "original" data row, since our row arg
|
||||
// may just be a proxy and not trigger view refresh
|
||||
for (let email of this.data) {
|
||||
if (email.key == row.key) {
|
||||
email.hidden = params.hidden ? 'Yes' : 'No'
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
@ -66,21 +66,21 @@
|
|||
:type="upgradeSystemKey ? null : 'is-danger'">
|
||||
<b-input v-model.trim="upgradeSystemKey"
|
||||
ref="upgradeSystemKey"
|
||||
:disabled="upgradeSystemKey == 'rattail'">
|
||||
</b-input>
|
||||
:disabled="upgradeSystemKey == 'rattail'"
|
||||
expanded />
|
||||
</b-field>
|
||||
<b-field label="Label"
|
||||
:type="upgradeSystemLabel ? null : 'is-danger'">
|
||||
<b-input v-model.trim="upgradeSystemLabel"
|
||||
ref="upgradeSystemLabel"
|
||||
:disabled="upgradeSystemKey == 'rattail'">
|
||||
</b-input>
|
||||
:disabled="upgradeSystemKey == 'rattail'"
|
||||
expanded />
|
||||
</b-field>
|
||||
<b-field label="Command"
|
||||
:type="upgradeSystemCommand ? null : 'is-danger'">
|
||||
<b-input v-model.trim="upgradeSystemCommand"
|
||||
ref="upgradeSystemCommand">
|
||||
</b-input>
|
||||
ref="upgradeSystemCommand"
|
||||
expanded />
|
||||
</b-field>
|
||||
</section>
|
||||
|
||||
|
|
|
@ -40,6 +40,7 @@
|
|||
<b-field label="Description"
|
||||
:type="{'is-danger': !apiNewTokenDescription}">
|
||||
<b-input v-model.trim="apiNewTokenDescription"
|
||||
expanded
|
||||
ref="apiNewTokenDescription">
|
||||
</b-input>
|
||||
</b-field>
|
||||
|
|
|
@ -263,7 +263,7 @@ def includeme(config):
|
|||
${parent.modify_this_page_vars()}
|
||||
<script type="text/javascript">
|
||||
|
||||
ThisPageData.activeStep = null
|
||||
ThisPageData.activeStep = 'enter-details'
|
||||
|
||||
ThisPageData.modelNames = ${json.dumps(model_names)|n}
|
||||
ThisPageData.modelName = null
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue