Skip to content

Commit

Permalink
Merge pull request #35 from infonova/develop
Browse files Browse the repository at this point in the history
ready v4.0.5
  • Loading branch information
rwese authored Nov 26, 2019
2 parents 58d1a44 + a0bc8bb commit 73e5ade
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 49 deletions.
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ COMPOSE_ENV_GOLANG_VERSION=1.13
COMPOSE_ENV_NGINX_VERSION=1
COMPOSE_ENV_SELENIUM_VERSION=3.141.59-p14

APP_LIBRARY_PERL_REPO=https://github.com/infonova/infocmdb-lib-perl
APP_LIBRARY_PERL_REPO=https://github.com/infonova/infocmdb-sdk-perl
APP_LIBRARY_GOLANG_REPO=
##
## On some systems in development cases, when using bind-mounts
Expand Down
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ script:
- ./run execute_tests unit --steps
- ./run execute_tests api --steps
- ./run execute_tests apiV2 --steps
- ./run execute_tests functional --steps
- ./run execute_tests acceptance --steps
- travis_retry ./run execute_tests functional --steps
- travis_retry ./run execute_tests acceptance --steps

after_script:
- docker-compose logs
Expand Down
4 changes: 2 additions & 2 deletions _dist/data/languages/en/ci_en.csv
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ configurationItem; "Configuration Item"
ciId; "CI Id"
update; "Update: "
projectOrProjects; "Project(s): "
created; "Created: "
created; "Created"
user; "User: "
relations; "Relations:"
relationAdd; "Add Relations"
Expand Down Expand Up @@ -127,4 +127,4 @@ dictOverrideFile; "There is a file already. Would you like to override
# locking
lockHeld; "CI locked (%s, %s) <a href='%s'>Force edit</a>"
lockExpired; "Form timed out. Reopen the edit form and apply your changes."
lockError; "There was an error during the locking process. Your changes may be lost, please refresh the page when you are ready."
lockError; "There was an error during the locking process. Your changes may be lost, please refresh the page when you are ready."
11 changes: 9 additions & 2 deletions _dist/data/languages/en/query_en.csv
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@ queryId; "ID"
name; "Name"
active; "active"

cqlDefault; "Default Webservices"
cqlIndividual; "Individual Webservices"

edit; "Edit"

noEntriesFound; "No entries found!"
noQueryFound; "No entries found!"

queryCreateSuccess; "Webservice created successfully!"
queryCreateFailed; "Couldn't create Query!"
Expand All @@ -21,20 +23,24 @@ queryDeleteFailed; "Couldn't delete Query!"

queryDetail; "Webservice Detail"

queryQuery; "Query"
queryNameExample; "Example: create_ci_by_ciTypeName"
queryDescriptionExample; "Example: Creates a CI of a specific ci_typeName(argv1)"
queryQueryExample; "Example: insert into ci(ci_type_id) values (select id from ci_type where name = ':argv1:')"
queryQueryHelp; "Placeholders"
testButtonHint; "It is possible to test Select-Querys (without argv) straight away"

queryApiUrl; "Api Url"
queryApiUrlTitle; "Api Url"

queryUpdateSuccess; "Webservice edited successfully!"
queryUpdateFailed; "Couldn't edit Webservice!"

queryEdit; "Edit Webservice"
queryButtonTest; "Test"

testButtonHintExtended; " The URL can be used for the Webservice Call (copy). When using ARGVs the Questionmark "?" must be replaced by the ARGV value. Instead of using "json" it is also possible to use "plain" or "xml". "

testQueryException; "Beim Ausführen der Query ist ein Fehler aufgetreten. Bitte die mitgegebenen Argumente überprüfen."
queryStatus; "Status"
queryDescription; "Description"
queryName; "Name"
Expand All @@ -43,4 +49,5 @@ save; "Save"
cancle; "Cancel"


xmlinfo; If the Query contains a coulumn "ci_id" in the resultset and the methode XML is used all CIs with their CI-Type hierachy are returned in XML Style e.g. select ci_id, max(case cia.attribute_id when (select id from attribute where name = 'ma_lastname') then cia.value_text else null end) as ma_lastname...
xmlinfo; If the Query contains a coulumn "ci_id" in the resultset and the methode XML is used all CIs with their CI-Type hierachy are returned in XML Style e.g. select ci_id, max(case cia.attribute_id when (select id from attribute where name = 'ma_lastname') then cia.value_text else null end) as ma_lastname...
areYouSureDelete; "Do you really want to delete this Project?"
Original file line number Diff line number Diff line change
Expand Up @@ -4,47 +4,17 @@ package main
// DO NOT EDIT - This part will be set automatically
//////////////////////// /DOCHEAD ////////////////////////

import "os"
import "encoding/json"
import "log"
import "fmt"

type WorkflowParams struct {
Apikey string `json:"apikey"`
TriggerType string `json:"triggerType"`
WorkflowItemId int `json:"workflow_item_id"`
WorkflowInstanceId int `json:"workflow_instance_id"`
CiId int `json:"ciid"`
CiAttributeId int `json:"ciAttributeId"`
CiRelationId int `json:"ciRelationId"`
CiProjectId int `json:"ciProjectId"`
FileImportHistoryId int `json:"fileImportHistoryId"`
}
import (
"github.com/infonova/infocmdb-sdk-go/infocmdb"
log "github.com/sirupsen/logrus"
)

func main() {
params, parseErr := parseParams()
if parseErr != nil {
log.Fatal(parseErr)
}

err := Run(params)
if err != nil {
log.Fatal(err)
}
}

func parseParams() (WorkflowParams, error) {
jsonParam := os.Args[1]
var params WorkflowParams
jsonErr := json.Unmarshal([]byte(jsonParam), &params)
if jsonErr != nil {
return params, jsonErr
}

return params, nil
w := infocmdb.NewWorkflow()
w.Run(workflow)
}

func Run(p WorkflowParams) error {
fmt.Printf("%+v", p)
return nil
func workflow(params infocmdb.WorkflowParams, cmdb *infocmdb.Client) (err error) {
log.Info("TODO: Implement me")
return
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
package main

import "testing"

func TestRun(t *testing.T) {
import (
"github.com/infonova/infocmdb-sdk-go/infocmdb"
"testing"
)

func TestPreconditions(t *testing.T) {
w := infocmdb.NewWorkflow()
w.TestPreconditions(t, infocmdb.Preconditions{
//{infocmdb.TYPE_CI_TYPE, "required_ci_typ"},
//{infocmdb.TYPE_ATTRIBUTE, "required_attribute"},
//{infocmdb.TYPE_RELATION, "required_relation"},
})
}

0 comments on commit 73e5ade

Please sign in to comment.