Skip to content

Commit

Permalink
fix: search json
Browse files Browse the repository at this point in the history
Signed-off-by: Yvonnick Esnault <[email protected]>
  • Loading branch information
yesnault committed Aug 11, 2020
1 parent fa566fe commit 0a9550e
Show file tree
Hide file tree
Showing 22 changed files with 34 additions and 43 deletions.
4 changes: 1 addition & 3 deletions docs/layouts/partials/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,8 @@
</script>
<script type="text/javascript" src="{{ "js/script.js" | relURL }}"></script>
<script type="text/javascript" src="{{ "js/lunr.min.js" | relURL}}"></script>
<script type="text/javascript">
var baseurl = "{{.Site.BaseURL}}";
<a id="indexJSON" href="{{ "./index.json" | relURL}}"></a>

</script>
<script type="text/javascript" src="{{ "js/auto-complete.js" | relURL}}"></script>
<script type="text/javascript" src="{{ "js/search.js" | relURL}}"></script>
<script type="text/javascript" src="{{ "js/asciinema-player.js" | relURL}}"></script>
9 changes: 1 addition & 8 deletions docs/static/js/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,8 @@ function endsWith(str, suffix) {

// Initialize lunrjs using our generated index file
function initLunr() {
if (!endsWith(baseurl,"/")){
baseurl = baseurl+'/'
};

// First retrieve the index file
$.getJSON(baseurl +"index.json")
$.getJSON($('#indexJSON').attr('href'))
.done(function(index) {
pagesIndex = index;
// Set up lunrjs by declaring the fields we use
Expand Down Expand Up @@ -74,9 +70,6 @@ $( document ).ready(function() {
item.context = text;

var pathItem = item.uri;
if (pathItem.startsWith(baseurl)) {
pathItem = pathItem.slice(baseurl.length);
}
if (endsWith(pathItem,"/")) {
pathItem = pathItem.substring(0, pathItem.length-1);
};
Expand Down
2 changes: 1 addition & 1 deletion ui/src/app/shared/conditions/conditions.html
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ <h4 class="inline">{{'workflow_node_condition_lua_title' | translate}}</h4>
</div>
<div>
<i class="book icon"></i><a
href="https://ovh.github.io/cds/docs/concepts/workflow/run-conditions" target="_blank"
href="/docs/docs/concepts/workflow/run-conditions" target="_blank"
rel="noopener noreferrer">{{'common_cds_documentation' | translate}}</a>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions ui/src/app/shared/keys/form/keys.form.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<div class="KeyForm">
<div class="ui form">
<div class="ui info message" *ngIf="newKey.type == 'ssh'">
{{ 'keys_ssh_key_help' | translate }} <a href="https://ovh.github.io/cds/docs/components/worker/key/install/">Worker Install Key</a>
{{ 'keys_ssh_key_help' | translate }} <a href="/docs/docs/components/worker/key/install/">Worker Install Key</a>
</div>
<div class="ui info message" *ngIf="newKey.type == 'pgp'">
{{ 'keys_pgp_key_help' | translate }} <a href="https://ovh.github.io/cds/docs/components/worker/key/install/">Worker Install Key</a>
{{ 'keys_pgp_key_help' | translate }} <a href="/docs/docs/components/worker/key/install/">Worker Install Key</a>
</div>
<div class="fields">
<div class="seven wide field">
Expand Down
2 changes: 1 addition & 1 deletion ui/src/app/shared/requirements/form/requirements.form.html
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" rel="noopener noreferrer">
<a href="/docs/docs/concepts/requirement/" target="_blank" rel="noopener noreferrer">
{{ 'requirement_documentation' | translate }} </a>
</p>
<p [innerHtml]="helpType[newRequirement.type]"></p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
<div class="inline fields">
<div class="four wide field">
<label>
<a href="https://ovh.github.io/cds/docs/concepts/workflow/mutex" target="_blank" rel="noopener noreferrer">
<a href="/docs/docs/concepts/workflow/mutex" target="_blank" rel="noopener noreferrer">
{{ 'workflow_root_context_mutex' | translate }}
<i class="external icon"></i>
</a>
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" rel="noopener noreferrer">{{'common_documentation' | translate}}</a>
<i class="book icon"></i><a href="/docs/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" rel="noopener noreferrer">
<a href="/docs/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,7 +2,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"
<i class="book icon"></i><a href="/docs/docs/concepts/workflow/hooks" target="_blank"
rel="noopener noreferrer">{{'common_documentation' | translate}}</a>
</div>
<ng-container *ngIf="!loadingModels">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,15 +92,15 @@ <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" rel="noopener noreferrer"
href="https://ovh.github.io/cds/docs/tutorials/worker_model-docker/">{{'worker_model_help_howto_link_1'
href="/docs/docs/tutorials/worker_model-docker/">{{'worker_model_help_howto_link_1'
| translate}}</a>
<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'
href="/docs/docs/tutorials/worker_model-docker/docker-customized/">{{'worker_model_help_howto_link_2'
| translate}}</a>
<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'
href="/docs/docs/tutorials/worker_model-openstack/">{{'worker_model_help_howto_link_3'
| translate}}</a>
<a class="item" target="_blank" rel="noopener noreferrer" href="https://ovh.github.io/cds/docs/concepts/worker-model/">{{'common_read_more'
<a class="item" target="_blank" rel="noopener noreferrer" href="/docs/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 @@ -23,7 +23,7 @@
<div>
<div class="ui list">
<a class="item" target="_blank" rel="noopener noreferrer"
href="https://ovh.github.io/cds/docs/tutorials/init_workflow_with_cdsctl/">
href="/docs/docs/tutorials/init_workflow_with_cdsctl/">
{{'common_read_more'| translate}}
</a>
</div>
Expand Down
2 changes: 1 addition & 1 deletion ui/src/app/views/navbar/navbar.html
Original file line number Diff line number Diff line change
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="/docs" target="_blank" rel="noopener noreferrer">{{ 'navbar_documentation' | translate }}</a>
<a sm-item href="#" [routerLink]="['docs', '']" 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 @@ -26,7 +26,7 @@
<div>
<div class="ui list">
<a class="item" target="_blank" rel="noopener noreferrer"
href="https://ovh.github.io/cds/docs/tutorials/init_workflow_with_cdsctl/">
href="/docs/docs/tutorials/init_workflow_with_cdsctl/">
{{'common_read_more'| translate}}
</a>
</div>
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" rel="noopener noreferrer">{{'action_help_line_1'
<a class="item" href="/docs/docs/actions/" target="_blank" rel="noopener noreferrer">{{'action_help_line_1'
| translate}}</a>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion ui/src/app/views/settings/cdsctl/cdsctl.html
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ <h1>{{ 'cdsctl_title_5' | translate }}</h1>
<h1>{{ 'cdsctl_title_6' | translate }}</h1>

{{ 'cdsctl_title_6_info_1' | translate }}
(<a href="https://ovh.github.io/cds/docs/concepts/workflow/hooks/git-repo-webhook/">Git Repository
(<a href="/docs/docs/concepts/workflow/hooks/git-repo-webhook/">Git Repository
Webhook</a>).
{{ 'cdsctl_title_6_info_2' | translate }}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
[(ngModel)]="workerModel.restricted" [disabled]="!workerModel.editable">
<label for="restricted">{{'worker_model_restricted_help' | translate}} <a
target="_blank" rel="noopener noreferrer"
href="https://ovh.github.io/cds/docs/concepts/worker-model/#what-s-a-restricted-worker-model">{{'common_see_documentation'
href="/docs/docs/concepts/worker-model/#what-s-a-restricted-worker-model">{{'common_see_documentation'
| translate}}</a></label>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@ <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" rel="noopener noreferrer"
href="https://ovh.github.io/cds/docs/tutorials/worker_model-docker/">{{'worker_model_help_howto_link_1'
href="/docs/docs/tutorials/worker_model-docker/">{{'worker_model_help_howto_link_1'
| translate}}</a>
<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'
href="/docs/docs/tutorials/worker_model-docker/docker-customized/">{{'worker_model_help_howto_link_2'
| translate}}</a>
<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'
href="/docs/docs/tutorials/worker_model-openstack/">{{'worker_model_help_howto_link_3'
| translate}}</a>
<a class="item" target="_blank" rel="noopener noreferrer"
href="https://ovh.github.io/cds/docs/concepts/worker-model/">{{'common_read_more'
href="/docs/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 @@ -5,7 +5,7 @@ <h2 class="ui header"><i class="fa fa-book"></i> {{ 'settings_tips' | translate

<div class="ui list">
<a class="item" target="_blank" rel="noopener noreferrer"
href="https://ovh.github.io/cds/docs/concepts/template">{{'common_read_more'
href="/docs/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,7 +66,7 @@
<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"
href="/docs/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">
Expand Down
4 changes: 2 additions & 2 deletions ui/src/app/views/workflow/workflow.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<div>
<div class="ui list">
<a class="item" target="_blank" rel="noopener noreferrer"
href="https://ovh.github.io/cds/docs/tutorials/init_workflow_with_cdsctl/">{{'common_read_more'
href="/docs/docs/tutorials/init_workflow_with_cdsctl/">{{'common_read_more'
| translate}}</a>
</div>
</div>
Expand Down Expand Up @@ -71,7 +71,7 @@
<p>{{'workflow_template_help_line_2' | translate}}</p>
<div class="ui list">
<a class="item" target="_blank" rel="noopener noreferrer"
href="https://ovh.github.io/cds/docs/concepts/template">{{'common_read_more'
href="/docs/docs/concepts/template">{{'common_read_more'
| translate}}</a>
</div>
<p>{{'workflow_template_help_line_3' | translate}}</p>
Expand Down
6 changes: 3 additions & 3 deletions ui/src/assets/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -588,10 +588,10 @@
"requirement_type": "Type",
"requirement_value": "Value",
"requirement_help_binary": "Requirement type 'binary': CDS will choose a worker with this binary in his path.",
"requirement_help_model": "Requirement type 'model': <ul><li>If you select a <a target=\"_blank\" href=\"https://ovh.github.io/cds/docs/concepts/worker-model/\">Worker Model</a>, CDS will launch your job inside it</li><li><a target=\"_blank\" href=\"https://ovh.github.io/cds/docs/tutorials/worker_model-docker/\">Create a worker model based on a docker image from Docker Hub</a></li><li><a target=\"_blank\" href=\"https://ovh.github.io/cds/docs/tutorials/worker_model-docker/docker-customized/\">Create a worker model with your own image</a></li><li><a target=\"_blank\" href=\"https://ovh.github.io/cds/docs/tutorials/worker_model-openstack/\">Create a worker model based on a Openstack image</a></li><li><a target=\"_blank\" href=\"https://ovh.github.io/cds/docs/concepts/worker-model/\">Read more</a></li></ul>",
"requirement_help_memory": "Requirement type 'memory': <ul><li>If you want 4Go, enter value in Mo: <b>4096</b></li><li>Memory requirement is availabe only on <a href=\"https://ovh.github.io/cds/docs/concepts/worker-model/\">Worker Model</a> type Docker</li></ul>",
"requirement_help_model": "Requirement type 'model': <ul><li>If you select a <a target=\"_blank\" href=\"/docs/docs/concepts/worker-model/\">Worker Model</a>, CDS will launch your job inside it</li><li><a target=\"_blank\" href=\"/docs/docs/tutorials/worker_model-docker/\">Create a worker model based on a docker image from Docker Hub</a></li><li><a target=\"_blank\" href=\"/docs/docs/tutorials/worker_model-docker/docker-customized/\">Create a worker model with your own image</a></li><li><a target=\"_blank\" href=\"/docs/docs/tutorials/worker_model-openstack/\">Create a worker model based on a Openstack image</a></li><li><a target=\"_blank\" href=\"/docs/docs/concepts/worker-model/\">Read more</a></li></ul>",
"requirement_help_memory": "Requirement type 'memory': <ul><li>If you want 4Go, enter value in Mo: <b>4096</b></li><li>Memory requirement is availabe only on <a href=\"/docs/docs/concepts/worker-model/\">Worker Model</a> type Docker</li></ul>",
"requirement_help_hostname": "Requirement type 'hostname': <ul><li>This Job will be take by a worker hosted on this host</li></ul>",
"requirement_help_service": "Requirement type 'service': <ul><li><a target=\"_blank\" href=\"https://ovh.github.io/cds/docs/concepts/requirement/\">Note on Service Requirement</a></li><li><a target=\"_blank\" href=\"https://ovh.github.io/cds/docs/tutorials/service-requirement-nginx/\">Tutorial - Service Link Requirement Nginx Tutorial</a></li><li><a target=\"_blank\" href=\"https://ovh.github.io/cds/docs/tutorials/service-requirement-pg/\">Service Link Requirement PostgreSQL</a></li><li>You can force memory on service, example: 'CDS_SERVICE_MEMORY=4096'</li></ul>",
"requirement_help_service": "Requirement type 'service': <ul><li><a target=\"_blank\" href=\"/docs/docs/concepts/requirement/\">Note on Service Requirement</a></li><li><a target=\"_blank\" href=\"/docs/docs/tutorials/service-requirement-nginx/\">Tutorial - Service Link Requirement Nginx Tutorial</a></li><li><a target=\"_blank\" href=\"/docs/docs/tutorials/service-requirement-pg/\">Service Link Requirement PostgreSQL</a></li><li>You can force memory on service, example: 'CDS_SERVICE_MEMORY=4096'</li></ul>",
"requirement_help_volume": "Requirement type 'volume': <ul><li>CDS will mount a volume inside you job</li><li>Available only with Worker Model Type 'Docker'</li><li>You have to launch a Hatchery Swarm yourself for this feature</li><li>Format :--mount syntax, see <a target=\"_blank\" href='https://docs.docker.com/engine/admin/volumes/bind-mounts/'>Docker Documentation</a></li><li>Example: type=bind,source=/hostDir/sourceDir,target=/dirInJob</li></ul>",
"requirement_help_os-architecture": "Requirement type 'os-architecture': CDS will choose a worker with this OS and architecture",
"requirement_hostname_error": "Hostname is mandatory and must respect the alphanumeric pattern ([a-zA-Z0-9]*)",
Expand Down
Loading

0 comments on commit 0a9550e

Please sign in to comment.