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

Added frontend components for benchmarkcache #12

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jessevz
Copy link

@jessevz jessevz commented Aug 30, 2023

Added frontend components for benchmark cache: hashtopolis/server#955

@@ -44,6 +44,7 @@
<div ngbDropdownMenu (mouseout)='onMouseLeave(drop)' class="dropdown-menu top-cat-sub" aria-labelledby="dropdownAgents">
<a class="dropdown-item" routerLink="agents/show-agents" [routerLinkActiveOptions]="{exact: true}" [routerLinkActive]="['active']">Show Agents</a>
<a class="dropdown-item" routerLink="agents/agent-status" [routerLinkActiveOptions]="{exact: true}" [routerLinkActive]="['active']">Agent Status</a>
<a class="dropdown-item" routerLink="agents/benchmarks" [routerLinkActiveOptions]="{exact: true}" [routerLinkActive]="['active']">benchmarks</a>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The title of the menu entry should be capitalized, i.e. Benchmarks

kind: 'edit-agent',
breadcrumb: 'Edit Agent'
},
canActivate: [AuthGuard,AgentGuard]},
]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code has change, so pull the new code and change should be sth like this.

    {
      path: 'benchmarks', component: BenchmarkComponent,
      data: {
        kind: 'benchmark',
        breadcrumb: 'Benchmark'
    },
    canActivate: [IsAuth,CheckPerm]},

}
}

// Set permissions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We dont need this code anymore as we have now guards and we leave the backend handle the permissions

}

onDelete(id: number){
if(this.manageBenchmarkAccess || typeof this.manageBenchmarkAccess == 'undefined'){
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, leave it to the back end hadling error

@@ -0,0 +1,48 @@
<div class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center py-4">
<div class="d-block mb-4 mb-md-0">
<h2 class="h4">Benchmarks</h2>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can change this block for this template

<app-page-title [title]="Benchmarks'" [subbutton]="false">

<tr>
<th class="border-0 rounded-start"><input type="checkbox" (click)="setCheckAll()"> ID</th>
<th class="border-0">CMD</th>
<th class="border-0">Hashmode</th>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The class="border-0" is not needed

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use instead the service _services/main.service.ts instead

})
export class BenchmarkService {

private endpoint = environment.config.prodApiEndpoint + '/ui/benchmarks';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use the class SERV in _services/main.config.ts

Copy link
Contributor

@xbenyx xbenyx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are using an old branch here, see some guideline for changes. any questions let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants