* [msic] Format code.
This commit is contained in:
@@ -63,7 +63,7 @@ $config->instance->actionList['upgrade']['url'] = helper::createLink('in
|
||||
|
||||
$config->instance->actions = new stdclass();
|
||||
$config->instance->actions->view = array();
|
||||
$config->instance->actions->view['mainActions'] = array('visit','showLogs', 'ajaxStart', 'ajaxStop', 'upgrade');
|
||||
$config->instance->actions->view['mainActions'] = array('visit', 'showLogs', 'ajaxStart', 'ajaxStop', 'upgrade');
|
||||
$config->instance->actions->view['suffixActions'] = array('ajaxUninstall');
|
||||
|
||||
$config->instance->devopsApps = array('gitea', 'gitlab', 'jenkins', 'sonarqube', 'nexus3', 'nexus');
|
||||
|
||||
@@ -1,25 +1,31 @@
|
||||
window.initComponent = function (instanceID) {
|
||||
window.initComponent = function (instanceID)
|
||||
{
|
||||
toggleLoading('#logs-panel', true);
|
||||
const $picker = $('[name=component]').zui('picker');
|
||||
$picker.$.clear();
|
||||
|
||||
$.getJSON($.createLink('instance', 'ajaxGetComponents', 'id=' + instanceID), function (items) {
|
||||
$.getJSON($.createLink('instance', 'ajaxGetComponents', 'id=' + instanceID), function (items)
|
||||
{
|
||||
toggleLoading('#logs-panel', false);
|
||||
$picker.render({items: items});
|
||||
if (typeof (items) !== 'undefined') {
|
||||
if (typeof (items) !== 'undefined')
|
||||
{
|
||||
$picker.$.setValue(items.component);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
window.changeComponent = function (instanceID) {
|
||||
window.changeComponent = function (instanceID)
|
||||
{
|
||||
toggleLoading('#logs-panel', true);
|
||||
const $picker = $('[name=pod]').zui('picker');
|
||||
$picker.$.clear();
|
||||
const component = $('[name=component]').val();
|
||||
$.getJSON($.createLink('instance', 'ajaxGetPods', 'id=' + instanceID + '&component=' + component), function (items) {
|
||||
$.getJSON($.createLink('instance', 'ajaxGetPods', 'id=' + instanceID + '&component=' + component), function (items)
|
||||
{
|
||||
$picker.render({items: items});
|
||||
if (typeof (items) !== 'undefined') {
|
||||
if (typeof (items) !== 'undefined')
|
||||
{
|
||||
$picker.$.setValue(items.pod);
|
||||
}
|
||||
toggleLoading('#logs-panel', false);
|
||||
@@ -27,13 +33,15 @@ window.changeComponent = function (instanceID) {
|
||||
});
|
||||
};
|
||||
|
||||
window.showLogs = function (instanceID) {
|
||||
window.showLogs = function (instanceID)
|
||||
{
|
||||
const instanceComponent = $('[name=component]').val();
|
||||
const instancePod = $('[name=pod]').val();
|
||||
const previous = $('[name=previous]').val();
|
||||
const target = $.createLink('instance', 'showlogs', 'id=' + instanceID + "&component=" + instanceComponent + "&pod=" + instancePod + "&previous=" + previous);
|
||||
toggleLoading('#logs-panel', true);
|
||||
$.getJSON(target, function (data) {
|
||||
$.getJSON(target, function (data)
|
||||
{
|
||||
toggleLoading('#logs-panel', false);
|
||||
$('#logs-content').html(data.data.map(item => item.timestamp + ' ' + item.content).join('\n'));
|
||||
});
|
||||
|
||||
@@ -187,9 +187,9 @@ $lang->instance->log = new stdclass;
|
||||
$lang->instance->log->date = 'date';
|
||||
$lang->instance->log->message = 'Content';
|
||||
|
||||
$lang->instance->log->viewButton = 'Logs';
|
||||
$lang->instance->log->title = 'Watch Logs';
|
||||
$lang->instance->log->button = 'View Now';
|
||||
$lang->instance->log->viewButton = 'Logs';
|
||||
$lang->instance->log->title = 'Watch Logs';
|
||||
$lang->instance->log->button = 'View Now';
|
||||
|
||||
$lang->instance->component = 'Component';
|
||||
$lang->instance->pod = 'Pod';
|
||||
|
||||
@@ -187,9 +187,9 @@ $lang->instance->log = new stdclass;
|
||||
$lang->instance->log->date = 'date';
|
||||
$lang->instance->log->message = 'Content';
|
||||
|
||||
$lang->instance->log->viewButton = 'Logs';
|
||||
$lang->instance->log->title = 'Watch Logs';
|
||||
$lang->instance->log->button = 'View Now';
|
||||
$lang->instance->log->viewButton = 'Logs';
|
||||
$lang->instance->log->title = 'Watch Logs';
|
||||
$lang->instance->log->button = 'View Now';
|
||||
|
||||
$lang->instance->component = 'Component';
|
||||
$lang->instance->pod = 'Pod';
|
||||
|
||||
@@ -187,9 +187,9 @@ $lang->instance->log = new stdclass;
|
||||
$lang->instance->log->date = 'date';
|
||||
$lang->instance->log->message = 'Content';
|
||||
|
||||
$lang->instance->log->viewButton = 'Logs';
|
||||
$lang->instance->log->title = 'Watch Logs';
|
||||
$lang->instance->log->button = 'View Now';
|
||||
$lang->instance->log->viewButton = 'Logs';
|
||||
$lang->instance->log->title = 'Watch Logs';
|
||||
$lang->instance->log->button = 'View Now';
|
||||
|
||||
$lang->instance->component = 'Component';
|
||||
$lang->instance->pod = 'Pod';
|
||||
|
||||
@@ -191,9 +191,9 @@ $lang->instance->log = new stdclass;
|
||||
$lang->instance->log->date = '日期';
|
||||
$lang->instance->log->message = '内容';
|
||||
|
||||
$lang->instance->log->viewButton = '日志';
|
||||
$lang->instance->log->title = '查看日志';
|
||||
$lang->instance->log->button = '立即查看';
|
||||
$lang->instance->log->viewButton = '日志';
|
||||
$lang->instance->log->title = '查看日志';
|
||||
$lang->instance->log->button = '立即查看';
|
||||
|
||||
$lang->instance->component = '组件';
|
||||
$lang->instance->pod = 'Pod';
|
||||
|
||||
Reference in New Issue
Block a user