Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update the layout of the dashboard ui. #707

Merged
merged 1 commit into from
Feb 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -217,11 +217,13 @@ public async Task<PerformActionResponse> PerformActionAsync(PerformActionRequest
var results = await method(handlerOptions, callbacks);
_syncManagementCache.CacheItems(requestId, results.Actions, false);

var allActions = _syncManagementCache.GetCachedActions(requestId);
return new PerformActionResponse
{
RequestId = requestId.ToString(),
Actions = results.Actions.Select(x => x.ToActionView()),
Status = GetSummaries(action, handlers, actionRequest.StepNumber, results.Actions.ToList()),
Actions = allActions.Select(x => x.ToActionView()),
// results.Actions.Select(x => x.ToActionView()),
Status = GetSummaries(action, handlers, actionRequest.StepNumber, allActions), // results.Actions.ToList()),
Complete = false
};
}
Expand Down Expand Up @@ -289,8 +291,8 @@ private IEnumerable<SyncHandlerSummary> GetSummaries(HandlerActions action, List
Icon = handlers[n].Icon,
Status = n < nextStep ? HandlerStatus.Complete :
n == nextStep ? HandlerStatus.Processing : HandlerStatus.Pending,
Changes = handlerActions.Count(x => x.Change > Core.ChangeType.NoChange),
InError = handlerActions.Any(x => x.Change >= Core.ChangeType.Fail)
Changes = handlerActions.CountChanges(),
InError = handlerActions.ContainsErrors()
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ export class uSyncActionBox extends LitElement {
static styles = css`
:host {
flex-grow: 1;
margin: var(--uui-size-space-2);
}

.action-box {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ export class uSyncProcessBox extends UmbElementMixin(LitElement) {
static styles = css`
:host {
display: block;
margin: var(--uui-size-space-4) 0;
}

h2 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,11 @@ export class uSyncDefaultViewElement extends UmbLitElement {
} else {
return html`
<umb-body-layout>
${this.#renderLegacyBanner()} ${this.#renderActions()} ${this.#renderBanner()}
${this.#renderProcessBox()} ${this.#renderReport()}
${this.#renderLegacyBanner()}
<div class="wrapper">
${this.#renderActions()} ${this.#renderBanner()} ${this.#renderProcessBox()}
${this.#renderReport()}
</div>
</umb-body-layout>
`;
}
Expand All @@ -146,7 +149,7 @@ export class uSyncDefaultViewElement extends UmbLitElement {
}

#renderActions() {
if (!this._actions || !Array.isArray(this._actions)) return nothing;
if (!this._actions || !Array.isArray(this._actions)) return nothing;

var actions = this._actions?.map((group) => {
return html`
Expand Down Expand Up @@ -203,6 +206,12 @@ export class uSyncDefaultViewElement extends UmbLitElement {
margin-top: calc(var(--uui-size-space-4) * -1);
}

.wrapper {
display: flex;
flex-direction: column;
gap: var(--uui-size-space-4);
}

.legacy-banner {
display: flex;
gap: var(--uui-size-space-2);
Expand All @@ -216,16 +225,15 @@ export class uSyncDefaultViewElement extends UmbLitElement {
position: relative;
display: block;
z-index: 1;
margin: var(--uui-size-space-4) 0;
}

.action-buttons-box {
position: relative;
display: flex;
gap: var(--uui-size-space-4);
flex-wrap: wrap;
align-content: stretch;
z-index: 1;
margin: calc(var(--uui-size-space-2) * -1);
}

umb-empty-state {
Expand Down
Loading