- Add CloudronStack/output/CloudronPackages-Artifacts/tirreno/ directory and its contents - Includes package manifest, Dockerfile, source code, documentation, and build artifacts - Add tirreno-1761840148.tar.gz as a build artifact - Add tirreno-cloudron-package-1761841304.tar.gz as the Cloudron package - Include all necessary files for the tirreno Cloudron package This adds the complete tirreno Cloudron package artifacts to the repository.
66 lines
1.7 KiB
JavaScript
66 lines
1.7 KiB
JavaScript
import {BasePage} from './Base.js';
|
|
import {UsageStatsGrid} from '../parts/grid/UsageStats.js?v=2';
|
|
import {EnrichAllPopUp} from '../parts/EnrichAllPopUp.js?v=2';
|
|
|
|
export class ApiPage extends BasePage {
|
|
|
|
constructor() {
|
|
super();
|
|
|
|
this.initUi();
|
|
}
|
|
|
|
initUi() {
|
|
const onSelectChange = this.onSelectChange.bind(this);
|
|
this.versionSelect.addEventListener('change', onSelectChange, false);
|
|
|
|
const onTextAreaClick = this.onTextAreaClick.bind(this);
|
|
this.snippetTextareas.forEach(txt => txt.addEventListener('click', onTextAreaClick, false));
|
|
|
|
const gridParams = {
|
|
url: '/admin/loadUsageStats',
|
|
tableId: 'usage-stats-table',
|
|
tileId: 'totalUsageStats',
|
|
|
|
isSortable: false,
|
|
|
|
getParams: function() {
|
|
return {};
|
|
}
|
|
};
|
|
|
|
new UsageStatsGrid(gridParams);
|
|
new EnrichAllPopUp();
|
|
}
|
|
|
|
onTextAreaClick(e) {
|
|
const txt = e.target;
|
|
const value = txt.value;
|
|
|
|
txt.setSelectionRange(0, value.length);
|
|
}
|
|
|
|
onSelectChange(e) {
|
|
const value = event.target.value;
|
|
|
|
this.snippetTextareas.forEach(txt => {
|
|
const container = txt.closest('div');
|
|
const isHidden = container.classList.contains('is-hidden');
|
|
if (!isHidden) {
|
|
container.classList.add('is-hidden');
|
|
}
|
|
});
|
|
|
|
const textarea = document.getElementById(value);
|
|
textarea.closest('div').classList.remove('is-hidden');
|
|
}
|
|
|
|
get versionSelect() {
|
|
return document.querySelector('select[name=version]');
|
|
}
|
|
|
|
get snippetTextareas() {
|
|
return document.querySelectorAll('.code-snippet');
|
|
}
|
|
}
|