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

refactor: fix sonar issues #5228

Merged
merged 2 commits into from
Jun 4, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
13 changes: 7 additions & 6 deletions ui/src/app/shared/conditions/conditions.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@
<td class="middle-aligned">
<div class="field">
<ng-container *ngIf="conditionNames">
<app-select-filter [disabled]="readonly" [searchable]="true"
[(value)]="c.variable" [options]="conditionNames"
(valueChange)="pushChange('name')"></app-select-filter>
<app-select-filter [disabled]="readonly" [searchable]="true" [(value)]="c.variable"
[options]="conditionNames" (valueChange)="pushChange('name')">
</app-select-filter>
</ng-container>
</div>
</td>
Expand Down Expand Up @@ -112,12 +112,13 @@ <h4 class="inline">{{'workflow_node_condition_lua_title' | translate}}</h4>
<em> {{'workflow_node_condition_lua_help' | translate}}</em>
<div class="right floated">
<div>
<i class="book icon"></i><a href="https://devhints.io/lua" target="_blank">Lua Cheatsheet</a>
<i class="book icon"></i><a href="https://devhints.io/lua" target="_blank"
rel="noopener noreferrer">Lua Cheatsheet</a>
</div>
<div>
<i class="book icon"></i><a
href="https://ovh.github.io/cds/docs/concepts/workflow/run-conditions"
target="_blank">{{'common_cds_documentation' | translate}}</a>
href="https://ovh.github.io/cds/docs/concepts/workflow/run-conditions" target="_blank"
rel="noopener noreferrer">{{'common_cds_documentation' | translate}}</a>
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
</div>
<p>
<i class="fa fa-book"></i>
<a href="https://ovh.github.io/cds/docs/concepts/requirement/" target="_blank">
<a href="https://ovh.github.io/cds/docs/concepts/requirement/" target="_blank" rel="noopener noreferrer">
{{ 'requirement_documentation' | translate }} </a>
</p>
<p [innerHtml]="helpType[newRequirement.type]"></p>
Expand Down
2 changes: 1 addition & 1 deletion ui/src/app/shared/workflow/wizard/hook/hook.form.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<div class="ui form">
<h3 class="inline">{{ 'workflow_node_hook_form_title' | translate }}</h3>
<div class="right floated mb15">
<i class="book icon"></i><a href="https://ovh.github.io/cds/docs/concepts/workflow/hooks/" target="_blank">{{'common_documentation' | translate}}</a>
<i class="book icon"></i><a href="https://ovh.github.io/cds/docs/concepts/workflow/hooks/" target="_blank" rel="noopener noreferrer">{{'common_documentation' | translate}}</a>
</div>
<ng-container *ngIf="isRun">
<input class="ui fluid input" [value]="hook?.hook_model_name" [readOnly]="true">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
<div class="ui toggle checkbox ml10">
<input type="checkbox" id="mutex" name="mutex" [(ngModel)]="node.context.mutex">
<label for="mutex">
<a href="https://ovh.github.io/cds/docs/concepts/workflow/mutex" target="_blank">
<a href="https://ovh.github.io/cds/docs/concepts/workflow/mutex" target="_blank" rel="noopener noreferrer">
{{ 'workflow_root_context_mutex' | translate }}
<i class="external icon"></i>
</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<div class="ui form">
<h3 class="inline">{{ 'workflow_node_hook_form_title' | translate }}</h3>
<div class="right floated mb15">
<i class="book icon"></i><a href="https://ovh.github.io/cds/docs/concepts/workflow/hooks"
target="_blank">{{'common_documentation' | translate}}</a>
<i class="book icon"></i><a href="https://ovh.github.io/cds/docs/concepts/workflow/hooks" target="_blank"
rel="noopener noreferrer">{{'common_documentation' | translate}}</a>
</div>
<ng-container *ngIf="!loadingModels">
<sui-select class="selection" placeholder="{{'workflow_node_hook_select' | translate}}"
Expand Down Expand Up @@ -35,8 +35,9 @@ <h3>{{ 'workflow_node_hook_form_config' | translate }}</h3>
[readonly]="!outgoingHook.outgoing_hook.config[k].configurable || mode === 'ro'"
*ngIf="k !== 'payload' && outgoingHook.outgoing_hook.config[k].type === 'password'" />
<ng-container *ngIf="k === 'payload' && outgoingHook.outgoing_hook.config[k].type === 'string'">
<codemirror [class.invalid]="invalidJSON" [(ngModel)]="outgoingHook.outgoing_hook.config[k].value"
[config]="codeMirrorConfig" (change)="changeCodeMirror($event)" #textareaCodeMirror>
<codemirror [class.invalid]="invalidJSON"
[(ngModel)]="outgoingHook.outgoing_hook.config[k].value" [config]="codeMirrorConfig"
(change)="changeCodeMirror($event)" #textareaCodeMirror>
</codemirror>
</ng-container>
</div>
Expand Down Expand Up @@ -78,7 +79,8 @@ <h3>{{ 'workflow_node_hook_form_config' | translate }}</h3>
</sui-select>
</div>
</div>
<div class="inline fields" *ngIf="availableHooks && outgoingHook.outgoing_hook.config['target_hook'].value">
<div class="inline fields"
*ngIf="availableHooks && outgoingHook.outgoing_hook.config['target_hook'].value">
<div class="four wide field"><label>payload</label></div>
<div class="twelve wide field">
<codemirror [class.invalid]="invalidJSON"
Expand All @@ -92,9 +94,7 @@ <h3>{{ 'workflow_node_hook_form_config' | translate }}</h3>
{{ 'workflow_node_hook_no_configuration' | translate }}</div>
</ng-container>
<ng-container *ngIf="mode === 'update' && workflow.permissions.writable">
<button class="ui right floated green button"
*ngIf="workflow.permissions.writable"
[disabled]="loading"
<button class="ui right floated green button" *ngIf="workflow.permissions.writable" [disabled]="loading"
[class.loading]="loading" (click)="updateWorkflow()">
{{ 'btn_save' | translate }}
</button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,16 +91,16 @@ <h2 class="ui header"><i class="fa fa-book"></i> {{ 'settings_tips' | translate
<p>{{'worker_model_help_line_2' | translate}}</p>
<i class="fa fa-question-circle"></i> {{'worker_model_help_howtos' | translate}}
<div class="ui list">
<a class="item" target="_blank"
<a class="item" target="_blank" rel="noopener noreferrer"
href="https://ovh.github.io/cds/docs/tutorials/worker_model-docker/">{{'worker_model_help_howto_link_1'
| translate}}</a>
<a class="item" target="_blank"
<a class="item" target="_blank" rel="noopener noreferrer"
href="https://ovh.github.io/cds/docs/tutorials/worker_model-docker/docker-customized/">{{'worker_model_help_howto_link_2'
| translate}}</a>
<a class="item" target="_blank"
<a class="item" target="_blank" rel="noopener noreferrer"
href="https://ovh.github.io/cds/docs/tutorials/worker_model-openstack/">{{'worker_model_help_howto_link_3'
| translate}}</a>
<a class="item" target="_blank" href="https://ovh.github.io/cds/docs/concepts/worker-model/">{{'common_read_more'
<a class="item" target="_blank" rel="noopener noreferrer" href="https://ovh.github.io/cds/docs/concepts/worker-model/">{{'common_read_more'
| translate}}</a>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion ui/src/app/views/application/show/application.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<div class="footer">
<div>
<div class="ui list">
<a class="item" target="_blank"
<a class="item" target="_blank" rel="noopener noreferrer"
href="https://ovh.github.io/cds/docs/tutorials/init_workflow_with_cdsctl/">
{{'common_read_more'| translate}}
</a>
Expand Down
4 changes: 2 additions & 2 deletions ui/src/app/views/home/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
</div>
<div class="five wide column">
<div>
<a class="fluid ui blue basic button link" href="https://ovh.github.io/cds" target="_blank">
<a class="fluid ui blue basic button link" href="https://ovh.github.io/cds" target="_blank" rel="noopener noreferrer">
<i class="book icon"></i>Guide
</a>
</div>
Expand All @@ -49,4 +49,4 @@
</div>
</div>
<div class="ui active text loader" *ngIf="loading">{{ 'common_loading' | translate }}</div>
</div>
</div>
12 changes: 6 additions & 6 deletions ui/src/app/views/navbar/navbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@

<ng-template let-popup #popupSearchTemplate>
<div class="content searchpopup">
<div class="ui right floated" suiPopup popupPlacement="left" [popupText]="'navbar_search_help_details' | translate"><i class="help icon"></i>
<div class="ui right floated" suiPopup popupPlacement="left" [popupText]="'navbar_search_help_details' | translate"><i class="help icon"></i>
{{ 'navbar_search_help' | translate }}
</div>

<div *ngIf="containsResult && isSearch"><div class="ui left"><i class="search icon"></i> {{'navbar_results' | translate}}</div></div>
<div *ngIf="containsResult && !isSearch"><div class="ui left"><i class="history icon"></i>{{'navbar_seen_recently' | translate}}</div></div>
<div *ngIf="!containsResult"><div class="ui center"><i class="search icon"></i>{{'navbar_no_result' | translate}}</div></div>
Expand Down Expand Up @@ -146,7 +146,7 @@
title="{{ 'common_workflow_title' | translate }}{{el.title}}">
{{el.title}}
</a>
<div class="description">{{'navbar_in_project' | translate}}
<div class="description">{{'navbar_in_project' | translate}}
<a (click)="$event.stopPropagation()"
[routerLink]="['/project', el.projectKey]"
title="{{ 'common_project_title' | translate }}{{el.title}}">
Expand All @@ -158,7 +158,7 @@
</div>
</div>
</div>

<div class="six wide column">
<div class="ui secondary pointing menu">
<div class="ui relaxed divided list">
Expand Down Expand Up @@ -187,7 +187,7 @@
title="{{ 'common_application_title' | translate }}{{el.title}}">
{{el.title}}
</a>
<div class="description">{{'navbar_in_project' | translate}}
<div class="description">{{'navbar_in_project' | translate}}
<a (click)="$event.stopPropagation()"
[routerLink]="['/project', el.projectKey]"
title="{{ 'common_project_title' | translate }}{{el.title}}">
Expand Down Expand Up @@ -309,7 +309,7 @@
<a sm-item href="#" [routerLink]="['settings', 'queue']">{{ 'admin_queue_title' | translate }}</a>
<div class="divider"></div>
<a sm-item href="#" [routerLink]="['settings', 'downloads']">{{ 'navbar_downloads' | translate }}</a>
<a sm-item href="https://ovh.github.io/cds/" target="_blank">{{ 'navbar_documentation' | translate }}</a>
<a sm-item href="https://ovh.github.io/cds/" target="_blank" rel="noopener noreferrer">{{ 'navbar_documentation' | translate }}</a>
<div class="divider"></div>
<sm-checkbox class="theme-switch" name="switch-theme" [control]="themeSwitch" type="toggle"
label="{{'navbar_dark_mode' | translate}}" (change)="changeTheme()"></sm-checkbox>
Expand Down
2 changes: 1 addition & 1 deletion ui/src/app/views/pipeline/show/pipeline.show.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<div class="footer">
<div>
<div class="ui list">
<a class="item" target="_blank"
<a class="item" target="_blank" rel="noopener noreferrer"
href="https://ovh.github.io/cds/docs/tutorials/init_workflow_with_cdsctl/">
{{'common_read_more'| translate}}
</a>
Expand Down
2 changes: 1 addition & 1 deletion ui/src/app/views/settings/action/help/action.help.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div class="ui segment">
<h2 class="ui header"><i class="fa fa-book"></i> {{ 'settings_tips' | translate }}</h2>
<div class="ui list">
<a class="item" href="https://ovh.github.io/cds/docs/actions/" target="_blank">{{'action_help_line_1'
<a class="item" href="https://ovh.github.io/cds/docs/actions/" target="_blank" rel="noopener noreferrer">{{'action_help_line_1'
| translate}}</a>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
<input type="checkbox" id="restricted" name="restricted"
[(ngModel)]="workerModel.restricted" [disabled]="!workerModel.editable">
<label for="restricted">{{'worker_model_restricted_help' | translate}} <a
target="_blank"
target="_blank" rel="noopener noreferrer"
href="https://ovh.github.io/cds/docs/concepts/worker-model/#what-s-a-restricted-worker-model">{{'common_see_documentation'
| translate}}</a></label>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,17 @@ <h2 class="ui header"><i class="fa fa-book"></i> {{ 'settings_tips' | translate

<i class="fa fa-question-circle"></i> {{'worker_model_help_howtos' | translate}}
<div class="ui list">
<a class="item" target="_blank" href="https://ovh.github.io/cds/docs/tutorials/worker_model-docker/">{{'worker_model_help_howto_link_1'
<a class="item" target="_blank" rel="noopener noreferrer"
href="https://ovh.github.io/cds/docs/tutorials/worker_model-docker/">{{'worker_model_help_howto_link_1'
| translate}}</a>
<a class="item" target="_blank"
<a class="item" target="_blank" rel="noopener noreferrer"
href="https://ovh.github.io/cds/docs/tutorials/worker_model-docker/docker-customized/">{{'worker_model_help_howto_link_2'
| translate}}</a>
<a class="item" target="_blank" href="https://ovh.github.io/cds/docs/tutorials/worker_model-openstack/">{{'worker_model_help_howto_link_3'
<a class="item" target="_blank" rel="noopener noreferrer"
href="https://ovh.github.io/cds/docs/tutorials/worker_model-openstack/">{{'worker_model_help_howto_link_3'
| translate}}</a>
<a class="item" target="_blank" href="https://ovh.github.io/cds/docs/concepts/worker-model/">{{'common_read_more'
<a class="item" target="_blank" rel="noopener noreferrer"
href="https://ovh.github.io/cds/docs/concepts/worker-model/">{{'common_read_more'
| translate}}</a>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ <h2 class="ui header"><i class="fa fa-book"></i> {{ 'settings_tips' | translate
<p>{{'workflow_template_help_line_2' | translate}}</p>

<div class="ui list">
<a class="item" target="_blank" href="https://ovh.github.io/cds/docs/concepts/template">{{'common_read_more'
<a class="item" target="_blank" rel="noopener noreferrer"
href="https://ovh.github.io/cds/docs/concepts/template">{{'common_read_more'
| translate}}</a>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@
<div class="fifteen wide field center ui info message"
*ngIf="!eventIntegrations || eventIntegrations.length === 0">
{{'workflow_no_event_integration' | translate }} <a
href="https://ovh.github.io/cds/docs/concepts/workflow/notifications/"
target="_blank">{{'common_click_more_informations' | translate }}</a>
href="https://ovh.github.io/cds/docs/concepts/workflow/notifications/" target="_blank"
rel="noopener noreferrer">{{'common_click_more_informations' | translate }}</a>
</div>
<div class="one wide field" *ngIf="eventIntegrations && eventIntegrations.length > 0">
<button class="ui blue icon button right floated" [class.loading]="loading"
Expand Down
2 changes: 1 addition & 1 deletion ui/src/app/views/workflow/workflow.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<div class="footer">
<div>
<div class="ui list">
<a class="item" target="_blank"
<a class="item" target="_blank" rel="noopener noreferrer"
href="https://ovh.github.io/cds/docs/tutorials/init_workflow_with_cdsctl/">{{'common_read_more'
| translate}}</a>
</div>
Expand Down