Commit c88e1a15 authored by davelopez's avatar davelopez
Browse files

Load only summary view for all histories

The extended (and potentially expensive) properties will be requested only for particular histories, like the current history.
parent 5695e75e
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -39,6 +39,14 @@ function formData(fields = {}) {
 */
const stdHistoryParams = {
    view: "summary",
};

/**
 * Extended history request parameters.
 * Retrieves additional details which are usually more "expensive".
 */
const extendedHistoryParams = {
    view: "summary",
    keys: "size,contents_active",
};

@@ -58,7 +66,7 @@ export async function getHistoryList() {
 */
export async function getHistoryById(id) {
    const path = `api/histories/${id}`;
    const response = await axios.get(prependPath(path), { params: stdHistoryParams });
    const response = await axios.get(prependPath(path), { params: extendedHistoryParams });
    const props = doResponse(response);
    return new History(props);
}