-
Notifications
You must be signed in to change notification settings - Fork 14
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
base: master
Are you sure you want to change the base?
Conversation
@@ -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> |
There was a problem hiding this comment.
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]}, | ||
] |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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'){ |
There was a problem hiding this comment.
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> |
There was a problem hiding this comment.
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> |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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'; |
There was a problem hiding this comment.
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
There was a problem hiding this 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.
Added frontend components for benchmark cache: hashtopolis/server#955