Skip to content

Commit

Permalink
Add tooltip to explain versioning
Browse files Browse the repository at this point in the history
  • Loading branch information
lharzenetter committed Apr 25, 2018
1 parent 837d260 commit e415d55
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 4 deletions.
Expand Up @@ -48,7 +48,17 @@
</div>
</div>
<br>
<label for="newComponentVersion">Component version</label>
<label for="newComponentVersion">
Component version
</label>
<ng-template #versionExplanation>
The component version specifies the components' external version. For example, Tomcat in version 8 has a
component version 8.<br>
The management version (winery & wip) is automatically set to 1. For example the final id for Tomcat with component
version 8 is: <code style="color: black">Tomcat_8-w1-wip1</code>.<br>
The final name is displayed below in the 'Final name' field.
</ng-template>
<i class="fa fa-question-circle" [tooltip]="versionExplanation" containerClass="versionTooltip"></i>
<input type="text"
id="newComponentVersion"
name="newComponentVersion"
Expand All @@ -71,7 +81,7 @@
</div>
<br>
<label for="finalName">Final name</label>
<input class="form-control" id="finalName" [value]="newComponentFinalName" readonly>
<code class="form-control" id="finalName">{{ newComponentFinalName }}</code>
</div>
<br>
<div class="form-group" *ngIf="types">
Expand Down
Expand Up @@ -22,7 +22,7 @@ import { AbstractControl, NgForm, ValidatorFn } from '@angular/forms';
import { Utils } from '../wineryUtils/utils';
import { isNullOrUndefined } from 'util';
import { SectionData } from '../section/sectionData';
import { ModalDirective } from 'ngx-bootstrap';
import { ModalDirective, TooltipConfig } from 'ngx-bootstrap';
import { WineryNamespaceSelectorComponent } from '../wineryNamespaceSelector/wineryNamespaceSelector.component';
import { InheritanceService } from '../instance/sharedComponents/inheritance/inheritance.service';
import { WineryVersion } from '../wineryInterfaces/wineryVersion';
Expand All @@ -37,6 +37,12 @@ import { catchError, retry } from 'rxjs/operators';
providers: [
SectionService,
InheritanceService,
{
provide: TooltipConfig,
useFactory: () => {
return Object.assign(new TooltipConfig(), { placement: 'right' });
}
}
]
})

Expand Down
Expand Up @@ -23,7 +23,7 @@ import { WineryDuplicateValidatorModule } from '../wineryValidators/wineryDuplic
import { RouterModule } from '@angular/router';
import { WineryLoaderModule } from '../wineryLoader/wineryLoader.module';
import { SelectModule } from 'ng2-select';
import { AlertModule } from 'ngx-bootstrap';
import { AlertModule, TooltipModule } from 'ngx-bootstrap';

@NgModule({
imports: [
Expand All @@ -32,6 +32,7 @@ import { AlertModule } from 'ngx-bootstrap';
RouterModule,
SelectModule,
AlertModule.forRoot(),
TooltipModule,
WineryModalModule,
WineryLoaderModule,
WineryNotificationModule,
Expand Down

0 comments on commit e415d55

Please sign in to comment.