Added frontend components for benchmarkcache#12
Added frontend components for benchmarkcache#12jessevz wants to merge 1 commit intohashtopolis:masterfrom
Conversation
| <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> |
There was a problem hiding this comment.
The title of the menu entry should be capitalized, i.e. Benchmarks
| breadcrumb: 'Edit Agent' | ||
| }, | ||
| canActivate: [AuthGuard,AgentGuard]}, | ||
| ] |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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'){ |
There was a problem hiding this comment.
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> | |||
There was a problem hiding this comment.
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> |
There was a problem hiding this comment.
The class="border-0" is not needed
There was a problem hiding this comment.
Use instead the service _services/main.service.ts instead
| }) | ||
| export class BenchmarkService { | ||
|
|
||
| private endpoint = environment.config.prodApiEndpoint + '/ui/benchmarks'; |
There was a problem hiding this comment.
Use the class SERV in _services/main.config.ts
xbenyx
left a comment
There was a problem hiding this comment.
You are using an old branch here, see some guideline for changes. any questions let me know.
|
this PR is getting closed, the feature will be added at a later stage, matching to the new frontend implementation changes. |
Added frontend components for benchmark cache: hashtopolis/server#955